(function(C){var s="colorbox",q="hover",y=true,Q=false,V,o=!C.support.opacity,S=o&&!window.XMLHttpRequest,z="cbox_open",K="cbox_load",v="cbox_complete",J="cbox_cleanup",p="cbox_closed",N="resize.cbox_resize",H,T,U,d,A,l,b,G,c,O,E,h,g,t,k,n,L,m,I,u,W,j,f,a,r,i,B,P,x,M,D={transition:"elastic",speed:350,width:Q,height:Q,innerWidth:Q,innerHeight:Q,initialWidth:"400",initialHeight:"400",maxWidth:Q,maxHeight:Q,scalePhotos:y,scrolling:y,inline:Q,html:Q,iframe:Q,photo:Q,href:Q,title:Q,rel:Q,opacity:0.9,preloading:y,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:Q,overlayClose:y,slideshow:Q,slideshowAuto:y,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:Q,onLoad:Q,onComplete:Q,onCleanup:Q,onClosed:Q};function F(X,Y){Y=Y==="x"?O.width():O.height();return(typeof X==="string")?Math.round((X.match(/%/)?(Y/100)*parseInt(X,10):parseInt(X,10))):X;}function w(X){X=C.isFunction(X)?X.call(r):X;return P.photo||X.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i);}function R(){for(var X in P){if(C.isFunction(P[X])&&X.substring(0,2)!=="on"){P[X]=P[X].call(r);}}P.rel=P.rel||r.rel;P.href=P.href||r.href;P.title=P.title||r.title;}function e(X){r=X;P=C(r).data(s);R();if(P.rel&&P.rel!=="nofollow"){c=C(".cboxElement").filter(function(){var Y=C(this).data(s).rel||this.rel;return(Y===P.rel);});B=c.index(r);if(B<0){c=c.add(r);B=c.length-1;}}else{c=C(r);B=0;}if(!x){x=y;M=y;i=r;i.blur();C(document).bind("keydown.cbox_close",function(Y){if(Y.keyCode===27){Y.preventDefault();V.close();}}).bind("keydown.cbox_arrows",function(Y){if(c.length>1){if(Y.keyCode===37){Y.preventDefault();I.click();}else{if(Y.keyCode===39){Y.preventDefault();m.click();}}}});if(P.overlayClose){H.css({cursor:"pointer"}).one("click",V.close);}C.event.trigger(z);if(P.onOpen){P.onOpen.call(r);}H.css({opacity:P.opacity}).show();P.w=F(P.initialWidth,"x");P.h=F(P.initialHeight,"y");V.position(0);if(S){O.bind("resize.cboxie6 scroll.cboxie6",function(){H.css({width:O.width(),height:O.height(),top:O.scrollTop(),left:O.scrollLeft()});}).trigger("scroll.cboxie6");}}n.add(I).add(m).add(L).add(k).hide();u.html(P.close).show();V.slideshow();V.load();}V=C.fn.colorbox=function(X,Z){var Y=this;if(!Y.length){if(Y.selector===""){Y=C("<a/>");X.open=y;}else{return this;}}Y.each(function(){var aa=C.extend({},C(this).data(s)?C(this).data(s):D,X);C(this).data(s,aa).addClass("cboxElement");if(Z){C(this).data(s).onComplete=Z;}});if(X&&X.open){e(Y);}return this;};V.init=function(){function X(Y){return C('<div id="cbox'+Y+'"/>');}O=C(window);T=C('<div id="colorbox"/>');H=X("Overlay").hide();U=X("Wrapper");d=X("Content").append(E=X("LoadedContent").css({width:0,height:0}),g=X("LoadingOverlay"),t=X("LoadingGraphic"),k=X("Title"),n=X("Current"),L=X("Slideshow"),m=X("Next"),I=X("Previous"),u=X("Close"));U.append(C("<div/>").append(X("TopLeft"),A=X("TopCenter"),X("TopRight")),C("<div/>").append(l=X("MiddleLeft"),d,b=X("MiddleRight")),C("<div/>").append(X("BottomLeft"),G=X("BottomCenter"),X("BottomRight"))).children().children().css({"float":"left"});h=C("<div style='position:absolute; top:0; left:0; width:9999px; height:0;'/>");C("body").prepend(H,T.append(U,h));if(o){T.addClass("cboxIE");if(S){H.css("position","absolute");}}d.children().bind("mouseover mouseout",function(){C(this).toggleClass(q);}).addClass(q);W=A.height()+G.height()+d.outerHeight(y)-d.height();j=l.width()+b.width()+d.outerWidth(y)-d.width();f=E.outerHeight(y);a=E.outerWidth(y);T.css({"padding-bottom":W,"padding-right":j}).hide();m.click(V.next);I.click(V.prev);u.click(V.close);d.children().removeClass(q);C(".cboxElement").live("click",function(Y){if(Y.button!==0&&typeof Y.button!=="undefined"){return y;}else{e(this);return Q;}});};V.position=function(ac,Z){var ab,Y=O.height(),aa=Math.max(Y-P.h-f-W,0)/2+O.scrollTop(),X=Math.max(document.documentElement.clientWidth-P.w-a-j,0)/2+O.scrollLeft();ab=(T.width()===P.w+a&&T.height()===P.h+f)?0:ac;U[0].style.width=U[0].style.height="9999px";function ad(ae){A[0].style.width=G[0].style.width=d[0].style.width=ae.style.width;t[0].style.height=g[0].style.height=d[0].style.height=l[0].style.height=b[0].style.height=ae.style.height;}T.dequeue().animate({width:P.w+a,height:P.h+f,top:aa,left:X},{duration:ab,complete:function(){ad(this);M=Q;U[0].style.width=(P.w+a+j)+"px";U[0].style.height=(P.h+f+W)+"px";if(Z){Z();}},step:function(){ad(this);}});};V.resize=function(ab){if(!x){return;}var ac,aa,Y,ae,ai,X,ag,Z=P.transition==="none"?0:P.speed;O.unbind(N);if(!ab){ag=setTimeout(function(){var aj=E.wrapInner("<div style='overflow:auto'></div>").children();P.h=aj.height();E.css({height:P.h});aj.replaceWith(aj.children());V.position(Z);},1);return;}E.remove();E=C('<div id="cboxLoadedContent"/>').html(ab);function af(){P.w=P.w||E.width();P.w=P.mw&&P.mw<P.w?P.mw:P.w;return P.w;}function ad(){P.h=P.h||E.height();P.h=P.mh&&P.mh<P.h?P.mh:P.h;return P.h;}E.hide().appendTo(h).css({width:af(),overflow:P.scrolling?"auto":"hidden"}).css({height:ad()}).prependTo(d);C("#cboxPhoto").css({cssFloat:"none"});if(S){C("select:not(#colorbox select)").filter(function(){return this.style.visibility!=="hidden";}).css({visibility:"hidden"}).one(J,function(){this.style.visibility="inherit";});}function ah(aj){V.position(aj,function(){if(!x){return;}if(o){if(X){E.fadeIn(100);}T[0].style.removeAttribute("filter");}if(P.iframe){E.append("<iframe id='cboxIframe'"+(P.scrolling?" ":"scrolling='no'")+" name='iframe_"+new Date().getTime()+"' frameborder=0 src='"+P.href+"' "+(o?"allowtransparency='true'":"")+" />");}E.show();k.show().html(P.title);if(c.length>1){n.html(P.current.replace(/\{current\}/,B+1).replace(/\{total\}/,c.length)).show();m.html(P.next).show();I.html(P.previous).show();if(P.slideshow){L.show();}}g.hide();t.hide();C.event.trigger(v);if(P.onComplete){P.onComplete.call(r);}if(P.transition==="fade"){T.fadeTo(Z,1,function(){if(o){T[0].style.removeAttribute("filter");}});}O.bind(N,function(){V.position(0);});});}if((P.transition==="fade"&&T.fadeTo(Z,0,function(){ah(0);}))||ah(Z)){}if(P.preloading&&c.length>1){aa=B>0?c[B-1]:c[c.length-1];ae=B<c.length-1?c[B+1]:c[0];ai=C(ae).data(s).href||ae.href;Y=C(aa).data(s).href||aa.href;if(w(ai)){C("<img />").attr("src",ai);}if(w(Y)){C("<img />").attr("src",Y);}}};V.load=function(){var Y,X,aa,Z=V.resize;M=y;r=c[B];P=C(r).data(s);R();C.event.trigger(K);if(P.onLoad){P.onLoad.call(r);}P.h=P.height?F(P.height,"y")-f-W:P.innerHeight?F(P.innerHeight,"y"):Q;P.w=P.width?F(P.width,"x")-a-j:P.innerWidth?F(P.innerWidth,"x"):Q;P.mw=P.w;P.mh=P.h;if(P.maxWidth){P.mw=F(P.maxWidth,"x")-a-j;P.mw=P.w&&P.w<P.mw?P.w:P.mw;}if(P.maxHeight){P.mh=F(P.maxHeight,"y")-f-W;P.mh=P.h&&P.h<P.mh?P.h:P.mh;}Y=P.href;g.show();t.show();if(P.inline){C('<div id="cboxInlineTemp" />').hide().insertBefore(C(Y)[0]).bind(K+" "+J,function(){C(this).replaceWith(E.children());});Z(C(Y));}else{if(P.iframe){Z(" ");}else{if(P.html){Z(P.html);}else{if(w(Y)){X=new Image();X.onload=function(){var ab;X.onload=null;X.id="cboxPhoto";C(X).css({margin:"auto",border:"none",display:"block",cssFloat:"left"});if(P.scalePhotos){aa=function(){X.height-=X.height*ab;X.width-=X.width*ab;};if(P.mw&&X.width>P.mw){ab=(X.width-P.mw)/X.width;aa();}if(P.mh&&X.height>P.mh){ab=(X.height-P.mh)/X.height;aa();}}if(P.h){X.style.marginTop=Math.max(P.h-X.height,0)/2+"px";}Z(X);if(c.length>1){C(X).css({cursor:"pointer"}).click(V.next);}if(o){X.style.msInterpolationMode="bicubic";}};X.src=Y;}else{C("<div />").appendTo(h).load(Y,function(ab,ac){if(ac==="success"){Z(this);}else{Z(C("<p>Request unsuccessful.</p>"));}});}}}}};V.next=function(){if(!M){B=B<c.length-1?B+1:0;V.load();}};V.prev=function(){if(!M){B=B>0?B-1:c.length-1;V.load();}};V.slideshow=function(){var Y,X,Z="cboxSlideshow_";L.bind(p,function(){L.unbind();clearTimeout(X);T.removeClass(Z+"off "+Z+"on");});function aa(){L.text(P.slideshowStop).bind(v,function(){X=setTimeout(V.next,P.slideshowSpeed);}).bind(K,function(){clearTimeout(X);}).one("click",function(){Y();C(this).removeClass(q);});T.removeClass(Z+"off").addClass(Z+"on");}Y=function(){clearTimeout(X);L.text(P.slideshowStart).unbind(v+" "+K).one("click",function(){aa();X=setTimeout(V.next,P.slideshowSpeed);C(this).removeClass(q);});T.removeClass(Z+"on").addClass(Z+"off");};if(P.slideshow&&c.length>1){if(P.slideshowAuto){aa();}else{Y();}}};V.close=function(){C.event.trigger(J);if(P.onCleanup){P.onCleanup.call(r);}x=Q;C(document).unbind("keydown.cbox_close keydown.cbox_arrows");O.unbind(N+" resize.cboxie6 scroll.cboxie6");H.css({cursor:"auto"}).fadeOut("fast");T.stop(y,Q).fadeOut("fast",function(){C("#colorbox iframe").attr("src","about:blank");E.remove();T.css({opacity:1});try{i.focus();}catch(X){}C.event.trigger(p);if(P.onClosed){P.onClosed.call(r);}});};V.element=function(){return C(r);};V.settings=D;C(V.init);}(jQuery));var unselectedSkuOptions;var cartButton;var currentSkuOptionObject;var selectedSkuOptionValues;var defaultRegularPrice;var defaultListPrice;var defaultSalePrice;var isInvalid;var selectQueue;var selectSkuQueue;$(document).ready(function(){cartButton=$("#add_to_cart input#addToCartSubmit");defaultRegularPrice=$("#productPrice span.regPrice").text();defaultListPrice=$("#productPrice span.listPrice").text();defaultSalePrice=$("#productPrice span.salePrice").text();selectQueue=new Array("","");selectSkuQueue=new Array("","");$("div.skuOptions li").click(function(){eventSkuOptionClick($(this));});setupToolTip();disableUnavailableSkuOptions();updateAlternateImages(false,defaultProductImages);setAddToCartStatus();});function eventSkuOptionClick(b){$("div.skuOptions #"+b.parent().attr("id")+" li").removeClass("active");b.addClass("active");updateSkuOptions(b.attr("id"),b.parent().attr("id"));updateSkuOptionObject();updateSkuListImages();setAddToCartStatus();updateProductPrice();if(unselectedSkuOptions.length==0){$("#skuGuid").attr("value",currentSkuOptionObject.sku);}$("#"+b.parent().attr("title")+"Label").text(b.attr("title")).show();if(unselectedSkuOptions.length==0){$("#skuGuid").attr("value",currentSkuOptionObject.sku);}var a=currentSkuOptionObject;if((b.parent().attr("title")=="Colour")||(b.parent().attr("title")=="Design")){$("#colourLabel").text(b.attr("title")).show();if($("li.active").length==1){a=findAnySkuOptionObjectFromColour(b.attr("id"));}}updateAlternateImages(a,defaultProductImages);}function setAddToCartStatus(){setUnselectedSkuOptionsArray();toggleAddtoCart();}function updateSkuOptionObject(){selectedSkuOptionValues=new Array();$("div.skuOptions ul.skuList li.active").each(function(){selectedSkuOptionValues.push($(this).attr("id"));});currentSkuOptionObject=getOptionSkuByOptionValues(selectedSkuOptionValues);}function updateSkuOptions(c,d){if($("div.skuOptions ul").length>2){var b=false;if(b=(selectQueue[0]!=d)){selectQueue[1]=selectQueue[0];selectQueue[0]=d;}if(b){selectSkuQueue[1]=selectSkuQueue[0];selectSkuQueue[0]=c;}else{selectSkuQueue[0]=c;}if(selectSkuQueue[1]==""){selectSkuQueue[1]=c;}}else{selectSkuQueue[0]=c;selectSkuQueue[1]=c;}$("div.skuOptions ul").each(function(){if($(this).attr("id")!=d){if($(this).attr("id")!=selectQueue[1]){$("ul#"+$(this).attr("id")+" li").addClass("disabled");}}});var a=getInStockSkuOptions(selectSkuQueue);$.each(a,function(){if($("div.skuOptions li#"+this).parent().attr("id")!=selectQueue[1]){$("div.skuOptions li#"+this).removeClass("disabled");}});}function getInStockSkuOptions(d){var b=new Array();for(var c in skuOptionList){if(($.inArray(d[0],skuOptionList[c].skuOptionValues)>=0)&&($.inArray(d[1],skuOptionList[c].skuOptionValues)>=0)){if(skuOptionList[c].status=="IN_STOCK"){for(var a=0;a<skuOptionList[c].skuOptionValues.length;a++){if((d[0]!=skuOptionList[c].skuOptionValues[a])&&(d[1]!=skuOptionList[c].skuOptionValues[a])){b.push(skuOptionList[c].skuOptionValues[a]);}}}}}return b;}function setUnselectedSkuOptionsArray(){unselectedSkuOptions=new Array();$("div.skuOptions ul.skuList").each(function(){isActive=$("ul#"+$(this).attr("id")+" li").hasClass("active");isInvalid=false;$("ul#"+$(this).attr("id")+" li").each(function(){if($(this).hasClass("disabled")&&$(this).hasClass("active")){isInvalid=true;return false;}});if((!isActive)||(isInvalid)){unselectedSkuOptions.push($(this).attr("title"));}});}function verifySelectedSkuExists(a){if($("div.skuOptions ul.skuList li.active").length==$("div.skuOptions ul.skuList").length){if(currentSkuOptionObject==false){$.each(selectedSkuOptionValues,function(){if(a.attr("id")!=this){$("#"+this).addClass("disabled");}});}}}function getOptionSkuByOptionValues(a){a=a.sort();var e;var b=true;for(var d in skuOptionList){e=skuOptionList[d].skuOptionValues.sort();b=true;for(var c=0;c<e.length;c++){if(a[c]!=e[c]){b=false;break;}}if(b==true){return skuOptionList[d];break;}}return false;}function findAnySkuOptionObjectFromColour(d){for(var b in skuOptionList){var c=skuOptionList[b].skuOptionValues.sort();for(var a=0;a<c.length;a++){if(d==c[a]){return skuOptionList[b];break;}}}return false;}function disableUnavailableSkuOptions(){var a=new Array();for(var c in skuOptionList){for(var b=0;b<skuOptionList[c].skuOptionValues.length;b++){if(skuOptionList[c].status=="IN_STOCK"){a.push(skuOptionList[c].skuOptionValues[b]);}}}$("div.skuOptions ul.skuList li").each(function(){if(jQuery.inArray($(this).attr("id"),a)<0){$(this).addClass("disabled");}});}function preSelectAvailableSkuOptions(){var b=false;var a;$("div.skuOptions ul.skuList").each(function(c){available_options=$(this).find("li:not('.disabled')");if(c==0){available_options.each(function(){eventSkuOptionClick($(this));b=true;return false;});}else{if(available_options.length==1){available_options.each(function(){eventSkuOptionClick($(this));return false;});}}});if(b==false){$("div.skuOptions ul.skuList:first").each(function(){$(this).find("li:first").each(function(){eventSkuOptionClick($(this));});});}}function preSelectCurrentSkuOptions(){currentSkuOptionObject=skuOptionList[defaultSku];var a=currentSkuOptionObject.skuOptionValues.slice();$.each(a,function(){eventSkuOptionClick($("#"+this));});}function preselectOptions(){if(defaultSku!=""){preSelectCurrentSkuOptions();}else{preSelectAvailableSkuOptions();}}function setupToolTip(){var a=$("#add_to_cart input").attr("title");$("#add_to_cart input").hover(function(b){if($(this).hasClass("disabled")&&(unselectedSkuOptions.length>0)){$(this).attr("title","");if($("#tooltip").length==0){$("#add_to_cart").append("<div id='tooltip'>"+getCartText()+"</div>");$("#tooltip").show();}}},function(){if($(this).hasClass("disabled")){$(this).attr("title",a);$("#tooltip").fadeOut("fast",function(){$(this).remove();});}});}function setSkuImage(b,a){imgSrc=b.find("img").attr("src");if(((b.parent().attr("title")!="Colour")&&(b.parent().attr("title")!="Design"))||(a!="_select.gif")){if(imgSrc.indexOf(a)==-1){if((a=="_out.gif")&&(imgSrc.indexOf("_select.gif")!=-1)){return imgSrc.replace("_select.gif",a);}else{return imgSrc.replace(".gif",a);}}}return imgSrc;}function removeSkuImage(b,a){imgSrc=b.find("img").attr("src");if(((b.parent().attr("id")!="Colour")&&(b.parent().attr("id")!="Design"))||(a!="_select.gif")){return imgSrc.replace(a,".gif");}return imgSrc;}function updateSkuListImages(){$("div.skuOptions ul li.disabled").each(function(){if($(this).find("img").length>0){$(this).find("img").attr("src",setSkuImage($(this),"_out.gif"));}});$("div.skuOptions ul li:not('.disabled')").each(function(){if($(this).find("img").length>0){$(this).find("img").attr("src",removeSkuImage($(this),"_out.gif"));}});}function toggleAddtoCart(){if((unselectedSkuOptions.length==0)&&(!isInvalid)){if($("#addToCartSubmit").length>0){$("#addToCartSubmit").removeClass("disabled");}else{if($("#updateToCartSubmit").length>0){$("#updateToCartSubmit").removeClass("disabled");}}}else{if(($("#addToCartSubmit").length>0)&&(!$("#addToCartSubmit").hasClass("disabled"))){$("#addToCartSubmit").addClass("disabled");}else{if(($("#updateToCartSubmit").length>0)&&(!$("#updateToCartSubmit").hasClass("disabled"))){$("#updateToCartSubmit").addClass("disabled");}}}}function updateProductPrice(){if(currentSkuOptionObject!=false){if(currentSkuOptionObject.price!=currentSkuOptionObject.sale_price){$("#productPrice span.regPrice").text("");$("#productPrice span.listPrice").text(formatCurrency(currentSkuOptionObject.price));$("#productPrice span.salePrice").text(formatCurrency(currentSkuOptionObject.sale_price));}else{$("#productPrice span.regPrice").text(formatCurrency(currentSkuOptionObject.price));$("#productPrice span.listPrice").text("");$("#productPrice span.salePrice").text("");}}else{$("#productPrice span.regPrice").text(formatCurrency(defaultRegularPrice));$("#productPrice span.listPrice").text(formatCurrency(defaultListPrice));$("#productPrice span.salePrice").text(formatCurrency(defaultSalePrice));}}function getCartText(){var a;if(!isInvalid){a="Please select: ";$.each(unselectedSkuOptions,function(b){a=a+"<strong>"+this+"</strong>";if(b!=(unselectedSkuOptions.length-1)){a=a+", ";}});}else{a="This product is out of stock";}return a;}function formatCurrency(a){if((a=="")||(a.indexOf("$")>-1)){return a;}else{return"$"+a;}}$(document).ready(function(){var a;$("#theImages img").click(function(){eventAlternateImageClick($(this));});$(".bigImage").hover(function(b){$("#enlargeText span").show();},function(){$("#enlargeText span").fadeOut("fast");});$("a[rel='colorbox']").colorbox({photo:true,innerWidth:500,innerHeight:600,opacity:0.7});});function eventAlternateImageClick(a){$("#theImages img").removeClass("selected");$(a).addClass("selected");$("#productImageA").attr("href",baseUrl+"/renderImage.image?imageName="+a.attr("name")+"&width=500&height=600");$("#productImage").attr("src",baseUrl+"/renderImage.image?imageName="+a.attr("name")+"&width=298&height=358&padding=0");$("#lightboxSet a").each(function(){if((a.attr("id")!=$(this).attr("name"))&&(!$("img#"+$(this).attr("name")).hasClass("hidden"))){$(this).attr("rel","colorbox");}else{$(this).attr("rel","");}});$("a[rel='colorbox']").removeClass("cboxElement").removeData("colorbox");$("a[rel='colorbox']").colorbox({photo:true,innerWidth:500,innerHeight:600,opacity:0.7});}function updateAlternateImages(a,b){if((a==false)||(a.skuProductImages==undefined)||(a.skuProductImages=="")){images=b.split(";");}else{images=a.skuProductImages.split(";");}$("#theImages img").each(function(c){if(c<images.length-1){var d=baseUrl+"/renderImage.image?imageName="+images[c]+"&width="+$(this).attr("width")+"&height="+$(this).attr("height");$(this).attr("src",d);$(this).attr("name",images[c]);$(this).removeClass("hidden");}else{$(this).addClass("hidden");}});$("#lightboxSet a").each(function(c){if(c<images.length-1){var d=baseUrl+"/renderImage.image?imageName="+images[c]+"&width="+$(this).attr("width")+"&height="+$(this).attr("height");$(this).attr("href",d);}});eventAlternateImageClick($("#theImages img:first"));}$(document).ready(function(){$("#addToCartSubmit").click(function(){if($(this).hasClass("disabled")){return false;}else{$(this).addClass("adding");$(this).addClass("disabled");$("#skuOptionsOverlay").show();var a=$("#skuGuid").attr("value");var d=document.getElementById("quantitySelect");var b=d.options[d.selectedIndex].value;var c={callback:success_ajax_handler,errorHandler:error_ajax_handler};shoppingCartAjaxController.addOrUpdateCartItem(a,b,true,c);return false;}});$(".btnContinueShopping").click(function(){$("#addToCartSubmit").removeClass("disabled");$("#addToCartSubmit").removeClass("adding");$("#skuOptionsOverlay").hide();$("#viewCartButton").hide();$("div.skuOptions").slideDown();$("#add_to_cart_message").slideUp();return false;});$("#updateToCartSubmit").click(function(){if($(this).hasClass("disabled")){return false;}else{return true;}});});function error_ajax_handler(a){if(a.validationErrors){$("#add_to_cart_error").show();$("#add_to_cart_error").animate({top:"-20"},500);$("#addToCartSubmit").removeClass("adding");setTimeout(function(){$("#addToCartSubmit").removeClass("disabled");$("#skuOptionsOverlay").fadeOut();$("#add_to_cart_error").animate({top:"0"},500);},3000);}}function success_ajax_handler(c){$("#viewCartButton").show();$("div.skuOptions").slideUp();$("#add_to_cart_message").slideDown();var b=parseInt($("#header_cart_qty").text())+parseInt($("#quantitySelect").val());$("#header_cart_qty").text(b);var a=$("#checkoutbutton_header").find("a");a.attr("title","Checkout").attr("href","/storefront/view-cart.ep").html("Checkout");a.removeClass("btnCheckoutDisabled").addClass("btnCheckout");correctItemsText();}function correctItemsText(){if(parseInt($("#header_cart_qty").text())==1){$("#header_cart_qty_items").text("item");}else{$("#header_cart_qty_items").text("items");}}