function setCookie(t,e,n){var a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3);var i="expires="+a.toGMTString();document.cookie=t+"="+e+";"+i+";path=/"}function getCookie(t){for(var e=t+"=",n=decodeURIComponent(document.cookie).split(";"),a=0;a=200?$(".header-fixed").css("display","block"):$(".header-fixed").css("display","none")}))},searchMobile:function(){t(".search_mobile_btn").on("click",(function(){"none"==jQuery(".search-fixed-mobile").css("display")?jQuery(".search-fixed-mobile").css("display","block"):jQuery(".search-fixed-mobile").css("display","none")}))},newBlogSete:function(){t(document).ready((function(){let e=t("html").data("files"),n=t("html").data("store");t.ajax({url:`/loja/busca_noticias.php?loja=${n}&${e}`,method:"get",success:function(e){let n,a;t(e).find(".noticias").length?(n=t(".blog-post-preview"),a=t(t(e).find(".noticias")),a.find("li:nth-child(n+5)").remove(),a=a.contents(),a.each((function(e,a){let i=t(this).find("#noticia_imagem a").attr("href"),o=t(this).find("#noticia_imagem a img").attr("src"),s=t(this).find("#noticia_dados h3 a").text(),c=t(this).find("#noticia_dados p").text();n.append(`\n\n
  • \n\n \n\n
    \n\n \n\n
    \n\n
    \n\n
    \n\n
    ${s}
    \n\n

    ${c}

    \n\n
    \n\n
  • \n\n `)}))):t(".latest-blog-posts-wrap").remove()}})}))},popover:function(){$(".pin-column .pin-circle").hover((function(){$(".pin-flag",this).toggle()}))},banner:function(){t(document).ready((function(){$(".box_skitter").css("cssText","height:auto !important;")}))}};n.init(),e.theme=n}(jQuery,window),jQuery('[data-app="product.buy-button"]').on("click",(function(){var t=jQuery(this).attr("data-product"),e=jQuery("html").attr("data-session"),n=this;jQuery.ajax({method:"POST",url:"/web_api/cart/",contentType:"application/json; charset=utf-8",data:'{"Cart":{"session_id":"'+e+'","product_id":"'+t+'","quantity":1}}'}).done((function(t,e,a){jQuery(n).text("Adicionado!");var i=parseInt(jQuery("[data-cart=amount]").html());jQuery("[data-cart=amount]").html(i+1)})).fail((function(t,e,n){var a=jQuery.parseJSON(t.responseText);alert(a.causes[0])}))}));