var autoLinks=["10.80.20.181","10.80.20.182","10.80.20.183","208.234.123.19","208.234.123.21","admin.superga-usa.com","admin.superga.com","new.superga-usa.com","www.superga-usa.com"];var scene7ServerURL="http://s7d9.scene7.com/is/image/Superga/";var pdpAltViewsWidth=160;var pdpAltViewsHeight=96;var quickViewAltViewsWidth=160;var quickViewAltViewsHeight=96;var addToCartHoverColor="#000000";var siteParams={sociableLabsEnabled:"false",assetsBaseURL:"assets.superga-usa.com/",blueTriangleSiteID:"superga"};var jsMessages={};jsMessages["productImage.info"]="Drag Left/Right to spin";var product_image_360="//assets.superga-usa.com//assets/images/common/view360.png";if(typeof console==="undefined"){console={log:function(){},debug:function(){}};}if(!Array.prototype.filter){Array.prototype.filter=function(fun){if(!this){throw new TypeError();}var objects=Object(this);var len=objects.length>>>0;if(typeof fun!=="function"){throw new TypeError();}var res=[];var thisp=arguments[1];for(var i in objects){if(objects.hasOwnProperty(i)){if(fun.call(thisp,objects[i],i,objects)){res.push(objects[i]);}}}return res;};}if(!String.prototype.endsWith){String.prototype.endsWith=function(searchString,position){position=position||this.length;position=position-searchString.length;var lastIndex=this.lastIndexOf(searchString);return lastIndex!==-1&&lastIndex===position;};} /*! Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. * Thanks to: Seamus Leahy for adding deltaX and deltaY * * Version: 3.1.3 * * Requires: 1.2.2+ */ ; /*! * jQuery++ - 1.0.1 * http://jquerypp.com * Copyright (c) 2013 Bitovi * Mon, 07 Oct 2013 21:27:01 GMT * Licensed MIT * Download from: http://bitbuilder.herokuapp.com/jquerypp.custom.js?plugins=jquerypp%2Fevent%2Fswipe */ (function($){var __m3=(function($){var event=$.event,findHelper=function(events,types,callback,selector){var t,type,typeHandlers,all,h,handle,namespaces,namespace,match;for(t=0;t0;}};$.fn.triggerHandled=function(event,data){event=(typeof event=="string"?$.Event(event):event);this.trigger(event,data);return event.handled;};event.setupHelper=function(types,startingEvent,onFirst){var remove;var add;if(!onFirst){onFirst=startingEvent;startingEvent=null;}add=function(handleObj){var bySelector,selector=handleObj.selector||"",namespace=handleObj.namespace?"."+handleObj.namespace:"";if(selector){bySelector=event.find(this,types,selector);if(!bySelector.length){$(this).delegate(selector,startingEvent+namespace,onFirst);}}else{if(!event.find(this,types,selector).length){event.add(this,startingEvent+namespace,onFirst,{selector:selector,delegate:this});}}};remove=function(handleObj){var bySelector,selector=handleObj.selector||"";if(selector){bySelector=event.find(this,types,selector);if(!bySelector.length){$(this).undelegate(selector,startingEvent,onFirst);}}else{if(!event.find(this,types,selector).length){event.remove(this,startingEvent,onFirst,{selector:selector,delegate:this});}}};$.each(types,function(){event.special[this]={add:add,remove:remove,setup:function(){},teardown:function(){}};});};return $;})($);var __m1=(function($){var isPhantom=/Phantom/.test(navigator.userAgent),supportTouch=!isPhantom&&"ontouchend" in document,scrollEvent="touchmove scroll",touchStartEvent=supportTouch?"touchstart":"mousedown",touchStopEvent=supportTouch?"touchend":"mouseup",touchMoveEvent=supportTouch?"touchmove":"mousemove",data=function(event){var d=event.originalEvent.touches?event.originalEvent.touches[0]:event;return{time:(new Date).getTime(),coords:[d.clientX,d.clientY],origin:$(event.target)};};var swipe=$.event.swipe={delay:500,max:320,min:30};$.event.setupHelper(["swipe","swipeleft","swiperight","swipeup","swipedown"],touchStartEvent,function(ev){var start=data(ev),stop,delegate=ev.delegateTarget||ev.currentTarget,selector=ev.handleObj.selector,entered=this;function moveHandler(event){if(!start){return;}stop=data(event);if(Math.abs(start.coords[0]-stop.coords[0])>10){event.preventDefault();}}$(document.documentElement).bind(touchMoveEvent,moveHandler).one(touchStopEvent,function(event){$(this).unbind(touchMoveEvent,moveHandler);if(start&&stop){var deltaX=Math.abs(start.coords[0]-stop.coords[0]),deltaY=Math.abs(start.coords[1]-stop.coords[1]),distance=Math.sqrt(deltaX*deltaX+deltaY*deltaY);if(stop.time-start.time=swipe.min&&distance<=swipe.max){var events=["swipe"];if(deltaX>=swipe.min&&deltaYstop.coords[0]?"swipeleft":"swiperight");}else{if(deltaY>=swipe.min&&deltaX=0){colorCodeUrl=colorCodeUrl.replace(/selectedColor=[^&]+/,"selectedColor="+colorCode);}else{if(colorCodeUrl.indexOf("?")==-1){colorCodeUrl=colorCodeUrl+"?";}else{colorCodeUrl=colorCodeUrl+"&";}colorCodeUrl=colorCodeUrl+"selectedColor="+colorCode;}var existingImgSrc=currentThumbnailImg[0].src;var imageName=existingImgSrc.split("?")[0].substring(existingImgSrc.split("?")[0].lastIndexOf("/")+1);var altImageToUse=$(altImage).attr("id");$(currentThumbnailImg).attr("src",existingImgSrc.replace(imageName,altImageToUse));$(currentThumbnailImg).removeAttr("data-swap");$(currentThumbnailImgAnchor).attr("href",colorCodeUrl);$(currentThumbnailTitle).attr("href",colorCodeUrl);var currentQuicklookBtn=$(oElm).parents(".item_wrap").find(".quicklookButton");var currentDataUrlSplit,framedUrl,genUrl,currentDataUrl;currentDataUrl=$(currentQuicklookBtn).attr("data-url");if(currentDataUrl.indexOf("colorCode")!=-1){currentDataUrlSplit=currentDataUrl.split("&");currentDataUrlSplit.pop();genUrl=currentDataUrlSplit.join("&");$(currentQuicklookBtn).attr("data-url",genUrl+"&colorCode="+colorCode);}else{genUrl=currentDataUrl+"&colorCode="+colorCode;$(currentQuicklookBtn).attr("data-url",genUrl);}});function paginationSuccess(data,substitute){try{var precessedProducts=successProducts(data,substitute);if(precessedProducts===true){quickView.handleQuickView();}successArticles(data,substitute);refinementUtil();}catch(e){console.log(e);}}$("a.viewMore").live("click",function(event){$(".thumbnails").after("
");$.ajax({type:"GET",url:$(event.target).attr("data-href")+"&comm=async",dataType:"html",timeout:15000,success:function(data){$(".loadInfo").remove();paginationSuccess(data,false);return true;},error:function(){$(".loadInfo").remove();return false;}});});$("a.viewMoreByContent").live("click",function(event){$(".thumbnails").after("
");$.ajax({type:"GET",url:$(event.target).attr("data-href")+"&comm=async",dataType:"html",timeout:15000,success:function(data){$(".loadInfo").remove();paginationSuccess(data,true);return true;},error:function(){$(".loadInfo").remove();return false;}});});$("a.viewAll").live("click",function(event){$(".thumbnails").after("
");$.ajax({type:"GET",url:$(event.target).attr("data-href")+"&comm=async",dataType:"html",timeout:60000,success:function(data){$(".loadInfo").remove();paginationSuccess(data,true);return true;},error:function(){$(".loadInfo").remove();return false;}});});$("a.viewone").live("click",function(event){$(".thumbnails").after("
");$.ajax({type:"GET",url:dataHref+"&comm=async",dataType:"html",timeout:15000,success:function(data){$(".loadInfo").remove();paginationSuccess(data);return true;},error:function(){$(".loadInfo").remove();return false;}});});function submitSearchForm(theForm){try{if(strTrim(theForm.keyword.value)==searchInstructions){theForm.keyword.value="";}var f=jQuery(theForm);if(f.length==1){var url=f.attr("action");var qs=f.serialize();var keyword=doubleEncodeURI(theForm.elements.keyword.value);qs=qs.replace("&keyword=","&keyword1=")+"&keyword="+keyword;window.parent.location.href=url+"?cm_sp=globalheader-_-search&"+qs;return false;}}catch(e){}}function doSearchInstructionsAll(){try{if(searchInstructions===undefined){return;}var s1=jQuery("input#keyword.keyword-text");var s2=jQuery("input#keyword1.fl");var s3=jQuery("input#keyword2.fl");if(s1.val()==""){s1.val(searchInstructions);}if(s2.val()==""){s2.val(searchInstructions);}if(s3.val()==""){s3.val(searchInstructions);}}catch(e){}}function doSearchFocus(component,event){var d=component.getAttribute("data-defaultValue");if(d.length){if(!event.keyCode){component.value=component.value.replace(d,"");}else{component.value=String.fromCharCode(event.keyCode);}component.setAttribute("data-defaultValue","");if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}}}function doSearchBlur(component){var megaSearch=$("#megaSearch");var searchButton=$(".js_searchButton");if(megaSearch.is(":visible")){searchButton.removeClass("active");}var searchVal=component.value;if(strTrim(searchVal)==""){component.value=searchInstructions;component.setAttribute("data-defaultValue",searchInstructions);}}$(function(){$("input.search-button").click(function(){clearTimeout(binder.vars.searchTimeout);submitSearchForm(document.searchForm);});});function doControlFocus(component,defaultMessage){var controlVal=component.value;if(controlVal==defaultMessage){component.value="";}}function doControlBlur(component,defaultMessage){var controlVal=component.value;if(strTrim(controlVal)==""){component.value=defaultMessage;}}function strTrim(s){while(s.substring(0,1)==" "){s=s.substring(1,s.length);}while(s.substring(s.length-1,s.length)==" "){s=s.substring(0,s.length-1);}return s;}function displayLayerWithURL(hrefUrl){var p={scrolling:false,href:hrefUrl,opacity:0.6};if(binder.vars.isMobile){p.width="100%";}$.colorbox(p);}function displayResetPasswordLayer(resetPasswordURL){displayLayerWithURL(resetPasswordURL);}function displayCannotSignInLayer(){displayLayerWithURL("/user/cannot_signin.jsp");}function openWindow(address,width,height,features){var featureString,newFeatures,newWindow,featureParam;if(features){featureParam=features.toLowerCase();if(featureParam=="all"){featureString="toolbar=1,menubar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1";}else{newFeatures=featureParam.split(",").length>1?featureParam.split(",").join("=1,"):featureParam+"=1";featureString="toolbar=0,menubar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0"+newFeatures;}}else{featureString="";}newWindow=window.open(address,"Popup_Window","width="+width+",height="+height+',"'+featureString+'"');newWindow.focus();}function trim(s){while(s.substring(0,1)==" "){s=s.substring(1,s.length);}while(s.substring(s.length-1,s.length)==" "){s=s.substring(0,s.length-1);}return s;}function isZipCode(s){return isUnitedStateZipCode(s)||isFPOorAPOZipCode(s)||isCanadianZipCode(s);}function isUnitedStateZipCode(s){var reUSZip=new RegExp(/(^\d{5}$)|(^\d{5}(\-|\ )\d{2}[N0-9][D0-9]$)/);if(!reUSZip.test(s)){return false;}return true;}function isCanadianZipCode(s){var reCanZip=new RegExp(/(^[a-zA-Z]\d{1}[a-zA-Z](\-|\ )\d{1}[a-zA-Z]\d{1}$)/);if(!reCanZip.test(s)){return false;}return true;}function isFPOorAPOZipCode(s){var reFPOorAPOZip=new RegExp(/(^[a-zA-Z]{3}(\-|\ )?[a-zA-Z]{2}(\-|\ )?\d{5}$)/);if(!reFPOorAPOZip.test(s)){return false;}return true;}function callEmailSignup(){var formAction=$(document.forms.subscribeForm).attr("action");$("#emailSignUp").html(binder.translate.getMap("common",{key:"footer.emailSignUp.shipping"})).load(formAction,{userEmail:$("#subscribeForm input[name=userEmail]").val()});}$(function(){$("#subscribeForm input[name=userEmail]").keydown(function(event){if(event.keyCode==13){callEmailSignup();return false;}});$(".email-signup-container .signup-button").click(function(){callEmailSignup();});$(".email-signup-container .common-button").click(function(){callEmailSignup();return false;});});function createCookie(name,value,domain,secs,path){if(secs){var date=new Date();date.setTime(date.getTime()+(secs*1000));var expires="; expires="+date.toGMTString();}else{var expires="";}document.cookie=name+"="+value+expires+"; path="+((path)?path:"/")+((domain)?"; domain="+domain:"");}var writeDataIntoLayer=function(data){$("#cboxLoadedContent").html(data);$.colorbox.resize();};jQuery.fn.closeLayer=function(){$.colorbox.close();};jQuery.fn.softSlideDown=function(callback){this.css("opacity",0).slideDown(300).fadeTo(150,1,function(){if(callback&&typeof callback=="function"){callback();}});return this;};jQuery.fn.softSlideUp=function(callback){this.fadeTo(150,0).slideUp(300,function(){if(callback&&typeof callback=="function"){callback();}}).css("opacity",1);return this;};jQuery.fn.hilight=function(callback){var me=this;if(me.hasClass("animating")){var t=setTimeout(function(){me.hilight(callback);},200);}else{var hiliteColor="#BDE8FF";var defaultStart="#FFFFFF";var currentColor=jQuery(this).css("background-color");if(currentColor&¤tColor!="transparent"&¤tColor.indexOf("rgba(")==-1){defaultStart=currentColor;}me.addClass("animating").css("background-color",defaultStart).animate({backgroundColor:hiliteColor},300,function(){me.animate({backgroundColor:defaultStart},1000,function(){me.css("background-color",currentColor).removeClass("animating");if(callback&&typeof callback=="function"){callback();}});});return this;}};$(function(){$(".openAjaxLayer").die("click").live("click",function(e){e.preventDefault();var layerWidth=false;var layerHeight=false;var maxLayerWidth=false;var path=$(this).attr("href");var tagsLayerWidth=$(this).attr("data-layerWidth");var tagsMaxLayerWidth=$(this).attr("data-maxLayerWidth");if(tagsMaxLayerWidth!=undefined){maxLayerWidth=tagsMaxLayerWidth;}if(tagsLayerWidth!=undefined){layerWidth=tagsLayerWidth;}if(layerWidth>($("body").width()-30)){layerWidth="100%";}var paramSep=(path.indexOf("?")>0)?"&":"?";var d=new Date();path=path+paramSep+"time="+d.getTime();var ary={scrolling:false,href:path,opacity:0.6};if(document.body.className.search(/\bsmall\b/gi)!=-1){if(layerWidth>($("body").width()-30)){layerWidth="100%";}ary.width="100%",ary.top="0";}else{if(layerWidth){ary.width=layerWidth;}if(maxLayerWidth){ary.maxWidth=maxLayerWidth;}}var me=this;var isRepo=me.className.search(/\bjs_repositiontohere\b/gi);if(isRepo!=-1){ary.opacity=0;var cn=me.className;var dims=cn.toLowerCase().split("js_repositiontohere|").pop().split(" ").shift().split("|");for(var i=0;i",height:"515px",width:"600px",opacity:".4"});return false;});$(".js_closeCaptchaLink").die("click").live("click",function(e){e.preventDefault();top.$.fn.closeLayer();return false;});});var productImage={};var EVENTS={ZOOM_VIEWER_OPENED:"zoomViewerOpened"};function closeDrawer(){$("#quickviewDrawer").slideDown("slow",function(){$("#quickviewDrawer").remove();});}var quickView={handleQuickView:function(){$(".item_wrap").each(function(index){if(!responsiveUtil.isMobile()&&!responsiveUtil.isTablet()){$(this).mouseover(function(e){$(this).addClass("mouseover");$(".quicklookButton",this).show();$(".bvRating",this).show();});$(this).mouseout(function(e){$(this).removeClass("mouseover");$(".quicklookButton",this).hide();$(".bvRating",this).hide();});}$("ul > li.swatch:lt(5)",this).not(".plus").css("display","inline-block");var swatchPlus=$("ul > li.swatch.plus",this);if($("ul > li.swatch",this).length>5){$("ul > li.swatch:eq(4)",this).after(swatchPlus);swatchPlus.css("display","inline-block");}});var bid=$("body").attr("id");if(!(bid=="wishlist")){$(".productImage .mainImage").each(function(index){if($(this).attr("mouseOverOut-initialized")){return;}if(!responsiveUtil.isMobile()&&!responsiveUtil.isTablet()){$(this).mouseover(function(e){showHoverImageView(this);});$(this).mouseout(function(e){showMainImageView(this);});}else{if(responsiveUtil.isTablet()){$(this).attr("data-doClick","false");$(this).attr("data-TouchHREF",$(this).attr("href"));}}$(this).attr("mouseOverOut-initialized",true);});}$(".swatch.plus").each(function(){if($(this).attr("data-clickInitialized")){}else{if(!responsiveUtil.isMobile()&&!responsiveUtil.isTablet()){$(this).on("click",function(e){e.preventDefault();var itemWrap=$(this).closest(".item_wrap");$(".quicklookButton",itemWrap).trigger("click");});}$(this).attr("data-clickInitialized",true);}});$(".quicklookButton").each(function(){var $this,parentImage,parentPos,url,sourceSelector,qlData;$this=$(this);if($this.attr("data-initialized")){return;}url=$this.attr("data-url");qlData={sourceURL:encodeURIComponent(url),sourceSelector:$this.attr("data-sourceSelector")};$this.attr("data-initialized",true);$this.on("click",function(e){if($this.closest(".overflowholder").length>0||$this.closest(".subcatWrap").length>0){var ary={scrolling:false,trapFocus:false,href:url,data:qlData,opacity:0.6,trapFocus:false};$this.colorbox(ary);ary.isQuickLook=true;binder.vars.colorBoxList.push(ary);}else{var currentRow=$(this).closest(".columns").data("row");var quickviewDrawer=$("#quickviewDrawer");if(quickviewDrawer.length){quickviewDrawer.slideDown("slow",function(){quickviewDrawer.remove();});}if($(".lastColThumb[data-row="+currentRow+"]").length){if($(".lastColThumb[data-row="+currentRow+"]").length>1){var drawerTarget=$($(".lastColThumb[data-row="+currentRow+"]")[$(".lastColThumb[data-row="+currentRow+"]").length-1]);}else{var drawerTarget=$(".lastColThumb[data-row="+currentRow+"]");}}else{var drawerTarget=$(".columns[data-row="+currentRow+"]").last();}drawerTarget.after("
");var newQuickviewDrawer=$("#quickviewDrawer");var quickViewURL=url;try{var v=$(".mainImage",e.target.parentElement).attr("href").split(/[&?]+/);for(var i=0;i