var KB=new KitbagObjects("everton"),yourEverton={defUsername:{},defPassword:{},init:function(){this.defUsername="email / customer no";this.defPassword="password";var c=$(".yourEverton"),b=c.find(".textbox:first"),a=c.find(".textbox:last");b.attr("value")==""&&b.attr("value",this.defUsername);b.focus(function(){$(this).attr("value")==yourEverton.defUsername&&$(this).attr("value","")}).blur(function(){if($(this).attr("value")=="")$(this).attr("value",yourEverton.defUsername);else $(this).css("borderColor","#999")});a.attr("value")==""&&a.css("background-image","url(/stores/everton/artwork/english/header/password_v1.png)");a.focus(function(){$(this).css("background-image","none")}).blur(function(){if($(this).attr("value")=="")$(this).css("background-image","url(/stores/everton/artwork/english/header/password_v1.png)");else $(this).css("borderColor","#999")});c.find("input:image").click(function(c){if(b.attr("value")==""||$(".yourEverton .textbox:first").attr("value")==yourEverton.defUsername){c.preventDefault();b.css("borderColor","#0161BA").focus();return}if(a.attr("value")==""){c.preventDefault();a.css("borderColor","#0161BA").focus()}})}},header={curMenu:{},defSearchText:{},init:function(){this.defSearchText="enter keyword here";this.defUsername="email / member no";this.defPassword="password";$(".modalBackground").fadeTo(.7);$("a.searchButton","#headerNav").click(function(){$("#txt_search").attr("value")!=header.defSearchText&&header.goSearch($("#txt_search").attr("value"))});$("#txt_search").attr("value",this.defSearchText).focus(function(){$(this).attr("value")==header.defSearchText&&$(this).attr("value","")}).blur(function(){$(this).attr("value")==""&&$(this).attr("value",header.defSearchText)}).keypress(function(a){if(a.which&&a.which==13||a.keyCode&&a.keyCode==13){a.preventDefault();header.goSearch($(this).attr("value"));return false}else return true});var b=$("#evertonNavigation img:not(:first)");b.mouseenter(function(){$(this).attr("src",$(this).attr("src").match(/[^_]+/)+"_on_v1.gif")});b.mouseleave(function(){$(this).attr("src",$(this).attr("src").match(/[^_]+/)+"_v1.gif")});var c=$("a","#siteNav"),d=$(".navMenu","#headerNav"),a=$("#navMenuShadow");c.mouseenter(function(){$(this).prev().css("visibility","visible");header.curMenu=d.eq(($("#siteNav li").index($(this).parent())+1)/2-1);var b=$(this).position().left-6;if(header.curMenu.width()>945-b)b=b-5-(header.curMenu.width()-$(this).width());if(b<10)b=10;header.curMenu.css("left",b).fadeIn(200);a.show().css("left",b+5).height(header.curMenu.height()+5).width(header.curMenu.width()+30)});c.mouseleave(function(b){$(this).prev().css("visibility","hidden");if(!header.determineHide(header.curMenu.get(0),b)){a.hide(0);header.curMenu.hide(0)}});a.fadeTo(0,.6);d.mouseleave(function(){$(this).hide(0);a.hide(0)})},determineHide:function(b,c){var c=window.event||c,a=c.relatedTarget||c.toElement;while(a&&a!=b)try{a=a.parentNode}catch(c){a=b}return a==b?true:false},goSearch:function(a){freeTextValue=encodeURIComponent(a);window.location.href="/stores/everton/products/product_browse.aspx?free_text="+freeTextValue}},home={imgID:{},timer:{},links:{},init:function(){home.imgID=0;$(".promoimage:first","#homepageTopBanners").show();$("#navbarbg").fadeTo(0,.8);$("#navbartext span:first").show();home.links=$("a","#navbarimages");home.links.fadeTo(0,.7);home.links.eq(0).addClass("ptSelected").fadeTo(0,1);home.links.mouseenter(function(){home.links.index($(this))!=home.imgID&&$(this).fadeTo(300,1).addClass("ptSelected")});home.links.mouseleave(function(){$("#navbarimages a:animated").stop(false,true);home.links.index($(this))!=home.imgID&&$(this).fadeTo(300,.7).removeClass("ptSelected")});$(".accordian").each(function(){$(this).children().children(".accimage:not(:first)").hide().height(0);$(this).children().children(".accimage:first").show()});$(".accordian .accdesc").mouseenter(function(){$(this).parents(".accordian").children().children(".accimage:animated").stop();var a=$(this).parents(".accordian").children().children(".accimage").not($(this).prev());$(this).prev().animate({opacity:1,height:96},350,function(){$(this).prev().show()});a.animate({opacity:0,height:0},350,function(){a.hide()})});$("a","#homepageSideBanners").click(function(){sc_trackLink("HPSideBnr"+$("#homepageSideBanners a").index(this),"eVar6")});$(".promoimage","#homepageTopBanners").click(function(){sc_trackLink("HPTopBnr"+$("#homepageTopBanners a").index(this),"eVar6")});$("#navbartext span a").click(function(){sc_trackLink("HPTopBnr"+$("#navbartext span a").index(this)+"-Txt","eVar6")})},tlmRotate:function(){this.timer=setInterval("home.tlmFireRotate()",9e3)},tlmFireRotate:function(){var a=home.imgID+1;if(a>tlma.length-1)a=0;var b=tlma[a].image;$(new Image).load(function(){home.changeImg()}).attr("src",b)},changeImg:function(){var a=$("a.promoimage","#homepageTopBanners"),c=$("span","#navbartext");home.links.eq(home.imgID).removeClass("ptSelected").fadeTo(200,.7);c.eq(home.imgID).hide();home.imgID+=1;if(home.imgID>tlma.length-1)home.imgID=0;var b=tlma[home.imgID];a.fadeOut(300,function(){a.find("img").attr("src",b.image);a.attr("href",b.link);a.find("img").attr("alt",b.title);a.find("img").attr("title",b.title)});a.fadeIn(300);home.links.eq(home.imgID).addClass("ptSelected").fadeTo(200,1);c.eq(home.imgID).show()}},merchzone={currentZone:{},timer:{},init:function(){this.currentZone=1;var a=$(".browseMerchZone");if(a.get(0)){if(a.length>1)this.timer=setInterval("merchzone.rotateZone()",5e3);var b=$(".browseMerchZonesHeader a");b.toggleClass("zoneheader");b.eq(0).toggleClass("zoneheader").toggleClass("zoneactiveheader");a.eq(0).show()}$(".browseMerchZonesHeader a").click(function(){clearInterval(merchzone.timer);$(this).attr("rel")!=merchzone.currentZone&&merchzone.rotateZone(parseInt($(this).attr("rel")))});$(".browseMerchZone .productListImage").siblings().remove()},rotateZone:function(c){var a=$(".browseMerchZone"),b=$(".browseMerchZonesHeader a");a.eq(this.currentZone-1).fadeOut(300);b.eq(this.currentZone-1).toggleClass("zoneactiveheader").toggleClass("zoneheader");if(c)this.currentZone=c;else{this.currentZone+=1;if(this.currentZone>a.size())this.currentZone=1}a.eq(this.currentZone-1).fadeIn(300);b.eq(this.currentZone-1).toggleClass("zoneheader").toggleClass("zoneactiveheader")}};function s7jsonResponse(b){var c="",e=0,a=0,f=0;for(c in b){e=b[c].indexOf(";",0);a=b[c].indexOf(",",0);if(a==-1)a=b[c].length;while(e>0){f++;var d=b[c].substring(e+1,a).replace("Findel/","");d=d.substring(d.indexOf("-")+1);var g=productdetail.ImageURL.substring(productdetail.ImageURL.lastIndexOf("/")+1,productdetail.ImageURL.lastIndexOf("-")+1)+d;$("<img/>").data("imgname",g).attr("src","http://evertondirect.evertonfc.com/stores/product_images/"+g+".jpg?width=90&height=90&quality=95").appendTo("#pdMultiImages");if(f==4)break;e=b[c].indexOf(";",a);a=b[c].indexOf(",",a+1);if(a==-1)a=b[c].length}}f>1&&$("#pdMultiImages").show()}var proddetails={pdArea:{},nameBox:{},numberBox:{},sizeDD:{},persBox:{},init:function(){$("#pdTabs").kb_tabs();$("#productDetailNav").kb_accordian({defaultpane:":first",grow:true});$("#pdMultiImages img").live("click",function(){var a=$("#pdMainImage img"),b="http://evertondirect.evertonfc.com/stores/product_images/"+$(this).data("imgname")+".jpg?width=400&height=400&quality=95";a.fadeOut(500,function(){$(new Image).load(function(){a.attr("src",b).fadeIn(500)}).attr("src",b)})});if(typeof viewerSet!=="undefined")$.getScript("http://findel.scene7.com/is/image/Findel/"+viewerSet+"-"+productdetail.ProductID+"-set?req=imageset,json");else $("#pdMultiImages").hide(0);$("#showsizechart").mousedown(function(){$(this).queue(function(){sizechart_viewer.load("#sizechart div.content");$(this).dequeue()})});$("#returnsinfolink").mousedown(function(){$(this).queue(function(){$("#returnsinfo div.content").kb_content({branch:897,leaf:"returnsinfoFull112"});$(this).dequeue()})});$("#ukdeliveryinfolink").mousedown(function(){$(this).queue(function(){$("#ukdeliveryinfo div.content").kb_content({branch:897,leaf:"delinfo_UKFull112"});$(this).dequeue()})});$("#overseasdeliveryinfolink").mousedown(function(){$(this).queue(function(){$("#overseasdeliveryinfo div.content").kb_content({branch:897,leaf:"delinfo_OverseasFull112"});$(this).dequeue()})});$(".colourway a").mouseover(function(){var b=window["colour"+$(this).attr("rel")],a=$("#pdMainImage img");!a.data("origImg")&&a.data("origImg",a.attr("src"));a.attr("src",b.ImageURL)});$("#pdColourContainer").mouseleave(function(){var a=$("#pdMainImage img");a.data("origImg")&&a.data("origImg")!=a.attr("src")&&a.fadeTo(200,.5,function(){$(this).attr("src",$(this).data("origImg")).fadeTo(600,1)})});pdArea=$("#productDetailInfo");nameBox=$("input.pdNameBox",pdArea);numberBox=$("input.pdNumberBox",pdArea);sizeDD=$("select.pdSizes",pdArea);persBox=$(".persfield",pdArea);sizeDD.change(function(){var d=parseInt($(this).val(),10),e=$("span.pdNameBoxMax",pdArea),a=10,b;if(d>0){var c=0;while(c<=productdetail.variations.length-1){if(productdetail.variations[c].VariationId==d){b=productdetail.variations[c];a=b.MaxLetters;$("span.pdAvailability",pdArea).html(b.Availability);break}c++}}if(nameBox.get(0)){nameBox.attr("maxLength",a);e.text(a);if(printingChoices.Name.length>a){printingChoices.Name=printingChoices.Name.substring(0,a);nameBox.val(printingChoices.Name)}}proddetails.displayPersFields(b);proddetails.priceUpdate()}).load(function(){proddetails.priceUpdate()});nameBox.keypress(function(a){var b=a.which?a.which:event.keyCode,c=/[a-zA-Z\s\'\.]/;!c.test(String.fromCharCode(b))&&b>41&&a.preventDefault()}).keyup(function(){this.value=this.value.replace(/[^a-zA-Z\s\'\.]/g,"");if(printingChoices.Name!=this.value){printingChoices.Name=this.value;proddetails.priceUpdate()}});numberBox.keypress(function(a){var b=a.which?a.which:event.keyCode,c=/([0-9])/;!c.test(String.fromCharCode(b))&&b>41&&a.preventDefault()}).keyup(function(){this.value=this.value.replace(/[^0-9\.]/g,"");if(printingChoices.Number!=this.value){printingChoices.Number=this.value;proddetails.priceUpdate()}});persBox.focus(function(){$(this).addClass("focus")});persBox.blur(function(){$(this).removeClass("focus")});persBox.keypress(function(a){var b=a.which?a.which:event.keyCode,c=/[0-9a-zA-Z\s\'\.!]/;!c.test(String.fromCharCode(b))&&b>41&&a.preventDefault()}).keyup(function(){this.value=this.value.replace(/[^0-9a-zA-Z\s\'\.!]/g,"");var b=parseInt($(this).attr("rel").replace(/[^0-9]/g,""));if(eval("printingChoices.EmbFlock"+b)!=this.value){eval("printingChoices.EmbFlock"+b+" = this.value");proddetails.priceUpdate()}var c=$(this).attr("maxlength"),a=$(this).val().length;if(a==0)$("span[rel$="+$(this).attr("rel").replace("pers","max")+"]").text("(max "+c+" chars)");else $("span[rel$="+$(this).attr("rel").replace("pers","max")+"]").text("("+(c-a)+" left)")});proddetails.displayPersFields();$(".chkGiftWrap").bind("click",function(){if($("#giftArea").css("display")=="block")$("#giftArea").css("display","none");else $("#giftArea").css("display","block")})},displayPersFields:function(d){if(persBox.get(0)){$(".printingoptions","#productDetailInfo").hide();persBox.hide();if(d)for(i=0;i<d.PrintingLines.length;i++){var c=d.PrintingLines[i];maxLetters=c.LineLength;var a=$("input[rel$=pers"+c.LineNumber+"]");if(a.get(0)){a.show();a.attr("maxlength",maxLetters);title=a.attr("title").replace(/Max [0-9]+ Characters/,"Max "+maxLetters+" Characters");a.attr("title",title);realText=eval("printingChoices.EmbFlock"+c.LineNumber);if(realText.length>maxLetters){realText=realText.substring(0,maxLetters);eval("printingChoices.EmbFlock"+c.LineNumber+" = realText");a.val(realText)}}var b=$("span[rel$=max"+c.LineNumber+"]");if(b.get(0)){b.show();b.val("(max "+maxLetters+" chars)")}}else{maxLetters=3;if(productdetail.variations[0].PrintingLines[0].PrintingTypeID==15)maxLetters=11;var a=$("input[rel$=pers1]");if(a.get(0)){a.show();maxLetters=a.attr("maxlength");title=a.attr("title").replace(/Max [0-9]+ Characters/,"Max "+maxLetters+" Characters");a.attr("title",title)}var b=$("span[rel$=max1]");if(b.get(0)){b.show();b.val("(max "+maxLetters+" chars)")}}}},priceUpdate:function(){var f=0,b=0,a=0,g,h=productdetail.variations,c=productdetail.printingitems,e,d;if(sizeDD.get(0))g=parseInt(sizeDD.val(),10);else g=0;if(g===0)e=productdetail;else while(a<=h.length-1){if(h[a].VariationId==g){e=h[a];break}a++}f=e.PriceActual;if(nameBox.get(0)&&printingChoices.Name!=""){a=0;while(a<=c.length-1){if(c[a].PrintingTypeID==1){d=c[a];break}a++}b=b+d.PriceActual}else{if(numberBox.get(0)&&printingChoices.Number!=""){a=0;while(a<=c.length-1){if(c[a].PrintingTypeID==2||c[a].PrintingTypeID==8){d=c[a];break}a++}if(d.PrintingTypeID==8)b=b+d.PriceActual*printingChoices.Number.length;else b=b+d.PriceActual}if((persBox.get(0)&&printingChoices.EmbFlock1!="")|(persBox.get(1)&&printingChoices.EmbFlock2!="")|(persBox.get(2)&&printingChoices.EmbFlock3!="")){a=0;while(a<=c.length-1){if(c[a].PrintingTypeID==14||c[a].PrintingTypeID==15){d=c[a];break}a++}b=b+d.PriceActual}}var i=$(".pdBadges",pdArea).val();if(i)if(i>0){a=0;while(a<=c.length-1){if(c[a].PrintingID==i){d=c[a];break}a++}b=b+d.PriceActual}if(printingChoices.Name!=""||printingChoices.Number!="")personalised=1;$("input.persfield").each(function(){if(eval("printingChoices.EmbFlock"+$(this).attr("rel").replace(/[^0-9]/g,""))!="")personalised=1});printingChoices.Price=parseFloat(b).toFixed(2);$("span.pdPrintingPrice",pdArea).text(pagedetails.currency+parseFloat(b).toFixed(2));$("span.pdProductPrice",pdArea).text(pagedetails.currency+parseFloat(f).toFixed(2));if(e.PriceWas>0){var j=parseFloat(e.PriceWas)-parseFloat(f),k=parseInt((parseFloat(e.PriceWas)-parseFloat(f))/parseFloat(e.PriceWas)*100,10);$("span.pdPreviousPrice",pdArea).show().text(pagedetails.currency+parseFloat(e.PriceWas).toFixed(2))}else $("span.pdPreviousPrice",pdArea).hide().text("");$("span.pdTotalPrice",pdArea).text(pagedetails.currency+parseFloat(f+b).toFixed(2));if($("input.persfield"))if(b>0){$("span.embflockcost",pdArea).text(pagedetails.currency+parseFloat(f+b).toFixed(2));$("span.embflockprice",pdArea).css({visibility:"visible"});$("span.embflockcost",pdArea).css({visibility:"visible"})}else{$("span.embflockprice",pdArea).css({visibility:"hidden"});$("span.embflockcost",pdArea).css({visibility:"hidden"})}}},productplus={img:{},init:function(){$(".ppimg").click(function(b){b.preventDefault;var a=$(this).parents(".ppItem");a.addClass("ppSelected").siblings(".ppItem").removeClass("ppSelected");productplus.img=a.find(".ppImg").attr("src");KB.Services.Product().SetProductPlus($(this).attr("rel"),a.find(".ppVariation").val(),productplus.onPPComplete,productplus.onError)});$("#ppSelectedInfo").live("click",function(){KB.Services.Product().RemoveProductPlus(productplus.onPPRemoveComplete,productplus.onError)})},onPPComplete:function(a){a=a.replace("[IMG]","<img src='"+productplus.img+"' alt='' />");$("#ppSelectedInfo").slideUp(400).queue(function(){$(this).html(a+"<br/><a><img src='/stores/everton/artwork/english/interface/buttons/button_cancel.gif' /></a>").dequeue()}).slideDown(400)},onPPRemoveComplete:function(){$("#ppSelectedInfo").slideUp(400).queue(function(){$(".ppItem").removeClass("ppSelected");$(this).html("<p>You have not yet made a selection</p>").dequeue()}).slideDown(200)},onError:function(){$("#ppSelectedInfo").html("Unfortunately a problem occurred, please try again or come back later when the problem will hopefully be resolved")}},basket={init:function(){$(".productListATB").click(function(c){c.preventDefault();EnableUI.Toggle(false);var a=$(this).parents(".productListItem"),d=$(this).attr("rel"),b=0;if(a.find(".productListSizes").get(0))b=parseInt(a.find(".productListSizes").val(),10);KB.Services.Product().AddToBasket(d,b,0,"","",0,basket.onATBComplete,basket.onError)});$("#basketRight").kb_accordian({grow:true});$(".shiplink").live("mousedown",function(){$(this).queue(function(){$("#deliveryinfo div.content").kb_content({branch:892,leaf:"shipping_info_112"});$(this).dequeue})});$("#collectionlink").live("mousedown",function(){$("#collectioninfo div.content").html("");$.get("/stores/everton/help/store_information.html",function(a){$("#collectioninfo div.content").html(a);$("#collectionintro").kb_content({branch:892,leaf:"collection_info_112"})})});$(".removeItem").live("click",function(a){a.preventDefault();basket.feedback($(this),"Please wait while this item is removed from your basket");__doPostBack($(this).attr("name"),"")});$(".decreaseItem, .increaseItem").live("click",function(){basket.feedback($(this),"Please wait while this item is updated");__doPostBack($(this).attr("name"),"")});basket.giftWrap.init()},refreshContents:function(){__doPostBack("ctl00_ContentMain_basket1_up_basket","BasketRefresh")},feedback:function(b,c){var a=b.parents("tr");a.find("td:gt(0)").remove();a.find("td:first");a.append("<td colspan='6' align='center'><img src='/stores/everton/artwork/common/interface/loader-bar_v1.gif' alt='loading' border='0' /><p>"+c+"</p></td>")},onATBComplete:function(a){if(a){var b=$("."+a.ProductID+a.VariationID),c="<td align='center' valign='middle' style='height:105px;width:120px;'><img src='http://evertondirect.evertonfc.com/stores/product_images/"+a.ImageName+"?width=100&amp;height=100' alt='"+a.Description+"' style='height:100px;width:100px;border-width:0px;' /></td><td colspan='6' align='center'><img src='/stores/everton/artwork/common/interface/loader-bar_v1.gif' alt='loading' style='border:none !Important' /><p>Please wait while <em>'"+a.Description+"'</em> is added to your basket</p></td>";if(b.length>0)b.html(c);else b=$("<tr style='display:none' />").html(c).fadeIn(600).appendTo($(".basketContents"));var d=b.offset().top+b.height();if(parseInt(d,10)>$(window).height()+$(window).scrollTop())$("html,body").animate({scrollTop:d-$(window).height()+10},500,function(){basket.refreshContents()});else basket.refreshContents()}else{alert("There was a problem adding the current selection to the basket");EnableUI.Toggle(true)}},onError:function(){alert("Unfortunately an error has occured, please try again");EnableUI.Toggle(true)},giftWrap:{init:function(){basket.giftWrap.enableGWCheckBoxes();var a=Sys.WebForms.PageRequestManager.getInstance();a.add_endRequest(function(){basket.giftWrap.enableGWCheckBoxes()});$(".chkGiftWrap").live("click",function(){var a=$(this).find("input");shadowViewer.highlight({resourceURL:"/stores/everton/help/giftwrap/giftwrap_enter.htm",width:640,height:550});$(".gw_charsmax").text(KB.GiftWrap.taglength);if(a.is(":checked")){$(".gw_text").data("bskItem",$(this).attr("rel")).focus();$(".gw_add").show()}else{$(".gw_text").data("bskItem",$(this).attr("rel")).attr("readonly","true").val($(".giftwrapmsg"+$(this).attr("rel")).html().replace(KB.GiftWrap.emptymsg,""));$(".gw_remove").show()}$(".gw_cancel").data({chkBoxID:a.attr("id")});basket.giftWrap.giftTagCalculateChars()});$(".editGiftTag").live("click",function(){shadowViewer.highlight({resourceURL:"/stores/everton/help/giftwrap/giftwrap_enter.htm",width:640,height:550});$(".gw_charsmax").text(KB.GiftWrap.taglength);$(".gw_text").data("bskItem",$(this).attr("rel")).show().val($(".giftwrapmsg"+$(this).attr("rel")).html().replace(KB.GiftWrap.emptymsg,"")).focus();$(".gw_edit").show();basket.giftWrap.giftTagCalculateChars()});$(".gw_info").live("click",function(){shadowViewer.highlight({resourceURL:"/stores/everton/help/giftwrap/giftwrap_info.htm",width:520,height:310})});$(".gw_cancel").live("click",function(){shadowViewer.hide();var a=$("#"+$(this).data("chkBoxID")).eq(0);if(a.attr("checked"))a.attr("checked",false);else a.attr("checked",true)});$(".gw_add").live("click",function(){if($(".gw_text").eq(0).val().length>KB.GiftWrap.taglength)basket.giftWrap.giftTagCalculateChars();else{EnableUI.Toggle(false);KB.Services.Basket().InsertPrintingItem($(".gw_text").data("bskItem"),16,1,KB.GiftWrap.name,0,KB.GiftWrap.price,basket.giftWrap.giftWrapAddedSuccess,basket.giftWrap.giftWrapError)}});$(".gw_edit").live("click",function(){var a=$(this).siblings(".gw_text").eq(0).val();if(a.length>KB.GiftWrap.taglength)basket.giftWrap.giftTagCalculateChars();else{EnableUI.Toggle(false);KB.Services.Basket().UpdatePrintingItem($(".gw_text").data("bskItem"),17,a,basket.giftWrap.giftWrapSuccess,basket.giftWrap.giftWrapError)}});$(".gw_remove").live("click",function(){EnableUI.Toggle(false);KB.Services.Basket().RemovePrintingItem($(".gw_text").data("bskItem"),17,basket.giftWrap.giftTagRemovedSuccess,basket.giftWrap.giftWrapError)});$(".gw_removeall").live("click",function(){EnableUI.Toggle(false);KB.Services.Basket().RemovePrintingItemsByType(17,basket.giftWrap.giftTagAllRemovedSuccess,basket.giftWrap.giftWrapError)});$(".gw_cancelcountry").live("click",function(){shadowViewer.hide();$(".countrySelector option[value='204']").attr("selected","selected");basket.refreshContents()});$("body").delegate(".countrySelector","change",function(){var c=KB.GiftWrap.countries.split(","),b=$(".countrySelector").eq(0).val(),a=$(".chkGiftWrap input:checked").length;a>0&&$.inArray(b,c)<0&&shadowViewer.highlight({resourceURL:"/stores/everton/help/giftwrap/giftwrap_restrictions.htm",width:520,height:310})});$(".gw_text").live("keydown",function(){var a=$(".gw_text").eq(0);if(a.val().length>KB.GiftWrap.taglength)return false}).live("keyup",function(){var a=$(".gw_text").eq(0);a.val(a.val().substring(0,KB.GiftWrap.taglength));basket.giftWrap.giftTagCalculateChars()})},enableGWCheckBoxes:function(){$(".chkGiftWrap input").attr("disabled",false);$(".chkGiftWrap").attr("disabled",false)},giftTagCalculateChars:function(){var a=$(".gw_text").eq(0).val();$(".gw_charsused").html(a.length);$(".gw_charsremaining").html(KB.GiftWrap.taglength-a.length)},giftWrapSuccess:function(){basket.feedback($(".chkGiftWrap[rel='"+$(".gw_text").data("bskItem")+"']"),"Altering gift wrap selection on this item");shadowViewer.hide({callback:basket.refreshContents()})},giftWrapError:function(){alert("There was a problem with the operation");EnableUI.Toggle(true)},giftWrapAddedSuccess:function(){KB.Services.Basket().InsertPrintingItem($(".gw_text").data("bskItem"),17,1,$(".gw_text").eq(0).val(),0,0,basket.giftWrap.giftWrapSuccess,basket.giftWrap.giftWrapError)},giftTagRemovedSuccess:function(){KB.Services.Basket().RemovePrintingItem($(".gw_text").data("bskItem"),16,basket.giftWrap.giftWrapSuccess,basket.giftWrap.giftWrapError)},giftTagAllRemovedSuccess:function(){KB.Services.Basket().RemovePrintingItemsByType(16,basket.giftWrap.giftWrapSuccess,basket.giftWrap.giftWrapError)}}},orderdetails={init:function(){$(".shiplink").live("mousedown",function(){$(this).queue(function(){$("#deliveryinfo .content").kb_content({branch:892,leaf:"shipping_info_112"})}).dequeue});$("#collectionlink").live("mousedown",function(){$("#collectioninfo .content").html("");$.get("/stores/everton/help/store_information.html",function(a){$("#collectioninfo .content").html(a);$("#collectionintro").kb_content({branch:892,leaf:"collection_info_112"})})})}},sizechart_viewer={load:function(a){!KB.Cache.Get("chart")&&$.get("/stores/everton/help/size_chart.htm",function(b){KB.Cache.Set("chart",b);$(a).html(b);$("#sizecharttabs").kb_tabs()})}};$(document).ready(function(){yourEverton.init();header.init();var a=Sys.WebForms.PageRequestManager.getInstance();a.add_beginRequest(function(a){if(a._postBackSettings.panelID.split("|")[0]=="ctl00$up_yourEverton"){$(".loggingIn #attempting").show(0);$(".loggingIn #failed").hide(0);$(".loggingIn").slideDown(200)}});a.add_endRequest(function(a){if(a._postBackSettings.panelID.split("|")[0]=="ctl00$up_yourEverton"){$(".loggingIn #failed").show(0);$(".loggingIn #attempting").hide(0);setTimeout(function(){$(".loggingIn").slideUp(300)},3e3);yourEverton.init()}})});var browse={init:function(){var a=$(".refinementPanel .refinement","#productBrowseContainer");a.children("a").click(function(a){a.preventDefault();$(this).parent().next().slideToggle(250)});$(".colourway a").mouseover(function(){var a=$(this).parents(".productListItem"),f=a.find(".productListImage img"),e=a.children(".productListLink").find("a"),d=a.children(".productListPrice").find("span:last"),b={};b.img=f.attr("src");b.desc=e.html();b.price=d.html();!a.data("orig")&&a.data("orig",b);var c=window["colour"+$(this).attr("rel")];f.attr("src",c.ImageURL);e.html(c.Description);d.html(c.PriceString)});$(".productListColours").mouseleave(function(){var b=$(this).parents(".productListItem"),c=b.find(".productListImage img"),a=b.data("orig");a&&a.img!=c.attr("src")&&c.fadeTo(200,.5,function(){$(this).attr("src",a.img).fadeTo(600,1);b.find(".productListLink a").html(a.desc);b.find(".productListPrice span:last").html(a.price)})});$(".productListItem",".browseResults").kb_equaliseHeights({minHeight:250})}};function goSort(a){window.location.href=baseurlwithoutsort+"&sort_option="+$("#"+a).val()};
