jQuery(document).ready(function(){jQuery("a.help").click(function(){helpWindow=window.open($(this).attr("href")+"?popup=true","help","width=300,height=300,resizable=yes,scrollbars=yes");helpWindow.moveTo(50,50);return false});jQuery(".swatches a").click(function(){if(jQuery(this).parent().hasClass("active")){return true}productDisplay=jQuery(this).parents(".swatches").parent();if(jQuery(this).parent().hasClass("custom")){if(!jQuery(productDisplay).find(".customoverlay").length){imagePath=jQuery(this).find("img").attr("src").replace(/-swatch/,"-overlay");jQuery(productDisplay).children("a").append('<img style="margin-left: -62px; margin-top: -50px;" class="customoverlay" src="'+imagePath+'" width="124" height="100" alt="Design Your Own!" />')}jQuery(productDisplay).find(".customoverlay").show();jQuery(productDisplay).children("a").attr("href",jQuery(this).attr("href"))}else{jQuery(productDisplay).find(".customoverlay").hide();imagePath=$(this).find("img").attr("src").replace(/-swatch/,"-thumb");jQuery(productDisplay).children("a").attr("href",jQuery(this).attr("href")).find("img:not(.customoverlay)").attr("src",imagePath)}if(jQuery(this).parent().find(".available").length){if(jQuery(productDisplay).children("a").find(".available").length){$(productDisplay).children("a").find(".available").show()}else{jQuery(productDisplay).children("a").append('<span class="available">This colorway is available!</span>')}}else{jQuery(productDisplay).children("a").find(".available").hide()}jQuery(productDisplay).find(".swatches").children().removeClass("active");jQuery(this).parent().addClass("active");return false})});var itemWait=4000;var animSpeed=800;function set_cookie(b,g,i,f,h,j,e,a){var d=b+"="+escape(g);if(i){var c=new Date(i,f,h);d+="; expires="+c.toGMTString()}if(j){d+="; path="+escape(j)}if(e){d+="; domain="+escape(e)}if(a){d+="; secure"}document.cookie=d}function get_cookie(b){var a=document.cookie.match("(^|;) ?"+b+"=([^;]*)(;|$)");if(a){return(unescape(a[2]))}else{return null}}jQuery(document).ready(function(){jQuery(".itemlinks li:first").addClass("active");jQuery(".items li:first").addClass("active");var a=setInterval(showNext,itemWait);setTimeout("showNumbers()",1);jQuery(".itemlinks li").click(function(){clearInterval(a);if(jQuery(".items .active").length){showItem(this)}})});function showNext(){if(jQuery(".itemlinks .active").next().length){showItem(jQuery(".itemlinks .active").next())}else{showItem(jQuery(".itemlinks li:first").get())}}function showNumbers(){jQuery(".itemlinks").animate({right:"10"},1000)}function showItem(a){if(jQuery(a).hasClass("active")){return false}jQuery(".items ul").stop();jQuery(".itemlinks li").removeClass("active");jQuery(a).addClass("active");featureNum=jQuery(a).prevAll().length;feature=jQuery(".items li").eq(featureNum);feature.css("z-index","49");jQuery(".items .active").removeClass("active").fadeOut(animSpeed,function(){jQuery(this).css("z-index","40").show();feature.css("z-index","50").addClass("active")})}(function(b){b.fn.extend({animateToClass:function(h,e,g,f){if(!h){return this}styles=a(h);if(!styles){return this}return this.animate(styles,e,g,f)}});function a(f){if(f.substr(0,1)!="."){f="."+f}for(var e=0;e<document.styleSheets.length;e++){v=document.styleSheets[e];attrClass=c(f,v);if(attrClass!=false){break}}if(!attrClass){attrClass=Array()}objStyle={};if(attrClass==""){return false}if(attrClass.match(";")){attrClass=attrClass.split(";")}else{attrClass=[attrClass]}b(attrClass).each(function(h,g){if(g!=""){g=g.split(":");g[0]=d(g[0]);objStyle[g[0]]=b.trim(g[1])}});return objStyle}function c(f,e){attrClass=false;if(b.browser.msie){if(e.rules.length>0){b(e.rules).each(function(g,h){if(f==h.selectorText){attrClass=h.style.cssText}})}else{if(e.imports.length>0){b(e.imports).each(function(g,h){if(f==h.selectorText){attrClass=h.style.cssText}else{if(h=="[object]"||h=="[Object CSSStyleSheet]"||h=="[object CSSImportRule]"){return c(f,h)}}})}}}else{b(e.cssRules).each(function(g,h){if(f==h.selectorText){attrClass=h.style.cssText}else{if(h=="[object CSSImportRule]"){return c(f,h.styleSheet)}}})}return attrClass}function d(f){f=b.trim(f);f=f.replace(/-/g," ");f=f.toLowerCase();strArr=f.split(" ");var e="";b(strArr).each(function(h,g){if(h==0){e+=g}else{e+=g.substr(0,1).toUpperCase();e+=g.substr(1,g.length)}});return e}})(jQuery);(function(a){a.fn.hoverIntent=function(k,j){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,j?{over:k,out:j}:k);var n,m,h,d;var e=function(f){n=f.pageX;m=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-n)+Math.abs(d-m))<l.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return l.over.apply(f,[g])}else{h=n;d=m;f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return l.out.apply(f,[g])};var b=function(q){var o=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(o&&o!=this){try{o=o.parentNode}catch(q){o=this}}if(o==this){return false}var g=jQuery.extend({},q);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(q.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},l.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);jQuery(document).ready(function(){jQuery(".shopp_categories li").hoverIntent({sensitivity:3,interval:400,over:b,timeout:100,out:a});function b(){jQuery(this).children(".children").slideDown()}function a(){if(jQuery(this).children("ul").hasClass(".active")==false){jQuery(this).children(".children").slideUp()}}jQuery(".children").hide();jQuery(".active").slideDown()});