";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/651/"+i,"#product-details-form"))}function attribute_change_handler_651(){var n="#product-details-form";$("#product-details-form-default").length>0&&(n="#product-details-form-default");$.ajax({cache:!1,url:"/shoppingcart/productdetails_attributechange?productId=651&validateAttributeConditions=False&loadPicture=True",data:$(n).serialize(),type:"POST",success:function(n){var i,t,u,r;if(n.price&&($(".price-value-651").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-651").text(n.basepricepangv):$("#base-price-pangv-651").hide(),n.sku?$("#sku-651").text(n.sku).parent(".sku").show():$("#sku-651").parent(".sku").hide(),n.mpn?$("#mpn-651").text(n.mpn).parent(".manufacturer-part-number").show():$("#mpn-651").parent(".manufacturer-part-number").hide(),n.gtin?$("#gtin-651").text(n.gtin).parent(".gtin").show():$("#gtin-651").parent(".gtin").hide(),n.stockAvailability&&($("#stock-availability-value-651").text(n.stockAvailability),$("#stock-availability-value-651").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-651").text(n.price);n.pictureDefaultSizeUrl&&$("#main-product-img-651").attr("src",n.pictureDefaultSizeUrl);n.pictureFullSizeUrl&&$("#main-product-img-lightbox-anchor-651").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_651();$("#product_attribute_331_3383").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3359").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3369").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3372").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3363").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3360").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3376").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3354").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3358").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3352").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3364").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3384").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3350").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3380").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3355").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3385").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3381").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3353").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_10285").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3368").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3375").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3378").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3349").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3365").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3362").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3382").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3370").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_6682").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3371").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3356").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3377").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3351").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3357").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3374").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3367").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3373").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3379").on("click",function(n){colourClicked(n);attribute_change_handler_651()});$("#product_attribute_331_3361").on("click",function(n){colourClicked(n);attribute_change_handler_651()})})