";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/1916/"+i,"#product-details-form"))}function attribute_change_handler_1916(){var n="#product-details-form";$("#product-details-form-default").length>0&&(n="#product-details-form-default");$.ajax({cache:!1,url:"/shoppingcart/productdetails_attributechange?productId=1916&validateAttributeConditions=False&loadPicture=True",data:$(n).serialize(),type:"POST",success:function(n){var i,t,u,r;if(n.price&&($(".price-value-1916").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-1916").text(n.basepricepangv):$("#base-price-pangv-1916").hide(),n.sku?$("#sku-1916").text(n.sku).parent(".sku").show():$("#sku-1916").parent(".sku").hide(),n.mpn?$("#mpn-1916").text(n.mpn).parent(".manufacturer-part-number").show():$("#mpn-1916").parent(".manufacturer-part-number").hide(),n.gtin?$("#gtin-1916").text(n.gtin).parent(".gtin").show():$("#gtin-1916").parent(".gtin").hide(),n.stockAvailability&&($("#stock-availability-value-1916").text(n.stockAvailability),$("#stock-availability-value-1916").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-1916").text(n.price);n.pictureDefaultSizeUrl&&$("#main-product-img-1916").attr("src",n.pictureDefaultSizeUrl);n.pictureFullSizeUrl&&$("#main-product-img-lightbox-anchor-1916").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_1916();$("#product_attribute_917_13364").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_13365").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_13366").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_13367").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_13368").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9933").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9934").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9940").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9935").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9936").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9937").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9938").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9939").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9924").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9901").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9904").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9902").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9911").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9907").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9912").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9910").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9908").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9903").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9909").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9905").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9906").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9915").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9920").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9919").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9921").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9922").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9914").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9916").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9918").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9917").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9913").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9923").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_12032").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_12029").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_12031").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_12033").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_12030").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_12034").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_12035").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_12416").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9925").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9927").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9928").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9929").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9930").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9931").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9926").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_9932").on("click",function(n){colourClicked(n);attribute_change_handler_1916()});$("#product_attribute_917_12423").on("click",function(n){colourClicked(n);attribute_change_handler_1916()})})