function NikeCommerce(){var self=this;var title=document.title.replace(/#.*/,"");this.init=function(){if(JQ("div#NIKE_COMMERCE").length==0){return false}if(self.commerce_mode==0){return}self.splitParams();self.setFQDN();if(!self.cookie_check){return}self.handlePage();setInterval(function(){self.hashListener()},50)};this.preInit=function(){self.params={};self.setConfigBase();self.buildParamLookupTable();self.loadParameters();self.getUnrelatedParameters();self.mergeConfigs();if(typeof self.params.page!="undefined"){page_tracker_obj.do_not_call=true}self.cookie_check=self.handleLocale();self.commerce_mode=0;self.commerce_mode=self.determineCommerceRegion(self.params.country,self.params.lang_locale);self.commerce_disabled=false;if(self.commerce_mode==2||self.commerce_mode==3){self.config.siteId=self.config.siteId_EMEA}if(self.commerce_mode==2||self.commerce_mode==3){self.config.membershipId=self.config.membershipId_EMEA}if(self.commerce_mode==0||self.commerce_mode=="0"){JQ("#nav div[commerce_dependant='true']").remove();JQ("#nav div[id_dependant='true']").remove()}else{if(self.commerce_mode==3||self.commerce_mode=="3"){JQ("#nav div[commerce_dependant='true']").remove()}}if(!self.cookie_check){return}self.setRegionalParameters()};this.mergeConfigs=function(){var config={title:"Nike Commerce",siteId:"28",site:"nikestore",userType:"defaultUser",languageTunnelURL:"#LANGUAGE_TUNNEL",configBaseURL:"/nikeos/site/nikeprototype/global/xml/commerce/",localConfigPath:null,US_Catalog:"101101",EMEA_Catalog:"102001",commerceNavTabs:["shop"],categoryHeadersEnabled:"false",membershipId:0,commerceBaseURL:"commerce",registerPath:escape("nikeos/p/nikewomen/${LANG_LOCALE}/profile?page=register&fields=&continueURL=profile%3Fpage%3Dpersonal_info"),hash:false,idEmailPrivacyPath:escape("/renov/nikestore/us/v1/us/en/info/privacy.jsp?item=terms"),idEmailFeedbackPath:escape("/renov/nikestore/us/v1/us/en/info/help.jsp?item=contact"),siteFolder:location.href.split("/")[5]};if(typeof NIKE_COMMERCE_CONFIG!="undefined"&&typeof NIKE_COMMERCE_CONFIG.configBaseURL!="undefined"){config.configBaseURL=NIKE_COMMERCE_CONFIG.configBaseURL}config.pdp={configPath:config.configBaseURL+"inlinepdp_config.xml"};var _location=document.location.toString();config.nikeid={configPath:config.configBaseURL+"nikeid_config.xml",emailPath:config.configBaseURL+"emailForm_config.xml",siteURL:escape(document.location),itemReturnURL:escape(document.location),idEmailMyDesignPath:escape(document.location.toString().substring(document.location.toString().indexOf("/nikeos/"),document.location.toString().indexOf("?"))+"?p=PDPiD&path="+self.params.pathName+"&metricsId=${metricId}"),designURL:escape(document.location.toString().substring(0,document.location.toString().indexOf("?"))+document.location.toString().substring(document.location.toString().lastIndexOf("?"))+"&metricsId={designId}")};config.pwp={configPath:config.configBaseURL+"wall_config.xml",inStockOnly:"true",numItemsPerPage:"48",hiddenFacets:""};config.minipdp={configPath:config.configBaseURL+"minipdp_config_nikestore.xml",productGroupId:"110787",productId:"153142"};config.minicart={configPath:config.configBaseURL+"minicart_config.xml",loginPath:config.configBaseURL+"login_config.xml",storeReturnURL:escape(document.location)};config.mylocker={configPath:config.configBaseURL+"myLocker_config.xml",loginPath:config.configBaseURL+"login_config.xml",emailPath:config.configBaseURL+"emailForm_config.xml",storeReturnURL:escape(document.location)};config.orderstatus={configPath:config.configBaseURL+"orderStatus_config.xml",loginPath:config.configBaseURL+"login_config.xml",emailPath:config.configBaseURL+"emailForm_config.xml",storeReturnURL:escape(document.location)};config.collection={configPath:config.configBaseURL+"collection_config.xml"};config.designsearch={configPath:config.configBaseURL+"designsearch_config.xml",loginPath:config.configBaseURL+"login_config.xml"};if(typeof NIKE_COMMERCE_CONFIG=="undefined"){self.config=config}else{self.config=JQ.extend(true,{},config,NIKE_COMMERCE_CONFIG)}if(JQ.browser.msie&&JQ.browser.version<7){self.config.hash=false}if(location.href.indexOf("nke6")!=-1&&location.href.indexOf("en_EMEA")!=-1){self.config.registerPath="nikeos/p/nke6/en_EMEA/profile?page=register&fields=&continueURL=profile%3Fpage%3Dpersonal_info"}};this.getLocaleData=function(){return{locale:self.params.lang_locale,country:self.params.country,lang_locale:JQ.cookie("NIKE_LANG_LOCALE"),lang_country:JQ.cookie("NIKE_COUNTRY")}};this.determineCommerceRegion=function(country,lang_locale){if(typeof self.config.DETERMINE_COMMERCE_REGION=="undefined"||typeof self.config.DETERMINE_COMMERCE_REGION[lang_locale]=="undefined"||typeof self.config.DETERMINE_COMMERCE_REGION[lang_locale][country]=="undefined"){return 0}var mode=self.config.DETERMINE_COMMERCE_REGION[lang_locale][country];return parseInt(mode,10)};this.setRegionalParameters=function(){if(self.commerce_mode==1){self.params.catalogs=self.config.US_Catalog}if(self.commerce_mode==2||self.commerce_mode==3){self.params.catalogs=self.config.EMEA_Catalog}};this.splitParams=function(){var mandatoryParams=["lang_locale","country"],param,paramLookup;self.mandatoryParams={};for(var i=0;i<mandatoryParams.length;i++){param=mandatoryParams[i],paramLookup=self.paramLookup(param);self.mandatoryParams[paramLookup]=self.params[param]}var mandatoryFlashParams=["lang_locale","country","catalogs"];self.mandatoryFlashParams={};for(var i=0;i<mandatoryFlashParams.length;i++){param=mandatoryFlashParams[i];self.mandatoryFlashParams[param]=self.params[param]}if(typeof tracking!="undefined"&&typeof nav_tracker_obj!="undefined"){if(tracker_obj&&tracker_obj.prop50){if(tracker_obj.prop50=="LOGGED_IN_ID"||tracker_obj.prop50==null){nav_tracker_obj.prop50=(tracking.logged_in_id!="")?tracking.logged_in_id:""}}if(tracker_obj&&tracker_obj.eVar4){nav_tracker_obj.eVar4=tracker_obj.eVar4}var qsMap=["sitesrc","promoID","cp"],i=qsMap.length;if(!nav_tracker_obj.setup){nav_tracker_obj.setup={}}for(;i--;){var qsItem=qsMap[i],qsVal=JQ.getURLParam(qsItem);if(!nav_tracker_obj.setup[qsItem]){nav_tracker_obj.setup[qsItem]=qsVal}}self.mandatoryFlashParams.trackingData=tracking.flash(nav_tracker_obj)}};this.hashListener=function(){if(JQ.browser.msie){document.title=title}if(!self.config.hash){return}if(typeof self.hash==="undefined"){self.hash=location.hash;return}if(location.hash!=self.hash){if(true||getParam("p","hash")==self.params.page){self.params={};self.loadParameters();switch(self.params.page){case"TEE":case"PWP":var data={catalogs:self.params.catalogs,hiddenFacets:self.params.hiddenFacets,id:"productWallChange",pageNumber:self.params.pageNumber,searchList:self.params.searchList,selectedFacets:self.params.selectedFacets,sortOrder:self.params.sortOrder,title:((self.params.title)?unescape(self.params.title):self.config.title)};break;case"DS":var data={catalogs:self.params.catalogs,id:"dsWallChange",pageNumber:self.params.pageNumber,searchList:self.params.searchList,selectedFacets:self.params.selectedFacets,sortOrder:self.params.sortOrder,inStockOnly:self.params.inStockOnly,primaryHex:self.params.primaryHex,primaryRange:self.params.primaryRange,secondaryHex:self.params.secondaryHex,secondaryRange:self.params.secondaryRange,range:self.params.range};break}if(false&&data){for(var p in data){if(typeof data[p]=="string"){data[p]=data[p].replace(/%2B/g,"+")}}var e={};e.type="setState";e.data=data;EventBridge.dispatchEvent(e);scroll(0,0)}else{self.rebuild()}}else{self.rebuild()}self.hash=location.hash}};this.rebuild=function(){self.destruct();self.preInit();self.init()};this.destruct=function(){if(self.page){self.page.destruct();delete self.page}for(var p in self){if(typeof self[p]!="function"&&p!="miniCart"){delete self[p]}}};this.handleLocale=function(){var overwriteLocaleCookies=false;if(!self.params.lang_locale||!self.params.country||overwriteLocaleCookies){if(!JQ.cookie("NIKE_COMMERCE_LANG_LOCALE")||!JQ.cookie("NIKE_COMMERCE_COUNTRY")||overwriteLocaleCookies){var lang_locale=location.href.substring(location.href.indexOf("/nikeos/p/")+10,location.href.length).split("/")[1];if(typeof site_data!="undefined"&&typeof site_data.settings!="undefined"){lang_locale=site_data.settings.platypus_lang_locale}if(lang_locale=="blogs"&&(typeof site_data=="undefined"||typeof site_data.settings!="undefined")){lang_locale="en_US"}var ct=lang_locale.split("_")[1];var k;var cr=self.config.DETERMINE_COMMERCE_REGION;if(typeof cr[lang_locale]!="undefined"){self.params.lang_locale=lang_locale;if(typeof cr[lang_locale][ct]!="undefined"){self.params.country=ct}}if(!self.params.lang_locale||!self.params.country){if(typeof site_data=="undefined"||typeof site_data.settings=="undefined"){location.href=NIKEOS.BASE[NIKEOS.site_mode]+self.config.languageTunnelURL}return false}}else{self.params.lang_locale=JQ.cookie("NIKE_COMMERCE_LANG_LOCALE");self.params.country=JQ.cookie("NIKE_COMMERCE_COUNTRY");if(self.params.page){if(location.href.indexOf("#")<0){location.href=location.href+"#?ll="+self.params.lang_locale+"&ct="+self.params.country}else{location.href=location.href+"&ll="+self.params.lang_locale+"&ct="+self.params.country}}}}if(!JQ.cookie("NIKE_COMMERCE_LANG_LOCALE")||!JQ.cookie("NIKE_COMMERCE_COUNTRY")){if(!self.params.lang_locale||!self.params.country){return false}JQ.cookie("NIKE_COMMERCE_LANG_LOCALE",self.params.lang_locale,{path:"/",domain:self.getDomain()});JQ.cookie("NIKE_COMMERCE_COUNTRY",self.params.country,{path:"/",domain:self.getDomain()})}return true};this.getDomain=function(){var d="";if(location.href.toString().indexOf("nike.com")>=0){d="nike.com"}else{if(location.href.toString().indexOf("rga.com")>=0){d="rga.com"}}return d};this.loadParameters=function(){var temp;for(var p in self.paramLookupTable){temp=getParam(p,"hash")||getParam(p,"query_string")||false;if(temp){self.params[self.paramLookup(p)]=temp.replace(/\^/g,"%2B")}}};this.paramLookup=function(param){if(self.paramLookupTable[param]){return self.paramLookupTable[param]}return false};this.buildParamLookupTable=function(){var params={};params.ll="lang_locale";params.ct="country";params.c="catalogs";params.p="page";params.pid="productId";params.cid="catalogId";params.pgid="productGroupId";params.pn="pageNumber";params.so="sortOrder";params.hf="hiddenFacets";params.sl="searchList";params.sf="selectedFacets";params.t="title";params.ipp="numItemsPerPage";params.fe="facetEnabled";params.pbid="prebuildId";params.piid="productInstanceId";params.path="pathName";params.metricsId="metricsId";params.mid="mid";params.bv="bv";params.ph="primaryHex";params.sh="secondaryHex";params.pr="primaryRange";params.sr="secondaryRange";params.r="range";self.urlParams=new Array();for(var i in params){self.urlParams[self.urlParams.length]=i}for(var p in params){params[params[p]]=p}self.paramLookupTable=params};this.updateHashParams=function(data){var params={};for(var p in data){if(self.paramLookupTable[p]&&typeof data[p]!="undefined"){params[self.paramLookup(p)]=""+(p=="title"||p=="searchList"?encodeURIComponent(data[p]):data[p])}}params.ll=self.params.lang_locale;params.ct=self.params.country;if(self.config.hash){params.p=self.params.page;var str=self.stringify(params);if(JQ.browser.msie){if(window.NIKE_COMMERCE_LAST_HASH&&window.NIKE_COMMERCE_LAST_HASH==str){return}window.NIKE_COMMERCE_LAST_HASH=str}if(typeof SWFAddress=="undefined"){JQ.historyLoad(str)}else{SWFAddress.setValue(str)}}else{params.p=self.params.page;JQ("div#NIKE_COMMERCE").css("visibility","hidden");var str=self.stringify(params)+"&"+self.unrelatedParamString;location.href=str}};this.setFQDN=function(){switch(NIKEOS.site_mode){case"dev":self.params.FQDN="http://nike-dev4.ny.rga.com";break;case"staging":if(typeof site_data!="undefined"){self.params.FQDN=site_data.base_modules_url;break}else{self.params.FQDN="http://qa-modules.nike.com";break}case"prod":self.params.FQDN="http://modules.nike.com";break}if(typeof site_data=="object"&&typeof site_data.settings=="object"&&site_data.settings.base_modules_url){self.params.FQDN=site_data.settings.base_modules_url}};this.getFQDN=function(){return self.params.FQDN};this.setConfigBase=function(){if(location.host.match(/ecn\d*-(www|nikeplus)/i)){self.params.configBase="http://"+location.host.match(/ecn\d*-(www|nikeplus)/i)[0]+".nike.com"}else{if(location.host.match(/nike\.com/i)){self.params.configBase="http://www.nike.com"}else{if(location.host.match(/nike-dev3/i)){self.params.configBase="http://nike-dev3.ny.rga.com"}else{self.params.configBase="http://nike-dev4.ny.rga.com"}}}};this.getConfigBase=function(){return self.params.configBase};this.buildPage=function(){switch(self.params.page){case"PWP":self.page=new NikePWPPage(self);break;case"PDP":self.page=new NikePDPPage(self);break;case"PDPiD":self.page=new NikePDPiDPage(self);break;case"ML":self.page=new NikeMyLockerPage(self);break;case"MPDP":self.page=new NikeMiniPDPPage(self);break;case"OS":self.page=new NikeOrderStatusPage(self);break;case"SR":self.page=new NikeSubmitReviewPage(self);break;case"C":self.page=new NikeCollectionPage(self);break;case"TEE":self.page=new NikeTeeWall(self);break;case"DS":self.page=new DesignSearchWall(self);break}};this.handlePage=function(){self.buildMiniCart()};this.buildMiniCart=function(){if(typeof self.miniCart=="undefined"){self.miniCart=new NikeMiniCart(self)}else{self.buildPage()}};this.gotoPage=function(page,page_config){var config=JQ.extend(true,{},self.mandatoryParams,page_config,{p:page});var pid=self.getPID(config);if(self.config.hash){if(self.params.page&&self.params.page!="undefined"){if(JQ.browser.msie){if(window.NIKE_COMMERCE_LAST_HASH&&window.NIKE_COMMERCE_LAST_HASH==self.stringify(config)){return}window.NIKE_COMMERCE_LAST_HASH=self.stringify(config)}if(typeof SWFAddress=="undefined"){JQ.historyLoad(self.stringify(config))}else{SWFAddress.setValue(self.stringify(config))}}else{location.href=location.href.split("/").slice(0,7).join("/")+"/"+self.config.commerceBaseURL+((!!self.unrelatedParamString)?"?"+self.unrelatedParamString:"")+"#"+self.stringify(config)}}else{JQ("div#NIKE_COMMERCE").css("visibility","hidden");if(self.params.page&&self.params.page!="undefined"){location.href=self.stringify(config)+"&"+self.unrelatedParamString}else{location.href=location.href.split("/").slice(0,7).join("/")+"/"+self.config.commerceBaseURL+self.stringify(config)+"&"+self.unrelatedParamString}}};this.stringify=function(config){var str="",seperate="?";for(var p in config){if(typeof config[p]!="undefined"){str+=seperate+p+"="+config[p].replace(/\+/g,"^");seperate="&"}}return str};this.getPID=function(config){var str="";for(var p in config){if(typeof config[p]!="undefined"){if(p=="pid"){str=config[p].replace(/\+/g,"^");break}}}return str};this.getReviewsEnabled=function(){var ret;switch(self.params.lang_locale){case"en_US":case"en_GB":ret=true;break;default:ret=false;break}return ret};this.getUnrelatedParameters=function(){self.unrelatedParamString="";var urlArray=location.search.substring(1).split(/[&]/);for(var i=0;i<urlArray.length;i++){var temp=urlArray[i].split(/[=]/);if(!self.paramCheck(temp[0])){self.unrelatedParamString+="&"+temp.join("=")}}self.unrelatedParamString=self.unrelatedParamString.substring(1)};this.paramCheck=function(x){for(var i in self.urlParams){if(x==self.urlParams[i]){return true}}return false};self.preInit();JQ(self.init);if(self.config.hash&&typeof JQ.historyInit!="undefined"&&typeof SWFAddress=="undefined"){window.onload=function(){JQ.historyInit(function(){})}}}function NikeCommercePage(parent,extended){var self=this;this.init=function(){if(extended.constructor!=NikeMiniCart){self.handleContainer()}self.eventsToListenFor=[]};this.handleContainer=function(){self.container=JQ("div#NIKE_COMMERCE>div#COMMERCE_MODULE")};this.buildListener=function(eventsToListenFor,listenerFn){self.listener={};self.listener.listenerFunction=listenerFn;EventBridge.setChannel("external");for(var i=0;i<eventsToListenFor.length;i++){EventBridge.addListener(eventsToListenFor[i],self.listener,"listenerFunction")}};this.addSWF=function(module_config,container){for(var p in module_config.variables){if(parent.params[p]){if(p=="hiddenFacets"&&module_config.variables[p].length>0){module_config.variables[p]+="%2B"+parent.params[p]}else{module_config.variables[p]=(p=="title"?encodeURIComponent(parent.params[p]):parent.params[p])}}else{if(module_config.variables[p]==null){delete module_config.variables[p]}}}var config=JQ.extend(true,{},{variables:parent.mandatoryFlashParams},module_config);var flashModule=new SWFObject(config.swf,config.id,config.width,config.height,"9.0.28","#ffffff");flashModule.addParam("scale","noscale");flashModule.addParam("allowScriptAccess","always");flashModule.addParam("allowFullScreen","true");flashModule.addParam("wmode",((config.params&&config.params.wmode)?config.params.wmode:"transparent"));flashModule.addParam("salign",((config.params&&config.params.salign)?config.params.salign:"tl"));flashModule.addParam("quality","high");flashModule.addVariable("FQDN",parent.getFQDN());flashModule.addVariable("site",parent.config.site);flashModule.addVariable("membershipId",parent.config.membershipId);for(var p in config.variables){if(p=="searchList"&&typeof config.variables[p]!="undefined"&&config.escapeSearchList){flashModule.addVariable(p,encodeURIComponent(config.variables[p]))}else{flashModule.addVariable(p,config.variables[p])}}setTimeout(function(){var write=flashModule.write(container)},0)};this.destruct=function(){for(var i=0;i<self.eventsToListenFor.length;i++){EventBridge.removeListener(eventsToListenFor[i],self.listener,"listenerFunction")}self.container.empty()};self.init()}function extendNikeCommercePage(page,parent){var temp=new NikeCommercePage(parent,page);for(var p in temp){if(!page[p]){page[p]=temp[p]}}delete temp}function NikePWPPage(parent,config){var PWPConfig=JQ.extend(true,{id:"pwp",width:"910",height:"520",swf:parent.getFQDN()+"/nikestore/modules/web/productWall.swf",variables:{hiddenFacets:parent.config.pwp.hiddenFacets,title:parent.config.title,inStockOnly:parent.config.pwp.inStockOnly,swatchEnabled:"true",facetEnabled:"true",numItemsPerPage:parent.config.pwp.numItemsPerPage,pageNumber:"1",userType:parent.config.userType,configPath:parent.config.pwp.configPath,alertEnabled:"false",categoryHeadersEnabled:parent.config.categoryHeadersEnabled,sortOrder:null,selectedFacets:null,searchList:null}},config);var self=this;this.init=function(){extendNikeCommercePage(self,parent);self.eventsToListenFor=["wallEventType","sfEventType","minipdpEventType"];self.buildListener(self.eventsToListenFor,self.eventListener);if(parent.commerce_mode==3){if(PWPConfig.variables.hiddenFacets.length>0){PWPConfig.variables.hiddenFacets+="%2B4294966765"}else{PWPConfig.variables.hiddenFacets+="4294966765"}}self.container.append('<div id="PWP_Module" ></div>');self.addSWF(PWPConfig,"PWP_Module")};this.eventListener=function(evt){var id=evt.data.id;switch(id){case"heightChange":self.container.find("div#PWP_Module embed, #PWP_Module object").attr("height",evt.data.height);break;case"productClick":parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;case"productWallChange":parent.updateHashParams(evt.data);break;case"customizeWithId":parent.gotoPage("PDPiD",{pid:evt.data.nikeId.productId,cid:evt.data.nikeId.catalogId,pbid:evt.data.nikeId.prebuildId,path:evt.data.nikeId.pathName,piid:evt.data.nikeId.productInstanceId,bv:evt.data.nikeId.BUILDER_VERSION});break;case"setLocation":var xArray=evt.data.location.split(/[,\/]/g);if(xArray[1]=="pdp"){var paramMap={};for(var i=0;i<xArray.length;i++){if(xArray[i].split("-").length>1){paramMap[xArray[i].split("-")[0]]=xArray[i].split("-").slice(1).join("-").replace(/[_]/g," ")}}if(paramMap.pn){paramMap.path=paramMap.pn}parent.gotoPage("PDPiD",paramMap)}else{var paramMap={f:"",hf:"",t:""};for(var i=0;i<xArray.length;i++){if(xArray[i].split("-").length>1){paramMap[xArray[i].split("-")[0]]=xArray[i].split("-").slice(1).join("-").replace(/[_]/g," ")}}parent.gotoPage(parent.params.page,{sf:paramMap.f.replace(/[+]/g,"^"),t:paramMap.t,hf:paramMap.hf.replace(/[+]/g,"^")})}break;case"relatedTechnology":parent.gotoPage("PDP",{pgid:evt.data.productGroupId,pid:evt.data.productId,c:evt.data.catalogId});break;case"loginRequired":if(evt.type=="minipdpEventType"){location.href="/nikeos/p/"+parent.config.siteFolder+"/"+location.href.split("/")[6]+"/profile?"+parent.unrelatedParamString+"&page=login&fields=screenname&continueURL="+escape(document.location)}break;case"viewDetails":parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;case"goToLocker":parent.gotoPage("ML");break;case"goToCheckout":document.location.href=evt.data.url+"&site="+parent.config.site+"&country="+parent.mandatoryParams.ct+"&lang_locale="+parent.mandatoryParams.ll+"&returnURL="+escape(location.href+"&"+parent.unrelatedParamString);break;default:if(self[id]){self[id](evt)}else{console.log(evt)}}};self.init()}function NikeTeeWall(parent){var page=new NikePWPPage(parent,{id:"tee_wall",height:948,swf:parent.getFQDN()+"/nikestore/modules/web/merchandisingwall/merchandisingWall.swf",variables:{configPath:"/sportswear/global/xml/merchandisingwall_config.xml",numItemsPerPage:17,localConfigPath:parent.config.localConfigPath}});return page}function NikePDPPage(parent){var self=this;var PDPConfig;this.init=function(){extendNikeCommercePage(self,parent);self.eventsToListenFor=["pdpEventType","minipdpEventType","setLocation","loginsuccess"];self.buildListener(self.eventsToListenFor,self.eventListener);PDPConfig={id:"pdp",width:"910",height:"520",swf:parent.getFQDN()+"/nikestore/modules/web/pdp.swf",variables:{container:"inline",userType:parent.config.userType,configPath:parent.config.pdp.configPath,alertEnabled:"false",siteId:parent.config.siteId,descriptionPanelEnabled:"true",productGroupId:parent.params.productGroupId,productId:parent.params.productId,emailPath:parent.config.mylocker.emailPath,catalogId:parent.params.catalogId,SOMETHINGDUMG:"blaargaklsjdakf;kj",wishlistEnabled:"true"}};self.container.append('<div id="PDP_Module"></div>');self.addSWF(PDPConfig,"PDP_Module")};this.eventListener=function(evt){if(evt.type=="loginsuccess"){if(nikeplus&&nikeplus.user&&nikeplus.user.reload){nikeplus.user.reload(function(){if(nikeplus.nav&&nikeplus.nav.rebuild){nikeplus.nav.rebuild()}})}}else{switch(evt.data.id){case"aspectChange":parent.gotoPage("PDP",{pid:evt.data.productId,pgid:evt.data.productGroupId,cid:evt.data.catalogId});break;case"pdpHeightChange":self.container.find("div#PDP_Module embed, div#PDP_Module object").css("height",evt.data.height);break;case"swatchChange":if(evt.type=="pdpEventType"){parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId})}break;case"loadProductWall":parent.gotoPage("PWP",{sf:evt.data.selectedFacets,c:evt.data.catalogs});break;case"relatedTechnology":parent.gotoPage("PDP",{pgid:evt.data.productGroupId,pid:evt.data.productId,c:evt.data.catalogId});break;case"customizeWithId":var cwidObj={c:evt.data.nikeId.catalogId,path:evt.data.nikeId.pathName,pbid:evt.data.nikeId.prebuildId,pid:evt.data.nikeId.productId,piid:evt.data.nikeId.productInstanceId,bv:evt.data.nikeId.BUILDER_VERSION};if(evt.data.nikeId.metricId){cwidObj.metricsId=evt.data.nikeId.metricId}parent.gotoPage("PDPiD",cwidObj);break;case"loginRequired":if(evt.type=="minipdpEventType"){location.href="/nikeos/p/"+parent.config.siteFolder+"/"+location.href.split("/")[6]+"/profile?"+parent.unrelatedParamString+"&page=login&fields=screenname&continueURL="+escape(document.location)}break;case"viewDetails":parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;case"goToLocker":parent.gotoPage("ML");break;case"goToCheckout":document.location.href=evt.data.url+"&site="+parent.config.site+"&country="+parent.mandatoryParams.ct+"&lang_locale="+parent.mandatoryParams.ll+"&returnURL="+escape(location.href+"&"+parent.unrelatedParamString);break;case"submitAReview":parent.gotoPage("SR",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;case"setLocation":location.href="http://store.nike.com/index.jsp?country="+parent.mandatoryParams.ct+"&lang_locale="+parent.mandatoryParams.ll+"&ref="+escape(location.href)+"#l="+evt.data.hash;break;default:console.log("unhandled event: ");console.log(evt);break}}};self.init()}function NikeMiniPDPPage(parent){var self=this;this.init=function(){extendNikeCommercePage(self,parent);self.eventsToListenFor=["pdpEventType","minipdpEventType"];self.buildListener(self.eventsToListenFor,self.eventListener);var PDPConfig={id:"minipdp",width:"320",height:"240",swf:parent.getFQDN()+"/nikestore/modules/web/miniPDP.swf",variables:{container:"inline",userType:parent.config.userType,configPath:parent.config.minipdp.configPath,alertEnabled:"false",siteId:parent.config.siteId,productGroupId:parent.config.minipdp.productGroupId,productId:parent.config.minipdp.productId,catalogId:parent.config.catalogId,closeEnabled:"false",detailsEnabled:"true",wishlistEnabled:"true"}};self.addSWF(PDPConfig,"MiniPDP_Module")};this.eventListener=function(evt){switch(evt.data.id){case"viewDetails":parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;case"customizeWithId":parent.gotoPage("PDPiD",{c:evt.data.nikeId.catalogId,path:evt.data.nikeId.pathName,pbid:evt.data.nikeId.prebuildId,pid:evt.data.nikeId.productId,piid:evt.data.nikeId.productInstanceId,bv:evt.data.nikeId.BUILDER_VERSION});break;case"loginRequired":if(evt.type=="minipdpEventType"){document.location.href="/nikeos/p/"+parent.config.siteFolder+"/"+location.href.split("/")[6]+"/profile?"+parent.unrelatedParamString+"&page=login&fields=screenname&continueURL="+escape(document.location)}break;case"goToLocker":parent.gotoPage("ML");break;case"submitAReview":parent.gotoPage("SR",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;default:console.log(evt);break}};self.init()}function NikePDPiDPage(parent){var self=this;this.init=function(){extendNikeCommercePage(self,parent);self.eventsToListenFor=["pdpEventType","minipdpEventType"];self.buildListener(self.eventsToListenFor,self.eventListener);self.translationFileName="builder_text_";if(parent.params.bv===undefined){parent.params.bv="2"}if(parent.params.bv==="5"){self.translationFileName="builder_text_reset_"}if(parent.params.mid!=undefined){parent.params.metricsId=parent.params.mid}var PDPConfig={id:"pdpid",width:"910",height:"520",swf:parent.getFQDN()+"/nikestore/modules/web/pdp.swf",variables:{container:"nikeid",userType:parent.config.userType,configPath:parent.config.nikeid.configPath,buildConfigDataPath:parent.getFQDN()+"/nikestore/modules/web/xml/nikeid/builder_config_only_"+parent.params.lang_locale+".xml",buildTranslationPath:parent.getFQDN()+"/nikestore/modules/web/xml/nikeid/"+self.translationFileName+parent.params.lang_locale+".xml",builderVersion:parent.params.bv,siteURL:parent.config.nikeid.siteURL,itemReturnURL:parent.config.nikeid.itemReturnURL,alertEnabled:"false",siteId:parent.config.siteId,descriptionPanelEnabled:"true",productId:parent.params.productId,catalogId:parent.params.catalogId,prebuildId:parent.params.prebuildId,productInstanceId:parent.params.productInstanceId,pathName:parent.params.pathName,metricId:parent.params.metricsId,idEmailPrivacyPath:parent.config.idEmailPrivacyPath,idEmailFeedbackPath:parent.config.idEmailFeedbackPath,idEmailDomain:NIKEOS.BASE.localhost+"/",idEmailMyDesignPath:parent.config.nikeid.idEmailMyDesignPath,commerceItemId:getParam("commerceItemId","hash"),designURL:parent.config.nikeid.designURL}};self.container.append('<div id="PDP_Module"></div>');self.addSWF(PDPConfig,"PDP_Module")};this.eventListener=function(evt){switch(evt.data.id){case"pdpHeightChange":self.container.find("div#PDP_Module embed, div#PDP_Module object").css("height",evt.data.height);break;case"swatchChange":parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;case"loadProductWall":parent.gotoPage("PWP",{sf:evt.data.selectedFacets,c:evt.data.catalogs});break;case"relatedTechnology":parent.gotoPage("PDP",{pgid:evt.data.productGroupId,pid:evt.data.productId,c:evt.data.catalogId});break;case"loginRequired":if(evt.type=="minipdpEventType"){document.location.href="/nikeos/p/"+parent.config.siteFolder+"/"+location.href.split("/")[6]+"/profile?"+parent.unrelatedParamString+"&page=login&fields=screenname&continueURL="+escape(document.location)}break;case"viewDetails":parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;case"goToLocker":parent.gotoPage("ML");break;case"goToCheckout":document.location.href=evt.data.url+"&site="+parent.config.site+"&country="+parent.mandatoryParams.ct+"&lang_locale="+parent.mandatoryParams.ll+"&returnURL="+escape(location.href);break;case"submitAReview":parent.gotoPage("SR",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;default:console.log(evt);break}};self.init()}function DesignSearchWall(parent){var self=this;this.init=function(){extendNikeCommercePage(self,parent);self.eventsToListenFor=["designSearchEventType"];self.buildListener(self.eventsToListenFor,self.eventListener);var DSConfig={id:"dsWall",width:"910",height:"520",swf:parent.getFQDN()+"/nikestore/modules/web/designSearch.swf",escapeSearchList:true,variables:{container:"dsWall",userType:parent.config.userType,siteId:parent.config.siteId,catalogs:parent.params.catalogId,metricId:parent.params.metricsId,pageNumber:parent.params.pn,sortOrder:parent.params.so,searchList:parent.params.sl,selectedFacets:parent.params.sf,inStockOnly:parent.params.iso,primaryHex:parent.params.ph,primaryRange:parent.params.pr,secondaryHex:parent.params.sh,secondaryRange:parent.params.sr,range:parent.params.r,configPath:parent.config.designsearch.configPath}};self.container.append('<div id="DS_Module"></div>');self.addSWF(DSConfig,"DS_Module")};this.eventListener=function(evt){switch(evt.data.id){case"heightChange":self.container.find("div#DS_Module embed, div#DS_Module object").css("height",evt.data.height);break;case"dsWallChange":parent.updateHashParams(evt.data);break;case"dsDetailClick":var cwidObj={c:evt.data.nikeId.catalogId,path:evt.data.nikeId.pathName,pbid:evt.data.nikeId.prebuildId,pid:evt.data.nikeId.productId,piid:evt.data.nikeId.productInstanceId};if(evt.data.nikeId.metricId){cwidObj.metricsId=evt.data.nikeId.metricId}parent.gotoPage("PDPiD",cwidObj);break;case"customizeWithId":var cwidObj={c:evt.data.nikeId.catalogId,path:evt.data.nikeId.pathName,pbid:evt.data.nikeId.prebuildId,pid:evt.data.nikeId.productId,piid:evt.data.nikeId.productInstanceId,bv:evt.data.nikeId.BUILDER_VERSION};if(evt.data.nikeId.metricId){cwidObj.metricsId=evt.data.nikeId.metricId}parent.gotoPage("PDPiD",cwidObj);break;default:console.log(evt);break}};self.init()}function NikeMiniCart(parent){var self=this;this.init=function(){extendNikeCommercePage(self,parent);self.eventsToListenFor=["minicartEventType"];self.buildListener(self.eventsToListenFor,self.eventListener);self.buildContainer();var miniCartConfig={id:"minicart",width:"450",height:"33",swf:parent.getFQDN()+"/nikestore/modules/web/miniCartNav.swf",params:{salign:"tr"},variables:{container:"inline",siteId:parent.config.siteId,catalogId:parent.params.catalogId,userType:parent.config.userType,configPath:parent.config.minicart.configPath,alertEnabled:"true",langLocale:parent.params.lang_locale,storeReturnURL:parent.config.minicart.storeReturnURL,loginPath:parent.config.minicart.loginPath}};self.container.append('<div id="MiniCart_Module" style="position:absolute;top:0px;right:0px;" ></div>');self.addSWF(miniCartConfig,"MiniCart_Module")};this.buildContainer=function(){self.container=JQ("div#NIKE_COMMERCE>div#MINI_CART")};this.eventListener=function(evt){switch(evt.data.id){case"minicartHeightChange":JQ("#MiniCart_Module object").height(evt.data.height+5);JQ("#MiniCart_Module embed").height(evt.data.height+5);break;case"minicartWidthChange":self.container.find("#MiniCart_Module embed, #MiniCart_Module object").css("width",evt.data.width);break;case"minicartLoaded":parent.buildPage();break;case"goToCart":document.location.href=evt.data.url+"&site="+parent.config.site+"&country="+parent.mandatoryParams.ct+"&lang_locale="+parent.mandatoryParams.ll+"&returnURL="+escape(location.href);break;case"goToCheckout":document.location.href=evt.data.url+"&site="+parent.config.site+"&country="+parent.mandatoryParams.ct+"&lang_locale="+parent.mandatoryParams.ll+"&returnURL="+escape(location.href);break;case"gotoorderstatus":parent.gotoPage("OS");break;case"gotomylocker":parent.gotoPage("ML");break;default:console.log(evt);break}};self.init()}function NikeMyLockerPage(parent){var self=this;this.init=function(){extendNikeCommercePage(self,parent);self.eventsToListenFor=["resize","launchPopup","externalLink","startShopping","pdpEventType","minipdpEventType","loginsuccess","loginfailure","baseModuleEventType"];self.buildListener(self.eventsToListenFor,self.eventListener);var myLockerConfig={id:"myLocker",width:"910",height:"650",swf:parent.getFQDN()+"/nikestore/modules/web/myLocker.swf",variables:{container:"inline",siteId:parent.config.siteId,catalogId:parent.config.catalogId,userType:parent.config.userType,configPath:parent.config.mylocker.configPath,alertEnabled:"false",langLocale:parent.params.lang_locale,storeReturnURL:escape(parent.config.mylocker.storeReturnURL),loginPath:parent.config.mylocker.loginPath,emailPath:parent.config.mylocker.emailPath,miniPdpConfigPath:parent.config.minipdp.configPath,registerPath:escape(parent.config.registerPath)}};self.container.append('<div id="MyLocker_Module" style="background-color: #2f2e2c;" ></div>');self.addSWF(myLockerConfig,"MyLocker_Module")};this.eventListener=function(evt){switch(evt.type){case"resize":JQ("#MyLocker_Module embed, #MyLocker_Module object").css("height",evt.data.height);break;case"startShopping":parent.gotoPage("PWP");break;case"minipdpEventType":if(evt.data.id=="loginRequired"){document.location.href="/nikeos/p/"+parent.config.siteFolder+"/"+location.href.split("/")[6]+"/profile?"+parent.unrelatedParamString+"&page=login&fields=screenname&continueURL="+escape(document.location)}else{if(evt.data.id=="viewDetails"){parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId})}else{if(evt.data.id=="customizeWithId"){parent.gotoPage("PDPiD",{pid:evt.data.nikeId.productId,cid:evt.data.nikeId.catalogId,path:evt.data.nikeId.pathName,bv:evt.data.nikeId.BUILDER_VERSION})}else{if(evt.data.id=="swatchChange"){console.log(evt.data)}else{if(evt.data.id=="goToCheckout"){document.location.href=evt.data.url+"&site="+parent.config.site+"&country="+parent.mandatoryParams.ct+"&lang_locale="+parent.mandatoryParams.ll+"&returnURL="+escape(location.href)}else{console.log(evt.data)}}}}}break;case"goToCheckout":document.location.href=evt.data.url+"&site="+parent.config.site+"&country="+parent.mandatoryParams.ct+"&lang_locale="+parent.mandatoryParams.ll+"&returnURL="+escape(location.href);break;case"loginsuccess":if(nikeplus&&nikeplus.user&&nikeplus.user.reload){nikeplus.user.reload(function(){if(nikeplus.nav&&nikeplus.nav.rebuild){nikeplus.nav.rebuild()}})}break;case"close":parent.gotoPage("ML");break;default:if(evt.id=="loginRequired"){document.location.href="/nikeos/p/"+parent.config.siteFolder+"/"+location.href.split("/")[6]+"/profile?"+parent.unrelatedParamString+"&page=login&fields=screenname&continueURL="+encodeURIComponent(document.location)}else{if(evt.data.id=="customizeWithId"){parent.gotoPage("PDPiD",{path:evt.data.nikeId.pathName,metricsId:evt.data.nikeId.metricsId,bv:evt.data.nikeId.BUILDER_VERSION})}else{console.log(evt)}}break}};self.init()}function NikeOrderStatusPage(parent){var self=this;this.init=function(){extendNikeCommercePage(self,parent);self.eventsToListenFor=["resize","launchPopup","externalLink","startShopping","pdpEventType","minipdpEventType","loginsuccess","loginfailure"];self.buildListener(self.eventsToListenFor,self.eventListener);var orderStatusConfig={id:"orderStatus",width:"910",height:"650",swf:parent.getFQDN()+"/nikestore/modules/web/orderStatus.swf",variables:{siteId:parent.config.siteId,catalogId:parent.config.catalogId,userType:parent.config.userType,configPath:parent.config.orderstatus.configPath,alertEnabled:"false",langLocale:parent.params.lang_locale,storeReturnURL:escape(parent.config.orderstatus.storeReturnURL),loginPath:parent.config.orderstatus.loginPath,emailPath:parent.config.orderstatus.emailPath,registerPath:escape(parent.config.registerPath)}};self.container.append('<div id="OrderStatus_Module" ></div>');self.addSWF(orderStatusConfig,"OrderStatus_Module")};this.eventListener=function(evt){switch(evt.type){case"resize":JQ("#OrderStatus_Module embed, #OrderStatus_Module object, #OrderStatus_Module").css("height",evt.data.height);JQ("object#orderStatus").attr("height","");JQ("object#orderStatus").attr("height",evt.data.height);break;case"startShopping":parent.gotoPage("PWP");break;case"loginsuccess":if(nikeplus&&nikeplus.user&&nikeplus.user.reload){nikeplus.user.reload(function(){if(nikeplus.nav&&nikeplus.nav.rebuild){nikeplus.nav.rebuild()}})}break;default:console.log(evt);break}};self.init()}function NikeCollectionPage(parent){var self=this;var PDPConfig;this.init=function(){extendNikeCommercePage(self,parent);self.eventsToListenFor=["pdpEventType","minipdpEventType"];self.buildListener(self.eventsToListenFor,self.eventListener);PDPConfig={id:"collection",width:"910",height:"520",swf:parent.getFQDN()+"/nikestore/modules/web/pdp.swf",variables:{container:"collection",userType:parent.config.userType,configPath:parent.config.collection.configPath,alertEnabled:"false",siteId:parent.config.siteId,descriptionPanelEnabled:"true",productGroupId:parent.params.productGroupId,productId:parent.params.productId,emailPath:parent.config.mylocker.emailPath,catalogId:parent.params.catalogId,wishlistEnabled:"true"}};self.container.append('<div id="PDP_Module"></div>');self.addSWF(PDPConfig,"PDP_Module")};this.eventListener=function(evt){switch(evt.data.id){case"pdpHeightChange":self.container.find("div#PDP_Module embed, div#PDP_Module object").css("height",evt.data.height);break;case"swatchChange":if(evt.type=="pdpEventType"){parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId})}break;case"loadProductWall":parent.gotoPage("PWP",{sf:evt.data.selectedFacets,c:evt.data.catalogs});break;case"relatedTechnology":parent.gotoPage("PDP",{pgid:evt.data.productGroupId,pid:evt.data.productId,c:evt.data.catalogId});break;case"customizeWithId":parent.gotoPage("PDPiD",{c:evt.data.nikeId.catalogId,path:evt.data.nikeId.pathName,pbid:evt.data.nikeId.prebuildId,pid:evt.data.nikeId.productId,piid:evt.data.nikeId.productInstanceId,bv:evt.data.nikeId.BUILDER_VERSION});break;case"loginRequired":if(evt.type=="minipdpEventType"){document.location.href="/nikeos/p/"+parent.config.siteFolder+"/"+location.href.split("/")[6]+"/profile?"+parent.unrelatedParamString+"&page=login&fields=screenname&continueURL="+escape(document.location)}break;case"viewDetails":parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;case"goToLocker":parent.gotoPage("ML");break;case"goToCheckout":document.location.href=evt.data.url;break;case"submitAReview":parent.gotoPage("SR",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;default:console.log(evt);break}};self.init()}function NikeSubmitReviewPage(parent){var self=this;var PDPConfig;this.init=function(){extendNikeCommercePage(self,parent);var eventsToListenFor=["pdpEventType","minipdpEventType"];self.buildListener(eventsToListenFor,self.eventListener);PDPConfig={id:"review",width:"910",height:"520",swf:parent.getFQDN()+"/nikestore/modules/web/pdp.swf",variables:{container:"submitReview",userType:parent.config.userType,configPath:parent.config.pdp.configPath,alertEnabled:"false",siteId:parent.config.siteId,descriptionPanelEnabled:"true",productGroupId:parent.params.productGroupId,productId:parent.params.productId,catalogId:parent.params.catalogId}};self.container.append('<div id="PDP_Submit_Review"></div>');self.addSWF(PDPConfig,"PDP_Submit_Review")};this.eventListener=function(evt){switch(evt.data.id){case"pdpHeightChange":self.container.find("div#PDP_Submit_Review embed, div#PDP_Submit_Review object").css("height",evt.data.height);break;case"swatchChange":parent.gotoPage("SR",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;case"loadProductWall":parent.gotoPage("PWP",{sf:evt.data.selectedFacets,c:evt.data.catalogs});break;case"relatedTechnology":parent.gotoPage("PDP",{pgid:evt.data.productGroupId,pid:evt.data.productId,c:evt.data.catalogId});break;case"customizeWithId":parent.gotoPage("PDPiD",{c:evt.data.nikeId.catalogId,path:evt.data.nikeId.pathName,pbid:evt.data.nikeId.prebuildId,pid:evt.data.nikeId.productId,piid:evt.data.nikeId.productInstanceId,bv:evt.data.nikeId.BUILDER_VERSION});break;case"loginRequired":if(evt.type=="minipdpEventType"){document.location.href="/nikeos/p/"+parent.config.siteFolder+"/"+location.href.split("/")[6]+"/profile?"+parent.unrelatedParamString+"&page=login&fields=screenname&continueURL="+escape(document.location)}break;case"viewDetails":parent.gotoPage("PDP",{pid:evt.data.productId,cid:evt.data.catalogId,pgid:evt.data.productGroupId});break;case"goToLocker":parent.gotoPage("ML");break;case"goToCheckout":document.location.href=evt.data.url+"&site="+parent.config.site+"&country="+parent.mandatoryParams.ct+"&lang_locale="+parent.mandatoryParams.ll+"&returnURL="+escape(location.href);break;case"continueShopping":case"startShopping":parent.gotoPage("PWP");break;default:console.log(evt);break}};self.init()}function getParam(x,location){var url=window.location.href;if(location=="query_string"){url=url.substring(0,url.indexOf("#"))}else{if(location=="hash"){url=url.substring(url.indexOf("#"),url.length)}}x=x.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regexS="[\\?&]"+x+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);if(results==null){return""}else{return decodeURIComponent(results[1])}}var serverTimeToDate=function(data,ignoreTimezone){if(!data||typeof data!="string"||data.indexOf("T")==-1||data.indexOf("-")==-1||data.indexOf(":")==-1){return(new Date)}var offset=data.split("T")[1].split(/[+-]/)[1].split(":");offset={positive:(data.indexOf("-")<0),hours:offset[0],minutes:offset[1]};var t=data.split("T")[1].split(/[+-]/,1)[0].split(":");var d=data.split("T",1)[0].split("-");var dt={year:d[0],month:d[1],day:d[2],hours:t[0],minutes:t[1],seconds:t[2]};for(var cv in dt){dt[cv]=parseInt(dt[cv],10)}var date=new Date(dt.year,dt.month-1,dt.day,dt.hours,dt.minutes,dt.seconds);if(!ignoreTimezone){date=new Date(date.valueOf()-((new Date()).getTimezoneOffset()*60000));if(!offset.positive){date=new Date(date.valueOf()+(offset.hours*3600000)+(offset.minutes*60000))}else{date=new Date(date.valueOf()-(offset.hours*3600000)-(offset.minutes*60000))}}return date};if(typeof(page_tracker_obj)=="undefined"){var page_tracker_obj={}}if(location.pathname.indexOf("/language_tunnel")==-1){var nike_commerce=new NikeCommerce()};
