";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/2299/"+i,"#product-details-form"))}function attribute_change_handler_2299(){var n="#product-details-form";$("#product-details-form-default").length>0&&(n="#product-details-form-default");$.ajax({cache:!1,url:"/shoppingcart/productdetails_attributechange?productId=2299&validateAttributeConditions=False&loadPicture=True",data:$(n).serialize(),type:"POST",success:function(n){var i,t;if(n.price&&($(".price-value-2299").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-2299").text(n.basepricepangv):$("#base-price-pangv-2299").hide(),n.sku?$("#sku-2299").text(n.sku).parent(".sku").show():$("#sku-2299").parent(".sku").hide(),n.mpn?$("#mpn-2299").text(n.mpn).parent(".manufacturer-part-number").show():$("#mpn-2299").parent(".manufacturer-part-number").hide(),n.gtin?$("#gtin-2299").text(n.gtin).parent(".gtin").show():$("#gtin-2299").parent(".gtin").hide(),n.stockAvailability&&($("#stock-availability-value-2299").text(n.stockAvailability),$("#stock-availability-value-2299").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())}n.pictureDefaultSizeUrl&&$("#main-product-img-2299").attr("src",n.pictureDefaultSizeUrl);n.pictureFullSizeUrl&&$("#main-product-img-lightbox-anchor-2299").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_2299()})