";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/440/"+i,"#product-details-form"))}function attribute_change_handler_440(){var n="#product-details-form";$("#product-details-form-default").length>0&&(n="#product-details-form-default");$.ajax({cache:!1,url:"/shoppingcart/productdetails_attributechange?productId=440&validateAttributeConditions=False&loadPicture=True",data:$(n).serialize(),type:"POST",success:function(n){var i,t,u,r;if(n.price&&($(".price-value-440").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-440").text(n.basepricepangv):$("#base-price-pangv-440").hide(),n.sku?$("#sku-440").text(n.sku).parent(".sku").show():$("#sku-440").parent(".sku").hide(),n.mpn?$("#mpn-440").text(n.mpn).parent(".manufacturer-part-number").show():$("#mpn-440").parent(".manufacturer-part-number").hide(),n.gtin?$("#gtin-440").text(n.gtin).parent(".gtin").show():$("#gtin-440").parent(".gtin").hide(),n.stockAvailability&&($("#stock-availability-value-440").text(n.stockAvailability),$("#stock-availability-value-440").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-440").text(n.price);n.pictureDefaultSizeUrl&&$("#main-product-img-440").attr("src",n.pictureDefaultSizeUrl);n.pictureFullSizeUrl&&$("#main-product-img-lightbox-anchor-440").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_440();$("#product_attribute_225_15633").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2867").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2837").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2850").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2842").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2864").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2868").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2853").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2859").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2861").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2862").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2860").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2843").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2866").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2839").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2851").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2865").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2852").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2840").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2838").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2849").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2863").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_10508").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_10509").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2841").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2854").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2858").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2855").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2857").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2856").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2846").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2847").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2845").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2848").on("click",function(n){colourClicked(n);attribute_change_handler_440()});$("#product_attribute_225_2844").on("click",function(n){colourClicked(n);attribute_change_handler_440()})})