var $j=jQuery.noConflict();$j(document).ready(function(){$j("body").addClass("js-enabled");$j(".slideshow").slideshow();$j(".image_zoom").image_zoom();$j(".sub_category_300x285").sub_category();$j("a.popup").widget_popup();});$j(function(){var pngFix=$j("body#IE6 img.transparentPNG");if(pngFix.length>0){pngFix.each(function(){var newPNG="";var _img=$j(this);newPNG+='<span style="position:relative;display:inline-block;background:transparent;';newPNG+="width:"+_img.width()+"px;height:"+_img.height()+"px;";newPNG+="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_img.attr("src")+"');";newPNG+='">&nbsp;</span>';_img.replaceWith(newPNG);});}});$j(function(){var data=$j("#signup input").attr("value");$j("#signup input").focus(function(){if($j(this).attr("value")==data){$j(this).attr("value","");}});$j("#signup input").blur(function(){if($j(this).attr("value")==""){$j(this).attr("value","");}});});$j(function(){var data=$j(".search_form input[id]").attr("value");$j(".search_form input").focus(function(){if($j(this).attr("value")==data){$j(this).attr("value","");}});$j(".search_form input[id]").blur(function(){if($j(this).attr("value")==""){$j(this).attr("value",data);}});});$j(function(){var data=$j("input#username").attr("value");$j("input#username").focus(function(){if($j(this).attr("value")=="Username"||$j(this).attr("value")=="Password"){$j(this).attr("value","");}});$j("input#username").blur(function(){if($j(this).attr("value")==""){$j(this).attr("value",data);}});});$j(function(){var data=$j("input#password").attr("value");$j("input#password").focus(function(){if($j(this).attr("value")=="Username"||$j(this).attr("value")=="Password"){$j(this).attr("value","");}});$j("input#password").blur(function(){if($j(this).attr("value")==""){$j(this).attr("value",data);}});$j("input#confirmPassword").blur(function(){if($j(this).attr("value")==""){$j(this).attr("value",data);}});var dataVerify=$j("input#verifyPassword").attr("value");$j("input#verifyPassword").blur(function(){if($j(this).attr("value")==""){$j(this).attr("value",dataVerify);}});});$j(function(){$j(".store_location ul").each(function(){$j(".store_location li:first-child .storeInfo").css({top:"0"});$j(".store_location li:last").css({"border-bottom":"0"});});});$j(function(){$j("ul.links").each(function(){$j(this).children("li:last").addClass("last");});});$j(function(){if($j(".sizes select").length>0){$j(".sizes select").sizes();}});$j(function(){if($j(".prod_tabs").length>0){}});$j(function(){if($j("#slider.price").length>0){$j("#slider.price").mousedown(function(){$j(this).slider("enable");});$j("#slider.price").keyup(function(){$j(this).slider("disable");});$j("#slider.price").slider({range:true,min:sliderMin,max:sliderMax,step:stepVar,values:[sliderMin,sliderMax]});$j("#slider").bind("slide",function(event,ui){var mi=ui.values[0];var mx=ui.values[1];var miformatted=formatCurrency(mi);var mxformatted=formatCurrency(mx);$j("#amount").html('<span class="min"><a href="#" title="'+miformatted+'">'+miformatted+'</a></span><span class="max"><a href="#" title="'+mxformatted+'">'+mxformatted+"</a></span>");});$j("#slider").bind("slidestop",function(event,ui){var linkHref=$j("#slider_link").attr("href");var newLink;var mi=ui.values[0];var mx=ui.values[1];var refRE=new RegExp("\\%3A"+refId+"\\%3A([0-9]+\\.[0-9]+)?\\-([0-9]+\\.[0-9]+)?(\\%7C"+lastIndc+")?","g");var rp="";if(mi==currMin&&mx==currMax){return;}if(mi==mx){if(mi<=0){rp="%3A"+refId+"%3A0.00-"+stepVar+".00";}else{if(mi>defMax){rp="%3A"+refId+"%3A"+(sliderMax-stepVar)+".00-"+sliderMax+".00%7C"+lastIndc;}else{mi-=0.0001;mx+=0.0001;rp="%3A"+refId+"%3A"+mi+"-"+mx;}}}else{if(mi>sliderMin&&mx==sliderMax){rp="%3A"+refId+"%3A"+mi+".00-"+mx+".00%7C"+lastIndc;}else{if(mi<=sliderMin&&mx>=sliderMax){if(typeof(selectedFacetsNumber)!="undefined"){if(selectedFacetsNumber==2){linkHref=linkHref.replace("facetSubCategory.jsp","subCategory.jsp");}}}else{rp="%3A"+refId+"%3A"+mi+".00-"+mx+".0001";}}}newLink=linkHref.replace(refRE,rp);newLink=unescape(newLink);if(mi==sliderMin&&mx==sliderMax){window.open(clearFacetUrl,"_self");return;}if(newLink.click){newLink.click();}else{window.open(newLink,"_self");}});$j("#slider").slider("values",0,currMin);$j("#slider").slider("values",1,currMax);var valuesformatteda=$j("#slider").slider("values",0);var valuesformattedb=$j("#slider").slider("values",1);valuesformatteda=formatCurrency(valuesformatteda);valuesformattedb=formatCurrency(valuesformattedb);$j("#amount").html('<span class="min"><a href="#" title="'+valuesformatteda+'">'+valuesformatteda+'</a></span><span class="max"><a href="#" title="'+valuesformattedb+'">'+valuesformattedb+"</a></span>");}});$j(function(){$j("#select_sort_by").change(function(){$j("#sort_by_btn").trigger("click");});});$j(function(){if($j("#slider.distance").length>0){$j("#slider.distance").mousedown(function(){$j(this).slider("enable");});$j("#slider.distance").keyup(function(){$j(this).slider("disable");});$j("#slider.distance").slider({range:true,min:sliderDistMin,max:sliderDistMax,step:5,values:[valueDistStart,valueDistEnd],slide:function(event,ui){if($j("#slider").slider("values",1)-$j("#slider").slider("values",0)==0){return false;}$j("#miles").val($j("#slider").slider("values",0)+"-"+$j("#slider").slider("values",1));},stop:function(event,ui){if($j("#slider").slider("values",1)-$j("#slider").slider("values",0)==0){if($j("#slider").slider("values",1)==100){$j("#slider").slider("values",0,95);}else{var inc=$j("#slider").slider("values",1);$j("#slider").slider("values",1,(inc+5));}}var onDistChangeMin=($j("#slider").slider("values",0));var onDistChangeMax=($j("#slider").slider("values",1));document.getElementById("minDist").value=onDistChangeMin;document.getElementById("maxDist").value=onDistChangeMax;}});$j("#miles").val($j("#slider.distance").slider("values",0)+"-"+$j("#slider.distance").slider("values",1));}});$j(function(){$j("#distance_range a").click(function(){$j("#slider a:first").css("left","0%");$j("#slider a:last").css("left","100%");var values=$j("#slider.distance").slider("option","values");$j("#slider.distance").slider("option","values",[0,100]);$j("#miles").val($j("#slider.distance").slider("values",0)+"-"+$j("#slider.distance").slider("values",1));});});$j(function(){$j("body#IE6 #navlist li").hover(function(){$j(this).addClass("over");},function(){$j(this).removeClass("over");});$j(".bag_nav li").hover(function(){$j(this).addClass("over");},function(){$j(this).removeClass("over");});});$j(function(){$j("body#IE6 #primary_nav li").hover(function(){$j(this).addClass("over");},function(){$j(this).removeClass("over");});$j("body#IE6 #primary_nav .menu_primary ul li:first-child").addClass("first-child");});$j(function(){$j(".filternav .nav_section h5").click(function(){if(!$j(this).hasClass("hiddenNav")){$j(this).addClass("hiddenNav");$j(this).parent().find(".options").slideUp("fast");}else{$j(this).removeClass("hiddenNav");$j(this).parent().find(".options").slideDown("fast");}});$j(".filternav ul.options li a").click(function(event){var coverElement=document.getElementById("glassCvrReq");if(coverElement==null){var element=$j("<div></div>").attr("id","glassCvr");$j(element).insertBefore("#duk_container");var areaObj=$j("#duk_container .refine").get(0);var areaPos=findPos(areaObj);var navObj=$j("#duk_secondary_nav").get(0);var navPos=findPos(navObj);$j(element).css("left",areaPos[0]);$j(element).css("top",areaPos[1]);var navObj=$j("#duk_secondary_nav").get(0);var gch=navObj.offsetHeight-areaPos[1]+navPos[1];$j(element).css("height",gch);optionTitle=$j(this).attr("title");optionValue=$j(this).attr("optionValue");if(!$j(this).hasClass("checked")){$j(".filternav ul.options #i_"+optionTitle).attr("checked","true");$j(this).addClass("checked");}else{$j(".filternav ul.options #i_"+optionTitle).removeAttr("checked");$j(this).removeClass("checked");}}else{optionTitle=$j(this).attr("title");optionValue=$j(this).attr("optionValue");if(!$j(this).hasClass("checked")){$j(".filternav ul.options #i_"+optionTitle).attr("checked","true");$j(this).addClass("checked");}else{$j(".filternav ul.options #i_"+optionTitle).removeAttr("checked");$j(this).removeClass("checked");}if(document.getElementById("i_"+optionTitle).checked==true){document.getElementById("i_"+optionTitle).value=optionValue;}else{document.getElementById("i_"+optionTitle).value="";}}});$j(".filternav .refine span a").click(function(event){$j(".filternav ul.options li").children(".checked").removeClass("checked");$j(".filternav ul.options li").children(".attachedHiddenInput").removeAttr("checked");});$j(".filternav .nav_section span a").click(function(event){$j(this).parent().parent().find(".checked").removeClass("checked");$j(".filternav ul.options li").children(".attachedHiddenInput").removeAttr("checked");});});$j(function(){var $targs=$j(".years .anchor");$targs.not(":first").hide();$j("#container .year_select ol.anchors a").click(function(e){$targs.hide();$j($j(this).attr("href")).show();$j("#container .year_select ol.anchors li").removeClass("selected");$j(this).parent().addClass("selected");e.preventDefault();});});$j(function(){if($j("#prod_type_select, #prod_type_select_wide").length>0){$j("#prod_type_select ul li a").click(function(event){event.preventDefault();$j("#prod_type_select ul li a").removeClass("selected");$j(this).addClass("selected");});$j("#IE6 #prod_type_select ul li, #IE6 #prod_type_select_wide ul li").hover(function(){$j(this).children().addClass("over");},function(){$j(this).children().removeClass("over");});}});$j(function(){if($j(".categories").length>0){$j(".categories li h3").click(function(){if($j(this).hasClass("answered")){$j(this).removeClass("answered");$j(this).next("div").css({display:"none"});}else{$j(".categories li div").css({display:"none"});$j(".categories li h3").removeClass("answered");$j(this).addClass("answered");$j(this).next("div").css({display:"block"});}});}});$j(function(){$j("body#IE6 #duk_content .prod_overview span.desc").css({"max-height":"35px"});});$j(function(){$j("body#IE6 #duk_content .store_location li:last").css({"border-bottom":"0"});});$j(function(){$j("a.duk_seo_slideUp").click(function(event){event.preventDefault();$j(this).parent().next("div").slideDown();$j(this).hide();});$j("a.duk_seo_slideDown").click(function(event){event.preventDefault();$j(this).parent().parent().slideUp();$j("a.duk_seo_slideUp").show();});});$j(function(){$j("body#IE6 #duk_content .store_location li:last").css({"border-bottom":"0"});});function disableAllInputs(){$j("input:not(:disabled)[type=image]").addClass("temp_disabled");$j("input.temp_disabled").attr("disabled","disabled");}function enableAllInputs(){$j("input.temp_disabled").removeAttr("disabled");$j("input.temp_disabled").removeClass("temp_disabled");}function showTransparentLayer(){if(jq("#trans-layer").length<=0){jq("body").append("<div id='trans-layer'></div>");jq("#trans-layer").attr("style","position: absolute; top: 0px; left: 0px; z-index: 9999; background: url('/images/transparent.gif') repeat transparent");jq("#trans-layer").css("width",jq(document).width());jq("#trans-layer").css("height",jq(document).height());}}function getDeliveryProductShippingInstructionsMap(deliveryMethods){var array=new Array();for(method in deliveryMethods){var methodId=method;var hasShippingInstructions=deliveryMethods[methodId][0].hasShippingInstructions;array[methodId]=hasShippingInstructions;}return array;}function hasShippingInstructions(deliveryOption){var deliveryMethods=CartService.newlookReferenceInfo.deliveryMethods;var deliveryProductShippingInstructionsMap=getDeliveryProductShippingInstructionsMap(deliveryMethods);return deliveryProductShippingInstructionsMap[deliveryOption];}function deliveryMethodChange(shippingGroup){var tries=0;function callback(shippingGroup){if(shippingGroup&&shippingGroup.deliveryProductId){tries++;var deliveryOption=shippingGroup.deliveryProductId;if(deliveryOption!=null&&deliveryOption!=""){if(logDebug){debug("[deliveryMethodChange] delivery option: "+deliveryOption);}deliveryMethodChangeOption(deliveryOption);}else{if(logDebug){debug("[deliveryMethodChange] delivery option is not set");}if(tries<CALLBACK_TRIGGER_MIN){setTimeout(callback(shippingGroup),CALLBACK_TRIGGER_MIN);}else{if(logDebug){debug("[deliveryMethodChange] Failed to load the page within specified retry count");}}}}}callback(shippingGroup);}function deliveryMethodChangeOption(deliveryOption){if(logDebug){debug("[deliveryMethodChangeOption] "+deliveryOption);}if(deliveryOption!=null&&deliveryOption!=""){info(hasShippingInstructions(deliveryOption));if(hasShippingInstructions(deliveryOption)){showStandardDeliveryInstructions();}else{hideAllDeliveryInstructions();}if(isNominatedDayDelivery(deliveryOption)){debug("showing nominated day table");jQuery("#checkout-table").show();}else{debug("hiding nominated day table");jQuery("#checkout-table").hide();}}else{if((/flexCart\.jsp/.test(window.location))&&CartService&&CartService.order&&CartService.order.shippingGroups[0]){var shippingGroup=CartService.order.shippingGroups[0];if(logDebug){debug("[deliveryMethodChangeOption] Change: "+shippingGroup);}deliveryMethodChange(shippingGroup);}else{if(logDebug){debug("[deliveryMethodChangeOption]  required info unavailable must hide all boxes");}hideAllDeliveryInstructions();}}}function showStandardDeliveryInstructions(){$j("#express_info").hide();$j("#standard_info").show();}function showExpressDeliveryInstructions(){$j("#express_info").show();$j("#standard_info").hide();}function hideAllDeliveryInstructions(){$j("#standard_info").hide();$j("#express_info").hide();}function displayRecentlyViewed(e){jq("#scrollable_popup_widget").css("display","block");return cancelEvent(e);}function toolTip(){var $tips=$j("img.tooltip");var $inputs=$j("input.tooltip");var $links=$j("a.tooltip");$tips.each(addToolTip);$inputs.each(addToolTip);$links.each(addToolTip);var $fields=$j("li:has(.tip_container) input, li:has(.tip_container) select");$fields.each(function(i){$j(this).focus(function(){$j(this).parent().find(".tip_item").addClass("on");});$j(this).blur(function(){$j(this).parent().find(".tip_item").removeClass("on");});});function addToolTip(i){var myTitle=$j(this).attr("title");if(myTitle!=""){$j(this).wrap('<span class="tip_container"></span>');var secondClass="";if($j(this).hasClass("cv2")){secondClass=" cv2";}if($j(this).hasClass("billing")){secondClass=" billing";}$j(this).after('<span class="tip_item'+secondClass+'">'+myTitle+"</span>");$j(this).attr("title","");}$j(this).hover(function(e){$j(this).next().addClass("on");},function(e){$j(this).next().removeClass("on");});}}$j(toolTip);(function($){var wPopup=function(element){var o={};this.init=function(){o.link=element;o.popup=$("#"+o.link.id+"_widget");$(document.createElement("a")).addClass("close").attr({href:"#",title:""}).html(closeText).click(function(e){e.preventDefault();$(o.popup).hide();}).appendTo(o.popup);$(o.link).click(function(e){e.preventDefault();$(o.link).data("widget_popup").centerPopup();$(o.popup).show();});};this.centerPopup=function(){o.contentWidth=$("#duk_content").width();o.contentTop=$("#duk_content").offset().top;o.popupWidth=$(o.popup).outerWidth();o.popupHeight=$(o.popup).outerHeight();o.scrollTop=$(document).scrollTop();this.getInnerWindowSize();var top=parseInt((((o.windowHeight-o.popupHeight)/2)-o.contentTop)+o.scrollTop);var left=parseInt(((o.contentWidth-o.popupWidth)/2)+96);$(o.popup).css({top:top,left:left});};this.getInnerWindowSize=function(){o.windowWidth=0;o.windowHeight=0;if(typeof(window.innerWidth)=="number"){o.windowWidth=window.innerWidth;o.windowHeight=window.innerHeight;}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){o.windowWidth=document.documentElement.clientWidth;o.windowHeight=document.documentElement.clientHeight;}}};this.init();};$.fn.widget_popup=function(){this.each(function(){var element=$(this);if(element.data("widget_popup")){return;}var widget_popup=new wPopup(this);element.data("widget_popup",widget_popup);});};})(jQuery);(function($){var subCat=function(element){var o={};this.init=function(){o.outer=element;o.list=$(o.outer).find("ul");o.img=$(o.outer).find("img.sub_category_image");o.largeImages=null;o.activeIndex=0;if(subCategoryImages!=null&&subCategoryImages.length>0){o.largeImages=new Array();for(var i=0;i<subCategoryImages.length;i++){o.largeImages[i]=new Image();o.largeImages[i].src=subCategoryImages[i][0];o.largeImages[i].alt=subCategoryImages[i][1];}}$(o.list).find("li a:first-child > img").css("opacity","0.4");this.setImage();$(o.list).find("li").mouseover(function(){var i=$(o.list).find("li").index(this);if(i==o.activeIndex){return;}else{$(o.list).find("li").eq(o.activeIndex).find("a:first-child > img").css("opacity","0.4");o.activeIndex=i;$(o.outer).data("sub_category").setImage();}});};this.setImage=function(){$(o.img).attr({src:o.largeImages[o.activeIndex].src,alt:o.largeImages[o.activeIndex].alt}).parent().attr("href",$(o.list).find("li").eq(o.activeIndex).children("a").attr("href"));$(o.list).find("li").eq(o.activeIndex).find("a:first-child > img").css("opacity","1");};this.init();};$.fn.sub_category=function(){this.each(function(){var element=$(this);if(element.data("sub_category")){return;}var sub_category=new subCat(this);element.data("sub_category",sub_category);});};})(jQuery);(function($){var zoomer=function(element){var o={};this.init=function(){o.outer=element;o.list=$(o.outer).find(".image_zoom_nav ul");o.zoomButton=$(o.outer).find("a.image_zoom_button");o.activeIndex=0;o.hoverZindex=100;if($j(".image_zoom_nav ul li").size()>3){$j(".image_zoom_nav ul").addClass("extra-wide");}this.positionListItems();this.addActiveClass();if($(o.outer).hasClass("catwalk_video")){this.setVideo();}if($(o.outer).hasClass("rotate_view")){this.setRotate();}this.setZoom();};this.setZoom=function(){o.zoomOuter=$(o.outer).find(".image_zoom_area");o.zoomOuterHeight=$(o.zoomOuter).height();o.zoomOuterWidth=$(o.zoomOuter).width();o.zoomOuterTop=$(o.zoomOuter).offset().top;o.zoomOuterLeft=$(o.zoomOuter).offset().left;o.img=$(o.zoomOuter).find("img");this.setImages();$(o.zoomButton).click(function(e){e.preventDefault();if(o.altViewEnabled==true){$(this).removeClass("active");$(o.img).removeClass("zoomEnabled");if(o.videoButton!=null){o.videoButton.show();}if(o.rotateButton!=null){o.rotateButton.show();}$(o.img).attr({src:o.largeImages[o.activeIndex].src}).css({top:0,left:0});$(o.outer).data("image_zoom").stopDrag();$(o.img).unbind("mousedown",$(o.outer).data("image_zoom").setDrag);o.altViewEnabled=false;}else{$(this).addClass("active");$(o.img).addClass("zoomEnabled");if(o.videoButton!=null){o.videoButton.hide();}if(o.rotateButton!=null){o.rotateButton.hide();}$(o.outer).data("image_zoom").setZoomedImage();o.altViewEnabled=true;}});};this.setImages=function(){this.changeAlternateView();};this.changeAlternateView=function(){$(o.list).find("li").click(function(e){e.preventDefault();$(o.outer).data("image_zoom").removeActiveClass();o.activeIndex=$(o.list).find("li").index(this);$(o.outer).data("image_zoom").addActiveClass();});};this.bindThumbs=function(){$(o.list).find("li").click(function(e){e.preventDefault();$(o.outer).data("image_zoom").removeActiveClass();o.activeIndex=$(o.list).find("li").index(this);$(o.outer).data("image_zoom").addActiveClass();if(o.altViewEnabled==true){$(o.zoomButton).click();}$(o.outer).find(".image_zoom_area img").attr({src:o.largeImages[o.activeIndex].src});});};this.setZoomedImage=function(){$(o.img).css("visibility","hidden");if(typeof o.zoomedImages[o.activeIndex]=="string"){var imgEl=new Image();imgEl.src=o.zoomedImages[o.activeIndex];if(imgEl.complete){o.zoomedImages[o.activeIndex]=imgEl;$(o.outer).data("image_zoom").swapZoom();}else{imgEl.onload=function(){o.zoomedImages[o.activeIndex]=imgEl;$(o.outer).data("image_zoom").swapZoom();};}}else{$(o.outer).data("image_zoom").swapZoom();}};this.swapZoom=function(){$(o.img).attr({src:o.zoomedImages[o.activeIndex].src});o.imgHeight=o.zoomedImages[o.activeIndex].height;o.imgWidth=o.zoomedImages[o.activeIndex].width;o.stopTop=o.zoomOuterTop-o.zoomOuterTop;o.stopRight=0-(o.imgWidth-o.zoomOuterWidth);o.stopBottom=0-(o.imgHeight-o.zoomOuterHeight);o.stopLeft=o.zoomOuterLeft-o.zoomOuterLeft;var top=0-parseInt((o.imgHeight/2)-(o.zoomOuterHeight/2));var left=0-parseInt((o.imgWidth/2)-(o.zoomOuterWidth/2));$(o.img).css({top:top,left:left,visibility:"visible"}).mousedown($(o.outer).data("image_zoom").setDrag);};this.setDrag=function(e){e.preventDefault();$(o.outer).data("image_zoom").getInfo(e);$(document).bind("mousemove",$(o.outer).data("image_zoom").startDrag).bind("mouseup",$(o.outer).data("image_zoom").stopDrag);$(o.img).each(function(){this.ondragstart=function(){return false;};});};this.getInfo=function(event){o.clickX=event.clientX;o.clickY=event.clientY;o.imgOffsetX=$(o.img).offset().left-o.zoomOuterLeft;o.imgOffsetY=$(o.img).offset().top-o.zoomOuterTop;o.imgTop=o.imgOffsetY-o.clickY;o.imgLeft=o.imgOffsetX-o.clickX;};this.startDrag=function(e){var top=o.imgTop+e.clientY;var left=o.imgLeft+e.clientX;if(top>=o.stopTop){top=o.stopTop;}if(left<=o.stopRight){left=o.stopRight;}if(top<=o.stopBottom){top=o.stopBottom;}if(left>=o.stopLeft){left=o.stopLeft;}$(o.img).css({left:left,top:top});};this.stopDrag=function(event){$(document).unbind("mousemove",$(o.outer).data("image_zoom").startDrag).unbind("mouseup",$(o.outer).data("image_zoom").stopDrag);};this.disableThumbs=function(disable){if(disable==true){$(o.list).addClass("disabled").find("img").css("opacity","0.4");$(o.list).find("li").unbind("click").click(function(e){e.preventDefault();});}else{$(o.outer).data("image_zoom").bindThumbs();$(o.list).removeClass("disabled").find("img").css("opacity","1");}};this.setRotate=function(){o.rotateButton=$(o.outer).find("a.rotate_view_button");$(o.rotateButton).click(function(e){e.preventDefault();if(o.altViewEnabled==true){$(this).removeClass("active");if(o.zoomButton!=null){o.zoomButton.show();}$(".image_zoom .image_zoom_area").css("display","block");$("#swf_content_area").css({position:"absolute",top:"-999em",left:"-999em",display:"none"});o.altViewEnabled=false;$(o.outer).data("image_zoom").disableThumbs(false);}else{$(o.outer).data("image_zoom").disableThumbs(true);$(this).addClass("active");if(o.zoomButton!=null){o.zoomButton.hide();}$(".image_zoom .image_zoom_area").css("display","none");if($("#swf_content").length!=0){var flashvars={};var params={wmode:"opaque",menu:"false"};var attributes={id:"swf_content_obj"};swfobject.embedSWF(swfpath,"swf_content","300","360","8.0.0","media/flash/expressInstall.swf",flashvars,params,attributes);}$("#swf_content_area").css({position:"static",top:"0",left:"0",display:"block"});o.altViewEnabled=true;}});};this.setVideo=function(){o.videoButton=$(o.outer).find("a.catwalk_video_button");$(o.videoButton).click(function(e){e.preventDefault();if(o.altViewEnabled==true){$(this).removeClass("active");if(o.zoomButton!=null){o.zoomButton.show();}alert("HIDE flash video");o.altViewEnabled=false;$(o.outer).data("image_zoom").disableThumbs(false);}else{$(o.outer).data("image_zoom").disableThumbs(true);$(this).addClass("active");if(o.zoomButton!=null){o.zoomButton.hide();}alert("SHOW flash video");o.altViewEnabled=true;}});};this.positionListItems=function(){$(o.list).find("li").each(function(i){$(this).css({left:($(this).width()*i)-(2*i),top:0});$(this).hover(function(){$(this).css({"z-index":o.hoverZindex++});},function(){$(o.outer).data("image_zoom").addActiveClass();});});};this.removeActiveClass=function(){$(o.list).find("li").eq(o.activeIndex).removeClass("active");};this.addActiveClass=function(){$(o.list).find("li").eq(o.activeIndex).addClass("active").css({"z-index":o.hoverZindex++});};this.init();};$.fn.image_zoom=function(){this.each(function(){var element=$(this);if(element.data("image_zoom")){return;}var image_zoom=new zoomer(this);element.data("image_zoom",image_zoom);});};})(jQuery);(function($){var ss=function(element,opt){var o=$.extend({activeIndex:0,homeBackgrounds:null,scrollableLookBook:null,highlightScrollIndex:0,animateSpeed:200,hoverZindex:100,automateTimer:5000},opt);this.init=function(){var classes=element.className.split(" ");for(var i=0;i<classes.length;i++){if(classes[i].indexOf("stack")!=-1){o.type=classes[i];}}o.outer=element;o.list=$(o.outer).find(".thumbnails");o.listItemWidth=$(o.list).find("li:first").width();o.listItemHeight=$(o.list).find("li:first").height();o.listItemCount=$(o.list).find("li").length;$(o.list).width(o.listItemWidth*o.listItemCount-(2*(o.listItemCount-1)));if(o.type=="six_stack_full_page"){this.positionListItems();this.setupStandardSlideshow();return;}else{if($(o.outer).hasClass("full_screen_scroller")==true){this.setupFullScreenScroller();return;}else{$(o.list).wrap($(document.createElement("div")).addClass("slideshow_inner"));o.inner=$(o.outer).find(".slideshow_inner");o.listWidth=$(o.inner).width();o.listHeight=$(o.inner).height();o.stackCols=Math.ceil(o.listWidth/o.listItemWidth);o.stackRows=Math.ceil(o.listHeight/o.listItemHeight);o.stackColsTotal=Math.ceil(o.listItemCount/o.stackRows);this.positionListItems();if(o.type=="single_stack_3x1_background"||o.type=="single_stack_3x1_background_wide"||o.type=="single_stack_4x1_background_wide"){o.isBackgroundSlideshow=true;this.setupBackgroundSlideshow();}else{o.isBackgroundSlideshow=false;this.setupStandardSlideshow();if(o.type=="triple_stack_5x3"){this.setupProdDetail();}if(o.type=="single_stack_5x1_tabbed"){this.setupTabbedSlideshow();}if($(o.outer).hasClass("sub_category_300x125")==true){o.scrollViewFirst=0;o.scrollViewLast=0;this.automate();}}this.setEditable();this.createNavigation();}}};this.setupFullScreenScroller=function(){o.type="full_screen_scroller";o.listLarge=$(o.outer).find(".largeImages");$(o.list).prev("h3").add($(o.list)).wrapAll($(document.createElement("div")).addClass("thumnails_wrap"));o.listWrap=$(o.outer).find(".thumnails_wrap");$(o.listWrap).add($(o.listLarge)).wrapAll($(document.createElement("div")).addClass("slideshow_inner"));o.inner=$(o.outer).find(".slideshow_inner");$(o.listWrap).add($(o.listLarge)).wrapAll($(document.createElement("div")).addClass("animate_wrap"));o.animateWrap=$(o.outer).find(".animate_wrap");$(o.inner).wrap($(document.createElement("div")).addClass("slideshow_inner_border"));o.innerBorder=$(o.outer).find(".slideshow_inner");o.stackRows=2;o.stackCols=Math.ceil(o.listItemCount/o.stackRows);this.positionListItems();$(o.list).width((o.listItemWidth*o.stackCols)-(2*(o.stackCols-1)));o.listLargeItemWidth=$(o.listLarge).find("li:first").width();o.listLargeItemHeight=$(o.listLarge).find("li:first").height();o.listLargeItemCount=$(o.listLarge).find("li").length;$(o.listLarge).width((o.listLargeItemWidth+4)*o.listLargeItemCount);$(o.listLarge).css("left",$(o.listWrap).width());$(o.animateWrap).width($(o.listWrap).width()+$(o.listLarge).width());o.scrollViewCount=null;o.widthOnScreen=0;this.createNavigation();};this.positionListItems=function(){var rowCount=0;var colCount=0;var img_txt=$(o.outer).find(".img_txt");$(o.list).find("li").each(function(i){var top=0;var left=0;if(o.type=="six_stack_full_page"){top=(i>6&&i<=13)?(o.listItemHeight*rowCount)-2:o.listItemHeight*rowCount-(2*rowCount);left=(i<14)?($(img_txt).width()+2)+(o.listItemWidth*colCount)-(2*colCount):(o.listItemWidth*colCount)-(2*colCount);colCount++;if((i<=14&&colCount==7)||(i>14&&colCount==11)){rowCount++;colCount=0;}}else{top=(rowCount>0)?(o.listItemHeight*rowCount)-(2*rowCount):(o.listItemHeight*rowCount);left=(colCount>0)?(o.listItemWidth*colCount)-(2*colCount):(o.listItemWidth*colCount);rowCount++;if(rowCount==o.stackRows){rowCount=0;colCount++;}}$(this).css({left:left,top:top});});};this.automate=function(){o.automate=setInterval(function(){if(o.scrollViewLast==(o.listItemCount-1)){o.scrollViewFirst=0;o.scrollViewLast=0;$(o.outer).data("slideshow").animate(0);}else{$(o.outer).data("slideshow").scroll(true);}},o.automateTimer);};this.resetAutomate=function(){if(o.automate!=null){clearInterval(o.automate);$(o.outer).data("slideshow").automate();}};this.addActiveClass=function(){$(o.list).find("li").eq(o.activeIndex).addClass("active").css({"z-index":o.hoverZindex++});};this.removeActiveClass=function(){$(o.list).find("li").eq(o.activeIndex).removeClass("active").css({"z-index":0});};this.createNavigation=function(){o.prev=$(document.createElement("a")).addClass("prev").attr({href:"#",title:goToPreviousTitle}).click(function(e){e.preventDefault();if(o.type=="full_screen_scroller"){if(o.prevDisabled!=true&&$(o.animateWrap).is(":animated")==false){$(o.outer).data("slideshow").scrollFullScreen(false);}}else{if(o.prevDisabled!=true&&$(o.list).is(":animated")==false){if(o.isBackgroundSlideshow==true&&((o.activeIndex-1)>=0)){$(o.outer).data("slideshow").highlightScroll(false);}else{if(o.isBackgroundSlideshow==false){$(o.outer).data("slideshow").scroll(false);}}}}}).appendTo(o.outer);o.next=$(document.createElement("a")).addClass("next").attr({href:"#",title:goToNextTitle}).click(function(e){e.preventDefault();if(o.type=="full_screen_scroller"){if(o.nextDisabled!=true&&$(o.animateWrap).is(":animated")==false){$(o.outer).data("slideshow").scrollFullScreen(true);}}else{if(o.nextDisabled!=true&&$(o.list).is(":animated")==false){if(o.isBackgroundSlideshow==true&&((o.activeIndex+1)!=o.listItemCount)){$(o.outer).data("slideshow").highlightScroll(true);}else{if(o.isBackgroundSlideshow==false&&((o.scrollViewLast+1)!=o.listItemCount)){$(o.outer).data("slideshow").scroll(true);}}}}}).appendTo(o.outer);this.checkDisabled();};this.checkDisabled=function(){if(o.isBackgroundSlideshow==true){o.prevDisabled=(o.activeIndex==0)?true:false;o.nextDisabled=(o.listItemCount<=o.stackCols||o.activeIndex==(o.listItemCount-1))?true:false;}else{if(o.type=="full_screen_scroller"){o.prevDisabled=(o.scrollViewCount==null||o.scrollViewCount==2)?true:false;o.nextDisabled=(o.scrollViewCount==o.listLargeItemCount)?true:false;}else{o.prevDisabled=(o.scrollViewFirst==0)?true:false;o.nextDisabled=(o.scrollViewLast>=(o.stackColsTotal-1))?true:false;}}if(o.listItemCount==0){o.nextDisabled=true;}if(o.prevDisabled==true){$(o.prev).addClass("disabled");}else{$(o.prev).removeClass("disabled");}if(o.nextDisabled==true){$(o.next).addClass("disabled");}else{$(o.next).removeClass("disabled");}};this.scroll=function(isNext){$(o.outer).data("slideshow").resetAutomate();if(isNext==true){if(o.scrollViewLast<(o.stackColsTotal-1)){$(o.outer).data("slideshow").animate($(o.list).position().left-(o.listItemWidth-2));o.scrollViewFirst++;o.scrollViewLast++;}}else{if(o.scrollViewFirst>0){if(isNext==false){$(o.outer).data("slideshow").animate($(o.list).position().left+(o.listItemWidth-2));}else{$(o.outer).find("ol.thumbnails").css("left",$(o.list).position().left+(o.listItemWidth-2));}o.scrollViewFirst--;o.scrollViewLast--;}}};this.highlightScroll=function(isNext){$(o.outer).data("slideshow").removeActiveClass();o.activeIndex=(isNext==true)?o.activeIndex+1:o.activeIndex-1;if(o.listItemCount>=o.stackCols){if(o.activeIndex>=o.highlightScrollIndex){$(o.outer).data("slideshow").animate($(o.list).position().left-(o.listItemWidth-2));o.highlightScrollIndex++;}if(o.activeIndex<(o.highlightScrollIndex-o.stackCols)){$(o.outer).data("slideshow").animate($(o.list).position().left+(o.listItemWidth-2));o.highlightScrollIndex--;}}$(o.outer).data("slideshow").addActiveClass();$(o.outer).data("slideshow").checkDisabled();$(o.outer).data("slideshow").setBackgroundImage();};this.scrollFullScreen=function(isNext){if(isNext==true){if(o.scrollViewCount<=(o.listLargeItemCount-1)){$(o.listLarge).find("li").each(function(i){var listItemPos=parseInt($(o.listLarge).position().left+$(this).position().left+$(this).width());if(o.scrollViewCount==null&&listItemPos>$(o.inner).width()){o.scrollViewCount=i;return false;}});var next=$(o.listLarge).find("li").eq(o.scrollViewCount);var widthOnScreen=$(o.inner).width()-($(o.listLarge).position().left+$(next).position().left);if(o.scrollViewCount==2){var left=($(o.animateWrap).position().left-$(next).width())+(widthOnScreen-(4*(o.scrollViewCount-1)));}else{var left=$(o.animateWrap).position().left-$(next).width()-4;}$(o.outer).data("slideshow").animate(left);o.scrollViewCount++;}}else{if(o.scrollViewCount>2){o.scrollViewCount--;var prev=$(o.listLarge).find("li").eq(o.scrollViewCount);var left=(o.scrollViewCount==2)?0:$(o.animateWrap).position().left+($(prev).width()+4);$(o.outer).data("slideshow").animate(left);}}};this.animate=function(left){$elm=(o.type=="full_screen_scroller")?o.animateWrap:o.list;$elm.animate({left:left},o.animateSpeed,function(){$(o.outer).data("slideshow").checkDisabled();});};this.setupBackgroundSlideshow=function(){if(o.type=="single_stack_4x1_background_wide"){if(scrollableLookBook!=null&&scrollableLookBook.length>0){o.scrollableLookBook=new Array();for(var i=0;i<scrollableLookBook.length;i++){o.scrollableLookBook[i]=new Image();o.scrollableLookBook[i].src=scrollableLookBook[i][0];o.scrollableLookBook[i].alt=scrollableLookBook[i][1];}}}$(o.list).find("li").each(function(i){$(this).hover(function(){$(this).css({"z-index":o.hoverZindex++});},function(){$(o.outer).data("slideshow").addActiveClass();});});this.addActiveClass();o.highlightScrollIndex=o.stackCols;$(o.list).find("li").click(function(e){if(o.type!="single_stack_3x1_background"){e.preventDefault();}$(o.outer).data("slideshow").removeActiveClass();o.activeIndex=$(o.list).find("li").index(this);$(o.outer).data("slideshow").addActiveClass();$(o.outer).data("slideshow").setBackgroundImage();});if(($.browser.msie&&parseInt($.browser.version)==6)&&(o.type!="single_stack_4x1_background_wide")){$(o.list).find("li a:first-child").each(function(i){$(this).hover(function(){$(this).children("img").css("display","none");$(this).children("span.prod_desc").css("display","block");},function(){$(this).children("img").css("display","block");$(this).children("span.prod_desc").css("display","none");});});}};this.setBackgroundImage=function(){if(o.type=="single_stack_4x1_background_wide"){$(o.outer).parents(".widget").prev("a").attr("href",$(o.list).find("li.active > a").attr("href")).children("img").attr({src:o.scrollableLookBook[o.activeIndex].src,alt:o.scrollableLookBook[o.activeIndex].alt});}};this.setupStandardSlideshow=function(){o.scrollViewFirst=0;o.scrollViewLast=o.stackCols-1;o.activeIndex=null;if($.browser.msie&&parseInt($.browser.version)==6){$(o.list).find("li a:first-child").each(function(i){$(this).hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");});});}};this.setupTabbedSlideshow=function(){o.tabbedOuter=$(o.outer).parent("div");if($(o.tabbedOuter).hasClass("tabbed_outer")==true){return;}else{$(o.tabbedOuter).addClass("tabbed_outer");var tabHeadings=$(o.tabbedOuter).find("h3");o.tabNavigation=$(document.createElement("ul")).addClass("single_stack_5x1_tabbed_navigation").prependTo(o.tabbedOuter);$(tabHeadings).each(function(i){var listItem=$(document.createElement("li")).appendTo(o.tabNavigation);var anchor=$(document.createElement("a")).html(this.innerHTML).attr({href:"#",title:""});$(anchor).click(function(e){e.preventDefault();var oldTab=$(o.tabNavigation).find("li.active");var oldTabIndex=$(o.tabNavigation).find("li").index(oldTab);$(oldTab).removeClass("active");$(o.tabbedOuter).find(".slideshow").eq(oldTabIndex).css("visibility","hidden");var newTab=$(this).parent("li");var newTabIndex=$(o.tabNavigation).find("li").index(newTab);$(newTab).addClass("active");$(o.tabbedOuter).find(".slideshow").eq(newTabIndex).css("visibility","visible");}).appendTo(listItem);if(i==0){$(listItem).addClass("active");$(o.tabbedOuter).find(".slideshow").eq(0).css("visibility","visible");}});}};this.setEditable=function(){if($(o.outer).hasClass("editable")==true){$(o.list).find("li").each(function(){$(document.createElement("a")).addClass("remove").attr({href:"#",title:""}).click(function(e){e.preventDefault();var elm=$(this).parent("li");o.activeIndex=$(o.list).find("li").index(elm);var productRef=$(elm).children("a").attr("href");alert("Product hook using product href (AAEK-478): href="+productRef);$(elm).remove();o.listItemCount=$(o.list).find("li").length;o.stackColsTotal=Math.ceil(o.listItemCount/o.stackRows);$(o.list).width(o.listItemWidth*o.listItemCount);$(o.outer).data("slideshow").positionListItems();$(o.outer).data("slideshow").scroll();$(o.outer).data("slideshow").checkDisabled();}).appendTo(this);});$(o.list).find(".prod_desc span").each(function(){$(document.createElement("div")).addClass("removeBlock").prependTo(this);});}};this.setupProdDetail=function(){$(o.list).find("li a:first-child").click(function(e){e.preventDefault();alert($(this).attr("href"));var aURL="Stream25-11-homepage_v6_SNIPPET.html";$(o.outer).find("#popInfo").load(aURL,function(){$(o.outer).find(".prod_detail a.close").click(function(e){e.preventDefault();$(o.outer).find(".prod_detail").remove();if($(o.prev).hasClass("blockedDisabled")){$(o.prev).removeClass("blockedDisabled");}else{$(o.prev).removeClass("blocked");o.prevDisabled=false;}if($(o.next).hasClass("blockedDisabled")){$(o.next).removeClass("blockedDisabled");}else{$(o.next).removeClass("blocked");o.nextDisabled=false;}});});if(o.prevDisabled==true){$(o.prev).addClass("blockedDisabled");}else{$(o.prev).addClass("blocked");o.prevDisabled=true;}if(o.nextDisabled==true){$(o.next).addClass("blockedDisabled");}else{$(o.next).addClass("blocked");o.nextDisabled=true;}});};this.init();};$.fn.slideshow=function(opt){this.each(function(){var element=$(this);if(element.data("slideshow")){return;}var slideshow=new ss(this,opt);element.data("slideshow",slideshow);});};$j.fn.equalHeight=function(){var tallest=0;this.each(function(){var thisHeight=$j(this).height();if(thisHeight>tallest){tallest=thisHeight;}});this.height(tallest);};})(jQuery);function findPos(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}while(obj=obj.offsetParent);}return[curleft,curtop];}function formatCurrency(amount){var currCode=getCurrencyCode(shortLocale);var currCodeAmount=amount;switch(currCode){case"GBP":currCodeAmount="&#163;"+currCodeAmount;break;case"EUR":currCodeAmount=currCodeAmount+" &#8364;";break;case"USD":currCodeAmount="&#36;"+currCodeAmount;break;default:currCodeAmount="&#163;"+currCodeAmount;}return currCodeAmount;}function getCurrencyCode(currentlocale){var currencyCode;switch(currentlocale){case"fr_FR":currencyCode="EUR";break;case"de_DE":currencyCode="EUR";break;case"en_EU":currencyCode="EUR";break;case"en_GB":currencyCode="GBP";break;case"en_US":currencyCode="USD";break;default:currencyCode="EUR";}return currencyCode;}function $import(src){var scriptElem=document.createElement("script");scriptElem.setAttribute("src",src);scriptElem.setAttribute("type","text/javascript");document.getElementsByTagName("head")[0].appendChild(scriptElem);}function $importNoCache(src){var ms=new Date().getTime().toString();var seed="?"+ms;$import(src+seed);}
