";r+="<\/form>";$(".nopAjaxCartProductVariantAddToCartButton").remove();$("#product-details-form-default").before(r);i===1?($("#add-to-cart-button-"+n).after("<\/button>"),$(".nopAjaxCartProductVariantAddToCartButton").trigger("click")):(AjaxCart.usepopupnotifications=!0,AjaxCart.addproducttocart_details("addproducttocart/details/845/"+i,"#product-details-form"))}function attribute_change_handler_845(){var n="#product-details-form";$("#product-details-form-default").length>0&&(n="#product-details-form-default");$.ajax({cache:!1,url:"/shoppingcart/productdetails_attributechange?productId=845&validateAttributeConditions=True&loadPicture=True",data:$(n).serialize(),type:"POST",success:function(n){var i,t,u,r;if(n.price&&($(".price-value-845").text(n.price),$(".afterpay-product-info .amount").length>0&&(i=(parseFloat(n.price.replace("$","").replace(",",""))/4).toFixed(2),isNaN(i)||$(".afterpay-product-info .amount").html(i))),n.basepricepangv?$("#base-price-pangv-845").text(n.basepricepangv):$("#base-price-pangv-845").hide(),n.sku?$("#sku-845").text(n.sku).parent(".sku").show():$("#sku-845").parent(".sku").hide(),n.mpn?$("#mpn-845").text(n.mpn).parent(".manufacturer-part-number").show():$("#mpn-845").parent(".manufacturer-part-number").hide(),n.gtin?$("#gtin-845").text(n.gtin).parent(".gtin").show():$("#gtin-845").parent(".gtin").hide(),n.stockAvailability&&($("#stock-availability-value-845").text(n.stockAvailability),$("#stock-availability-value-845").attr("class","value "+n.stockAvailability.toLowerCase().replaceAll(" ","-"))),n.enabledattributemappingids){for(t=0;t0&&($("#product_attribute_label_0").hide(),$("#product_attribute_input_0").hide(),$("#product_attribute_readmore_0").hide())}u=$(".color-squares li.selected-value").is(":visible");r=$("input[id^='product_attribute_'][value='0']");(r.length>0&&r.prop("checked")||!u)&&$(".price-value-845").text(n.price);n.pictureDefaultSizeUrl&&$("#main-product-img-845").attr("src",n.pictureDefaultSizeUrl);n.pictureFullSizeUrl&&$("#main-product-img-lightbox-anchor-845").attr("href",n.pictureFullSizeUrl);n.message&&alert(n.message);$(document).trigger({type:"product_attributes_changed",changedData:n})}})}var globalResizeTimer=null;$(window).resize(function(){globalResizeTimer!=null&&window.clearTimeout(globalResizeTimer);globalResizeTimer=window.setTimeout(function(){setColourDetailsPosition()},200)});$(document).ready(function(){attribute_change_handler_845();$("#product_attribute_601_0").on("click",function(){attribute_change_handler_845()});$("#product_attribute_601_6306").on("click",function(){attribute_change_handler_845()});$("#product_attribute_601_6304").on("click",function(){attribute_change_handler_845()});$("#product_attribute_603_6327").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6317").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6320").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6318").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6310").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6329").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6315").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6324").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6319").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6312").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6309").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6313").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6330").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6311").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6314").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6331").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_17088").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6307").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6323").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6321").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6322").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6325").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6339").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6335").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6336").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6334").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6337").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6338").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6332").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_603_6333").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17086").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17085").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17053").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17052").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17056").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17051").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17055").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17054").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17084").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17050").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17049").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_1625_17083").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6327").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6317").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6320").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6318").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6310").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6329").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6315").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6324").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6319").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6312").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6309").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6313").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6330").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6311").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6314").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6331").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_17088").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6307").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6323").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6321").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6322").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6325").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6339").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6335").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6336").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6334").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6337").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6338").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6332").on("click",function(n){colourClicked(n);attribute_change_handler_845()});$("#product_attribute_0_6333").on("click",function(n){colourClicked(n);attribute_change_handler_845()})})