function foot(){$(window).width()>800?setTimeout(function(){"block"==$(".compare-panel").css("display")?$("footer").css({marginBottom:$(".compare-panel").outerHeight()}):$("footer").css({marginBottom:0})},30):setTimeout(function(){"block"==$(".compare-panel").css("display")?$("footer").css({marginBottom:$(".compare-panel").outerHeight()+$(".mobbotact").outerHeight()+$(".list-wrapper").outerHeight()}):$("footer").css({marginBottom:$(".mobbotact").outerHeight()})},30)}function addproinquiry(t){foot(),$(t).toggleClass("pro-checked");var e=$(t).parent().parent();n=parseInt(e.attr("class").split("proid")[1]),"products-add-inquirl pro-checked"==$(t).attr("class")?arr.length<10?(arr.unshift({id:n,url:e.find(".products-item-name").attr("href"),image:e.find("img").attr("src"),name:e.find(".products-list-name span").text(),price:e.find(".product-price span").text()}),localStorage.setItem("productCachePC",JSON.stringify(arr)),getproinquiry()):($(t).removeClass("pro-checked"),$("body").append('
The number of products is limited to ten or less!
'),setTimeout(function(){$(".tips").fadeOut(500,function(){$(".tips").remove()})},1e3)):(arr.forEach(function(t,e){t.id==n&&arr.splice(e,1)}),localStorage.setItem("productCachePC",JSON.stringify(arr)),getproinquiry())}function removeproinquiry(t){foot();var e=parseInt($(t).attr("class").split("ic-close proid")[1]);arr.forEach(function(t,r){t.id==e&&arr.splice(r,1)}),localStorage.setItem("productCachePC",JSON.stringify(arr)),getproinquiry()}function getproinquiry(){$("#productChache_list").html("");var t=localStorage.getItem("productCachePC");null!==t&&(arr=JSON.parse(t)),0');$(".products-ninelist-0 li, .products-ninelist-1 li").removeClass("pro-item-checked"),$(".products-ninelist-0 li .products-add-inquirl, .products-ninelist-1 li .products-add-inquirl").removeClass("pro-checked"),$(".addToCart").removeClass("added"),arr.forEach(function(t){$("#productID").val()==t.id&&$(".addToCart").addClass("added"),$("li.proid".concat(t.id)).addClass("pro-item-checked"),$("li.proid".concat(t.id)).find(".products-add-inquirl").addClass("pro-checked"),t='
"),e.append(t)}),$("#productChache_list").append(e),$(".compare-checked").html(arr.length)}var arr=[];foot(),$(window).on("scroll",function(){foot()}),$(function(){function t(t,e){if("js"==e){var r=document.createElement("script");r.setAttribute("type","text/javascript"),r.setAttribute("src",t)}else"css"==e&&((r=document.createElement("link")).setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("href",t));void 0!==r&&document.getElementsByTagName("head")[0].appendChild(r)}getproinquiry(),$(".compare-panel .close").click(function(){foot(),$(".compare-panel").slideUp()}),$(".compare-panel .clear-all").click(function(){foot(),arr=[],localStorage.clear("productCachePC"),getproinquiry()}),$(".compare-panel .contact-button").click(function(){window.location="/inquiry"}),"object"!=typeof toastr&&(t("https://css01.v15cdn.com/toastr.min.css","css"),t("https://js01.v15cdn.com/toastr.min.js","js")),$(".addToCart").click(function(){var t=[],e=$("#productID").val(),r="";0==$(".singglepic").length?$(".thumbnail-box .list .swiper-slide img").each(function(t){0==t&&(r=$(this).attr("src"))}):r=$(".singglepic img").attr("src");var i={id:e,url:window.location.href,image:r,name:$("h1.prodetails-name").text(),price:$(".product-content-price .price:first-child").text(),priceText:$(".product-content-price>span:first-child").text()},o=localStorage.getItem("productCachePC");if(null!=o&&(t=JSON.parse(o)),$(".addToCart").hasClass("added"))t.forEach(function(t,r){t.id==e&&arr.splice(r,1)}),localStorage.setItem("productCachePC",JSON.stringify(arr)),getproinquiry();else{if(!(t.length<10))return void toastr.warning("The number of products is limited to ten or less!");t.unshift(i),localStorage.setItem("productCachePC",JSON.stringify(t)),getproinquiry()}}),$("body").append(''),$(".orderNow").click(function(){var t=JSON.parse(localStorage.getItem("productCachePC")),e=[];(t=t.filter(function(t){return""!=t.price})).forEach(function(t){""!==t.price&&e.push(t.id)}),e.length>0?($(".orderlayer").fadeIn(),setTimeout(function(){window.location.href="/payment",$(".orderlayer").fadeOut()},1e3)):toastr.warning("There is no price for the products in the shopping cart, so we can't place an order!")})});