$(document).ready(function(){function setCookie(name,value,days){var expires="";if(days){var date=new Date;date.setTime(date.getTime()+days*24*60*60*1e3),expires="; expires="+date.toUTCString()}document.cookie=name+"="+(value||"")+expires+"; path=/"}}),$(document).ready(function(){$(".iframe").fancybox({modal:!0,toolbar:!0,smallBtn:!0,preload:!1,infocus:!0,autoFocus:!1,showCloseButton:!0,closeBtn:'',ajax:{preload:!1}})}),$(document).ready(function(){window.themeJsData.templateName!=="product"&&localStorage.removeItem("product-click"),localStorage.setItem("checkout-value",1),window.themeJsData.cartItemCount<=0&&(localStorage.setItem("cart",null),localStorage.removeItem("cart_updated"),localStorage.removeItem("search_value"));var pageName2=window.location.href;$(document).on("click",".disable-btn",function(event){event.preventDefault()}),$(document).on("click",".product-scratch-list",function(e){var item_id=$(this).find(".frequent-products-mpn").val(),item_name=$(this).find(".frequent-products-tittlr").val(),item_category=$(this).find(".item_category").val();if(pageName2.includes("products"))var mpn_handle=$("#mpn_handle").val(),item_list_page="ATTACH :: "+mpn_handle;else if(pageName2.includes("cart"))var item_list_page="ATTACH :: Cart Page";else var item_list_page="ATTACH :: "+formatString($(this).find(".item_list_page").val());var currency=$(this).find(".item_currency").val(),price=$(this).find(".item_price").val(),item_sku=$(this).find(".list-sku").val(),productcomPrice2=$(this).find(".item_compare_price").val();localStorage.setItem("product-click",item_list_page);var productPrice=Number(price.replace(/[^0-9.-]+/g,"")),discount=0;productcomPrice2&&(productcomPrice2=Number(productcomPrice2.replace(/[^0-9.-]+/g,"")),productcomPrice2>productPrice&&(discount=parseFloat(productcomPrice2)-parseFloat(productPrice),discount=parseFloat(discount))),dataLayer.push({ecommerce:null}),dataLayer.push({event:"select_item",ecommerce:{item_list_name:item_list_page,items:[{item_id:item_sku,item_name,item_category,item_list_name:item_list_page,price:parseFloat(productPrice),quantity:1}]}})}),$(document).on("click",".predictive-search__results-list .predictive-search__list-item--product",function(e){localStorage.setItem("product-click","Search Quick View")}),$(document).on("click",".predictive-search__search-for-button, .predictive-search__results-list .predictive-search__list-item--suggestions",function(e){localStorage.setItem("product-click","Search Results")}),$(document).on("click",".plp_page_ga",function(e){localStorage.setItem("product-click","PLP :: "+formatString(pageName2.split("/")[pageName2.split("/").length-1]))});var attch_prod=[];$(".product-list-contain").each(function(key,val){var id=$(this).attr("id"),sliderId="#"+id,item_list_name="",productPrice=0,discount=0,prodQuant=1;$(sliderId+" li").each(function(key1,val2){if(item_ga={},productPrice=$(this).find(".item_price").val(),productcomPrice=$(this).find(".item_compare_price").val(),productPrice&&(productPrice=Number(productPrice.replace(/[^0-9.-]+/g,""))),discount=0,productcomPrice&&(productcomPrice=Number(productcomPrice.replace(/[^0-9.-]+/g,"")),productcomPrice>productPrice&&(discount=parseFloat(productcomPrice)-parseFloat(productPrice),discount=parseFloat(discount),value_price=productcomPrice*parseInt(prodQuant))),item_ga.item_id=$(this).find(".list-sku").val(),item_ga.item_name=$(this).find(".frequent-products-tittlr").val(),item_ga.item_category=$(this).find(".item_category").val(),pageName2.includes("products")){var mpn_handle=$("#mpn_handle").val();item_list_name="ATTACH :: "+mpn_handle}else pageName2.includes("cart")?item_list_name="ATTACH :: Cart Page":item_list_name="ATTACH :: "+formatString($(this).find(".item_list_page").val());item_ga.item_list_name=item_list_name,item_ga.price=parseFloat(productPrice),item_ga.quantity=1,attch_prod.push(item_ga)}),attch_prod.length!=0&&(dataLayer.push({ecommerce:null}),dataLayer.push({event:"view_item_list",ecommerce:{item_list_name,items:attch_prod}})),attch_prod=[]}),$("#cart-notification").hide(),$("#cart-notification").removeClass("minicart-active"),$("#cart-icon-bubble").click(function(evt){evt.stopPropagation(),$("#cart-notification").toggle(),$("#cart-notification").toggleClass("minicart-active")}),$("#close-cart").click(function(evt){$("#cart-notification").hide(),$("#cart-notification").removeClass("minicart-active")})}),window.mobileSearchNormalLayout=!0,window.autocompleteFormSelector=".mob_search:visible, .search-modal__form:visible",$(document).on("click",".card-slider-buttons_2",function(e){e.preventDefault();var prodId=$(this).attr("data-productid"),prodQuant=1,prodMaxqut=$(this).attr("data-productmaxquantity");if(prodMaxqut!=""){var maxQuant=checkMaxquantity(prodId);if(maxQuant!="")var max_total_quantity=parseInt(prodQuant)+parseInt(maxQuant);else var max_total_quantity=parseInt(prodQuant);if(max_total_quantity>prodMaxqut)return alert(quantity_limit_error_message),!1}var slider_variantid=$(".prod_details_"+prodId).find(":selected").val(),slider_tag=$(this).attr("data-tag"),main_product_sku=$(this).attr("data-productsku"),productList=$(this).attr("data-productlist"),productCategory=$(this).attr("data-producttype"),productPrice=$(this).attr("data-productprice"),productCurrency=$(this).attr("data-productcurrency"),productTitle=$(this).attr("data-producttitle"),prohandle=$(this).attr("data-producthandle"),mpnHandle=$(this).attr("data-productMPN"),mpnHandleVariant="";if(vat_free_day==!0){var addtaxfree=slider_tag.indexOf("taxfree")!=-1;if(addtaxfree==!0&&getCookie("total_quantity")>=vat_free_quantity)return alert(vat_free_message),!1}$("#slider-form-"+slider_variantid).attr("aria-disabled",!0),$("#slider-form-"+slider_variantid).addClass("loading"),$(".loading-overlay__spinner-frequent").removeClass("hidden");var viewurl=`${window.Shopify.routes.root}products/' + prohandle + '?variant=' + slider_variantid + '&view=mpn`;return $.ajax({type:"GET",url:viewurl,async:!1,success:function(itemData){let arrprod=itemData.split("|");mpnHandle.length==0?arrprod[1]!=""?mpnHandleVariant=arrprod[1]:mpnHandleVariant=arrprod[0]:mpnHandleVariant=mpnHandle,productPrice=arrprod[2]}}),mpnHandleVariant=mpnHandleVariant.trim(),fetch(`${window.Shopify.routes.root}cart/add.js`,{method:"post",headers:{"content-type":"application/json"},body:JSON.stringify({items:[{id:slider_variantid,quantity:1,properties:{_uuid:prohandle}}]})}).then(response=>{response.json().then(d=>{var productList2="Search Results";cartCookie(mpnHandleVariant,d.items[0].key,productList2)}),checkQuantity(),triggerGAAddToCart(mpnHandleVariant,productTitle,productCategory,productList,productCurrency,productPrice,prodQuant,main_product_sku,slider_variantid),$.get(`${window.Shopify.routes.root}cart?view=minicart`,function(itemData){var item_count=jQuery(itemData).find("#cart-notification-button .count").text();$(".cart-count-bubble").length>0||$("#cart-icon-bubble").append('