function isPWAonIOS(){const n="standalone"in window.navigator&&window.navigator.standalone,t=/iPad|iPhone|iPod/.test(window.navigator.userAgent)&&!window.MSStream;return t&&n}function urlBase64ToUint8Array(n){const r="=".repeat((4-n.length%4)%4),u=(n+r).replace(/-/g,"+").replace(/_/g,"/"),t=window.atob(u),i=new Uint8Array(t.length);for(let n=0;n<t.length;++n)i[n]=t.charCodeAt(n);return i}function chiedinotifiche(){"serviceWorker"in navigator&&Notification.requestPermission().then(n=>{n==="granted"&&navigator.serviceWorker.ready.then(n=>{n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:urlBase64ToUint8Array(publicKey)}).then(n=>{sendSubscriptionToServer(n)})})})}function sendSubscriptionToServer(n){console.log(n);fetch("/push.aspx",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}function getCookie(n){const t=n+"=",r=decodeURIComponent(document.cookie),u=r.split("; ");let i;return u.forEach(n=>{n.indexOf(t)===0&&(i=n.substring(t.length))}),i}function setCookie(n,t,i){let r=new Date;r.setTime(r.getTime()+i*864e5);const u="expires="+r.toUTCString();document.cookie=n+"="+t+"; "+u+"; path=/"}function removefromlist(n){var t=new XMLHttpRequest;t.open("POST","/wact.asmx/deletefromlist");t.onload=function(){t.status===200&&n.parentNode.remove()};t.setRequestHeader("Content-Type","application/json;charset=UTF-8");t.send(JSON.stringify({input:n.parentNode.innerHTML}))}function prenota_scheda(n,t,i,r){var u,f,e,o;prenota_o_compra(!1);setvarimg(t);u="";typeof r!="undefined"&&r>0&&r>i&&(u="<s>"+_currency+r+"<\/s> ");f=document.querySelector("#stickyadd .price");f?(document.querySelector(".h3.price").innerHTML=u+_currency+i,f.innerText=_currency+i):document.querySelector("h3.price span").innerHTML=_currency+i;document.querySelectorAll(".notify_email_varianti").forEach(n=>{n.addEventListener("change",()=>{n.value!=""&&document.querySelectorAll(".notify_email_varianti").forEach(t=>{t.value=n.value})})});document.querySelectorAll(".tagliesel").forEach(n=>{n.classList.remove("seltag")});e=document.querySelector("#vari_"+t.replace(".",""));o=document.querySelector("#var_"+t.replace(".",""));o&&o.classList.add("seltag");e&&e.classList.add("seltag");document.querySelectorAll(".prenotapanel").forEach(n=>{n.style.display="block",document.querySelector("#contaniertipo").scrollTo(0,document.querySelector("#contaniertipo").scrollHeight)});document.querySelectorAll(".btnprenota").forEach(i=>{i.addEventListener("click",function(){prenotaok(n,t)})})}function prenotaok(n,t){if(document.querySelectorAll(".notify_email_varianti").forEach(n=>{n.classList.remove("error")}),document.querySelector(".notify_email_varianti").value=="")return document.querySelectorAll(".notify_email_varianti").forEach(n=>{n.classList.add("error")}),!0;var i=new XMLHttpRequest;i.open("GET","/wact.asmx/pernotazione_add?prod_var="+t+"&id="+n+"&email="+document.querySelector(".notify_email_varianti").value);i.onload=function(){i.status===200&&(document.querySelectorAll(".confermaprenota").forEach(n=>{n.style.display="none"}),document.querySelectorAll(".confermaprenotaok").forEach(n=>{n.innerHTML=n.innerHTML.replace("{mail}",document.querySelector(".notify_email_varianti").value),n.style.display="block"}))};i.send()}function setvarimg(n){typeof immpertipo!="undefined"&&immpertipo.forEach(t=>{if(t.nome==n){var i=document.querySelectorAll("#addict a");i.forEach((n,i)=>{n.href.indexOf(t.foto)>=0&&MagicZoom.switchTo("Zoom-1",i)})}})}function prenota_o_compra(n){document.querySelectorAll(".confermaprenotaok").forEach(n=>{n.style.display="none"});var t=document.querySelectorAll("#addtipo");t.length>0?n?(document.querySelector("#addtipo").style.display="block",document.querySelector("#cmd_add2cart").style.display="flex",document.querySelector("#cmd_add2cart_mobile").style.display="block",document.querySelectorAll(".confermaprenotaok").forEach(n=>{n.style.display="none"})):(document.querySelector("#addtipo").style.display="none",document.querySelector("#cmd_add2cart").style.display="none",document.querySelector("#cmd_add2cart_mobile").style.display="none"):n?(document.querySelector("#addtipofix").style.display="block",document.querySelectorAll(".confermaprenota").forEach(n=>{n.style.display="none"}),document.querySelectorAll(".confermaprenotaok").forEach(n=>{n.style.display="none"})):(document.querySelectorAll(".confermaprenota").forEach(n=>{n.style.display="block"}),document.querySelector("#addtipofix").style.display="none")}function mobiliricerca(){ricplalce=mobileres;console.log("mobile");var n=document.querySelector(".fb_reset");n&&n.classList.toggle("hidden");ricerca.focus();togglemobile(!0)}function togglemobile(n){ricercarr.classList.toggle("in");bgff.classList.toggle("in");fixbody(n)}function isValidEmailAddress(n){return new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(n)}function getUrlVars(){for(var t=[],n,r=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),i=0;i<r.length;i++)n=r[i].split("="),t.push(n[0]),t[n[0]]=n[1];return t}function onShOpen(){return document.body.style.overflow="hidden",!0}function loadScript(n){var t=window.document.getElementsByTagName("script")[0],i=window.document.createElement("script");i.src=n;t.parentNode.insertBefore(i,t)}function loadScript_cb(n,t,i=""){if(i==""||!document.getElementById(i)){var r=document.createElement("script");r.id=i;r.type="text/javascript";r.readyState?r.onreadystatechange=function(){(r.readyState==="loaded"||r.readyState==="complete")&&(r.onreadystatechange=null,t())}:r.onload=function(){t()};r.src=n;document.getElementsByTagName("head")[0].appendChild(r)}}function remload(){exibg=document.querySelector(".exitpopup_bg");exisvg=document.querySelector(".exitsvg");var n=document.querySelector(".exitpopup_bg img");n&&document.querySelector(".exitpopup_bg img").classList.add("hide");exibg&&(exibg.style.display="none",exisvg.style.display="none")}function mostraload(n=false){if(exibg=document.querySelector(".exitpopup_bg"),exisvg=document.querySelector(".exitsvg"),exisvg=document.querySelector(".exitsvg"),exibg&&(exibg.style.display="flex"),n){var t=document.querySelector(".exitpopup_bg img");t&&document.querySelector(".exitpopup_bg img").classList.remove("hide")}else exisvg.style.display="block";exibg.addEventListener("click",()=>{remload()})}function gtag(){dataLayer.push(arguments)}function checkIfAnalyticsLoaded(){gtag("js",new Date);gtag("consent","default",{ad_storage:"granted",analytics_storage:"granted"});gtag("config",_trackg4);analitycs_attivo=!0;to_analytics()}function checkIfZopimLoaded(){typeof $zopim!="undefined"&&typeof $zopim.livechat!="undefined"?setTimeout($zopim.livechat.badge.hide(),50):setTimeout(checkIfZopimLoaded,250)}function loadzopim(){if(navigator==null||navigator.userAgent+""==""||/crawler|spider|robot|crawling|lighthouse|pagespeed/i.test(navigator.userAgent))return!0;if(1){var n=document.createElement("script");n.src="https://consent.cookiebot.com/uc.js";n.id="Cookiebot";n.type="text/javascript";n.dataset.cbid="91ce4f75-3fce-4a4c-a285-d9a1fda975d8";n.dataset.blockingmode="auto";n=document.createElement("script");n.src="https://widgets.rr.skeepers.io/carousel/3e700fbb-0662-43bc-9454-85ce0498f809/4f90af65-a807-470f-a775-b44d64e1954e.js";n.id="recensioni_verificate";n.type="text/javascript";n.async=!0;n.dataset.blockingmode="auto";document.head.appendChild(n),function(n,t,i,r,u){n[r]=n[r]||[];n[r].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var e=t.getElementsByTagName(i)[0],f=t.createElement(i),o=r!="dataLayer"?"&l="+r:"";f.async=!0;f.src="https://www.googletagmanager.com/gtm.js?id="+u+o;e.parentNode.insertBefore(f,e)}(window,document,"script","dataLayer",_tag_manager);checkIfAnalyticsLoaded()}}function to_analytics(){var n="",i="",u,t,r;window.location.href.indexOf("cart.aspx")>0?(n=2,i="cart"):window.location.href.indexOf("checkout.aspx")>0?(u=document.getElementById("fb_login_btn"),u?(n=1,i="login checkout"):(n=3,i="checkout")):window.location.href.indexOf("thanks.aspx")>0&&(n=4,i="thanks");typeof prodotto_analytics!="undefined"&&gtag("event","view_item",{send_to:_trackg4,currency:"EUR",value:prodotto_analytics.price-prodotto_analytics.discount,items:[prodotto_analytics]});n!=""?(t="",n==4?(prodconvehanced&&gtag("event","purchase",{send_to:_trackg4,currency:"EUR",transaction_id:ecpurchase.id,value:parseFloat(ecpurchase.revenue),items:prodconvehanced}),console.log("event","purchase",{send_to:_trackg4,currency:"EUR",transaction_id:ecpurchase.id,value:parseFloat(ecpurchase.revenue),items:prodconvehanced}),t="purchase"):n==2?(proden&&typeof totmerce!="undefined"&&(r=[],proden.length>0&&(proden.forEach(n=>{r.push({item_name:n.name,item_id:n.sku})}),tipoevt="view_cart",gtag("event","view_cart",{send_to:_trackg4,currency:"EUR",value:totmerce,items:r}))),t="cart"):n==3&&proden&&typeof totmerce!="undefined"&&(gtag("event","begin_checkout",{send_to:_trackg4,currency:"EUR",value:totmerce,items:proden}),t="checkout"),typeof remarketingdinamico!="undefined"&&(gtag("set","dimension1",remarketingdinamico),gtag("set","dimension2",t),gtag("set","dimension3",totmerce))):typeof remarketingdinamico!="undefined"&&(gtag("set","dimension1",remarketingdinamico),gtag("set","dimension2","cart"),gtag("set","dimension3",totmerce))}function _isScrolledIntoView(n){var t=window.innerHeight+window.scrollY;return a=containeroffset+n.offsetHeight,t>=a}function fill_carrello(){var t,n;if(window.location.href.indexOf("checkout.aspx")>0)return!0;t=document.getElementById("cart");t&&(onencart(),n=new XMLHttpRequest,n.open("POST","/wact.asmx/carrello"),n.onload=function(){var i,f,r,s,e,u,o;n.status===200&&(i=document.getElementById("infomincart"),f="",errore_prodotto&&(errore_prodotto=!1,f='<div class="alert alert-warning">Tutte le quantità di questo prodotto sono impegnate nei carrelli. Puoi attendere 10min e riprovare ad aggiungerlo.<\/div>'),t.innerHTML=f+n.responseText,r=document.getElementById("bulletcart"),r?(i.innerHTML=r.innerHTML,i.classList.remove("hidden"),9<parseInt(r.innerHTML)&&i.classList.add("wide"),0===parseInt(r.innerHTML)&&i.classList.add("hidden")):(i.innerHTML=0,i.classList.add("hidden")),s=document.getElementById("mincartotord"),e=document.querySelector("#iconacarrello .fas"),e&&e.setAttribute("data-tot",s.innerText+"€"),u=document.getElementById("_countysel"),u&&u.addEventListener("change",function(){cambiacountry(u.value)}),o=document.getElementById("applicapromo"),o&&o.addEventListener("click",function(){applicapromotocart(document.getElementById("custompromocode").value)}),vaicheckout())},n.send())}function applicapromotocart(n=""){var t=new XMLHttpRequest;t.open("GET","/wact.asmx/applicapromo?promotext="+n);t.onload=function(){t.status===200&&(window.location.href.indexOf("cart.aspx")<0?fill_carrello(!0):window.location.reload())};t.send()}function debounce(n,t,i){var r;return function(){var u=this,f=arguments,e=function(){r=null;i||n.apply(u,f)},o=i&&!r;clearTimeout(r);r=setTimeout(e,t);o&&n.apply(u,f)}}function _paginarcerca(){var n=document.getElementById("moreprodric");n&&n.addEventListener("click",function(){n.remove();finericerca&&suggestsearch(parseInt(finericerca.value))})}function resetc1(n){_c1=n;suggestsearch(0)}function closecart(){document.querySelector("#cart").classList.contains("open");document.querySelector("#cart").classList.remove("open");bgff.classList.remove("in");fixbody(!1)}function loadpp(){return!0}function onencart(){_paypal||loadpp();document.querySelector("#cart").classList.add("open");bgff.classList.add("in");fixbody(!0)}function checkmywhish(){loggato&&wishlist.forEach(n=>{var t=document.querySelector("#wi"+n);t&&t.classList.add("red")})}function mywhis(n,t){if(loggato){var i=new XMLHttpRequest;i.open("POST","/wact.asmx/whishadd");i.onload=function(){(i.status=200)&&(analitycs_attivo&&gtag("event","add_to_wishlist",{send_to:_trackg4,currency:"EUR",value:prezzocart,items:[{item_id:n,item_name:nomeprod,price:prezzocart}]}),console.log(i.responseText),wishlist.push(n),checkmywhish())};console.log("add",n,t);i.setRequestHeader("Content-Type","application/json;charset=UTF-8");i.send(JSON.stringify({prod:n,"var":t}))}else fill_user_form(n)}function fill_user_form(){var n=new XMLHttpRequest;n.open("POST","/wact.asmx/menuloggato");n.onload=function(){if(n.status===200){console.log(n.responseText);var t=document.createElement("div");t.innerHTML='<i onclick="document.getElementById(\'logform\').remove();" style="font-size:20px;margin-bottom:15px;margin-top:15px;" class="pull-right fa fa-times"><\/i>'+n.responseText;t.id="logform";t.classList.add("container");document.querySelector(".secondariga").appendChild(t)}};n.send()}function closesearch(){console.log("chiudo ricerca");ricplalce==mobileres&&togglemobile(!1);ricercares&&ricercares.style.display!="none"&&(ricercares.style.display="none");ricercaresp.innerHTML="";ricercaresp.classList.remove("mt-3");document.getElementById("mobileres").innerHTML=""}function showpass(){for(var t=document.querySelectorAll(".passwd"),n=0,i=t.length;n<i;n++)x=t[n],x.type=x.type==="password"?"text":"password"}function vaicheckout(){document.querySelectorAll("#minicart .checkout a").forEach(n=>{n.addEventListener("click",()=>{mostraload(!0)})})}function updcart(n,t){(isNaN(t)||""==t)&&(qta=1);var i=new XMLHttpRequest;i.open("POST","/wact.asmx/cart_upd");i.onload=function(){_paypal=!1;var n=document.getElementById("cart");n.innerHTML='<li id="cartloader"><\/li>';fill_carrello(!1)};i.setRequestHeader("Content-Type","application/json;charset=UTF-8");i.send(JSON.stringify({upd2cart_id:n,upd2cart_qta:t}))}function showtipo(n,t,i,r="cart"){var f,u;if(n&&n.preventDefault(),r=="cart"||loggato)if(r=="cart"||chekwishlist(t))fixbody(!0),f=document.getElementById("dispocatalogo"),f.innerHTML="",u=new XMLHttpRequest,u.open("GET","/wact.asmx/prodottovarianti?lan="+i+"&page_id_name="+t+"&tipo="+r+"&ti="+Date.now()),u.onload=function(){f.innerHTML=u.responseText;f.classList.add("open");document.querySelector("#contaniertipo .photocontainer .image")&&window.setTimeout(function(){document.querySelector("#contaniertipo .photocontainer .image").scrollTo(0,0);console.log(">>")},500);(r!="cart"||tipoadd=="wish")&&(document.getElementById("addtipofix").innerHTML='<i class="fa fa-heart"><\/i> '+document.getElementById("waddtipofix").innerText)},u.send();else return;else{fill_user_form();return}}function add2cart(n,t,i,r,u,f){var s,o,e;(typeof f=="undefined"||f==null)&&(f=!1);s=!1;typeof inaggiunta!="undefined"&&(s=!0);qta=1;""!=u&&(qta=u);(isNaN(qta)||""==qta)&&(qta=1);o=new XMLHttpRequest;s?o.open("POST","/wact.asmx/aggiungi_a_ordine"):o.open("POST","/wact.asmx/cart_add");o.onload=function(){if(o.responseText.indexOf("[0]")>=0&&(errore_prodotto=!0),s)console.log("textresp",o.responseText),window.location.href="/my.aspx?f=ord&reset=1&id="+inaggiunta.ordine;else{console.log("textresp",o.responseText);var n=document.getElementById("cart");n.innerHTML='<li id="cartloader"><\/li>';fill_carrello(!1);resetVar()}};o.setRequestHeader("Content-Type","application/json;charset=UTF-8");s?o.send(JSON.stringify({page_id:n,prod_code:t,prod_var:i,prod_qta:qta,stato:inaggiunta.stato,titolo:inaggiunta.nome,my_order_id:inaggiunta.ordine})):o.send(JSON.stringify({page_id:n,prod_code:t,prod_var:i,prod_qta:qta,instant_coupon:f}));e={name:nomeprod,category:"",brand:"",prezzo:prezzocart};typeof prodotto_analytics!="undefined"&&(e=prodotto_analytics,e.prezzo=myproddata.value);analitycs_attivo&&(gtag("event","add_to_cart",{send_to:_trackg4,currency:"EUR",value:e.prezzo,items:[{item_id:n,item_name:e.name,item_brand:e.brand,item_variant:i,price:e.prezzo,quantity:qta}]}),gtag("set","dimension1",n),gtag("set","dimension2","cart"),gtag("set","dimension3",e.prezzo));window.fbq&&fbq("track","AddToCart",{content_name:e.name,content_category:e.category,content_ids:[n],content_type:"product",value:e.prezzo,currency:"EUR"})}function add2cart_catalogo(n,t,i,r,u,f,e,o="cart"){console.log(n,t,i,r,u,f,e,o);prezzocart=e;nomeprod=f;o=="cart"?add2cart(n,t,i,r,u):chekwishlist(n)&&(i+""==""&&(i="no"),mywhis(n,i))}function resetVar(){if(typeof tagliasel!="undefined"&&tagliasel){typeof cmd_add!="undefined"&&(cmd_add.innerText=testoadd);tagliasel.value="";typeof cmd_add_mobile!="undefined"&&(cmd_add_mobile.innerText=testoadd);var n=document.querySelector(".seltag");n&&n.classList.remove("seltag")}}function add2cart(n,t,i,r,u,f){var s,o,e;(typeof f=="undefined"||f==null)&&(f=!1);s=!1;typeof inaggiunta!="undefined"&&(s=!0);qta=1;""!=u&&(qta=u);(isNaN(qta)||""==qta)&&(qta=1);o=new XMLHttpRequest;s?o.open("POST","/wact.asmx/aggiungi_a_ordine"):o.open("POST","/wact.asmx/cart_add");console.log("add",n,t,i,r,u,f);o.onload=function(){if(s)console.log("textresp",o.responseText),window.location.href="/my.aspx?f=ord&reset=1&id="+inaggiunta.ordine;else{console.log("textresp",o.responseText);var n=document.getElementById("cart");n.innerHTML='<li id="cartloader"><\/li>';fill_carrello(!1);resetVar()}};o.setRequestHeader("Content-Type","application/json;charset=UTF-8");s?o.send(JSON.stringify({page_id:n,prod_code:t,prod_var:i,prod_qta:qta,stato:inaggiunta.stato,titolo:inaggiunta.nome,my_order_id:inaggiunta.ordine})):o.send(JSON.stringify({page_id:n,prod_code:t,prod_var:i,prod_qta:qta,instant_coupon:f}));e={name:nomeprod,category:"",brand:"",prezzo:prezzocart};typeof prodotto_analytics!="undefined"&&(e=prodotto_analytics,e.prezzo=myproddata.value);analitycs_attivo&&(gtag("event","add_to_cart",{send_to:_trackg4,currency:"EUR",value:e.prezzo,items:[{item_id:n,item_name:e.name,item_brand:e.brand,item_variant:i,price:e.prezzo,quantity:qta}]}),gtag("set","dimension1",n),gtag("set","dimension2","cart"),gtag("set","dimension3",e.prezzo));window.fbq&&fbq("track","AddToCart",{content_name:e.name,content_category:e.category,content_ids:[n],content_type:"product",value:e.prezzo,currency:"EUR"})}function addoff2cart(n,t,i,r){add2cart(n,t,i,!1,r)}function isjson(n){return/^[\],:{}\s]*$/.test(n.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))}function whisme(n){_paypal=!1;var t=new XMLHttpRequest;t.open("POST","/wact.asmx/cart_whis");t.onload=function(){t.status===200&&alert("Prodotto aggiunto ai tuoi preferiti!")};t.setRequestHeader("Content-Type","application/json;charset=UTF-8");t.send(JSON.stringify({whisme_id:n}))}function remover(n,t){_paypal=!1;var i=new XMLHttpRequest;i.open("POST","/wact.asmx/cart_del");i.onload=function(){i.status===200&&fill_carrello(!0)};i.setRequestHeader("Content-Type","application/json;charset=UTF-8");i.send(JSON.stringify({del2cart_id:n}));gtag("event","remove_from_cart",{send_to:_trackg4,currency:"EUR",value:t,items:[n]})}function del2cart_norefresh(n,t){document.getElementById("tr"+n).classList.add("rimozione");document.querySelector("#tr"+n+" .remove").classList.add("hide");remover(n,t)}function addnl(){if(validate_form("#newsletter")){var n=new XMLHttpRequest;n.open("POST","/wact.asmx/newsadd");n.onload=function(){if(n.status===200){const t=JSON.parse(n.responseText);document.querySelector("#newsletter .form").innerHTML=t.d}};n.setRequestHeader("Content-Type","application/json;charset=UTF-8");n.send(JSON.stringify({email:nl_email.value}))}}function validate_form(n){var r,u,t,i,e;for(v=!0,r=document.querySelectorAll(n+" input.validate, "+n+" select.validate, "+n+" textarea.validate"),t=0,i=r.length;t<i;t++)elem=r[t],elem.disabled||elem.classList.remove("alert-danger"),(""==elem.value||2>elem.value.length||""==elem.value.replace(/\ /g,"")||"undefined"==elem.value||null==elem.value)&&(v=!1,elem.classList.add("alert-danger")),-1<elem.id.indexOf("login_usr")&&!isValidEmailAddress(elem.value)&&(v=!1,elem.classList.add("alert-danger")),-1<elem.id.indexOf("pwd2")&&(f=elem.id.replace("pwd2","pwd"),elem.value!=document.getElementById(f).value&&(v=!1,elem.classList.add("alert-danger"))),-1<elem.id.indexOf("email2")&&(g=elem.id.replace("email2","email"),elem.value!=document.getElementById(g).value&&(v=!1,elem.classList.add("alert-danger")));for(u=document.querySelectorAll(n+" .validate input[type=checkbox]"),t=0,i=u.length;t<i;t++)elem=u[t],e=elem.parentNode.querySelectorAll("div, label"),disallerta(e),checked||(v=!1,allerta(e));return v}function allerta(n){for(var t=0,i=n.length;t<i;t++)elex=n[t],elex.classList.add("alert-danger")}function disallerta(n){for(var t=0,i=n.length;t<i;t++)elex=n[t],elex.classList.remove("alert-danger")}function startDictation(){var t=document.querySelector(".speech>img"),i="",n;t.classList.add("registra");"webkitSpeechRecognition"in window?(i=document.getElementById("qsearch").value,document.getElementById("qsearch").value="",n=new webkitSpeechRecognition,n.continuous=!1,n.interimResults=!1,n.lang="it-IT",n.start(),n.onresult=function(t){document.getElementById("qsearch").value=t.results[0][0].transcript;n.stop();document.getElementById("ricercasito").submit()},n.onabort=function(){t.classList.remove("registra");document.getElementById("qsearch").value=i;n.stop()},n.onerror=function(r){t.classList.remove("registra");document.getElementById("qsearch").value=i;alert("errore "+r.error);n.stop()}):upgrade()}function setvarcata(n,t){prenota_o_compra(!0);prodottocatalogo.prezzo=t;prodottocatalogo.v=n;document.querySelector("h3.price span").innerHTML=_currency+t;document.querySelectorAll(".tagliesel").forEach(n=>{n.classList.remove("seltag")});document.querySelector("#var_"+n).classList.add("seltag");var i=document.getElementById("addtipofix");i.disabled=!1;i.style.display="block";i.addEventListener("click",function(n){n.preventDefault();aggiungiproddav();closevartipo()})}function aggiungiproddav(){var n=document.getElementById("ilprodotto").innerText,t=prodottocatalogo.v,i=prodottocatalogo.prezzo,r=document.querySelector("#contaniertipo h2").innerText;document.getElementById("addtipofix").innerHTML.indexOf("heart")<0?add2cart_catalogo(n,"",t,!1,1,r,i):add2cart_catalogo(n,"",t,!1,1,r,i,"wish")}function closevartipo(){var n=document.getElementById("dispocatalogo");n.classList.remove("open");n.innerHTML="";bgff.classList.remove("in");fixbody(!1)}function chekwishlist(n){var i=!0,t;return wishlist.indexOf(n)>=0&&(i=!1,document.getElementById("wi"+n).classList.remove("red"),wishlist.splice(wishlist.indexOf(n),1),t=new XMLHttpRequest,t.open("POST","/wact.asmx/whishrem"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.send(JSON.stringify({id:n}))),i}var _trackg4,_tag_manager,scroll,fixbody,i,len,fixa,analitycs_attivo,initSignal,containeroffset,bottonemore,scriveancora,rattuale,suggestsearch,cambiacountry,tendinac,prezzocart,nomeprod,errore_prodotto,prodottocatalogo;!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).LazyLoad=t()}(this,function(){"use strict";function nt(){return(nt=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n}).apply(this,arguments)}var u="undefined"!=typeof window,tt=u&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),it=u&&"IntersectionObserver"in window,rt=u&&"classList"in document.createElement("p"),ut=u&&window.devicePixelRatio>1,fi={elements_selector:"IMG",container:tt||u?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!1,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1},ft=function(n){return nt({},fi,n)},et=function(n,t){var i,r=new n(t);try{i=new CustomEvent("LazyLoad::Initialized",{detail:{instance:r}})}catch(n){(i=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:r})}window.dispatchEvent(i)},t=function(n,t){return n.getAttribute("data-"+t)},n=function(n,t,i){var r="data-"+t;null!==i?n.setAttribute(r,i):n.removeAttribute(r)},o=function(n){return t(n,"ll-status")},f=function(t,i){return n(t,"ll-status",i)},c=function(n){return f(n,null)},l=function(n){return null===o(n)},ot=function(n){return"native"===o(n)},r=function(n,t,i,r){n&&(void 0===r?void 0===i?n(t):n(t,i):n(t,i,r))},s=function(n,t){rt?n.classList.add(t):n.className+=(n.className?" ":"")+t},a=function(n,t){rt?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},st=function(n){return n.llTempImage},v=function(n,t){if(t){var i=t._observer;i&&i.unobserve(n)}},y=function(n,t){n&&(n.loadingCount+=t)},ht=function(n,t){n&&(n.toLoadCount=t)},ct=function(n){for(var t,i=[],r=0;t=n.children[r];r+=1)"SOURCE"===t.tagName&&i.push(t);return i},i=function(n,t,i){i&&n.setAttribute(t,i)},p=function(n,t){n.removeAttribute(t)},lt=function(n){return!!n.llOriginalAttrs},at=function(n){if(!lt(n)){var t={};t.src=n.getAttribute("src");t.srcset=n.getAttribute("srcset");t.sizes=n.getAttribute("sizes");n.llOriginalAttrs=t}},vt=function(n){if(lt(n)){var t=n.llOriginalAttrs;i(n,"src",t.src);i(n,"srcset",t.srcset);i(n,"sizes",t.sizes)}},yt=function(n,r){i(n,"sizes",t(n,r.data_sizes));i(n,"srcset",t(n,r.data_srcset));i(n,"src",t(n,r.data_src))},pt=function(n){p(n,"src");p(n,"srcset");p(n,"sizes")},h=function(n,t){var i=n.parentNode;i&&"PICTURE"===i.tagName&&ct(i).forEach(t)},wt=function(n,t){ct(n).forEach(t)},ei={IMG:function(n,t){h(n,function(n){at(n);yt(n,t)});at(n);yt(n,t)},IFRAME:function(n,r){i(n,"src",t(n,r.data_src))},VIDEO:function(n,r){wt(n,function(n){i(n,"src",t(n,r.data_src))});i(n,"poster",t(n,r.data_poster));i(n,"src",t(n,r.data_src));n.load()}},bt=function(n,t){var i=ei[n.tagName];i&&i(n,t)},kt=function(n,t,i){y(i,1);s(n,t.class_loading);f(n,"loading");r(t.callback_loading,n,i)},oi={IMG:function(t,i){n(t,i.data_src,null);n(t,i.data_srcset,null);n(t,i.data_sizes,null);h(t,function(t){n(t,i.data_srcset,null);n(t,i.data_sizes,null)})},IFRAME:function(t,i){n(t,i.data_src,null)},VIDEO:function(t,i){n(t,i.data_src,null);n(t,i.data_poster,null);wt(t,function(t){n(t,i.data_src,null)})}},si=function(t,i){n(t,i.data_bg_multi,null);n(t,i.data_bg_multi_hidpi,null)},dt=function(t,i){var r=oi[t.tagName];r?r(t,i):function(t,i){n(t,i.data_bg,null);n(t,i.data_bg_hidpi,null)}(t,i)},hi=["IMG","IFRAME","VIDEO"],gt=function(n,t){!t||function(n){return n.loadingCount>0}(t)||function(n){return n.toLoadCount>0}(t)||r(n.callback_finish,t)},ni=function(n,t,i){n.addEventListener(t,i);n.llEvLisnrs[t]=i},ci=function(n,t,i){n.removeEventListener(t,i)},w=function(n){return!!n.llEvLisnrs},b=function(n){var t,i,r;if(w(n)){t=n.llEvLisnrs;for(i in t)r=t[i],ci(n,i,r);delete n.llEvLisnrs}},ti=function(n,t,i){!function(n){delete n.llTempImage}(n);y(i,-1),function(n){n&&(n.toLoadCount-=1)}(i);a(n,t.class_loading);t.unobserve_completed&&v(n,i)},k=function(n,t,i){var u=st(n)||n;w(u)||function(n,t,i){w(n)||(n.llEvLisnrs={});var r="VIDEO"===n.tagName?"loadeddata":"load";ni(n,r,t);ni(n,"error",i)}(u,function(){!function(n,t,i,u){var e=ot(t);ti(t,i,u);s(t,i.class_loaded);f(t,"loaded");dt(t,i);r(i.callback_loaded,t,u);e||gt(i,u)}(0,n,t,i);b(u)},function(){!function(n,t,i,u){var e=ot(t);ti(t,i,u);s(t,i.class_error);f(t,"error");r(i.callback_error,t,u);e||gt(i,u)}(0,n,t,i);b(u)})},li=function(n,i,u){!function(n){n.llTempImage=document.createElement("IMG")}(n);k(n,i,u),function(n,i,r){var e=t(n,i.data_bg),f=t(n,i.data_bg_hidpi),u=ut&&f?f:e;u&&(n.style.backgroundImage='url("'.concat(u,'")'),st(n).setAttribute("src",u),kt(n,i,r))}(n,i,u),function(n,i,u){var h=t(n,i.data_bg_multi),e=t(n,i.data_bg_multi_hidpi),o=ut&&e?e:h;o&&(n.style.backgroundImage=o,function(n,t,i){s(n,t.class_applied);f(n,"applied");si(n,t);t.unobserve_completed&&v(n,t);r(t.callback_applied,n,i)}(n,i,u))}(n,i,u)},d=function(n,t,i){(function(n){return hi.indexOf(n.tagName)>-1})(n)?function(n,t,i){k(n,t,i);bt(n,t);kt(n,t,i)}(n,t,i):li(n,t,i)},ai=["IMG","IFRAME"],ii=function(n){return n.use_native&&"loading"in HTMLImageElement.prototype},vi=function(n,t,i){n.forEach(function(n){return function(n){return n.isIntersecting||n.intersectionRatio>0}(n)?function(n,t,i,u){r(i.callback_enter,n,t,u),function(n,t,i){t.unobserve_entered&&v(n,i)}(n,i,u),function(n){return!l(n)}(n)||d(n,i,u)}(n.target,n,t,i):function(n,t,i,u){l(n)||(function(n,t,i,u){i.cancel_on_exit&&function(n){return"loading"===o(n)}(n)&&"IMG"===n.tagName&&(b(n),function(n){h(n,function(n){pt(n)});pt(n)}(n),function(n){h(n,function(n){vt(n)});vt(n)}(n),a(n,i.class_loading),y(u,-1),c(n),r(i.callback_cancel,n,t,u))}(n,t,i,u),r(i.callback_exit,n,t,u))}(n.target,n,t,i)})},ri=function(n){return Array.prototype.slice.call(n)},g=function(n){return n.container.querySelectorAll(n.elements_selector)},yi=function(n){return function(n){return"error"===o(n)}(n)},ui=function(n,t){return function(n){return ri(n).filter(l)}(n||g(t))},e=function(n,t){var i=ft(n);this._settings=i;this.loadingCount=0,function(n,t){it&&!ii(n)&&(t._observer=new IntersectionObserver(function(i){vi(i,n,t)},function(n){return{root:n.container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}}(n)))}(i,this),function(n,t){u&&window.addEventListener("online",function(){!function(n,t){var i;(i=g(n),ri(i).filter(yi)).forEach(function(t){a(t,n.class_error);c(t)});t.update()}(n,t)})}(i,this);this.update(t)};return e.prototype={update:function(n){var r,u,i=this._settings,t=ui(n,i);ht(this,t.length);!tt&&it?ii(i)?function(n,t,i){n.forEach(function(n){-1!==ai.indexOf(n.tagName)&&(n.setAttribute("loading","lazy"),function(n,t,i){k(n,t,i);bt(n,t);dt(n,t);f(n,"native")}(n,t,i))});ht(i,0)}(t,i,this):(u=t,function(n){n.disconnect()}(r=this._observer),function(n,t){t.forEach(function(t){n.observe(t)})}(r,u)):this.loadAll(t)},destroy:function(){this._observer&&this._observer.disconnect();g(this._settings).forEach(function(n){delete n.llOriginalAttrs});delete this._observer;delete this._settings;delete this.loadingCount;delete this.toLoadCount},loadAll:function(n){var i=this,t=this._settings;ui(n,t).forEach(function(n){d(n,t,i)})}},e.load=function(n,t){var i=ft(t);d(n,i)},e.resetStatus=function(n){c(n)},u&&function(n,t){if(t)if(t.length)for(var i,r=0;i=t[r];r+=1)et(n,i);else et(n,t)}(e,window.lazyLoadOptions),e});const publicKey="BJVKYB5WsmCoSqPgYgtPemGo62PSHdelJYYGXFsCeFFrUsFk8TgmtKx1PWVAf5luMQIAMSM2-vr8gkktaIbKRZw";"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(function(n){n.pushManager.getSubscription().then(function(n){n&&sendSubscriptionToServer(n)})});"serviceWorker"in navigator&&typeof navigator.serviceWorker!="undefined"&&navigator.serviceWorker.register("/sw.js");Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(n){var i=this,t=this;if(!document.documentElement.contains(i))return null;do{if(t.matches(n))return t;t=t.parentElement}while(t!==null);return null});_trackg4="G-H4Y60TF18J";_tag_manager="GTM-5BRNHX5M";window.location.hash&&window.location.hash=="#_=_"&&(window.history&&history.pushState?window.history.pushState("",document.title,window.location.pathname):(scroll={top:document.body.scrollTop,left:document.body.scrollLeft},window.location.hash="",document.body.scrollTop=scroll.top,document.body.scrollLeft=scroll.left)),function(n,t){function r(){if(!u){u=!0;for(var n=0;n<i.length;n++)i[n].fn.call(window,i[n].ctx);i=[]}}function e(){document.readyState==="complete"&&r()}n=n||"docReady";t=t||window;var i=[],u=!1,f=!1;t[n]=function(n,t){if(typeof n!="function")throw new TypeError("callback for docReady(fn) must be a function");if(u){setTimeout(function(){n(t)},1);return}i.push({fn:n,ctx:t});document.readyState==="complete"?setTimeout(r,1):f||(document.addEventListener?(document.addEventListener("DOMContentLoaded",r,!1),window.addEventListener("load",r,!1)):(document.attachEvent("onreadystatechange",e),window.attachEvent("onload",r)),f=!0)}}("docReady",window);var myLazyLoad=new LazyLoad({callback_error:n=>{n.setAttribute("src","/resources/noimage.svg")}}),plac="/img/imgload.svg",c=istouch="ontouchstart"in document.documentElement&&window.innerHeight>window.innerWidth,zop=!0,genere="",miaurl=document.URL.replace(/^.*\/\/[^\/]+/,""),$screenhigh=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,$screensize=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,nojs=document.querySelectorAll(".nojs"),nojs=document.querySelectorAll(".nojs"),closer=document.querySelectorAll(".close"),ricerca=document.getElementById("qsearch"),ricercaresp=document.getElementById("ricercares"),ricercares=document.getElementById("searchres"),mobileres=document.getElementById("mobileres"),tracker,ricplalce=ricercaresp,finericerca=document.getElementById("finericerca"),correntenav=document.querySelector(".corrente"),validators=document.querySelectorAll("input.validate"),nav=document.getElementById("navigal"),navfiltri=document.querySelector(".product-filter.prodotti"),placeistantat=document.getElementById("placeistantat"),bgff=document.getElementById("bgff"),ricercarr=document.getElementById("barracerca"),ricercabtn=document.querySelector("#searchmobile"),ricercabtnx=document.querySelector(".closericerca"),_paypal=!1,columnleft=document.getElementById("columnleft"),removed=!1;for(fixbody=function(n){console.log("inn",n,typeof n);resetVar();typeof n!="undefined"?n?(document.body.classList.add("noscroll"),bgff.classList.add("in")):(document.body.classList.remove("noscroll"),bgff.classList.remove("in")):bgff.classList.contains("in")?document.body.classList.add("noscroll"):document.body.classList.remove("noscroll")},bgff&&bgff.addEventListener("click",function(){var n,t,i;columnleft&&columnleft.classList.remove("mobi");n=document.getElementById("tipologie");n&&n.classList.remove("open");t=document.querySelector("#fixtrovati");t&&t.remove();i=document.getElementById("findomestic");i&&i.classList.remove("in");typeof resettaVar!="undefined"&&resettaVar();ricercarr.classList.remove("in");bgff.classList.remove("in");fixbody(!1);console.log("chiudotutto");closecart();closevartipo()}),i=0,len=nojs.length;i<len;i++)elem=nojs[i],elem.classList.remove("nojs");ricercabtnx&&ricercabtnx.addEventListener("click",function(){ricercarr.classList.remove("in");bgff.classList.remove("in");fixbody(!1)});ricercabtn&&ricercabtn.addEventListener("click",function(){mobiliricerca()});var t0=0,tocco=window.addEventListener("touchstart",function(){t0=performance.now()},{passive:!0}),toccof=null;window.addEventListener("scroll",function(){fixa()},{passive:!0});fixa=debounce(function(){var n=this.document.querySelector(".collapse.in"),i,t;window.location.href.indexOf("checkout")>0&&(n=!0);i=this.document.querySelector(".navbar-fixed-top");t=.5*nav.offsetHeight+1;console.log("f",window.scrollY,t,n,nav);n?console.log("nont"):window.scrollY>t?(nav.classList.add("navbar-fixed-top"),document.body.classList.add("fix"),navfiltri&&navfiltri.classList.add("stick")):i&&(nav.classList.remove("navbar-fixed-top"),document.body.classList.remove("fix"),navfiltri&&navfiltri.classList.remove("stick"))},250);docReady(function(){function e(){const n=document.getElementById("menucloser");n.addEventListener("click",()=>{document.getElementById("rigatre").classList.toggle("open"),document.body.classList.toggle("noscroll"),n.classList.toggle("is-active"),n.classList.contains("is-active")&&document.querySelectorAll("#menucompleto > li").forEach(n=>{n.classList.remove("open"),n.classList.contains("visible-xs")||n.classList.remove("hidden")})});const t=document.querySelectorAll("#menucompleto > li.dropdownflevel");t.forEach(n=>{const i=n.querySelectorAll("ul:not(.c3menu)");i.forEach(n=>{const t=n.querySelectorAll(":scope > li:not(.importante)");t.forEach(n=>{n.addEventListener("click",i=>{i.preventDefault();i.stopPropagation();var r=i.target;if(r.tagName=="A"&&(r=r.parentNode,!r.classList.contains("open")))return window.location.href=i.target.href,!0;r.querySelector("ul")||(i.target.tagName=="A"?window.location.href=i.target.href:i.target.tagName=="LI"&&(window.location.href=i.target.querySelector("a").href));r.classList.contains("open")?t.forEach(n=>{n.classList.remove("open"),n.classList.remove("hidden")}):t.forEach(t=>{t===n?(t.classList.add("open"),t.classList.remove("hidden")):(t.classList.remove("open"),t.classList.add("hidden"))})})})});n.addEventListener("click",i=>{i.preventDefault();var r=i.target;r.tagName=="A"&&(r=r.parentNode);r.classList.contains("open")?t.forEach(n=>{n.classList.contains("visible-xs")||(n.classList.remove("open"),n.classList.remove("hidden"))}):t.forEach(t=>{t===n?(t.classList.add("open"),t.classList.remove("hidden")):(t.classList.remove("open"),t.classList.add("hidden"))})})})}var r,u,i,n,t;for(checkmywhish(),r=document.getElementById("iconacarrello"),r&&r.addEventListener("click",function(n){fill_carrello(!1);n.preventDefault()}),n=0,t=closer.length;n<t;n++)elem=closer[n],elem.addEventListener("click",function(){this.parentNode.style.display="none"});if(ricerca&&ricerca.addEventListener("keyup",function(){console.log(encodeURIComponent(ricerca.value).replace(/ /g,"").length,encodeURIComponent(ricerca.value).replace(/ /g,""));window.scrollTo(0,0);0>=encodeURIComponent(ricerca.value).replace(/ /g,"").length?closesearch():suggestsearch(0)}),u=function(n,t){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(n){for(var i=(this.document||this.ownerDocument).querySelectorAll(n),t=i.length;--t>=0&&i.item(t)!==this;);return t>-1});n&&n!==document;n=n.parentNode)if(n.matches(t))return n;return null},i=document.getElementById("retrivepass"),i&&i.addEventListener("click",function(n){n.preventDefault();window.location.href=i.href+"&email="+document.getElementById("headeremail").value}),istouch||document.addEventListener("click",function(n){n.id=="searchresclose"&&closesearch()}),validators)for(n=0,t=validators.length;n<t;n++)elem=validators[n],elem.addEventListener("change",function(){this.classList.remove("alert-danger");elval=this.value;(""==elval||2>elval.length||""==elval.replace(/\ /g,"")||"undefined"==elval||null==elval)&&(v=!1,this.classList.add("alert-danger"));-1<this.id.indexOf("login_usr")&&!isValidEmailAddress(elval)&&(v=!1,this.classList.add("alert-danger"));-1<this.id.indexOf("pwd2")&&(f=this.id.replace("pwd2","pwd"),elval!=document.getElementById(f).value&&(v=!1,this.classList.add("alert-danger")));-1<this.id.indexOf("email2")&&(g=this.id.replace("email2","email"),elval!=document.getElementById(g).value&&(v=!1,this.classList.add("alert-danger")))});istouch&&e();window.location.href.indexOf("checkout.aspx")<0&&window.location.href.indexOf("thanks.aspx")<0&&window.location.href.indexOf("my.aspx")<0&&window.location.href.indexOf("/pages/")<0?istouch?toccof=window.addEventListener("touchend",function(){performance.now()-t0>10&&zop&&(loadzopim(!0),zop=!1,window.removeEventListener("touchstart",tocco),window.removeEventListener("touchend",toccof))},{passive:!0}):loadzopim():loadzopim()});document.addEventListener("DOMContentLoaded",function(){},!1);window.dataLayer=window.dataLayer||[];analitycs_attivo=!1;initSignal=function(){window.OneSignal=window.OneSignal||[];OneSignal.push(function(){OneSignal.init({appId:""})});_utente!=""&&_utente!="._.XXX"&&OneSignal.push(function(){OneSignal.setExternalUserId(_utente)})};containeroffset=0;finericerca&&(containeroffset=finericerca.getBoundingClientRect().top);bottonemore='<div id="moreprodric" class="row"><span class="btn btn-default btn-lg">VEDI ALTRI PRODOTTI<\/span><\/div>';_lingua!="it"&&(bottonemore='<div id="moreprodric" class="row"><span class="btn btn-default btn-lg">LOAD MORE PRODUCTS<\/span><\/div>');rattuale="";window.location.href.indexOf("q=")>0&&(rattuale=decodeURI(window.location.href.substr(window.location.href.indexOf("q=")+2)).replace("+"," "));suggestsearch=debounce(function(){var n=new XMLHttpRequest;n.open("GET","/suggerimenti.aspx?cat="+_c1+"&q="+ricerca.value+"&t="+Date.now());n.onload=function(){ricercaresp.classList.add("mt-3");n.status===200?n.responseText.indexOf(ricerca.value+" <small>Cerca<\/small>")>0&&(mobileres.innerHTML='<ul id="elenco">'+n.responseText+"<\/ul>",document.querySelector("body").addEventListener("click",function(n){n.target.tagName.toLowerCase()!="a"&&(mobileres.innerHTML="")},{passive:!0})):ricercares.innerHTML=""};n.send()},50);cambiacountry=function(n){var t=new XMLHttpRequest;t.open("POST","/wact.asmx/setcountry");t.onload=function(){if(t.status===200){var n=document.getElementById("cart");n.innerHTML='<li id="cartloader"><\/li>';fill_carrello(!0)}};t.setRequestHeader("Content-Type","application/json;charset=UTF-8");t.send(JSON.stringify({country:n}))};tendinac=function(){var t=document.getElementById("countrywhereship"),i=document.querySelector("#countrywhereship span"),n=new XMLHttpRequest;n.open("POST","/wact.asmx/nazioni");n.onload=function(){if(n.status===200){response=n.responseText;t.innerHTML=response;var i=document.getElementById("_countysel");i.addEventListener("change",function(){cambiacountry(i.value)})}};n.send()};prezzocart=0;nomeprod="";errore_prodotto=!1;prodottocatalogo={};window.onfocus=function(){var n,t,i;window.location.href.indexOf("#cerca")>0&&window.location.reload(!0);window.location.href.indexOf("q=")>0&&(n=0,t=document.querySelector(".filtricat .hidden-xs"),t&&(n=t.innerText.replace(/\D/g,"")),i=decodeURI(window.location.href.substr(window.location.href.indexOf("q=")+2)).replace("+"," "),window.localStorage.setItem("ricerca",'{"val":"'+i.replace("'","").replace('"',"").replace(/["']/g,"")+'","numres":'+n+',"tipo":"statico"}'))};window.onblur=function(){window.localStorage.removeItem("ricerca")};