";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/4536/"+i,"#product-details-form"))}function attribute_change_handler_4536(){var n="#product-details-form";$("#product-details-form-default").length>0&&(n="#product-details-form-default");$.ajax({cache:!1,url:"/shoppingcart/productdetails_attributechange?productId=4536&validateAttributeConditions=False&loadPicture=True",data:$(n).serialize(),type:"POST",success:function(n){var i,t,u,r;if(n.price&&($(".price-value-4536").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-4536").text(n.basepricepangv):$("#base-price-pangv-4536").hide(),n.sku?$("#sku-4536").text(n.sku).parent(".sku").show():$("#sku-4536").parent(".sku").hide(),n.mpn?$("#mpn-4536").text(n.mpn).parent(".manufacturer-part-number").show():$("#mpn-4536").parent(".manufacturer-part-number").hide(),n.gtin?$("#gtin-4536").text(n.gtin).parent(".gtin").show():$("#gtin-4536").parent(".gtin").hide(),n.stockAvailability&&($("#stock-availability-value-4536").text(n.stockAvailability),$("#stock-availability-value-4536").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-4536").text(n.price);n.pictureDefaultSizeUrl&&$("#main-product-img-4536").attr("src",n.pictureDefaultSizeUrl);n.pictureFullSizeUrl&&$("#main-product-img-lightbox-anchor-4536").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_4536();$("#product_attribute_1632_17132").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17154").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17134").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17135").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17139").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17146").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17155").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17144").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17156").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17153").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17138").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17157").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17159").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17158").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17136").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17152").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17151").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17140").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17141").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17143").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17147").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17142").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17150").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17191").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17145").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17148").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17149").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17137").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17133").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17129").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17131").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17128").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17127").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17130").on("click",function(n){colourClicked(n);attribute_change_handler_4536()});$("#product_attribute_1632_17160").on("click",function(n){colourClicked(n);attribute_change_handler_4536()})})