! function(T, y) { T(function() { "use strict"; var c = '
'+ '
'+ '
'+ '
'+ '
'+ '

{VARIANT_NAME}

'+ '
'+ ''+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ ''+ '
'+ '
+
'+ '
-
'+ '
'+ '
'+ '
'+ '
'+ '
{VARIANT_PRICE}
'+ '
'+ '
'+ '
'+ '
', cst = (SHOW_PRODUCT_PRICE ? ' {CART_TOTAL}' : ""), d = '
Descontos: {CART_DISCOUNT_TOTAL}
', m = '
' + (SHOW_PRODUCT_PRICE ? 'Total: {CART_TOTAL}' : "") + '

'; m += '

* Valor do frete não incluso. Ele será inserido na finalização.

'; function i(e) { var t = SHOW_PRODUCT_PRICE ? T.number(e.totalWithDiscount, 2, ",", ".") : "", o = T(".shopping-cart-content").empty(), ts = T(".total-sumary").empty(), a = function(e) { var t = []; if (0 < e.items.length && (t = T.merge(t, e.items)), e.sales && 0 < e.sales.length) for (var o = 0; o < e.sales.length; o++) t = T.merge(t, e.sales[o].items); return t }(e); if (e && 0 != a.length) { for (var i = 0, s = 0; s < a.length; s++) { var n = a[s], r = SHOW_PRODUCT_PRICE ? "R$ " + T.number(n.totalPriceWithDiscount, 2, ",", ".") : "", l = n.quantity; n.variant.isFractionalStock && (l = 1), o.append(c.replace("{VARIANT_ID}", n.variant.id).replace("{VARIANT_ID}", n.variant.id).replace("{VARIANT_ID}", n.variant.id).replace("{ITEM_ID}", n.id).replace("{PRODUCT_IMAGE}", n.image ? n.image : "/bundles/flexyftwostore/img/product-placeholder.gif").replace("{VARIANT_NAME}", n.name).replace("{VARIANT_PRICE}", r).replace("{VARIANT_QUANTITY_PRESENTATION}", h(n.quantity))), i += l } 0 < e.salePromotionDiscountTotal && SHOW_PRODUCT_PRICE && o.append(d.replace("{CART_DISCOUNT_TOTAL}", "R$ " + T.number(e.salePromotionDiscountTotal, 2, ",", "."))), window.innerWidth < 991 || screen.width < 991 ? T(".cart-items-count").html('' + Number(i) + "") : T(".cart-items-count").html(Number(i) + " " + (1 < Number(i) ? "itens" : "item")), o.append(m.replace("{CART_TOTAL}", "R$ " + t)), ts.append(cst.replace("{CART_TOTAL}", "R$ " + t)) } else o.html("

Nenhum produto em seu carrinho.

") } function s(e, t) { return !(t && t < e) || (alert("Não foi possí­vel adicionar " + e + " produtos ao carrinho. Atualmente possuímos apenas " + t), !1) } var t = 0, o = T("#header"), a = T("#header-main-fixed"), n = T(".header-bg"), r = T(".top-header-bg"), l = document.getElementById("gotop"), u = null != l; T(window).scroll(function() { var e = T(this).scrollTop(); t < e ? 50 < e && (o.addClass("header-top-fixed"), o.find(".header-top-row").addClass("dis-n"), n.addClass("header-bg-fixed"), a.addClass("header-main-fixed"), r.addClass("top-header-bg-fix"), u && (l.style.display = "block")) : e < 50 && (o.removeClass("header-top-fixed"), o.find(".header-top-row").removeClass("dis-n"), a.removeClass("header-main-fixed"), n.removeClass("header-bg-fixed"), r.removeClass("top-header-bg-fix"), u && (l.style.display = "none")), t = e }), T(".top-page").click(function() { document.body.scrollTop = 0, document.documentElement.scrollTop = 0 }), T("#nav-bestseller .next").click(function() { T("#owl-bestseller").trigger("owl.next") }), T("#nav-bestseller .prev").click(function() { T("#owl-bestseller").trigger("owl.prev") }), T("#owl-bestseller").owlCarousel({ items: 4, itemsCustom: !1, itemsDesktop: [1199, 3], itemsDesktopSmall: [980, 2], itemsTablet: [630, 1], itemsTabletSmall: !1, itemsMobile: [479, 1], singleItem: !1, itemsScaleUp: !1, responsive: !0, responsiveRefreshRate: 200, responsiveBaseWidth: window, autoPlay: !1, stopOnHover: !1, navigation: !1 }), T("#nav-summer-sale .next").click(function() { T("#owl-summer-sale").trigger("owl.next") }), T("#nav-summer-sale .prev").click(function() { T("#owl-summer-sale").trigger("owl.prev") }), T("#owl-summer-sale").owlCarousel({ items: 3, itemsCustom: !1, itemsDesktop: [1199, 2], itemsDesktopSmall: [980, 2], itemsTablet: [630, 1], itemsTabletSmall: !1, itemsMobile: [479, 1], singleItem: !1, itemsScaleUp: !1, responsive: !0, responsiveRefreshRate: 200, responsiveBaseWidth: window, autoPlay: !1, stopOnHover: !1, navigation: !1 }), T("#nav-child .next").click(function() { T("#owl-child").trigger("owl.next") }), T("#nav-child .prev").click(function() { T("#owl-child").trigger("owl.prev") }), T("#owl-child").owlCarousel({ items: 3, itemsCustom: !1, itemsDesktop: [1199, 2], itemsDesktopSmall: [980, 2], itemsTablet: [630, 1], itemsTabletSmall: !1, itemsMobile: [479, 1], singleItem: !1, itemsScaleUp: !1, responsive: !0, responsiveRefreshRate: 200, responsiveBaseWidth: window, autoPlay: !1, stopOnHover: !1, navigation: !1 }), T("#nav-tabs .next").click(function() { T("#owl-new").trigger("owl.next"), T("#owl-featured").trigger("owl.next") }), T("#nav-tabs .prev").click(function() { T("#owl-new").trigger("owl.prev"), T("#owl-featured").trigger("owl.prev") }), T("#owl-new").owlCarousel({ items: 4, itemsCustom: !1, itemsDesktop: [1199, 3], itemsDesktopSmall: [980, 2], itemsTablet: [630, 1], itemsTabletSmall: !1, itemsMobile: [479, 1], singleItem: !1, itemsScaleUp: !1, responsive: !0, responsiveRefreshRate: 200, responsiveBaseWidth: window, autoPlay: !1, stopOnHover: !1, navigation: !1 }), T("#owl-featured").owlCarousel({ items: 4, itemsCustom: !1, itemsDesktop: [1199, 3], itemsDesktopSmall: [980, 2], itemsTablet: [630, 1], itemsTabletSmall: !1, itemsMobile: [479, 1], singleItem: !1, itemsScaleUp: !1, responsive: !0, responsiveRefreshRate: 200, responsiveBaseWidth: window, autoPlay: !1, stopOnHover: !1, navigation: !1 }), T("#nav-tabs2 .next").click(function() { T("#owl-new2").trigger("owl.next"), T("#owl-featured2").trigger("owl.next") }), T("#nav-tabs2 .prev").click(function() { T("#owl-new2").trigger("owl.prev"), T("#owl-featured2").trigger("owl.prev") }), T("#owl-new2").owlCarousel({ items: 3, itemsCustom: !1, itemsDesktop: [1199, 2], itemsDesktopSmall: [980, 2], itemsTablet: [630, 1], itemsTabletSmall: !1, itemsMobile: [479, 1], singleItem: !1, itemsScaleUp: !1, responsive: !0, responsiveRefreshRate: 200, responsiveBaseWidth: window, autoPlay: !1, stopOnHover: !1, navigation: !1 }), T("#owl-featured2").owlCarousel({ items: 3, itemsCustom: !1, itemsDesktop: [1199, 2], itemsDesktopSmall: [980, 2], itemsTablet: [630, 1], itemsTabletSmall: !1, itemsMobile: [479, 1], singleItem: !1, itemsScaleUp: !1, responsive: !0, responsiveRefreshRate: 200, responsiveBaseWidth: window, autoPlay: !1, stopOnHover: !1, navigation: !1 }), T("#owl-partners").owlCarousel({ items: 5, itemsCustom: !1, itemsDesktop: [1199, 4], itemsDesktopSmall: [980, 3], itemsTablet: [630, 1], itemsTabletSmall: !1, itemsMobile: [479, 1], singleItem: !1, itemsScaleUp: !1, responsive: !0, responsiveRefreshRate: 200, responsiveBaseWidth: window, autoPlay: !0, stopOnHover: !1, navigation: !1 }), T("#owl-home-slider").owlCarousel({ items: 1, itemsCustom: !1, itemsDesktop: [1199, 1], itemsDesktopSmall: [980, 1], itemsTablet: [630, 1], itemsTabletSmall: !1, itemsMobile: [479, 1], singleItem: !1, itemsScaleUp: !1, responsive: !0, responsiveRefreshRate: 200, responsiveBaseWidth: window, autoPlay: !0, stopOnHover: !1, navigation: !1 }), T(function() { T(".dropdown").hover(function() { T(this).addClass("open") }, function() { T(this).removeClass("open") }) }), T("body").find(".holder").length || T("body").append("
"), T("div.holder").jPages({ containerID: "products", previous: ".feature-block a[data-role='prev']", next: ".feature-block a[data-role='next']", animation: "fadeInRight", perPage: 4 }), T(".revolution").revolution({ delay: 9e3, startwidth: 1170, startheight: 500, hideThumbs: 10, fullWidth: "on", fullScreen: "on", navigationType: "none", navigationArrows: "solo", navigationStyle: "round", navigationHAlign: "center", navigationVAlign: "bottom", navigationHOffset: 30, navigationVOffset: 30, soloArrowLeftHalign: "left", soloArrowLeftValign: "center", soloArrowLeftHOffset: 20, soloArrowLeftVOffset: 0, soloArrowRightHalign: "right", soloArrowRightValign: "center", soloArrowRightHOffset: 20, soloArrowRightVOffset: 0, touchenabled: "on" }), T(".tool_tip").tooltip(), T("#product-zoom").elevateZoom({ zoomType: "inner", cursor: "crosshair", zoomWindowFadeIn: 500, zoomWindowFadeOut: 750 }); var e = T("#gal1"); e.find("a[data-image]").hover(function() { T(".product-media-details").removeClass("video"); var e = T(this).attr("data-image"), t = T(this).attr("data-zoom-image"); T("#product-zoom").data("elevateZoom").swaptheimage(e, t) }), e.find("a[data-video]").on("mouseover", function() { var e = T(this), t = T(".product-media-details"), o = t.find(".product-video"); o.find("iframe").remove(), o.append('
'); new YT.Player("player", { width: "100%", videoId: e.data("video"), events: { onReady: function(e) { e.target.playVideo() } } }); t.addClass("video") }); var p = (new Date).getTime(), v = new Date(p + 864e5); function f() { if (T("[name='customer[type]']").length) { var e = T("[name='customer[type]']").val(), t = T("#customer_customerType"), o = t.find("option"); "cpf" == e ? (T(".cpf").show().find(":input").attr("required", "required"), T(".cnpj").hide().find(":input").removeAttr("required"), t.val(o.filter(function() { return "B2C" == T(this).text() }).val())) : (T(".cnpj").show().find(":input:not(#check):not(#customer_taxationRegime)").attr("required", "required"), T(".cpf").hide().find(":input").removeAttr("required"), t.val(o.filter(function() { return "B2B" == T(this).text() }).val())) } } function g(e) { return e = e.replace(/\./g, ""), parseFloat(e.replace(/,/g, ".")) } function h(e) { return -1 < (e = e.toString()).indexOf(".") && (e = (e = Number(e).toFixed(3)).replace(".", ",")), e } T(".time").countdown({ date: v, yearsAndMonths: !0, leadingZero: !0 }), T(".ul-side-category li a").click(function() { var e = T(this).next(); return !e.hasClass("sub-category") || ("none" === e.css("display") ? T(this).next().slideDown() : (T(this).next().slideUp(), T(this).next().find(".sub-category").slideUp()), !1) }), T("[name='customer[type]']").on("change blur", function() { f() }), T("#check").on("change click", function() { T(this).is(":checked") ? T("#customer_cnpj_stateRegistration").addClass("readonly").attr("readonly", "readonly").val("ISENTO") : T("#customer_cnpj_stateRegistration").removeClass("readonly").removeAttr("readonly").val("") }), T(".main-category-block label").on("click", function() { window.location.href = T(this).data("url") }), T("#partners img").on("mouseenter", function(e) { var t = T(this); t.data("src", t.attr("src")).attr("src", t.data("hover")) }).on("mouseleave", function(e) { var t = T(this); t.attr("src", t.data("src")) }), T(".product-related-carousel").owlCarousel({ items: 6, itemsCustom: !1, itemsDesktop: [1199, 3], itemsDesktopSmall: [980, 2], itemsTablet: [630, 1], itemsTabletSmall: !1, itemsMobile: [479, 1], singleItem: !1, itemsScaleUp: !1, responsive: !0, responsiveRefreshRate: 200, responsiveBaseWidth: window, autoPlay: !0, stopOnHover: !0, navigation: !1 }), T(".product-related-nav .next").click(function() { T(T(this).data("carousel")).trigger("owl.next") }), T(".product-related-nav .prev").click(function() { T(T(this).data("carousel")).trigger("owl.prev") }), T(".flexy-cart-product-quantity, .input-number-inf").on("focus", function(e) { var t = T(this); t.data("quantity", g(t.val())) }).on("blur", function(e) { var t = T(this); t.val() && t.val() != t.data("quantity") ? t.trigger("change") : t.val(t.data("quantity")) }), T("body").on("cart-success", ".flexy-add-to-cart", function(e, t) { var o, a; i(t), o = 4e3, (a = T(".cart-sumary .header-mini-cart")).addClass("open"), window.setTimeout(function() { a.removeClass("open") }, o), (window.innerWidth < 991 || screen.width < 991) && alert("Produto adicionado ao carrinho!") }), T("body").on("cart-error", ".flexy-add-to-cart", function(e, t) { alert(t) }); var w, b = T(".flexy-weight-mask"); b.mask("#######0,000", { placeholder: "0,000", reverse: !0 }); b.on("keyup", function(i) { clearTimeout(w), w = setTimeout(function() { var e, t, o, a; e = i, t = b.val(), a = (o = b).data("stock"), (s(g(t), a) || (o.val(h(a)).trigger("change"), e.preventDefault(), e.stopImmediatePropagation(), 0)) && b.trigger("blur") }, 1200) }), b.on("keydown", function(e) { clearTimeout(w) }), T(".stock-verified").on("change keypress keyup keydown", function(e) { var t = T(this); s(Number(t.val()), t.data("stock")) || (t.val(h(t.data("stock"))).trigger("change"), e.preventDefault(), e.stopImmediatePropagation()) }), f(), i(y) }), (new WOW).init() }(jQuery, CART), function() { var a = [], t = new Set([]); function i(e) { return a.indexOf(e) } function e() { $(".search-box").animate({ opacity: "toggle" }, 500, function() {}), $(".search-modal-background").animate({ opacity: "toggle" }, 500, function() {}) } $(function() { $(".additional-add-to-cart").on("click", function() { var e, t, o = $(this).data("variant-id"); - 1 < i(o) ? (t = o, a.splice(i(t), 1), alert("Produto removido!")) : (e = o, a.push(e), alert("Produto adicionado!")), $(".main_cart_add").data("additional-variant-ids", a) }) }), $(function() { $(".additional-to-cart").on("click", function() { var e = $(this).data("addition-id"); t.add(e), $(".flexy-add-to-cart").one("cart-error", function() { t.delete(e) }) }) }), $(function() { $(".search-box-toggle").click(function() { e(), $(".search-input").focus() }), $(".search-modal-background").click(function() { e() }) }), $(function() { $(".coupon-validate").on("keyup", function(e) { $(this).val($(this).val().replace(/[^0-9a-zA-Z_]/g, "")) }) }), $(function() { $(".btn-cep").click(function() { if (-1 !== window.location.pathname.indexOf("quote")) { var e = $(".flexy-input-postcode").val(), t = [location.protocol, "//", location.host, location.pathname].join("") + "?zipCode=" + e, o = ""; $(".f2-quote-observation").each(function() { var e = $(this).data("observation"), t = $(this).val(); o += "&" + e + "=" + t }), window.location = t + o } }) }) }();