﻿
Type.registerNamespace("Nordstrom");Nordstrom.ClientErrorHandler=function(){Nordstrom.ClientErrorHandler.initializeBase(this);this._disableErrorPublication=false;};Nordstrom.ClientErrorHandler.prototype={initialize:function(){Nordstrom.ClientErrorHandler.callBaseMethod(this,"initialize");window.onerror=Function.createDelegate(this,this._unhandledError);},dispose:function(){window.onerror=null;Nordstrom.ClientErrorHandler.callBaseMethod(this,'dispose');},get_disableErrorPublication:function(){return this._disableErrorPublication;},set_disableErrorPublication:function(value){this._disableErrorPublication=value;},_unhandledError:function(msg,url,lineNumber){try{var stackTrace=StackTrace.createStackTrace(arguments.callee);if(!this._disableErrorPublication){$.ajax({type:"POST",data:'{"stackTrace":"'+stackTrace+'","message":"'+msg+'","url":"'+url+'","lineNumber":"'+lineNumber+'"}',url:"/WebService/ClientErrorService.asmx/PublishError",contentType:"application/json; charset=utf-8",dataType:"json",success:function(msg){}});}
var args=new ErrorEventArgs(stackTrace,msg,url,lineNumber);this._raiseUnhandledErrorOccured(args);}
catch(e){}},add_unhandledErrorOccurred:function(handler){this.get_events().addHandler("unhandledErrorOccurred",handler);},remove_unhandledErrorOccurred:function(handler){this.get_events().removeHandler("unhandledErrorOccurred",handler);},_raiseUnhandledErrorOccured:function(args){var evt=this.get_events().getHandler("unhandledErrorOccurred");if(evt!==null){evt(this,args);}},publishError:function(error){try{var e=Function._validateParams(arguments,[{name:"error",type:Error}]);if(e)throw e;var stackTrace;if(error.stack){stackTrace=error.stack;}
else{stackTrace=StackTrace.createStackTrace(arguments.callee);}
ClientErrorService.PublishError(stackTrace,null,null,null);}
catch(e){}}};Nordstrom.ClientErrorHandler.registerClass('Nordstrom.ClientErrorHandler',Sys.Component);ErrorEventArgs=function(stackTrace,message,url,lineNumber){ErrorEventArgs.initializeBase(this);this._message=message;this._stackTrace=stackTrace;this._url=url;this._lineNumber=lineNumber;}
ErrorEventArgs.registerClass("ErrorEventArgs",Sys.EventArgs);_StackTrace=function(){_StackTrace.initializeBase(this);this._maxRecursion=20;};_StackTrace.prototype={_getFunctionName:function(func){if(func.name){return func.name;}
var fnText=func.toString();var fnName=fnText.substring(fnText.indexOf('function')+8,fnText.indexOf('('));if(fnName!==null&&fnName!==""){return fnName;}
return"anonymous";},_getSignature:function(func){var signature=new Sys.StringBuilder(this._getFunctionName(func));signature.append("(");for(var i=0;i<func.arguments.length;i++){var nextArgument=func.arguments[i];if(nextArgument.length>30){nextArgument=String.format("{0}...",nextArgument.substring(0,27));}
signature.append(String.format("'{0}'",nextArgument));if(i<func.arguments.length-1){signature.append(", ");}}
signature.append(")");return signature.toString();},createStackTrace:function(startingPoint){var e=Function._validateParams(arguments,[{name:"startingPoint",type:Function}]);if(e)throw e;var numberOfRecursions=0;var stackTraceMessage=new Sys.StringBuilder("Stack Trace");stackTraceMessage.appendLine();var nextCaller=startingPoint;while(nextCaller&&(numberOfRecursions<this._maxRecursion)){stackTraceMessage.appendLine(this._getSignature(nextCaller));nextCaller=nextCaller.caller;numberOfRecursions++;}
stackTraceMessage.appendLine();stackTraceMessage.appendLine();return stackTraceMessage.toString();}};_StackTrace.registerClass("_StackTrace");Sys.Application.add_init(function(){StackTrace=new _StackTrace();});Sys.Application.notifyScriptLoaded();﻿
Nordstrom.ImageViewer=function(element){this._settings=null;this._largeSwatch=null;Nordstrom.ImageViewer.initializeBase(this);}
Nordstrom.ImageViewer.prototype={initialize:function(element){Nordstrom.ImageViewer.callBaseMethod(this,'initialize');this._settings=$.extend({thumbnails:"ul.thumbnails>li.fashion-photo",swatches:"ul.swatches>li",mainImage:"#mainImage",transparentImageUrl:getImageURL()+"store/product/trans_pixel.gif",galleryPath:PageParameters.galleryUrl+"MediumLarge/",imageRegistry:{},swatchRegistry:{},swatchClickedCallback:function(swatchInfo){},thumbClickedCallback:function(index){},mainImageChangedCallback:function(path){}},this._settings||{});$(this._settings.thumbnails).rollover().click(Function.createDelegate(this,this._onThumbnailClick));$(this._settings.swatches).rollover().click(Function.createDelegate(this,this._onSwatchClick));},_onThumbnailClick:function(e){var thumb=$(e.target).ancestor(this._settings.thumbnails);if($(thumb).hasClass("selected"))
return;var path=$.extractPhotoPath($(e.target).attr("src"));if(path.length==0)
return;thumb.siblings().removeClass("selected");thumb.addClass("selected").removeClass("hover");this._changeMainImage(path);if(this._settings.swatches.length>0){var swatchKey=this._settings.imageRegistry[path].swatch;if(swatchKey!=null)
this._setSelectedSwatch(this._settings.swatchRegistry[swatchKey].expr);else
this._deselectSwatches();}
if(typeof(this._settings.swatchClickedCallback)=="function"){var thumbIndex=$(this._settings.thumbnails).index($(thumb));this._settings.thumbnailClickedCallback(thumbIndex);}},setSwatch:function(swatchInfo){if(swatchInfo.imagePath!=null){if(this._largeSwatch!=null)
this._largeSwatch.hide();this._changeMainImage(swatchInfo.imagePath);var thumbnail=$(this._settings.thumbnails).filter(function(){return $.extractPhotoPath($("img",this).attr("src"))==swatchInfo.imagePath;});if(thumbnail.length==0)
this._deselectThumbnail();else
this._setSelectedThumbnail(thumbnail);}
else{this._deselectThumbnail();$("img",this._settings.mainImage).attr("src",PageParameters.transparentImageUrl).hide();if(this._largeSwatch==null)
this._largeSwatch=$("<div />").attr("class","swatch").appendTo(this._settings.mainImage);else
this._largeSwatch.empty();if(swatchInfo.rgbValues==null){var swatchSrc=PageParameters.galleryUrl+"SwatchMedium/"+swatchInfo.swatchPath+".jpg";$("<img />").attr("src",swatchSrc).appendTo(this._largeSwatch);}
else{this._buildRgbSwatch(swatchInfo).appendTo(this._largeSwatch);}
this._largeSwatch.show();$("div.clickToZoom").css({"visibility":"hidden"});$("div.viewLarger").css({"visibility":"hidden"});}},_onSwatchClick:function(e){var swatch=$(e.target).closest("li");var swatchInfo=this._settings.swatchRegistry[$(swatch).attr("id").split("_")[1]];this._setSelectedSwatch(swatch);this.setSwatch(swatchInfo);if(typeof(this._settings.swatchClickedCallback)=="function")
this._settings.swatchClickedCallback(swatchInfo);},_setSelectedThumbnail:function(thumb){if($(thumb).length>1)
$.log(thumb);if($(thumb).hasClass("selected"))
return;this._deselectThumbnail();$(thumb).addClass("selected");},_setSelectedSwatch:function(swatch){if($(swatch).hasClass("selected"))
return;this._deselectSwatches();$(swatch).removeClass("hover").addClass("selected");},_deselectSwatches:function(){$(this._settings.swatches).filter(function(){return $(this).hasClass("selected");}).removeClass("selected");},_deselectThumbnail:function(){$(this._settings.thumbnails).filter(function(){return $(this).hasClass("selected");}).removeClass("selected");},_changeMainImage:function(path){if(this._largeSwatch!=null)
this._largeSwatch.hide();$(this._settings.mainImage).find("img:first").imageSrcFadeIn(this._settings.galleryPath+path+".jpg");if(typeof(this._settings.mainImageChangedCallback)=="function")
this._settings.mainImageChangedCallback(path);},_buildRgbSwatch:function(swatchInfo)
{var ul=$("<ul/>").addClass("rgb");var stripeWidth=Math.round(100/swatchInfo.rgbValues.length,0)+"%";$.each(swatchInfo.rgbValues,function(i,rgb){$("<li />").css({"width":stripeWidth,"background-color":rgb}).appendTo(ul);});return ul;},dispose:function(){Nordstrom.ImageViewer.callBaseMethod(this,'dispose');},set_settings:function(value){this._settings=value;},get_settings:function(){return this._settings;}}
Nordstrom.ImageViewer.registerClass('Nordstrom.ImageViewer',Sys.Component);Sys.Application.notifyScriptLoaded();var Quantity=1;var pre;var post;var isIE;if(document.all){isIE=true;pre='document.all.';post='';}
else
if(document.getElementById){isIE=false;pre='document.getElementById("';post='")';}
else
if(document.layers){isIE=false;pre='document.layers["';post='"]';}
function pop(strURL,type,styleNumber,linkType){if(type=="largerView"){var feature1=window.open(strURL,'large','toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=640,height=675');feature1.focus();}
if(type=="swatchDisplay"){var feature2=top.open(strURL,'swatch','toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=790,height=640');feature2.focus();}
if(type=="sizeAndFitInfo"){cmCreatePageElementTag(linkType+' PRODUCT PAGE LINK','FIT POP UP ELEMENTS','','','','-_--_--_-"'+styleNumber)
var feature3=window.open(strURL,'size','toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=618,height=640');feature3.focus();}}
function disableAnchor(obj,disable){obj=$(obj);if(disable){var href=obj.attr("href");if(href&&href!=""&&href!=null){obj.attr("href_bak",href);}
obj.removeAttr("href");}
else{var hrefbak=obj.attr("href_bak");if(hrefbak&&hrefbak!="")
obj.attr("href",hrefbak);}}
function IsPOS()
{if(navigator.userAgent!=null)
{var userAgentLow=navigator.userAgent.toLowerCase();if((userAgentLow.indexOf("nordstrom")!=-1)&&(userAgentLow.indexOf("register")!=-1))
{return true;}}
return false;}
function GetElementById(id){var element=null;if(pre!=null&&post!=null)
element=eval(pre+id+post);return element;}
function TrimString(sInString){if(sInString==null||sInString.length==0){return'';}
return sInString.replace(/\s+$/g,"");}
function TrimEmailString(sInString)
{if(sInString==null||sInString.length==0)
{return'';}
return sInString.replace(/\s+$/g,"");}
function IsDropDownSelected(ctlId){ctl=GetElementById(ctlId);if(ctl.selectedIndex<1){return false;}
return true;}
function startsWithWords(text){var words='';var spaceCount=0;text=TrimString(text).toLowerCase();for(i=0;i<text.length;i++){if(text.charAt(i)==' '){if(spaceCount==1){return words;}
else{spaceCount=1;words=words+' ';}}
else{words=words+text.charAt(i);}}
return words;}
function doMenu(s){var val;val=s.options[s.selectedIndex].value;if(val==""){return;}
self.location=val;}
function openPopUpWL(poplocation){window.open(poplocation,"new",'toolbar=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no,width=362,height=360,screenX=20,screenY=20');}
function openPopUp(poplocation,sizeWidth,sizeHeight,sentProperties,sentName,refocus)
{var width=sizeWidth!=null?sizeWidth:636;var height=sizeHeight!=null?sizeHeight:430;var properties=(sentProperties!=null&&sentProperties!="")?sentProperties:"toolbar=no,status=no,resize=yes,scrollbars=yes,menubar=no";var windowName=(sentName!=null&&sentName!="")?sentName:"new";var newWindow=window.open(poplocation,windowName,properties+',width='+width+',height='+height);if(refocus==true)
newWindow.focus();}
function FindAndRemoveParameter(parameter,query){if(parameter.length==0||query.length==0)
return query;var arrQueryParams=Parse(query);var queryString='';for(var i=0;i<arrQueryParams.length;i++){var arrCurrentParamValue=arrQueryParams[i];if(!CompareString(arrCurrentParamValue[0],parameter)){queryString=queryString+'&'+arrCurrentParamValue.join('=');}}
queryString=queryString.substring(1);return queryString;}
function FindAndReplace(query,newParams){if(query.length==0)
return newParams;if(newParams.length==0)
return query;if(query.indexOf('&')==0){query=query.substring(1);}
if(newParams.indexOf('&')==0){newParams=newParams.substring(1);}
var querylements=Parse(query);var newQueryElements=Parse(newParams);var newQueryString='';var isFound=false;var queryString='';for(var x=0;x<querylements.length;x++){isFound=false;var oldPair=querylements[x];for(var i=0;i<newQueryElements.length;i++){var newPair=newQueryElements[i];if(CompareString(newPair[0],oldPair[0])){isFound=true;queryString=queryString+'&'+newPair.join('=');newQueryElements.splice(i,1);break;}}
if(!isFound){queryString=queryString+'&'+oldPair.join("=");}}
for(var i=0;i<newQueryElements.length;i++){newPair=newQueryElements[i];queryString=queryString+'&'+newPair.join('=');}
queryString=queryString.substring(1);return queryString;}
function Parse(query){var queryElements=query.split("=");var param=queryElements[0];var value='';var lastAmp;var arrQuery=new Array(queryElements.length-1);for(var i=1;i<queryElements.length;i++){value=queryElements[i];lastAmp=value.lastIndexOf('&');var arrPair=new Array(2);if(lastAmp>0){if(i+1<queryElements.length){value=value.substring(0,lastAmp);}
arrPair[0]=param;arrPair[1]=CallDecode(value);param=queryElements[i].substring(lastAmp+1);}
else
if(lastAmp==0){arrPair[0]=param;arrPair[1]='';param=queryElements[i].substring(lastAmp+1);}
else{arrPair[0]=param;arrPair[1]=CallDecode(value);}
arrQuery[i-1]=arrPair;}
return arrQuery;}
function EncodeURL(query){if(query.length==0)
return query;var querylements=Parse(query);var encodedQuery='';for(var i=0;i<querylements.length;i++){var arrParamVaues=querylements[i];encodedQuery=encodedQuery+'&'+arrParamVaues[0]+'='+
CallEncode(arrParamVaues[1]);}
encodedQuery=encodedQuery.substring(1);return encodedQuery;}
function CompareString(string1,string2){if(TrimString(string1.toLowerCase())==TrimString(string2.toLowerCase()))
return true;return false;}
function CallEncode(text){var encoded=encodeURIComponent(text);return encoded;}
function CallDecode(text){return decodeURIComponent(text);}
function ParseQueryString(query){var qsParm=new Array();if(query!=null){var parms=query.split('&');for(var i=0;i<parms.length;i++){var pos=parms[i].indexOf('=');if(pos>0){var key=parms[i].substring(0,pos);var val=parms[i].substring(pos+1);qsParm[key]=val;}}}
return qsParm;}
function QueryString(qString){this.params=new Object();this.get=queryString_get;if(qString==null)
qString=window.location.search.substring(1,window.location.search.length);if(qString.length==0)
return null;qString=qString.replace(/\+/g,' ')
params=ParseQueryString(unescape(qString));}
function queryString_get(key,defaultValue){if(typeof defaultValue=='undefined')
defaultValue=null;var parameterValue=this.params[key];if(parameterValue==null)
parameterValue=defaultValue;return parameterValue;}
function openCatalogCollectionPopup(PopupUrl){window.name="ccPopup";var feature=window.open(PopupUrl,"Anniversary",'toolbar=no,resizable=no,scrollbars=yes,dependent=yes,status=0,alwaysRaised=yes,width=636,height=430');}
function OpenWindow(page,winName,features){var contentURL=getContentURL();var theURL=contentURL+'catalogOnline/'+page;if(winName=='Store Only'){var StoreOnlyWindow=window.open(theURL,'StoreOnly','toolbar=no,resizable=no,scrollbars=no,dependent=yes,status=0,alwaysRaised=yes,width=636,height=430');StoreOnlyWindow.location=theURL;}
else{var ProductWindow=window.open(theURL,winName,'toolbar=no,resizable=yes,scrollbars=yes,dependent=yes,status=0,alwaysRaised=yes,width=460,height=410');ProductWindow.location=theURL;}}
function CatalogPageDisplay_SelectedIndexChanged(requestCode,businessObject,minPage,maxPage,selectCategoryPage){var currentPage=2;var selItem;var subStr;selItem=selectCategoryPage.options[selectCategoryPage.selectedIndex].text;if(selItem.indexOf('Select')>-1)
return;if(selItem.Length!=0){if(selItem==("Page "+maxPage)){subStr=selItem.substring(selItem.indexOf(' ')+1);}
else{var toIndex=selItem.indexOf('&')-1;subStr=selItem.substring(6,toIndex);}
if(subStr[subStr.Length-1]==" "){currentPage=subStr.substring(0,0);}
else{currentPage=subStr;}}
var query="p="+currentPage;SetHiddenFieldsAndSubmit(requestCode,businessObject,'',query,'N');}
function OpenWindow(page,winName,features){var contentURL=getContentURL();var theURL=contentURL+'catalogOnline/'+page;if(winName=='Store Only'){var StoreOnlyWindow=window.open(theURL,'StoreOnly','toolbar=no,resizable=no,scrollbars=no,dependent=yes,status=0,alwaysRaised=yes,width=636,height=430');StoreOnlyWindow.location=theURL;}
else{var ProductWindow=window.open(theURL,winName,'toolbar=no,resizable=yes,scrollbars=yes,dependent=yes,status=0,alwaysRaised=yes,width=460,height=410');ProductWindow.location=theURL;}}
function getCookieValue(index){var allcookies=document.cookie;var pos=allcookies.indexOf(index+"=");if(pos==-1)
return null;var start=pos+(index.length+1);var end=allcookies.indexOf(";",start);if(end==-1)
end=allcookies.length;var value=allcookies.substring(start,end);return value;}
function GetOriginValue(currentUrl)
{var shopPattern=new RegExp("/*shop[0-9]*[a-z]*[.dev]*[.]+nordstrom.com/S/","i");var securePattern=new RegExp("/*secure[0-9]*[a-z]*[.dev]*[.]+nordstrom.com","i");if(0<=currentUrl.toLowerCase().indexOf("/livehelp/default.asp"))
return"DLP";else if(shopPattern.test(currentUrl))
return"PP";else if(securePattern.test(currentUrl))
return"CP";}
function CheckBrowserType()
{if(Sys.Browser.agent==Sys.Browser.InternetExplorer)
return"yes";else
return"no";}
function OpenChatPopupWindow(url,name)
{var w=500;var h=320;var l=(screen.width-w)/2;var t=(screen.height-224)/2;var features="left="+l+",top="+t+",width="+w+",height="+h+",toolbar=0,status=1,location="+CheckBrowserType();var popupWindow=window.open(url,name,features);return popupWindow;}
function DecideDestinationUrl(aboutUrl)
{if(0<=document.location.href.indexOf("secure.dev.nordstrom.com")||0<=document.location.href.indexOf("secure.nordstrom.com"))
{Click();}
else
{document.location.href=aboutUrl+"help/livehelp/default.asp";}}
var defaultChat;function Click()
{var currentURL;var nextURL;var origin;if(null==defaultChat||defaultChat.closed)
{nextURL=PageParameters.chatUrl+"livehelpstart.asp";currentURL=document.location.href;origin=GetOriginValue(currentURL);if(0<=currentURL.toLowerCase().indexOf("/services/"))
{origin="FS";}
nextURL=nextURL+"?uri="+escape(currentURL)+"&origin="+origin;if(0<=currentURL.indexOf("/livehelp/livehelpstart.asp"))
{document.location.replace(nextURL);}
else
{defaultChat=OpenChatPopupWindow(nextURL,"defaultChat");defaultChat.focus();}}
else
{defaultChat.focus();}}
var beautyChat;function BeautyClick(){var currentURL;var nextURL;var origin;if(null==beautyChat||beautyChat.closed)
{nextURL=PageParameters.chatUrl+"livehelpstart.asp?contact=beauty";currentURL=document.location.href;origin=GetOriginValue(currentURL);if(0<=currentURL.toLowerCase().indexOf("/services/beautyhotline.asp"))
{origin="BHL";}
nextURL=nextURL+"&uri="+escape(currentURL)+"&origin="+origin;beautyChat=OpenChatPopupWindow(nextURL,"beautyChat");beautyChat.focus();}
else
{beautyChat.focus();}}
var designerChat;function DesignerChatPopUp(strNextURL,strConcatinationOperator,strcurrentURL)
{var currentURL;var nextURL;var ConcatinationOperator;var BoutiqueID;var currentURL;var origin;currentURL=strcurrentURL;ConcatinationOperator=strConcatinationOperator;if(null==designerChat||designerChat.closed)
{nextURL=strNextURL;origin=GetOriginValue(currentURL);if(0<=currentURL.toLowerCase().indexOf("/services/designer_contact.asp"))
{origin="Designer";}
nextURL=nextURL+ConcatinationOperator+"uri="+escape(currentURL)+"&origin="+origin;designerChat=OpenChatPopupWindow(nextURL,"designerChat");designerChat.focus();}
else
{designerChat.focus();}}
function DesignerRedirect(strNextURL,strConcatinationOperator,strcurrentURL)
{var currentURL;var nextURL;var ConcatinationOperator;var BoutiqueID;var currentURL;currentURL=strcurrentURL;ConcatinationOperator=strConcatinationOperator;document.cookie="LCS=on;path=/;domain=.nordstrom.com";nextURL=strNextURL;nextURL=nextURL+ConcatinationOperator+"uri="+escape(currentURL);document.location.href=nextURL;}
function DesignerClick(strFlashID){var nextURL;var concatinationOperator;var FlashID;FlashID=strFlashID;nextURL=PageParameters.chatUrl+"livehelpstart.asp?contact=designer";concatinationOperator="&"
if(FlashID!=null){currentURL=document.location.href;if(currentURL.indexOf("FlashID")==-1){if(currentURL.indexOf("?")==-1){currentURL=currentURL+'?'+FlashID;}
else{currentURL=currentURL+'&'+FlashID;}}
else{currentURL=currentURL.substring(0,currentURL.indexOf("?"))
currentURL=currentURL+'?'+FlashID;}}
else{currentURL=document.location.href;}
DesignerChatPopUp(nextURL,concatinationOperator,currentURL);}
function DesignerEmailClick(){var nextURL;var concatinationOperator;var currentURL;nextURL=PageParameters.secureUrl+"services/designer_contact.asp";concatinationOperator="?"
currentURL=document.location.href;DesignerRedirect(nextURL,concatinationOperator,currentURL);}
function doResize(){if(navigator.appName.indexOf("Netscape")!=-1&&window&&window.location&&window.location.href){window.location.href=window.location.href;}}
function clearLastLocation(){document.cookie="lastLocation=;path=/;domain=.nordstrom.com";}
function LiveHelpCheck(){if(window.name=='main_frame'||window.name=='largerView'||window.name=='sizeAndFitInfo'){return true;}
else{return false;}}
function open_popup(strURL){window.name="popup";var feature=window.open(strURL,'feature','toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=461,height=430');}
function validateForm(){var nameField,newStr;nameField=document.loginguest.elements[0].value;newStr="";for(var i=0;i<nameField.length;i++){var c=nameField.charAt(i);if(c==' '){newStr+="_";}
else{newStr+=nameField.charAt(i);}}
document.loginguest.elements[0].value=newStr;if(isValidUsername(document.loginguest.elements[0],"Name")){if(!vchat())
return false;document.loginguest.elements[5].value+="&question="+escape(document.loginguest.question.value);document.loginguest.elements[0].value=stripunderscore(document.loginguest.elements[0].value);return true;}
else
return false;}
function stripunderscore(value){var nameField,newStr;var temp;nameField=value;newStr="";for(var i=0;i<nameField.length;i++){var c=nameField.charAt(i);if(c=='_'){newStr+=" ";}
else{newStr+=nameField.charAt(i);}}
return newStr;}
function isValidUsername(field,desc){if(isProvided(field,desc)){var s=field.value;if(s.length<2){alert('The value in "'+desc+'" must be at least 2 characters long.');return false;}
for(var i=0;i<s.length;i++){var c=s.charAt(i);if((c<'a'||c>'z')&&(c<'A'||c>'Z')&&(c<'0'||c>'9')&&c!='-'&&c!='.'&&c!='_'&&c!='\''){alert('The value in "'+desc+'" may only contain alphabetic and numeric characters and \'-\'.');return false;}}
var firstOne=s.charAt(0);if(firstOne>='0'&&firstOne<='9'){alert("We're sorry, all names must begin with a letter of the alphabet. Please try again.");return false;}
return true;}
else
return false;}
function isProvided(field,desc){var s=field.value;if(s&&s.length)
return true;if(desc=='Question')
alert('Please enter a question and click SEND to communicate with one of our customer service agents.');else
alert('The value in "'+desc+'" may not be empty.');return false;}
function encodeQuestion(strQuestion){if(strQuestion.length>255){strQuestion=strQuestion.substring(0,255);alert("Question is too long.  The question is truncated to 250 characters.");}
var quest=unescape(strQuestion);var string="";for(var i=0;i<quest.length&&string.length<250;i++)
{if((quest.charAt(i)=="\n")&&(quest.charAt(i+1)=="\r")){string+=" ";i+=1;}
else
if(quest.charAt(i)=="\n")
string+=" ";else
if(quest.charAt(i)=="\r")
string+=" ";else
if(quest.charAt(i)=="%")
string+=" ";else
string+=quest.charAt(i);}
string=escape(string);if(string.length>240){string=string.substring(0,240);}
return string;}
function vchat(){var strQuestion;strQuestion=document.loginguest.elements[1].value;if(strQuestion.length>240){alert("Question is too long.  The question should be truncated to 250 characters or less.");return false;}
document.loginguest.elements[2].value=encodeQuestion(document.loginguest.elements[1].value);return isProvided(document.loginguest.elements[1],'Question');}
function endSession(returnUrl){var LastLoc
document.cookie="cc=0;path=/;domain=.nordstrom.com";document.cookie="LCS=0; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/;domain=.nordstrom.com";LastLoc=unescape(returnUrl);if(LastLoc==""||LastLoc=="null"||LastLoc==0){LastLoc="http://www.nordstrom.com";}
document.cookie="LCSLastLoc=0; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/;domain=.nordstrom.com";top.location.href=LastLoc;}
function CQOSearchClicked(requestCode,bussinessObjectId,textBoxId){var itemNum=TrimString(GetElementById(textBoxId).value);if(itemNum.indexOf('<')>-1||itemNum.indexOf('>')>-1){alert('We\'re sorry, the item number entered is invalid. Please try again.');return false;}
if(itemNum.length>0){var cqoQueryParams='sitesource=cqo&';itemNum='itemnum='+CallEncode(itemNum);cqoQueryParams=cqoQueryParams+itemNum;}
else{return false;}
return true;}
function openEmergencyPopup(){window.name="emergencyPopup";var feature=window.open(getContentURL()+"Popup/Message/Default.asp","EmgergencyAlert",'toolbar=no,status=no,width=461,height=430,resize=no,scrollbars=yes,menubar=no');return(false);}
function GetShopperFirstName(){var firstName=GetShopperCookieValue('FIRSTNAME');if(firstName!=null)
return firstName.replace('+',' ');else
return'';}
function GetBagCountMessage(bagCount){if(bagCount==1)
return bagCount+" item";else
return bagCount+" items";}
function UpdateBagCount(bagCount)
{var sbCount=document.getElementById('shoppingBagCount');if(undefined!=sbCount)
sbCount.innerHTML=GetBagCountMessage(bagCount);}
function GetShopperBagCount(){var bagCount=GetShopperCookieValue('BAGCOUNT');if(bagCount!=null&&bagCount!='')
return parseInt(bagCount);else
return 0;}
function GetShopperCookieValue(key){var cookieValue=null;if(PageParameters.nordstromCookie!=null){var nordstromCookie=$.cookie(PageParameters.nordstromCookie);if(nordstromCookie!=null){cookieValue=nordstromCookie[key.toUpperCase()];if(cookieValue==null)
cookieValue=nordstromCookie[key.toLowerCase()];}}
return cookieValue;}
function doMenu(s){var val;val=s.options[s.selectedIndex].value;if(val==""){return;}
self.location=val;}
function WishList(styleId,businessId,requestCode,queryString){var query="deletedStyleId="+styleId;if(TrimString(queryString)==""){queryString=query;}
else{queryString=queryString+"&"+query;}
SetHiddenFields(requestCode,businessId,'',queryString,'N');}
function RenderCoremetricsErrorElementTag(val,isValid){if(!isValid){var checkoutPage;var end=window.location.href.lastIndexOf("?");var pageUrl=window.location.href.substring(0,end);var start=pageUrl.lastIndexOf("/")+1;if(end==-1){end=window.location.href.length;}
pageUrl=pageUrl.substring(start,pageUrl.length);switch(pageUrl.toLowerCase()){case"orderreview.aspx":checkoutPage="Order Review";break;case"addresssetup.aspx":checkoutPage="Address form page";break;case"addresssetup.aspx":checkoutPage="Address form page";break;case"shoppingbag.aspx":checkoutPage="Shopping Bag";break;case"orderconfirmation.aspx":checkoutPage="Order Receipt";break;case"orderreview.aspx":checkoutPage="Order Review";break;case"reviewsregistration.aspx":checkoutPage="CUSTOMER REVIEWS";break;case"wishlistregistration.aspx":case"wishlist.aspx":checkoutPage="Wish List";break;default:return;}
cmCreatePageElementTag("'"+val.innerHTML+"'","'"+checkoutPage+"' messaging");}}
var ItemOK=false;var LocationOK=false;var radius;var colorIndex;var quantityIndex;var sizeIndex;var zipCode;var zipValue;var cityValue;var city;var state;var imageURL;var resultsDefaultMessage="";var resultsDefaultMessageOutfit="";var renderMsgNoParams="";var renderMsgZeroResults="<p class=\"pickUpInStoreText\" style=\"line-height: 16px;\"><span style=\"color: #C30A2C; font-weight: bold;\">Your search returned 0 results.</span><br />Please adjust your criteria to search for another store.<br />Click cancel to return to the product page to add this item to your Shopping Bag or continue shopping.</p>";var storeCount=0;var allStores=0;var msgColorSize="<span class=\"buyButtonDDErrorText error\"><img src=\"http://images.nordstrom.net/Web41/smartcontrols/images/circle_exclamation.gif\"   alt=\"!\">  Please complete your size and color selections.</span>";var msgItemsQuantity="<span class=\"buyButtonDDErrorText error\"><img src=\"http://images.nordstrom.net/Web41/smartcontrols/images/circle_exclamation.gif\" class=\"\"   alt=\"!\">&nbsp;Quantity must be a number.</span>";var msgItemsNoQuantity="<span class=\"buyButtonDDErrorText error\"><img src=\"http://images.nordstrom.net/Web41/smartcontrols/images/circle_exclamation.gif\" class=\"\"   alt=\"!\">&nbsp;Please enter a quantity.</span>";var msgItemsHaveChanged="<span class=\"buyButtonDDErrorText error\"><img src=\"http://images.nordstrom.net/Web41/smartcontrols/images/circle_exclamation.gif\" class=\"\"   alt=\"!\">&nbsp;Your search criteria has changed. Click the Go <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;button again to find a store.</span>";var MsgCityStateError="<span class=\"storeSearchErrorText error\"><img src=\"http://images.nordstrom.net/Web41/smartcontrols/images/circle_exclamation.gif\" class=\"\"   alt=\"!\"> Please enter a Zip Code or a City and State.</span>";var MsgZipCodeError="<span class=\"storeSearchErrorText error\"><img src=\"http://images.nordstrom.net/Web41/smartcontrols/images/circle_exclamation.gif\" class=\"\"   alt=\"!\"> Please enter a valid Zip Code.</span>";var isOutfit=false;var storeID=-1;var skuId;function buildErrorMessage(imageURL){msgColorSize="<span class=\"buyButtonDDErrorText error\"><img src=\""+imageURL+"Web41/smartcontrols/images/circle_exclamation.gif\"   alt=\"!\">  Please complete your size and color selections.</span>";msgItemsQuantity="<span class=\"buyButtonDDErrorText error\"><img src=\""+imageURL+"Web41/smartcontrols/images/circle_exclamation.gif\" class=\"\"   alt=\"!\">&nbsp;Quantity must be a number.</span>";msgItemsNoQuantity="<span class=\"buyButtonDDErrorText error\"><img src=\""+imageURL+"Web41/smartcontrols/images/circle_exclamation.gif\" class=\"\"   alt=\"!\">&nbsp;Please enter a quantity.</span>";msgItemsHaveChanged="<span class=\"buyButtonDDErrorText error\"><img src=\""+imageURL+"Web41/smartcontrols/images/circle_exclamation.gif\" class=\"\"   alt=\"!\">&nbsp;Your search criteria has changed. Click the Go <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;button again to find a store.</span>";MsgCityStateError="<span class=\"storeSearchErrorText error\"><img src=\""+imageURL+"Web41/smartcontrols/images/circle_exclamation.gif\" class=\"\"   alt=\"!\"> Please enter a Zip Code or a City and State.</span>";MsgZipCodeError="<span class=\"storeSearchErrorText error\"><img src=\""+imageURL+"Web41/smartcontrols/images/circle_exclamation.gif\" class=\"\"   alt=\"!\"> Please enter a valid Zip Code.</span>";msgColorSize="<span class=\"buyButtonDDErrorText error\"><img src=\""+imageURL+"Web41/smartcontrols/images/circle_exclamation.gif\"   alt=\"!\">  Please complete your size and color selections.</span>";}
function setStoreID(id){corpStoreID=id;storeID=id;if(isOutfit){parent.corpStoreID=id;}
else{corpStoreID=id;}}
function removeLeadingZeros(number){var y;if(number[0]=="0"){y=number.substring(1,number.length);}
else{y=number;}
return y;}
function setStoreCount(count,totalStores){if(typeof isRenderedInSecure!='undefined')
{document.getElementById("divStoreResults2").style.visibility="visible";}
storeCount=$("#tblResults  input.storeResultsListItemRad1").length;allStores=$("#tblResults tr").length;$('#imgOneMoment').css('visibility','hidden');if(storeCount>0){document.getElementById("dvPickUpBuyLabel").style.visibility="visible";document.getElementById("storeResultsDiv").style.visibility="visible";var d=new Date();var time;var day=d.getDate();var month=d.getMonth()+1;var year=d.getFullYear()-2000;var minutes=d.getMinutes();var hours=d.getHours();var validResults;if(minutes<9){minutes='0'+minutes;}
if(d.getHours()<13){time=hours+":"+minutes+" am:";}
else{time=hours-12+":"+minutes+" pm:";}
var dateMsg="Status as of <b>"+removeLeadingZeros(month)+"/"+removeLeadingZeros(day)+"/"+"0"+year+"</b> at "+"<b>"+time+"</b>";if(!isOutfit){validResults="<table cellpadding=\"0\" cellspacing=\"0\" class=\"storeResultsTable1\"><tr><th class=\"storeResultsTh1\"><h2 class=\"storeResultsH21\"><span class=\"pickUpInStoreLabel\"> "+storeCount+" of "+allStores+" stores in your area have your item.</span><br />"+dateMsg+"</h2></th><th class=\"storeResultsTh2\"><h2 class=\"storeResultsH22\">Store<br />Location:</h2></th><th class=\"storeResultsTh3\"><h2 class=\"storeResultsH23\">Estimated Distance:</h2></th></tr></table>"}
else{validResults="<table cellpadding=\"0\" cellspacing=\"0\" class=\"storeResultsTable1\"><tr><th class=\"storeResultsTh1\"><h2 class=\"storeResultsH21\"><span class=\"pickUpInStoreLabel\"> "+storeCount+" of "+allStores+" stores in your area have all of<br> your items.</span><br />"+dateMsg+"</h2></th><th class=\"storeResultsTh2\"><h2 class=\"storeResultsH22\">Store<br />Location:</h2></th><th class=\"storeResultsTh3\"><h2 class=\"storeResultsH23\">Estimated Distance:</h2></th></tr></table>"}
document.getElementById("dvStoreMsg").innerHTML=validResults;}
else{if(isOutfit){document.getElementById("dvStoreMsg").innerHTML="<p class=\"pickUpInStoreText\" style=\"line-height: 16px;\"><span style=\"color: #C30A2C; font-weight: bold;\"> 0 of "+allStores+" stores in your area have your items.</span><br />Please adjust your criteria to search for another store.<br />Click cancel to return to the product page to add this item to your Shopping Bag or continue shopping.</p>";}
else{document.getElementById("dvStoreMsg").innerHTML="<p class=\"pickUpInStoreText\" style=\"line-height: 16px;\"><span style=\"color: #C30A2C; font-weight: bold;\"> 0 of "+allStores+" stores in your area have your item.</span><br />Please adjust your criteria to search for another store.<br />Click cancel to return to the product page to add this item to your Shopping Bag or continue shopping.</p>";}
document.getElementById("storeResultsDiv").style.visibility="hidden";document.getElementById("dvPickUpBuyLabel").style.visibility="hidden";}}
function getQueryVariable(variable){var query=window.location.search.substring(1);var vars=query.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0]==variable){skuId=pair[1];isOutfit=true;return pair[1];}}
isOutfit=false;}
function SetOutfitsPopup(){if(Radius!=""){document.getElementById('radius').value=Radius;}}
function isInteger(n){if(n==""){return false;}
return(!isNaN(n))&&(Math.floor(n)==n)}
function validateStoreSearch(){imageURL=PageParameters.imageUrl;buildErrorMessage(imageURL);storeID=-1;getQueryVariable("skus");cityValue=$('#city').val();zipValue=$('#zipcode').val();radius=$('#radius').val();stateValue=$('#state').val();zipCode=$('#zipcode');city=$('#city');state=$('#state')
if(zipValue!="")
{document.getElementById("city").value="";document.getElementById("state").value="";}
if(!isOutfit){var selectedSkus=getSelectedSkuIds();if(selectedSkus!=null&&selectedSkus.length>0){$("#dropDown1_1").css(" buyButton1");$("#dropDown2_1").css(" buyButton1");$("#buyButtonDDErrorWrap").html("");window.ItemOK=true;window.skuId=selectedSkus[0];}
else{$("#dropDown1_1").css(" buyButton1 FieldError");$("#dropDown2_1").css(" buyButton1 FieldError");$("#buyButtonDDErrorWrap").html(msgColorSize);window.ItemOK=false;return;}
validateFinder();if(ItemOK&&LocationOK){if(typeof isRenderedInSecure=='undefined')
{$("#storeResultsDiv").removeClass("storeResultsDivOff");$("#storeResultsDiv").addClass("storeResultsDivOn");$('#imgOneMoment').css('visibility','visible');var urlSplit=window.location.href.split('?')[0]
urlSplit=urlSplit.split(/\/s\//i)[1];var urlTest="?tn=storeResultsList&ct=C&zip="+zipValue+"&city="+cityValue+"&state="+stateValue+"&radius="+radius+"&skus="+skuId+"&origin=pickupstoreresultsproduct"+"&qty="+Quantity+"&format=json";var url="/TS_S/"+urlSplit+urlTest;$.ajax({"url":url,"success":function(data,status){$("#storeResultsDiv").html(data.htmlContent);setStoreCount(data.args.availableStores,data.args.allStores);},"error":function(xhr,status,error){alert("error");},"dataType":"json"});}
else
{$("#storeResultsDiv").removeClass("storeResultsDivOff");$("#storeResultsDiv").addClass("storeResultsDivOn");$('#imgOneMoment').css('visibility','visible');var urlTest="?tn=storeResultsList&ct=C&zip="+zipValue+"&city="+cityValue+"&state="+stateValue+"&radius="+radius+"&skus="+skuId+"&origin=pickupstoreresultsproduct"+"&qty="+Quantity+"&format=json";var url="/TemplateSyndicationProxy.axd"+urlTest;$.ajax({"url":url,"success":function(data,status){$("#storeResultsDiv").html(data.htmlContent);setStoreCount(data.args.availableStores,data.args.allStores);},"error":function(xhr,status,error){alert("error");},"dataType":"json"});}}}
else
{validateFinder();if(LocationOK){var urlTest="?tn=storeResultsList&ct=C&zip="+zipValue+"&city="+cityValue+"&state="+stateValue+"&radius="+radius+"&skus="+skuId+"&origin=pickupstoreresultsoutfit"+"&qty="+Quantity+"&format=json";var url="/TemplateSyndicationProxy.axd"+urlTest;$.ajax({"url":url,"success":function(data,status){$("#storeResultsDiv").html(data.htmlContent);setStoreCount(data.args.availableStores,data.args.allStores);},"error":function(xhr,status,error){alert("error");},"dataType":"json"});var d=new Date();var dateMsg="Status as of "+d.getMonth()+"/"+d.getDay()+"/"+d.getFullYear()+" at "+d.getHours()+":"+d.getMinutes();if(storeCount>0){var validResults="<table cellpadding=\"0\" cellspacing=\"0\" class=\"storeResultsTable1\"><tr><th class=\"storeResultsTh1\"><h2 class=\"storeResultsH21\"><span class=\"pickUpInStoreLabel\"> "+storeCount+" Nordstrom stores are within your area:</span><br />"+dateMsg+"</h2></th><th class=\"storeResultsTh2\"><h2 class=\"storeResultsH22\">Store<br />Location:</h2></th><th class=\"storeResultsTh3\"><h2 class=\"storeResultsH23\">Estimated Distance:</h2></th></tr></table>"
document.getElementById("dvStoreMsg").innerHTML=validResults;}}}}
function validateFinder(){if(typeof isRenderedInSecure!='undefined')
{Quantity=$('#txtQuantity').val();if(isInteger(Quantity)){if(Quantity<0){LocationOK=false;document.getElementById("buyButtonDDErrorWrap").innerHTML=msgItemsQuantity;document.getElementById("txtQuantity").className=" buyButton1 FieldError";document.getElementById("span2").style.display="none";document.getElementById("span1").style.display="none";document.getElementById("dvStoreMsg").innerHTML="Hello There";document.getElementById("storeSearchErrorTextLower").innerHTML="";document.getElementById("storeResultsIframe").style.visibility="hidden";document.getElementById("storeResultsIframe").src="/blank.htm";document.getElementById("storeResultsIframe").className="storeResultsIfrOff";document.getElementById("dvPickUpBuyLabel").style.visibility="hidden";return false;}
else
if(Quantity==0){LocationOK=false;document.getElementById("buyButtonDDErrorWrap").innerHTML=msgItemsNoQuantity;document.getElementById("txtQuantity").className=" buyButton1 FieldError";document.getElementById("span2").style.display="none";document.getElementById("span1").style.display="none";document.getElementById("dvStoreMsg").innerHTML="";document.getElementById("storeSearchErrorTextLower").innerHTML="";document.getElementById("storeResultsDiv").style.visibility="visible";document.getElementById("storeResultsDiv").className="storeResultsIfrOff";document.getElementById("dvPickUpBuyLabel").style.visibility="hidden";return false;}
else{document.getElementById("txtQuantity").className=" buyButton1 ";}}
else{LocationOK=false;document.getElementById("buyButtonDDErrorWrap").innerHTML=msgItemsNoQuantity;document.getElementById("txtQuantity").className=" buyButton1 FieldError";document.getElementById("span2").style.display="none";document.getElementById("span1").style.display="none";document.getElementById("dvStoreMsg").innerHTML="";document.getElementById("storeSearchErrorTextLower").innerHTML="";document.getElementById("storeResultsIframe").style.visibility="hidden";document.getElementById("storeResultsIframe").src="/blank.htm";document.getElementById("storeResultsIframe").className="storeResultsIfrOff";document.getElementById("dvPickUpBuyLabel").style.visibility="hidden";return false;}}
if(zipValue!=""){if(isZip(zipValue)){document.getElementById("span1").style.display="none";LocationOK=true;city.className="storeSearchCity";state.className="storeSearchState";zipCode.className="storeSearchZipcode";city.value="";state.value="";cityValue="";document.getElementById("span2").style.display="none";}
else{$("span1").css("display","inline");zipCode.className="storeSearchZipcode FieldError";LocationOK=false;document.getElementById("span2").style.display="none";city.className="storeSearchCity";state.className="storeSearchState";}}
else
{if(stateValue==""||cityValue==""){document.getElementById("span2").style.display="inline";document.getElementById("span1").style.display="none";zipCode.className="storeSearchZipcode FieldError";document.getElementById("storeSearchErrorTextLower").innerHTML=MsgCityStateError;document.getElementById("storeSearchErrorTextLower").className="storeSearchErrorText";LocationOK=false;if(cityValue==""){city.className="storeSearchCity FieldError";}
else{city.className="storeSearchCity";}
if(state.value==""){state.className="storeSearchState FieldError";}
else{state.className="storeSearchState";}}
else{document.getElementById("span2").style.display="none";document.getElementById("span1").style.display="none";showResults=true;city.className="storeSearchCity";zipCode.className="storeSearchZipcode";state.className="storeSearchState";LocationOK=true;}}}
function isZip(s){var reZip=/(^\d{5}$)|(^\d{5}-\d{4}$)/;if(!reZip.test(s)){return false;}
return true;}
function PrepopulateSearch(radius,zip,city,state){$('#dvStoreMsg').html(resultsDefaultMessage);if(radius==""||radius==0){$('#radius').val("25");}
else{$('#radius').val(radius);}
$('#zipcode').val(zip);$('#city').val(city);$('#state').val(state);}
function getImageURL(){return window.PageParameters["imageUrl"];}
function initBtn(){};if(typeof(Sys)!='undefined'){Sys.Application.notifyScriptLoaded();}
function cmGetManualPageId(btnId)
{if($("#KeyWord").val().length>0)
{var cm=new _cm("tid","1","vn2","e4.0");cmCreateManualLinkClickTag('',btnId,cm.pi);}}
function getUrlParameter(param){var value="";var href=window.location.href;if(href.indexOf("?")>-1){var queryString=href.substr(href.indexOf("?")).toLowerCase();var array=queryString.split("&");for(var i=0;i<array.length;i++){if(array[i].indexOf(param+"=")>-1){var aParam=array[i].split("=");value=aParam[1];break;}}}
return value;}
function SetNordstromCookie(bagCount)
{var shopperParam="";var firstNameParam="";var returnStyleId="";var shopperId=GetShopperCookieValue("shopperid");if(shopperId!=null)
shopperParam="shopperid="+shopperId+"&";var firstName=GetShopperCookieValue("firstname");if(firstName!=null)
firstNameParam="firstname="+firstName+"&";var userName=GetShopperCookieValue("USERNAME");if(userName==null)
userName="";var encrypted=GetShopperCookieValue("encrypted");if(encrypted==null)
encrypted="";var urlSplit=window.location.href.split('?')[0];urlSplit=urlSplit.split(/\/S\//i)[1];if(urlSplit.indexOf("#")>-1)
returnStyleId=urlSplit.substring(0,urlSplit.indexOf("#"));else if(urlSplit.indexOf("/")>-1)
returnStyleId=urlSplit.substring(0,urlSplit.indexOf("/"));else
returnStyleId=urlSplit;var cookieName="nordstrom";var cookieDomain=".nordstrom.com";if(location.host.indexOf(".dev.")!=-1){cookieName="nordstromdev";cookieDomain=".dev.nordstrom.com";}
var sValue=shopperParam+"bagcount="+bagCount+"&"+firstNameParam+"USERNAME="+
userName+"&encrypted="+
encrypted+"&bvreturnstyleid="+
returnStyleId;var exdate=new Date();var tenYearsFromNow=exdate.getTime()+(3650*24*60*60*1000);exdate.setTime(tenYearsFromNow);document.cookie=cookieName+"="+sValue+"; path=/; domain="+cookieDomain+"; expires="+exdate.toGMTString();}
﻿
Type.registerNamespace("Nordstrom");Nordstrom.PageInspector=function(){this._properties=null;Nordstrom.PageInspector.initializeBase(this);}
Nordstrom.PageInspector.prototype={initialize:function(){Nordstrom.PageInspector.callBaseMethod(this,"initialize");},display:function(){var inspector=$("#pageInspector");if(inspector.length==0){inspector=$("<div><h3>Page Properties Inspector</h3><div><dl /></div><input type='button' value='close' /></div>");inspector.attr("id","pageInspector").appendTo(document.body);inspector.find("input[type=button]").click(function(){$.unblockUI();});}
var dl=inspector.find("dl").empty();for(var prop in this._properties){$("<dt />").text(prop).appendTo(dl);var dd=$("<dd />");var propValue=unescape(this._properties[prop]);if(prop.endsWith("Url")){var link=$("<a href='"+propValue+"' />").text(propValue);if(prop!="CurrentResultsUrl")
link.truncate({"width":445});link.appendTo(dd);}
else{dd.text(propValue);}
dd.appendTo(dl);}
$.blockUI({"message":inspector,"showOverlay":true,"css":{"border":"none","centerY":0,"top":"100px","left":"100px"}});},setProperty:function(key,value){this._properties[key]=value;},getProperty:function(key){return this._properties[key];},dispose:function(){Nordstrom.PageInspector.callBaseMethod(this,"dispose");},set_properties:function(value){this._properties=value;},get_properties:function(){return this._properties;}}
Nordstrom.PageInspector.registerClass("Nordstrom.PageInspector",Sys.Component);Sys.Application.notifyScriptLoaded();﻿(function($){$.fn.flyout=function(settings){settings=$.extend({duration:250,shiftLeft:0,shiftTop:0,blockUIBeforeOpen:true,viewPortBuffer:10,className:"",optimizeForViewport:false},settings||{});if(settings.blockUIBeforeOpen){$.blockUI({overlayCSS:{backgroundColor:"#FFFFFF",opacity:"0.0"},message:"",css:{border:"none"}});}
if(!window.__flyoutElement){$("<div>").attr("id","__flyout").css({"position":"absolute","visibility":"hidden","z-index":"9999","background-color":"#FFFFFF","border":"solid 1px silver","top":"0px","left":"0px","width":"0px","height":"0px"}).addClass(settings.className).prependTo("body");window.__flyoutElement=$("#__flyout")[0];}
$(this).css("visibility","hidden");var originOffset=$(settings.origin).offset();var finalBounds={"width":$(this).width(),"height":$(this).height(),"left":originOffset.left+settings.shiftLeft,"top":originOffset.top+settings.shiftTop};if(settings.optimizeForViewport){finalBounds=$.optimizeBoundsForViewport($.extend(finalBounds,{"dropShadow":false}),settings.viewPortBuffer);}
$(__flyoutElement).locateTo(originOffset).makeSameSize(settings.origin).css({"opacity":"0.0","visibility":"visible"}).animate({opacity:"1.0",width:finalBounds.width+"px",height:finalBounds.height+"px",left:finalBounds.left+"px",top:finalBounds.top+"px"},settings.duration,onAnimateComplete);var content=this;function onAnimateComplete(){$(content).locateTo(finalBounds).css("visibility","visible").fadeIn("fast").dropShadow();$(__flyoutElement).css("visibility","hidden");if(settings.callback)
settings.callback(finalBounds);}
return this;}
$.fn.dropShadow=function(){var settings={};$.extend(settings,{background:"url("+getImageURL()+"Secure42/shadowAlpha.png) repeat bottom right",IE6background:"url("+getImageURL()+"Secure42/shadow.gif) no-repeat bottom right",offset:4},window.DropShadowSettingsOverride||{});var isIE6=(Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.version<7);if(!window.__dropShadow){$("<div>").attr("id","__dropShadow").css({"position":"absolute","visibility":"hidden","background":isIE6?settings.IE6background:settings.background,"top":"0px","left":"0px","width":"0px","height":"0px"}).appendTo("body");window.__dropShadow=$("#__dropShadow")[0];}
var position=$(this).offset();$(window.__dropShadow).makeSameSize(this).locateTo({top:position.top+settings.offset,left:position.left+settings.offset}).css({"z-index":parseInt($(this).css("z-index"))-1,"visibility":"visible"});}
$.hideDropShadow=function(){$(window.__dropShadow).css("visibility","hidden");}
$.fn.imageSrcFadeIn=function(newSrc,callback){var target=$(this);var bgTop=Math.floor((target.parent().height()-target.height())/2);target.parent().css("background","url("+newSrc+") no-repeat 0 "+bgTop+"px");target.fadeOut(250,function(){$(this).attr("src",newSrc).show();target.parent().css("background","none");});return target;}
$.fn.addOption=function(text,value){var option=(value)?new Option(text,value):new Option(text);this.each(function(){this.options[this.options.length]=option;});return this;}
$.fn.addOptions=function(array){return $(this).each(function(){var select=this;$.each(array,function(){select.options[select.options.length]=new Option(this);});});}
$.fn.clearOptions=function(startIndex){if(!startIndex)
startIndex=0;$(this).each(function(){while(this.length>startIndex)
this.options[this.length-1]=null;});return this;}
$.fn.setSelectedOption=function(value){$(this).each(function(){for(var i=0;i<this.length;i++){if(this.options[i].value==value||this.options[i].text==value){this.options[i].selected=true;break;}}});return this;}
$.fn.setSelectedOptionIndex=function(index){return this.each(function(){this.options[index].selected=true;});}
$.fn.selectedOptionText=function(){if(this.length==0)
return"";var select=this[0];return select.options[select.selectedIndex].text;}
$.fn.selectedOptionValue=function(){if(this.length==0)
return"";var select=this[0];return select.options[select.selectedIndex].value;};$.fn.imageRollover=function(){$(this).each(function(){}).hover(function(){$(this).attr("src",getHoverSrc($(this).attr("src")));},function(){$(this).attr("src",$(this).attr("src").replace("-hov",""));});function getHoverSrc(src){var i=src.lastIndexOf(".");return src.substr(0,i)+"-hov"+src.substr(i);}
return this;};$.fn.rollover=function(options){options=$.extend({},$.fn.rollover.defaults,options);if($(this).length==0)
return this;var tagName=$(this)[0].tagName;var overCallback=function(e){var target=$(e.target).closest(tagName);var ignore=false;$.each(options.ignoreClass,function(i,c){if(target.hasClass(c)){ignore=true;return false;}});if(!ignore)
target.addClass(options.className);};var outCallback=function(e){$(e.target).closest(tagName).removeClass(options.className);};return $(this).hover(overCallback,outCallback);};$.fn.rollover.defaults={"className":"hover","ignoreClass":["disabled","selected"]};$.fn.locateTo=function(offset){$(this).css({left:offset.left,top:offset.top});return this;}
$.fn.makeSameSize=function(target){$(this).width($(target).outerWidth()).height($(target).outerHeight());return this;}
$.fn.sameElement=function(expr){var set1=$(this);var set2=$(expr);if(set1.length==0||set2.length==0)
return false;return set1[0]==set2[0];}
$.fn.ancestor=function(expr){if($(this).length==0)
return null;var ancestorSet=$(expr);var current=$(this).get(0);while(current.length!=0){for(var i=0;i<ancestorSet.length;i++){if($(current).sameElement(ancestorSet[i]))
return $(current);}
current=$(current).parent();}
return $(current);}
$.fn.truncate=function(options){var defaults={width:'100',after:'...'};var options=$.extend(defaults,options);var tempSpan=$("<span style='position:absolute; visible:hidden;'>"+$(this).text()+"</span>").appendTo(document.body);var truncateWidth=options.width;if(tempSpan.width()>truncateWidth){var smaller_text=tempSpan.text();var i=1;tempSpan.text(options.after);while(tempSpan.width()<truncateWidth){tempSpan.text(smaller_text.substr(0,i++)+options.after);}
$(this).text(tempSpan.text());}
tempSpan.remove();return this;}
var types=['DOMMouseScroll','mousewheel'];$.event.special.mousewheel={setup:function(){if(this.addEventListener)
for(var i=types.length;i;)
this.addEventListener(types[--i],mousewheelHandler,false);else
this.onmousewheel=mousewheelHandler;},teardown:function(){if(this.removeEventListener)
for(var i=types.length;i;)
this.removeEventListener(types[--i],mousewheelHandler,false);else
this.onmousewheel=null;}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});function mousewheelHandler(event){var args=[].slice.call(arguments,1),delta=0,returnValue=true;event=$.event.fix(event||window.event);event.type="mousewheel";if(event.wheelDelta)delta=event.wheelDelta/120;if(event.detail)delta=-event.detail/3;args.unshift(event,delta);return $.event.handle.apply(this,args);}})(jQuery);﻿
Type.registerNamespace("Nordstrom");Nordstrom.QuickView=function(){this._settings=null;this._currentStyle;this._hoverTimeoutHandler;this._quickViewOpenedHandler;this._loadErrorHandler;this._mouseMoveHandler;this._fashionClickHandler;this._currentButton;this._enabled=true;this._bufferLayer;this._imageViewer=null;this._navigateCallback=null;this._currentPopupBounds;Nordstrom.QuickView.initializeBase(this);}
Nordstrom.QuickView.prototype={initialize:function(){Nordstrom.QuickView.callBaseMethod(this,"initialize");var container=$(this._settings.container);if(container.length==0)
return;this._hoverTimeoutHandler=Function.createDelegate(this,this._onHoverTimeout);this._contentLoadedHandler=Function.createDelegate(this,this._onContentLoaded);this._mouseMoveHandler=Function.createDelegate(this,this._onMouseMove);this._quickViewOpenedHandler=Function.createDelegate(this,this._onQuickViewOpened);this._fashionClickHandler=Function.createDelegate(this,this._onFashionClick);$.extend(this._settings,{hoverBufferWidth:10,medThumbHorizShift:-11,smallThumbHorizShift:-61,altViewAddtlAdjustment:-50},window.QuickViewSettingsOverride||{});container.remove().prependTo("body");this._bufferLayer=$("<div/>").attr("id","qvBuffer").css({"background":"url("+PageParameters.imageUrl+"store/common/trans_pixel.gif) repeat","cursor":"default","position":"absolute","display":"none","z-index":parseInt(container.css("z-index"))-2}).prependTo("body");this.bind(document.body,null);},bind:function(context){$("div.qv-button",context).mouseover(Function.createDelegate(this,this._onMouseOver)).mouseout(Function.createDelegate(this,this._onMouseOut));},_onMouseOver:function(e){this._currentButton=e.target;window.setTimeout(this._hoverTimeoutHandler,this._settings.hoverDelay);},_onMouseOut:function(e){this._currentButton=null;},_onHoverTimeout:function(){if(this._currentButton==null||!this._enabled)
return;var currentButtonSettings=$(this._currentButton).data("settings");if(currentButtonSettings==null){var idParts=$(this._currentButton).attr("id").split("_");currentButtonSettings={fashionId:idParts[1],mode:idParts[2],origin:idParts[3]};$(this._currentButton).data("settings",currentButtonSettings);}
if(currentButtonSettings.htmlContent){this._launchQuickView(currentButtonSettings);}
else{this._loadQuickViewContent(currentButtonSettings);}},_loadQuickViewContent:function(currentButtonSettings){if(currentButtonSettings.fashionId==null)
return;var url=String.format(this._settings.syndicationUrl,currentButtonSettings.fashionId,currentButtonSettings.origin);$.ajax({"method":"GET","url":url,"dataType":"json","success":this._contentLoadedHandler,"error":$.ajaxError});},_onContentLoaded:function(response,textStatus){if(response.error){alert(response.error);return;}
if(response.errorUrl){document.location=response.errorUrl;return;}
var currentButtonSettings=$(this._currentButton).data("settings");$.extend(currentButtonSettings,{htmlContent:$.stripLeadingEmptySpan(response.htmlContent)},response.args);this._launchQuickView(currentButtonSettings);$(this._currentButton).data("settings",currentButtonSettings);},_setImagePath:function(){var imagePath=getImageURL();var endString=imagePath.lastIndexOf('.com');return imagePath.substring(imagePath,endString+5);},_launchQuickView:function(currentButtonSettings){if(this._currentButton==null||currentButtonSettings==null)
return;this._prepareQuickViewContent(currentButtonSettings);var container=$(this._settings.container);var pos=$(this._currentButton).offset();container.show();if(container.find("div.unavailable").length==0){var productText=$("a.link",container);var linkPos=productText.position();var hasAltViews=$("ul.thumbnails",container).length>0;var shiftTop=-1*(linkPos.top-$(this._currentButton).height())-1;var src=$(this._currentButton).closest("div.fashion-item").find("div.fashion-photo img").attr("src");var mediumPhoto=src.indexOf("/Medium/")!=-1;var shiftLeft=(mediumPhoto)?this._settings.medThumbHorizShift:this._settings.smallThumbHorizShift;if(hasAltViews)
shiftLeft+=this._settings.altViewAddtlAdjustment;if(!hasAltViews)
$("div.quickview",container).addClass("no-alts");}
var context=this;if(this._currentButton==null)
return;container.flyout({origin:this._currentButton,shiftLeft:shiftLeft,shiftTop:shiftTop,blockUIBeforeOpen:false,optimizeForViewport:true,callback:function(bounds){context._currentPopupBounds=bounds;context._quickViewOpenedHandler(currentButtonSettings);}});this._toggleMainPageElements(false);},_prepareQuickViewContent:function(currentButtonSettings){$(this._settings.container).html(currentButtonSettings.htmlContent);var thumbnailHandler=Function.createDelegate(this,this._onThumbnailClick);var swatchClickHandler=Function.createDelegate(this,this._onSwatchClicked);var imageViewerSettings={mainImage:$("div.fashion-photo",this._settings.container),swatches:$("ul.swatches>li",this._settings.container),thumbnails:$("ul.thumbnails>li.fashion-photo",this._settings.container),largeSwatch:"#largeSwatch",imageRegistry:currentButtonSettings.photos,swatchRegistry:currentButtonSettings.swatches,galleryPath:this._setImagePath()+"ImageGallery/store/product/"+this._settings.photoSize+"/",swatchClickedCallback:function(swatchInfo){swatchClickHandler(swatchInfo,currentButtonSettings)},thumbnailClickedCallback:function(index){thumbnailHandler(index,currentButtonSettings)}};$create(Nordstrom.ImageViewer,{"settings":imageViewerSettings},null,null,null);if($.browser.msie&&$.browser.version<=7){$('.quickview .fashion-photo img').load(function(){var fashionPhoto=$(this).parents('.fashion-photo:first');var topMargin=Math.floor((fashionPhoto.height()-$(this).height())/2);$(this).css("margin-top",topMargin+"px")})}
$("div.fashion-photo>a, a.link, a.more-colors",this._settings.container).click(this._fashionClickHandler);$("#qvMoreColorsLink").click(function(){cmCreatePageElementTag('More Colors Link Click','Quickview');});},_onMouseMove:function(e){if(e.pageX>(this._currentPopupBounds.left-this._settings.hoverBufferWidth)&&e.pageX<(this._currentPopupBounds.left+this._currentPopupBounds.width+this._settings.hoverBufferWidth)&&e.pageY>(this._currentPopupBounds.top-this._settings.hoverBufferWidth)&&e.pageY<(this._currentPopupBounds.top+this._currentPopupBounds.height+this._settings.hoverBufferWidth)){return;}
this._closeQuickView();},_closeQuickView:function(){$(document).unbind("mousemove",this._mouseMoveHandler);this._toggleMainPageElements(true);$.hideDropShadow();this._bufferLayer.css("display","none");$(this._settings.container).css("display","none");},_toggleMainPageElements:function(visible){if((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7)){$("select[id^='dropDown']").css("visibility",visible?"visible":"hidden");}},_onQuickViewOpened:function(currentButtonSettings){$.log("quick view opened: pos="+this._currentPopupBounds.left+","+
this._currentPopupBounds.top+" dims="+this._currentPopupBounds.width+","+this._currentPopupBounds.height);$(document).mousemove(this._mouseMoveHandler);var context=this;$("div.photo",this._settings.container).click(function(){window.location=$("a.link",context._settings.container).attr("href");});this._bufferLayer.css({"display":"block","left":(this._currentPopupBounds.left-this._settings.hoverBufferWidth)+"px","top":(this._currentPopupBounds.top-this._settings.hoverBufferWidth)+"px"}).width(this._currentPopupBounds.width+2*this._settings.hoverBufferWidth).height(this._currentPopupBounds.height+2*this._settings.hoverBufferWidth);$(this._settings.container).dropShadow();this._createCoremetricTags(currentButtonSettings);},_createCoremetricTags:function(currentButtonSettings){var isSwatchAvailable="NO";var styleType="Style Group";var attributeArray;var categoryId="/quickview/";var totalAlternatesCount=$("ul.thumbnails>li.fashion-photo",this._settings.container).length;var availableSwatchCount=$("ul.swatches>li.swatch",this._settings.container).length;if(availableSwatchCount>1)
isSwatchAvailable="YES";var pageId="QUICKVIEW > ALTS"+totalAlternatesCount+"_SWATCH"+
isSwatchAvailable+": "+currentButtonSettings.styleNumber;if(currentButtonSettings.isOutfit)
styleType="Outfit";attributeArray=currentButtonSettings.categoryString+"-_-"+currentButtonSettings.cmPlacement+"-_--_-"+styleType;if(totalAlternatesCount==0&&availableSwatchCount==0)
categoryId=categoryId+"main";else if(totalAlternatesCount>=1&&availableSwatchCount>1)
categoryId=categoryId+"altsandcolors/alts"+totalAlternatesCount;else if(totalAlternatesCount>=1&&availableSwatchCount<1)
categoryId=categoryId+"altsonly/alts"+totalAlternatesCount;else if(totalAlternatesCount==0&&availableSwatchCount>=1)
categoryId=categoryId+"colorsonly/";cmCreatePageviewTag(pageId,null,categoryId,null,null,attributeArray);if($("#qvMoreColorsLink",this._settings.container).length>0)
cmCreatePageElementTag('More Colors Link Display','Quickview');},_onThumbnailClick:function(index,currentButtonSettings){var slotNumber=index+1;var numberOfThumbs=$("ul.thumbnails>li.fashion-photo",this._settings.container).length;cmCreatePageviewTag('QUICKVIEW > ALT_SLOT'+slotNumber+': '+currentButtonSettings.styleNumber,null,'/quickview/use/altslots/'+numberOfThumbs,null,'QuickViewContainer');},_onSwatchClicked:function(swatchInfo,currentButtonSettings){cmCreatePageviewTag('QUICKVIEW > SWATCH:'+currentButtonSettings.styleNumber,null,'/quickview/use/swatchclicks',null,'QuickViewContainer');},_onFashionClick:function(e){var target=$(e.target).closest("a");var fashionId=parseInt(target.closest("div.quickview").attr("id").split("_")[1]);var cmName;if(target.hasClass("link"))
cmName="Item Title";else if(target.hasClass("more-colors"))
cmName="More Colors";else
cmName="Main Image";cmCreatePageElementTag(cmName,"Quickview");if(window.fashionResults){target.attr("href",target.attr("href")+"&resultback="+window.fashionResults._currentScroll||"0");}
return true;},dispose:function(){Nordstrom.QuickView.callBaseMethod(this,"dispose");},set_settings:function(value){this._settings=value;},get_settings:function(){return this._settings;},set_enabled:function(value){this._enabled=value;},get_enabled:function(){return this._enabled;}}
Nordstrom.QuickView.registerClass("Nordstrom.QuickView",Sys.Component);Sys.Application.notifyScriptLoaded();﻿Type.registerNamespace("Nordstrom");Nordstrom.SearchBar=function(){this._settings=null;this._currentData=null;this._mouseDownHandler=null;this._suggestionListFull=false;this._startCharacter=null;this._selectedText="";this._suggestionList=null;this._listControl=null;this._onSuggestionsLoadedHandler=null;this._onSuggestionsLoadFailHandler=null;this._isPredictiveSearchTermSelected=false;Nordstrom.SearchBar.initializeBase(this);}
Nordstrom.SearchBar.prototype={initialize:function(){Nordstrom.SearchBar.callBaseMethod(this,"initialize");$.extend(this._settings,{maxItems:10,inputBox:$("#keywordSearchForm input[type=text]")},window.SearchBoxSettingsOverride||{});this._onSuggestionsLoadedHandler=Function.createDelegate(this,this._onSuggestionsScriptLoaded);this._onSuggestionsLoadFailHandler=Function.createDelegate(this,this._onSuggestionsLoadFail);$("#keywordSearchForm").submit(Function.createDelegate(this,this._onSubmit));var context=this;$("#keywordSearchForm input[type=text]").attr("autocomplete","off").keydown(Function.createDelegate(this,this._onKeyDown)).keyup(Function.createDelegate(this,this._onKeyUp)).select(Function.createDelegate(this,this._onSelect)).click(Function.createDelegate(this,this._onClick)).blur(function(){window.setTimeout(Function.createDelegate(context,context.hideSuggestions),150)});this._initListElement();},_initListElement:function(){var searchName=$("#keywordSearchForm").attr("name");this._suggestionList=$("<ul/>").attr("id","searchSuggestions").appendTo(document.body);this._listControl=$create(Nordstrom.DynamicList,{"settings":$.extend({},this._settings,{"itemSelectedCallback":Function.createDelegate(this,this._onItemSelected)})},null,null,this._suggestionList.get(0));},_onItemSelected:function(value){$(this._settings.inputBox).val(value);$(this._suggestionList).hide();this._isPredictiveSearchTermSelected=true;$("#keywordSearchForm").submit();},_onSelect:function(e){this._selectedText=$(e.target).val();},_onClick:function(e){if(Sys.Browser.agent===Sys.Browser.InternetExplorer)
document.body.oncontextmenu=function(){return false;}
else
window.oncontextmenu=function(){return false;}},_onKeyUp:function(e){var input=$(e.target);var inputValue=input.val();switch(e.keyCode){case 46:case Sys.UI.Key.backspace:if(inputValue.length==1&&this._isValidStartChar(inputValue))
this._loadSuggestions(inputValue);break;}},_onKeyDown:function(e){var input=$(e.target);var inputValue=input.val();if(this._selectedText.length>0){switch(e.keyCode){case Sys.UI.Key.right:case Sys.UI.Key.left:return;break;}
inputValue="";this._selectedText="";}
switch(e.keyCode){case Sys.UI.Key.up:e.preventDefault();this._listControl.highlightPrev();inputValue=this._listControl.highlightedValue();if(inputValue!=null)
input.val(inputValue);this._isPredictiveSearchTermSelected=true;break;case Sys.UI.Key.down:e.preventDefault();this._listControl.highlightNext();inputValue=this._listControl.highlightedValue();if(inputValue!=null)
input.val(inputValue);this._isPredictiveSearchTermSelected=true;break;case Sys.UI.Key.backspace:case 46:if(inputValue.length==1)
this.hideSuggestions();else
window.setTimeout(Function.createDelegate(this,this._bindSuggestions),100);this._isPredictiveSearchTermSelected=false;break;case Sys.UI.Key.tab:this.hideSuggestions();$("#keywordSearchForm input[type=submit]").focus();return false;case Sys.UI.Key.enter:break;default:if(inputValue.length==0){var keyCode;if(e.keyCode>=96&&e.keyCode<=105)
keyCode=48+e.keyCode-96;else
keyCode=e.keyCode;var character=String.fromCharCode(keyCode).toLowerCase();if(!this._isValidStartChar(character))
return true;window.setTimeout(Function.createDelegate(this,this._bindSuggestions),100);this._loadSuggestions(character);}
else
window.setTimeout(Function.createDelegate(this,this._bindSuggestions),100);break;}},_isValidStartChar:function(c){return new RegExp("[a-z0-9]").test(c);},_onSubmit:function(){this.hideSuggestions();var input=this._settings.inputBox.val().trim();if(input.length==0){alert("Please specify a search term.");return false;}
this._settings.inputBox.val(input);var cmLinkname="go";if(this._isPredictiveSearchTermSelected){cmLinkname="Predictive Search";$("#keywordSearchForm input[name='origin']").val("PredictiveSearch");}
var cm=new _cm("tid","1","vn2","e4.0");cmCreateManualLinkClickTag(PageParameters.storeUrl+"SR?"+$.param({"KeyWord":input,"CatID":cmLinkname}),cm.pi);return true;},_loadSuggestions:function(startLetter){this._startCharacter=startLetter;var scriptLoader=Sys._ScriptLoader.getInstance();var imageUrl=PageParameters.imageUrl.indexOf('images/')>0?PageParameters.imageUrl.replace('images/',''):PageParameters.imageUrl;scriptLoader.queueScriptReference(imageUrl+"images/store/suggestions/"+startLetter+".js");scriptLoader.loadScripts(100,this._onSuggestionsLoadedHandler,this._onSuggestionsLoadFailHandler,null);},_onSuggestionsScriptLoaded:function(obj,scriptElement){this._toggleMainPageElements(false);eval("Nordstrom$SearchBar$LoadSuggestions$"+this._startCharacter+"()");},_onSuggestionsLoadFail:function(obj,scriptElement){},onItemsFetched:function(data){this._currentData=data;this._bindSuggestions();},_appendSuggestion:function(term,highlight,input){var formatted;if(term.startsWith(input))
formatted="<strong>"+term.substring(0,input.length)+"</strong>"+term.substring(input.length);else
formatted=term;this._listControl.add(formatted,term);this._suggestionListFull=(this._listControl.count()>=this._settings.maxItems);},_bindSuggestions:function(){this._listControl.clear();this._suggestionListFull=false;if(this._currentData==null){this.hideSuggestions();return;}
var context=this;var input=$(this._settings.inputBox).val().toLowerCase();if(this._currentData.prefixes==null||this._currentData.suggestions==null){this.hideSuggestions();return;}
var suggestIndexes=this._currentData.prefixes[input];if(suggestIndexes==null){this.hideSuggestions();return;}
$.each(suggestIndexes,function(){if(context._suggestionListFull)
return false;var suggestion=context._currentData.suggestions[this];if(suggestion==null||suggestion.length==0)
return true;context._appendSuggestion(suggestion,true,input);});if(this._listControl.count()==0){this.hideSuggestions();return;}
if(!this._suggestionList.is(":visible")){var loc=Sys.UI.DomElement.getLocation($(this._settings.inputBox)[0]);var offset=$(this._settings.inputBox).offset();this._suggestionList.css({top:offset.top+$(this._settings.inputBox)[0].offsetHeight+2,left:offset.left,display:"block"});}},hideSuggestions:function(e){this._suggestionList.hide();this._toggleMainPageElements(true);},_toggleMainPageElements:function(visible){if((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7)){$("select[id^='dropDown']").css("visibility",visible?"visible":"hidden");$("#ctl00_MainContent_listStates").css("visibility",visible?"visible":"hidden");}},dispose:function(){Nordstrom.SearchBar.callBaseMethod(this,"dispose");},set_settings:function(value){this._settings=value;},get_settings:function(){return this._settings;}}
Nordstrom.SearchBar.registerClass("Nordstrom.SearchBar",Sys.Component);Nordstrom.DynamicList=function(element){this._settings=null;this._highlightedItem=null;this._count=0;Nordstrom.DynamicList.initializeBase(this,[element]);}
Nordstrom.DynamicList.prototype={initialize:function(){Nordstrom.DynamicList.callBaseMethod(this,'initialize');var context=this;var listElement=$(this.get_element());this._count=$("LI",listElement).length;listElement.mouseover(function(e){var target=context._getListItemTarget(e.target);context._setHighlightedItem(target);});listElement.mousedown(function(e){var target=context._getListItemTarget(e.target);if(target==null)
return;context._selectItem(target);e.preventDefault();});},_selectItem:function(item){if(item==null)
return;if(this._settings.itemSelectedCallback)
this._settings.itemSelectedCallback($.data(item,"value"));this._isPredictiveSearchTermSelected=true;},_setHighlightedItem:function(element){if(element==null)
return;$(this._highlightedItem).removeClass("over");this._highlightedItem=$(element);this._highlightedItem.addClass("over");},_getListItemTarget:function(element){while(element&&element.tagName!="LI")
element=element.parentNode;return element;},_getHighlightedIndex:function(){if(this._highlightedItem==null)
return-1;return $("LI",this.get_element()).index(this._highlightedItem);},_highlightFirst:function(){this._setHighlightedItem($("LI:first",this.get_element()));},highlightPrev:function(){if(this._count==0)
return;if(this._highlightedItem==null){this._highlightFirst();return;}
if(this._count==1)
return;var prev=this._highlightedItem.prev();if(prev.length==1)
this._setHighlightedItem(prev);else
this._setHighlightedItem($("LI:last",this.get_element()));},highlightNext:function(){if(this._count==0)
return;if(this._highlightedItem==null){this._highlightFirst();return;}
var next=this._highlightedItem.next();if(next.length==1)
this._setHighlightedItem(next);else
this._highlightFirst();},highlightedValue:function(){if(this._highlightedItem==null)
return null;return this._highlightedItem.data("value");},count:function(){return this._count;},clear:function(){$("LI",this.get_element()).remove();this._count=0;},add:function(html,value){var li=$("<li />").html(html.toString());$.data(li[0],"value",value.toString());li.appendTo($(this.get_element()));this._count++;},highlight:function(index){var items=$("LI",this.get_element());if(index>=0&&index<items.length)
this._setHighlightedItem(items[index]);},dispose:function(){Nordstrom.DynamicList.callBaseMethod(this,'dispose');},set_settings:function(value){this._settings=value;},get_settings:function(){return this._settings;}}
Nordstrom.DynamicList.registerClass('Nordstrom.DynamicList',Sys.UI.Control);function Nordstrom$SearchBar$LoadSuggestions(data){$find('SearchBoxComponent').onItemsFetched(data);}
Sys.Application.notifyScriptLoaded();﻿(function($){$.fn.tooltip=function(options){options=$.extend({},$.fn.tooltip.defaults,options);var displayTooltip=function(target){if(options.callback){if(!options.callback(target))
return;}
var tooltipContainer=$("#tooltipContainer");if(tooltipContainer.length==0){tooltipContainer=$("<div id='tooltipContainer' />").appendTo(document.body);}
var index=target.data("tooltipIndex");if(index!=null){tooltip=tooltipContainer.find("div.tooltip:eq("+index+")");}
else{if(options.message.length==0)
options.message=target.data("title");tooltip=$("<div />").addClass("tooltip "+options.format).mouseover(function(){$(this).css("visibility","hidden");});$("<p/>").html(options.message).appendTo(tooltip);if(options.centerText===true)
tooltip.find("p").css("text-align","center");tooltip.appendTo(tooltipContainer);target.data("tooltipIndex",tooltipContainer.children().length-1);}
var offset=target.offset();tooltip.css("top",offset.top-tooltip.height()+3);var tooltipWidth=tooltip.width();var targetWidth=target.width();var orient=options.format.substr(0,options.format.indexOf("-"));switch(orient){case"left":break;case"right":tooltip.css("left",offset.left-tooltipWidth+(targetWidth/2)+21);break;case"center":default:tooltip.css("left",offset.left+(targetWidth/2)-(tooltipWidth/2));break;}
tooltip.css("visibility","visible");};var hideTooltip=function(target){var tooltip=$("#tooltipContainer").find("div.tooltip:eq("+target.data("tooltipIndex")+")");tooltip.css("visibility","hidden");};$(this).each(function(){var target=$(this);target.data("title",target.attr("title"));target.removeAttr("title");if(options.trigger=="hover"){target.mouseenter(function(){target.addClass("tooltip-over");window.setTimeout(function(){if(target.hasClass("tooltip-over"))
displayTooltip(target);},options.delay);});target.mouseleave(function(){target.removeClass("tooltip-over");hideTooltip(target);});}
else if(options.trigger=="click"){var markerClass="_keepDisplaying";var tryHideTooltip=function(){if(!target.hasClass(markerClass))
hideTooltip(target);else
target.removeClass(markerClass);};target.mouseleave(tryHideTooltip);target.click(function(){displayTooltip(target);target.addClass(markerClass);window.setTimeout(tryHideTooltip,options.minDisplayDuration);});}});}
$.fn.tooltip.defaults={format:"center-1line-short",trigger:"hover",message:"",delay:250,minDisplayDuration:1000};})(jQuery);﻿(function($){$.extractPhotoPath=function(url){if(url==null||url.length==0)
return"";var lastSlash=url.lastIndexOf('/');var nextLastSlash=url.lastIndexOf('/',lastSlash-1);return url.substring(nextLastSlash+1,url.lastIndexOf('.'));}
$.log=function(msg){if(typeof(console)!="undefined"){console.log("%s: %o",msg,this);}
return this;}
$.log=function(message){if(typeof(console)!="undefined"){console.log(message);}}
$.ajaxError=function(e){var json;try
{var json=$.parseJSON(e.responseText);}
catch(exception)
{$.log(e.responseText);return;}
if(json.errorUrl)
window.location.href=json.errorUrl;else if(json.error)
alert(json.error);}
$.optimizeBoundsForViewport=function(bounds,buffer){var optimizedBounds={};var scrollTop=$(window).scrollTop();var scrollLeft=$(window).scrollLeft();var winHeight=$(window).height();var winWidth=$(window).width();if(bounds.top<scrollTop+buffer)
optimizedBounds.top=scrollTop+buffer;else
if(bounds.top+bounds.height>winHeight+scrollTop-buffer)
optimizedBounds.top=scrollTop+winHeight-bounds.height-buffer;if(bounds.left<scrollLeft+buffer)
optimizedBounds.left=scrollLeft+buffer;else
if(bounds.left+bounds.width>winWidth+scrollLeft+buffer)
optimizedBounds.left=winWidth-bounds.width+scrollLeft-buffer;return $.extend(bounds,optimizedBounds);}
$.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',value,expires,path,domain,secure].join('');}else{if(undefined==name)
return;var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=cookie.substring(name.length+1);if(cookieValue.indexOf("&")>0)
cookieValue=$.unparam(cookieValue);else
cookieValue=decodeURIComponent(cookieValue);break;}}}
return cookieValue;}};$.setCookie=function(name,keyName,keyValue){var cookie=$.cookie(name)||{};cookie[keyName]=encodeURIComponent(keyValue);var cookieDomain=location.host.indexOf(".dev.")!=-1?".dev.nordstrom.com":".nordstrom.com";$.cookie(name,$.param(cookie),{"domain":cookieDomain,"path":"/"});};$.any=function(array,evaluator){var any=false;$.each(array,function(i,value){if(evaluator(i,value)){any=true;return false;}});return any;};$.firstOrDefault=function(array,evaluator){var first=null;$.each(array,function(i,value){if(evaluator(i,value)){first=value;return false;}});return first;};$.unparam=function(queryString){if(typeof(queryString)!=="string")
return queryString;var obj={};var vars=queryString.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");pair[0]=decodeURIComponent(pair[0]);try
{pair[1]=decodeURIComponent(pair[1]);}
catch(exception)
{pair[1]=pair[1];}
if(typeof obj[pair[0]]==="undefined"){obj[pair[0]]=pair[1];}else if(typeof obj[pair[0]]==="string"){var arr=[obj[pair[0]],pair[1]];obj[pair[0]]=arr;}else{obj[pair[0]].push(pair[1]);}}
return obj;};$.sprintf=function(format){var argv=Array.apply(null,arguments).slice(1);return format.replace($.sprintf.settings.re,$.sprintf.dispatch(argv));};$.vsprintf=function(format,data){return format.replace($.sprintf.settings.re,$.sprintf.dispatch(data));};$.sprintf.settings={formats:{'%':function(val){return'%';},'b':function(val){return parseInt(val,10).toString(2);},'c':function(val){return String.fromCharCode(parseInt(val,10));},'d':function(val){return parseInt(val,10)?parseInt(val,10):0;},'u':function(val){return Math.abs(val);},'f':function(val,p){return(p>-1)?Math.round(parseFloat(val)*Math.pow(10,p))/Math.pow(10,p):parseFloat(val);},'o':function(val){return parseInt(val,10).toString(8);},'s':function(val){return val;},'x':function(val){return(''+parseInt(val,10).toString(16)).toLowerCase();},'X':function(val){return(''+parseInt(val,10).toString(16)).toUpperCase();}},re:/%(?:(\d+)?(?:\.(\d+))?|\(([^)]+)\))([%bcdufosxX])/g};$.sprintf.dispatch=function(data){if(data.length==1&&typeof data[0]=='object'){data=data[0];return function(match,w,p,lbl,fmt,off,str){return $.sprintf.settings.formats[fmt](data[lbl]);};}else{var idx=0;return function(match,w,p,lbl,fmt,off,str){return $.sprintf.settings.formats[fmt](data[idx++],p);};}};$.stripLeadingEmptySpan=function(htmlContent){if(htmlContent.startsWith("<span></span>")){htmlContent=htmlContent.substr(13);}
return htmlContent;};$.uniqueStrings=function(strings,delimiter){var stringsArray=strings.split("|");var uniqueStrings="";var uniqueStringsArray=[];for(var i=stringsArray.length-1;i>=0;i--){var val=stringsArray[i];if($.inArray(val,uniqueStringsArray)===-1){uniqueStringsArray.unshift(val);uniqueStrings+=(uniqueStringsArray.length>1)?"|"+val:val;}}
return uniqueStrings;};$.formatNumber=function(strNumber){var objRegExp=new RegExp('(-?[0-9]+)([0-9]{3})');while(objRegExp.test(strNumber)){strNumber=strNumber.replace(objRegExp,'$1,$2');}
return strNumber;};$.getNodeData=function(node,attribute,index,delimiter,capitalize){if(node.length==0)
return"";var returnVal=node.attr(attribute).split(delimiter)[index];if(capitalize)
returnVal=returnVal.replace(/(^|\s)([a-z])/g,function(m,p1,p2){return p1+p2.toUpperCase();});return returnVal;};$.getUrlParameter=function(href,param){var value="";if(href.indexOf("?")>-1){var queryString=href.substr(href.indexOf("?")).toLowerCase();var array=queryString.split("&");for(var i=0;i<array.length;i++){if(array[i].indexOf(param+"=")>-1){var aParam=array[i].split("=");value=aParam[1];break;}}}
return value;};$.addCoremetricsToCategoryId=function(filterState,origin){var KEYWORD_SEARCH_ORIGIN_VALUE="keywordsearch";var PREDICTIVE_SEARCH_ORIGIN_VALUE="predictivesearch";var ADVANCED_SEARCH_ORIGIN_VALUE="advancedsearch";origin=origin.toLowerCase();if(origin!=KEYWORD_SEARCH_ORIGIN_VALUE&&origin!=PREDICTIVE_SEARCH_ORIGIN_VALUE&&origin!=ADVANCED_SEARCH_ORIGIN_VALUE)
return"";var addToCategoryId="";if(filterState.isFilterActive=="true")
{if(filterState.isFilterUsed=="true")
{switch(origin)
{case KEYWORD_SEARCH_ORIGIN_VALUE:case PREDICTIVE_SEARCH_ORIGIN_VALUE:addToCategoryId="1";break;case ADVANCED_SEARCH_ORIGIN_VALUE:addToCategoryId=".01";break;}}
else if(origin==KEYWORD_SEARCH_ORIGIN_VALUE||origin==PREDICTIVE_SEARCH_ORIGIN_VALUE)
addToCategoryId="2";}
return addToCategoryId;};$.formatNumber=function(number){number+="";var parts=number.split('.');var integer=parts[0];var decimal=parts.length>1?'.'+parts[1]:'';var regex=/(\d+)(\d{3})/;while(regex.test(integer))
{integer=integer.replace(regex,'$1'+','+'$2');}
return integer+decimal;};})(jQuery);
