(function(e){e(document).ready(function(){var o=e("html");e(".trigger-menu, .menu-mobile-backdrop").click(function(){o.addClass("menu-open")});e(".menu-mobile-backdrop,.backdrop-icon").click(function(){o.removeClass("menu-open")});if(e(".caixa-cupom").length){e(".caixa-cupom").parents("tr").addClass("cupom-wrapper")}if(e("#calculoFrete").length){e("#calculoFrete").parents("tr").addClass("frete-wrapper")}});if(e(".page-lista, .page-print_lista").length){e(".lista-produtos").wrapAll("
")}e("#home-slider").slick({slidesToShow:1,slidesToScroll:1,fade:true,dots:false,arrows:true,autoplay:true,autoplaySpeed:5e3});e(".produtos-carrossel").slick({infinite:true,slidesToShow:4,slidesToScroll:4,prevArrow:'',nextArrow:'',responsive:[{breakpoint:992,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:768,settings:{slidesToShow:1,slidesToScroll:1}}]});e(document).ready(function(){e(window).scroll(function(){var o=Number(jQuery(window).scrollTop());if(o>=200){e("#barraTopo").css({display:"block",opacity:"1",visibility:"visible"})}else{e("#barraTopo").css({display:"block",opacity:"0",visibility:"hidden"})}})});e(".box-captcha").prepend('');e(".modal-login").click(function(o){o.preventDefault();e("tray-login").show()})})(jQuery);
$("#botoes span:nth-of-type(3)").addClass("formcamisa");
$('.bandeira-promocao').each(function(){
var txt;
txt = $(this).text().replace('desconto','');
$(this).text(txt);
});
$(".ico-top-menu").addClass("rastreio");
$(".rastreio").append($("Rastreie seu pedido")), $(".rastrear").click(function(i) {
i.preventDefault();
var t = "http://rastreie.com/" + $(".form-rastreio input").val();
window.open(t, "blank")
});
$('.fwr-agencia').append(' ');
function fecharBannerFlutuante() {
application.banner.closeBannerFloating()
}
function changeClass(t, e, o) {
for (var i = document.getElementById(t).getElementsByTagName("a"), n = i.length, a = 0; n > a; a++) i[a].className = "";
document.getElementById(e).className = o
}
function geraLinkPaginacao(t, e) {
jQuery("#" + t).load(e)
}
function cleanVisited(t, e) {
atualizaDiv(t.href, e), document.getElementById(e).style.display = "none"
}
function atualizaDiv(t, e, o) {
var i = "class" == (o = o || "id") ? "." : "#";
1 == Boolean(status) && jQuery(i + e).length && (status = !1, jQuery(i + e).load(t, function() {
status = !0
}))
}
function loadImage(t) {
t.removeAttribute("class"), t.setAttribute("src", t.dataset.source)
}
function isScrolledIntoView(t) {
var e = jQuery(window).height(),
o = jQuery(window).scrollTop(),
i = jQuery(t).closest(".product").offset().top,
n = jQuery(t).height();
return i < e + o && i > o - n
}
function CheckIfProductIsVisibleAndShowIt() {
var t = jQuery(".product:not(.slick-cloned)").find(".load-image");
t.length && jQuery.each(t, function(t, e) {
if (isScrolledIntoView(e)) return loadImage(e)
})
}
function buildProductsSuggestionBlock(t) {
jQuery.ajax({
datatype: "json",
type: "GET",
url: "/mvc/store/elastic/suggestions/get/" + t,
complete: function(t, e) {
jQuery("nav.category-menu > form .wrapper-suggestion, .mobile-menu .wrapper-suggestion").html(t.responseJSON.suggestions.html.replace(/(.*?)<\/span>/g, '$1'))
}
})
}
function getTimeRemaining(t, e) {
var o = new Date;
o.setHours(o.getHours() - 3);
var i = Date.parse(t) - Date.parse(o.toISOString()),
n = Math.floor(i / 864e5);
return {
total: i,
hours: e = (Math.floor(i / 36e5 % 24) + 24 * n) % e,
minutes: Math.floor(i / 1e3 / 60 % 60),
seconds: Math.floor(i / 1e3 % 60),
milliseconds: i.toString().slice(-3)
}
}
function updateClock(t) {
var e = getTimeRemaining(t.dataset.offerEnd, t.dataset.hours),
o = t.querySelector("li:first-of-type strong"),
i = t.querySelector("li:nth-of-type(2) strong"),
n = t.querySelector("li:nth-of-type(3) strong"),
a = t.querySelector("li:last-of-type strong");
e.total < 1 ? (clearInterval(offerCountdownTimeInterval[t.dataset.offerCountdown]), o.innerHTML = "00", i.innerHTML = "00", n.innerHTML = "00", a.innerHTML = "00") : (o.innerHTML = 1 == e.hours.toString().length ? "0" + e.hours : e.hours, i.innerHTML = ("0" + e.minutes).slice(-2), n.innerHTML = ("0" + e.seconds).slice(-2), a.innerHTML = e.milliseconds.toString().slice(0, 2))
}
function initializeOfferCountdown() {
var t = jQuery(".product:not(.slick-cloned) .countdown, .product-details .countdown");
jQuery.each(t, function(t, e) {
offerCountdownTimeInterval[e.dataset.offerCountdown] = setInterval(updateClock, 20, e)
})
}! function(t) {
"use strict";
"function" == typeof define && define.amd ? define(["jquery"], t) : "undefined" != typeof exports ? module.exports = t(require("jquery")) : t(jQuery)
}(function(t) {
"use strict";
var e = window.Slick || {};
(e = function() {
var e = 0;
return function(o, i) {
var n, a = this;
a.defaults = {
accessibility: !0,
adaptiveHeight: !1,
appendArrows: t(o),
appendDots: t(o),
arrows: !0,
asNavFor: null,
prevArrow: '',
nextArrow: '',
autoplay: !1,
autoplaySpeed: 3e3,
centerMode: !1,
centerPadding: "50px",
cssEase: "ease",
customPaging: function(e, o) {
return t('').text(o + 1)
},
dots: !1,
dotsClass: "slick-dots",
draggable: !0,
easing: "linear",
edgeFriction: .35,
fade: !1,
focusOnSelect: !1,
infinite: !0,
initialSlide: 0,
lazyLoad: "ondemand",
mobileFirst: !1,
pauseOnHover: !0,
pauseOnFocus: !0,
pauseOnDotsHover: !1,
respondTo: "window",
responsive: null,
rows: 1,
rtl: !1,
slide: "",
slidesPerRow: 1,
slidesToShow: 1,
slidesToScroll: 1,
speed: 500,
swipe: !0,
swipeToSlide: !1,
touchMove: !0,
touchThreshold: 5,
useCSS: !0,
useTransform: !0,
variableWidth: !1,
vertical: !1,
verticalSwiping: !1,
waitForAnimate: !0,
zIndex: 1e3
}, a.initials = {
animating: !1,
dragging: !1,
autoPlayTimer: null,
currentDirection: 0,
currentLeft: null,
currentSlide: 0,
direction: 1,
$dots: null,
listWidth: null,
listHeight: null,
loadIndex: 0,
$nextArrow: null,
$prevArrow: null,
scrolling: !1,
slideCount: null,
slideWidth: null,
$slideTrack: null,
$slides: null,
sliding: !1,
slideOffset: 0,
swipeLeft: null,
swiping: !1,
$list: null,
touchObject: {},
transformsEnabled: !1,
unslicked: !1
}, t.extend(a, a.initials), a.activeBreakpoint = null, a.animType = null, a.animProp = null, a.breakpoints = [], a.breakpointSettings = [], a.cssTransitions = !1, a.focussed = !1, a.interrupted = !1, a.hidden = "hidden", a.paused = !0, a.positionProp = null, a.respondTo = null, a.rowCount = 1, a.shouldClick = !0, a.$slider = t(o), a.$slidesCache = null, a.transformType = null, a.transitionType = null, a.visibilityChange = "visibilitychange", a.windowWidth = 0, a.windowTimer = null, n = t(o).data("slick") || {}, a.options = t.extend({}, a.defaults, i, n), a.currentSlide = a.options.initialSlide, a.originalSettings = a.options, void 0 !== document.mozHidden ? (a.hidden = "mozHidden", a.visibilityChange = "mozvisibilitychange") : void 0 !== document.webkitHidden && (a.hidden = "webkitHidden", a.visibilityChange = "webkitvisibilitychange"), a.autoPlay = t.proxy(a.autoPlay, a), a.autoPlayClear = t.proxy(a.autoPlayClear, a), a.autoPlayIterator = t.proxy(a.autoPlayIterator, a), a.changeSlide = t.proxy(a.changeSlide, a), a.clickHandler = t.proxy(a.clickHandler, a), a.selectHandler = t.proxy(a.selectHandler, a), a.setPosition = t.proxy(a.setPosition, a), a.swipeHandler = t.proxy(a.swipeHandler, a), a.dragHandler = t.proxy(a.dragHandler, a), a.keyHandler = t.proxy(a.keyHandler, a), a.instanceUid = e++, a.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/, a.registerBreakpoints(), a.init(!0)
}
}()).prototype.activateADA = function() {
this.$slideTrack.find(".slick-active").attr({
"aria-hidden": "false"
}).find("a, input, button, select").attr({
tabindex: "0"
})
}, e.prototype.addSlide = e.prototype.slickAdd = function(e, o, i) {
var n = this;
if ("boolean" == typeof o) i = o, o = null;
else if (o < 0 || o >= n.slideCount) return !1;
n.unload(), "number" == typeof o ? 0 === o && 0 === n.$slides.length ? t(e).appendTo(n.$slideTrack) : i ? t(e).insertBefore(n.$slides.eq(o)) : t(e).insertAfter(n.$slides.eq(o)) : !0 === i ? t(e).prependTo(n.$slideTrack) : t(e).appendTo(n.$slideTrack), n.$slides = n.$slideTrack.children(this.options.slide), n.$slideTrack.children(this.options.slide).detach(), n.$slideTrack.append(n.$slides), n.$slides.each(function(e, o) {
t(o).attr("data-slick-index", e)
}), n.$slidesCache = n.$slides, n.reinit()
}, e.prototype.animateHeight = function() {
var t = this;
if (1 === t.options.slidesToShow && !0 === t.options.adaptiveHeight && !1 === t.options.vertical) {
var e = t.$slides.eq(t.currentSlide).outerHeight(!0);
t.$list.animate({
height: e
}, t.options.speed)
}
}, e.prototype.animateSlide = function(e, o) {
var i = {},
n = this;
n.animateHeight(), !0 === n.options.rtl && !1 === n.options.vertical && (e = -e), !1 === n.transformsEnabled ? !1 === n.options.vertical ? n.$slideTrack.animate({
left: e
}, n.options.speed, n.options.easing, o) : n.$slideTrack.animate({
top: e
}, n.options.speed, n.options.easing, o) : !1 === n.cssTransitions ? (!0 === n.options.rtl && (n.currentLeft = -n.currentLeft), t({
animStart: n.currentLeft
}).animate({
animStart: e
}, {
duration: n.options.speed,
easing: n.options.easing,
step: function(t) {
t = Math.ceil(t), !1 === n.options.vertical ? (i[n.animType] = "translate(" + t + "px, 0px)", n.$slideTrack.css(i)) : (i[n.animType] = "translate(0px," + t + "px)", n.$slideTrack.css(i))
},
complete: function() {
o && o.call()
}
})) : (n.applyTransition(), e = Math.ceil(e), !1 === n.options.vertical ? i[n.animType] = "translate3d(" + e + "px, 0px, 0px)" : i[n.animType] = "translate3d(0px," + e + "px, 0px)", n.$slideTrack.css(i), o && setTimeout(function() {
n.disableTransition(), o.call()
}, n.options.speed))
}, e.prototype.getNavTarget = function() {
var e = this,
o = e.options.asNavFor;
return o && null !== o && (o = t(o).not(e.$slider)), o
}, e.prototype.asNavFor = function(e) {
var o = this.getNavTarget();
null !== o && "object" == typeof o && o.each(function() {
var o = t(this).slick("getSlick");
o.unslicked || o.slideHandler(e, !0)
})
}, e.prototype.applyTransition = function(t) {
var e = this,
o = {};
!1 === e.options.fade ? o[e.transitionType] = e.transformType + " " + e.options.speed + "ms " + e.options.cssEase : o[e.transitionType] = "opacity " + e.options.speed + "ms " + e.options.cssEase, !1 === e.options.fade ? e.$slideTrack.css(o) : e.$slides.eq(t).css(o)
}, e.prototype.autoPlay = function() {
var t = this;
t.autoPlayClear(), t.slideCount > t.options.slidesToShow && (t.autoPlayTimer = setInterval(t.autoPlayIterator, t.options.autoplaySpeed))
}, e.prototype.autoPlayClear = function() {
var t = this;
t.autoPlayTimer && clearInterval(t.autoPlayTimer)
}, e.prototype.autoPlayIterator = function() {
var t = this,
e = t.currentSlide + t.options.slidesToScroll;
t.paused || t.interrupted || t.focussed || (!1 === t.options.infinite && (1 === t.direction && t.currentSlide + 1 === t.slideCount - 1 ? t.direction = 0 : 0 === t.direction && (e = t.currentSlide - t.options.slidesToScroll, t.currentSlide - 1 == 0 && (t.direction = 1))), t.slideHandler(e))
}, e.prototype.buildArrows = function() {
var e = this;
!0 === e.options.arrows && (e.$prevArrow = t(e.options.prevArrow).addClass("slick-arrow"), e.$nextArrow = t(e.options.nextArrow).addClass("slick-arrow"), e.slideCount > e.options.slidesToShow ? (e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), e.htmlExpr.test(e.options.prevArrow) && e.$prevArrow.prependTo(e.options.appendArrows), e.htmlExpr.test(e.options.nextArrow) && e.$nextArrow.appendTo(e.options.appendArrows), !0 !== e.options.infinite && e.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true")) : e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({
"aria-disabled": "true",
tabindex: "-1"
}))
}, e.prototype.buildDots = function() {
var e, o, i = this;
if (!0 === i.options.dots) {
for (i.$slider.addClass("slick-dotted"), o = t("").addClass(i.options.dotsClass), e = 0; e <= i.getDotCount(); e += 1) o.append(t("").append(i.options.customPaging.call(this, i, e)));
i.$dots = o.appendTo(i.options.appendDots), i.$dots.find("li").first().addClass("slick-active")
}
}, e.prototype.buildOut = function() {
var e = this;
e.$slides = e.$slider.children(e.options.slide + ":not(.slick-cloned)").addClass("slick-slide"), e.slideCount = e.$slides.length, e.$slides.each(function(e, o) {
t(o).attr("data-slick-index", e).data("originalStyling", t(o).attr("style") || "")
}), e.$slider.addClass("slick-slider"), e.$slideTrack = 0 === e.slideCount ? t('').appendTo(e.$slider) : e.$slides.wrapAll('').parent(), e.$list = e.$slideTrack.wrap('').parent(), e.$slideTrack.css("opacity", 0), !0 !== e.options.centerMode && !0 !== e.options.swipeToSlide || (e.options.slidesToScroll = 1), t("img[data-lazy]", e.$slider).not("[src]").addClass("slick-loading"), e.setupInfinite(), e.buildArrows(), e.buildDots(), e.updateDots(), e.setSlideClasses("number" == typeof e.currentSlide ? e.currentSlide : 0), !0 === e.options.draggable && e.$list.addClass("draggable")
}, e.prototype.buildRows = function() {
var t, e, o, i, n, a, r, s = this;
if (i = document.createDocumentFragment(), a = s.$slider.children(), s.options.rows > 1) {
for (r = s.options.slidesPerRow * s.options.rows, n = Math.ceil(a.length / r), t = 0; t < n; t++) {
var l = document.createElement("div");
for (e = 0; e < s.options.rows; e++) {
var d = document.createElement("div");
for (o = 0; o < s.options.slidesPerRow; o++) {
var c = t * r + (e * s.options.slidesPerRow + o);
a.get(c) && d.appendChild(a.get(c))
}
l.appendChild(d)
}
i.appendChild(l)
}
s.$slider.empty().append(i), s.$slider.children().children().children().css({
width: 100 / s.options.slidesPerRow + "%",
display: "inline-block"
})
}
}, e.prototype.checkResponsive = function(e, o) {
var i, n, a, r = this,
s = !1,
l = r.$slider.width(),
d = window.innerWidth || t(window).width();
if ("window" === r.respondTo ? a = d : "slider" === r.respondTo ? a = l : "min" === r.respondTo && (a = Math.min(d, l)), r.options.responsive && r.options.responsive.length && null !== r.options.responsive) {
n = null;
for (i in r.breakpoints) r.breakpoints.hasOwnProperty(i) && (!1 === r.originalSettings.mobileFirst ? a < r.breakpoints[i] && (n = r.breakpoints[i]) : a > r.breakpoints[i] && (n = r.breakpoints[i]));
null !== n ? null !== r.activeBreakpoint ? (n !== r.activeBreakpoint || o) && (r.activeBreakpoint = n, "unslick" === r.breakpointSettings[n] ? r.unslick(n) : (r.options = t.extend({}, r.originalSettings, r.breakpointSettings[n]), !0 === e && (r.currentSlide = r.options.initialSlide), r.refresh(e)), s = n) : (r.activeBreakpoint = n, "unslick" === r.breakpointSettings[n] ? r.unslick(n) : (r.options = t.extend({}, r.originalSettings, r.breakpointSettings[n]), !0 === e && (r.currentSlide = r.options.initialSlide), r.refresh(e)), s = n) : null !== r.activeBreakpoint && (r.activeBreakpoint = null, r.options = r.originalSettings, !0 === e && (r.currentSlide = r.options.initialSlide), r.refresh(e), s = n), e || !1 === s || r.$slider.trigger("breakpoint", [r, s])
}
}, e.prototype.changeSlide = function(e, o) {
var i, n, a, r = this,
s = t(e.currentTarget);
switch (s.is("a") && e.preventDefault(), s.is("li") || (s = s.closest("li")), a = r.slideCount % r.options.slidesToScroll != 0, i = a ? 0 : (r.slideCount - r.currentSlide) % r.options.slidesToScroll, e.data.message) {
case "previous":
n = 0 === i ? r.options.slidesToScroll : r.options.slidesToShow - i, r.slideCount > r.options.slidesToShow && r.slideHandler(r.currentSlide - n, !1, o);
break;
case "next":
n = 0 === i ? r.options.slidesToScroll : i, r.slideCount > r.options.slidesToShow && r.slideHandler(r.currentSlide + n, !1, o);
break;
case "index":
var l = 0 === e.data.index ? 0 : e.data.index || s.index() * r.options.slidesToScroll;
r.slideHandler(r.checkNavigable(l), !1, o), s.children().trigger("focus");
break;
default:
return
}
}, e.prototype.checkNavigable = function(t) {
var e, o;
if (e = this.getNavigableIndexes(), o = 0, t > e[e.length - 1]) t = e[e.length - 1];
else
for (var i in e) {
if (t < e[i]) {
t = o;
break
}
o = e[i]
}
return t
}, e.prototype.cleanUpEvents = function() {
var e = this;
e.options.dots && null !== e.$dots && (t("li", e.$dots).off("click.slick", e.changeSlide).off("mouseenter.slick", t.proxy(e.interrupt, e, !0)).off("mouseleave.slick", t.proxy(e.interrupt, e, !1)), !0 === e.options.accessibility && e.$dots.off("keydown.slick", e.keyHandler)), e.$slider.off("focus.slick blur.slick"), !0 === e.options.arrows && e.slideCount > e.options.slidesToShow && (e.$prevArrow && e.$prevArrow.off("click.slick", e.changeSlide), e.$nextArrow && e.$nextArrow.off("click.slick", e.changeSlide), !0 === e.options.accessibility && (e.$prevArrow.off("keydown.slick", e.keyHandler), e.$nextArrow.off("keydown.slick", e.keyHandler))), e.$list.off("touchstart.slick mousedown.slick", e.swipeHandler), e.$list.off("touchmove.slick mousemove.slick", e.swipeHandler), e.$list.off("touchend.slick mouseup.slick", e.swipeHandler), e.$list.off("touchcancel.slick mouseleave.slick", e.swipeHandler), e.$list.off("click.slick", e.clickHandler), t(document).off(e.visibilityChange, e.visibility), e.cleanUpSlideEvents(), !0 === e.options.accessibility && e.$list.off("keydown.slick", e.keyHandler), !0 === e.options.focusOnSelect && t(e.$slideTrack).children().off("click.slick", e.selectHandler), t(window).off("orientationchange.slick.slick-" + e.instanceUid, e.orientationChange), t(window).off("resize.slick.slick-" + e.instanceUid, e.resize), t("[draggable!=true]", e.$slideTrack).off("dragstart", e.preventDefault), t(window).off("load.slick.slick-" + e.instanceUid, e.setPosition)
}, e.prototype.cleanUpSlideEvents = function() {
var e = this;
e.$list.off("mouseenter.slick", t.proxy(e.interrupt, e, !0)), e.$list.off("mouseleave.slick", t.proxy(e.interrupt, e, !1))
}, e.prototype.cleanUpRows = function() {
var t, e = this;
e.options.rows > 1 && ((t = e.$slides.children().children()).removeAttr("style"), e.$slider.empty().append(t))
}, e.prototype.clickHandler = function(t) {
!1 === this.shouldClick && (t.stopImmediatePropagation(), t.stopPropagation(), t.preventDefault())
}, e.prototype.destroy = function(e) {
var o = this;
o.autoPlayClear(), o.touchObject = {}, o.cleanUpEvents(), t(".slick-cloned", o.$slider).detach(), o.$dots && o.$dots.remove(), o.$prevArrow && o.$prevArrow.length && (o.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), o.htmlExpr.test(o.options.prevArrow) && o.$prevArrow.remove()), o.$nextArrow && o.$nextArrow.length && (o.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), o.htmlExpr.test(o.options.nextArrow) && o.$nextArrow.remove()), o.$slides && (o.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function() {
t(this).attr("style", t(this).data("originalStyling"))
}), o.$slideTrack.children(this.options.slide).detach(), o.$slideTrack.detach(), o.$list.detach(), o.$slider.append(o.$slides)), o.cleanUpRows(), o.$slider.removeClass("slick-slider"), o.$slider.removeClass("slick-initialized"), o.$slider.removeClass("slick-dotted"), o.unslicked = !0, e || o.$slider.trigger("destroy", [o])
}, e.prototype.disableTransition = function(t) {
var e = this,
o = {};
o[e.transitionType] = "", !1 === e.options.fade ? e.$slideTrack.css(o) : e.$slides.eq(t).css(o)
}, e.prototype.fadeSlide = function(t, e) {
var o = this;
!1 === o.cssTransitions ? (o.$slides.eq(t).css({
zIndex: o.options.zIndex
}), o.$slides.eq(t).animate({
opacity: 1
}, o.options.speed, o.options.easing, e)) : (o.applyTransition(t), o.$slides.eq(t).css({
opacity: 1,
zIndex: o.options.zIndex
}), e && setTimeout(function() {
o.disableTransition(t), e.call()
}, o.options.speed))
}, e.prototype.fadeSlideOut = function(t) {
var e = this;
!1 === e.cssTransitions ? e.$slides.eq(t).animate({
opacity: 0,
zIndex: e.options.zIndex - 2
}, e.options.speed, e.options.easing) : (e.applyTransition(t), e.$slides.eq(t).css({
opacity: 0,
zIndex: e.options.zIndex - 2
}))
}, e.prototype.filterSlides = e.prototype.slickFilter = function(t) {
var e = this;
null !== t && (e.$slidesCache = e.$slides, e.unload(), e.$slideTrack.children(this.options.slide).detach(), e.$slidesCache.filter(t).appendTo(e.$slideTrack), e.reinit())
}, e.prototype.focusHandler = function() {
var e = this;
e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick", "*", function(o) {
o.stopImmediatePropagation();
var i = t(this);
setTimeout(function() {
e.options.pauseOnFocus && (e.focussed = i.is(":focus"), e.autoPlay())
}, 0)
})
}, e.prototype.getCurrent = e.prototype.slickCurrentSlide = function() {
return this.currentSlide
}, e.prototype.getDotCount = function() {
var t = this,
e = 0,
o = 0,
i = 0;
if (!0 === t.options.infinite)
if (t.slideCount <= t.options.slidesToShow) ++i;
else
for (; e < t.slideCount;) ++i, e = o + t.options.slidesToScroll, o += t.options.slidesToScroll <= t.options.slidesToShow ? t.options.slidesToScroll : t.options.slidesToShow;
else if (!0 === t.options.centerMode) i = t.slideCount;
else if (t.options.asNavFor)
for (; e < t.slideCount;) ++i, e = o + t.options.slidesToScroll, o += t.options.slidesToScroll <= t.options.slidesToShow ? t.options.slidesToScroll : t.options.slidesToShow;
else i = 1 + Math.ceil((t.slideCount - t.options.slidesToShow) / t.options.slidesToScroll);
return i - 1
}, e.prototype.getLeft = function(t) {
var e, o, i, n = this,
a = 0;
return n.slideOffset = 0, o = n.$slides.first().outerHeight(!0), !0 === n.options.infinite ? (n.slideCount > n.options.slidesToShow && (n.slideOffset = n.slideWidth * n.options.slidesToShow * -1, a = o * n.options.slidesToShow * -1), n.slideCount % n.options.slidesToScroll != 0 && t + n.options.slidesToScroll > n.slideCount && n.slideCount > n.options.slidesToShow && (t > n.slideCount ? (n.slideOffset = (n.options.slidesToShow - (t - n.slideCount)) * n.slideWidth * -1, a = (n.options.slidesToShow - (t - n.slideCount)) * o * -1) : (n.slideOffset = n.slideCount % n.options.slidesToScroll * n.slideWidth * -1, a = n.slideCount % n.options.slidesToScroll * o * -1))) : t + n.options.slidesToShow > n.slideCount && (n.slideOffset = (t + n.options.slidesToShow - n.slideCount) * n.slideWidth, a = (t + n.options.slidesToShow - n.slideCount) * o), n.slideCount <= n.options.slidesToShow && (n.slideOffset = 0, a = 0), !0 === n.options.centerMode && n.slideCount <= n.options.slidesToShow ? n.slideOffset = n.slideWidth * Math.floor(n.options.slidesToShow) / 2 - n.slideWidth * n.slideCount / 2 : !0 === n.options.centerMode && !0 === n.options.infinite ? n.slideOffset += n.slideWidth * Math.floor(n.options.slidesToShow / 2) - n.slideWidth : !0 === n.options.centerMode && (n.slideOffset = 0, n.slideOffset += n.slideWidth * Math.floor(n.options.slidesToShow / 2)), e = !1 === n.options.vertical ? t * n.slideWidth * -1 + n.slideOffset : t * o * -1 + a, !0 === n.options.variableWidth && (i = n.slideCount <= n.options.slidesToShow || !1 === n.options.infinite ? n.$slideTrack.children(".slick-slide").eq(t) : n.$slideTrack.children(".slick-slide").eq(t + n.options.slidesToShow), e = !0 === n.options.rtl ? i[0] ? -1 * (n.$slideTrack.width() - i[0].offsetLeft - i.width()) : 0 : i[0] ? -1 * i[0].offsetLeft : 0, !0 === n.options.centerMode && (i = n.slideCount <= n.options.slidesToShow || !1 === n.options.infinite ? n.$slideTrack.children(".slick-slide").eq(t) : n.$slideTrack.children(".slick-slide").eq(t + n.options.slidesToShow + 1), e = !0 === n.options.rtl ? i[0] ? -1 * (n.$slideTrack.width() - i[0].offsetLeft - i.width()) : 0 : i[0] ? -1 * i[0].offsetLeft : 0, e += (n.$list.width() - i.outerWidth()) / 2)), e
}, e.prototype.getOption = e.prototype.slickGetOption = function(t) {
return this.options[t]
}, e.prototype.getNavigableIndexes = function() {
var t, e = this,
o = 0,
i = 0,
n = [];
for (!1 === e.options.infinite ? t = e.slideCount : (o = -1 * e.options.slidesToScroll, i = -1 * e.options.slidesToScroll, t = 2 * e.slideCount); o < t;) n.push(o), o = i + e.options.slidesToScroll, i += e.options.slidesToScroll <= e.options.slidesToShow ? e.options.slidesToScroll : e.options.slidesToShow;
return n
}, e.prototype.getSlick = function() {
return this
}, e.prototype.getSlideCount = function() {
var e, o, i = this;
return o = !0 === i.options.centerMode ? i.slideWidth * Math.floor(i.options.slidesToShow / 2) : 0, !0 === i.options.swipeToSlide ? (i.$slideTrack.find(".slick-slide").each(function(n, a) {
if (a.offsetLeft - o + t(a).outerWidth() / 2 > -1 * i.swipeLeft) return e = a, !1
}), Math.abs(t(e).attr("data-slick-index") - i.currentSlide) || 1) : i.options.slidesToScroll
}, e.prototype.goTo = e.prototype.slickGoTo = function(t, e) {
this.changeSlide({
data: {
message: "index",
index: parseInt(t)
}
}, e)
}, e.prototype.init = function(e) {
var o = this;
t(o.$slider).hasClass("slick-initialized") || (t(o.$slider).addClass("slick-initialized"), o.buildRows(), o.buildOut(), o.setProps(), o.startLoad(), o.loadSlider(), o.initializeEvents(), o.updateArrows(), o.updateDots(), o.checkResponsive(!0), o.focusHandler()), e && o.$slider.trigger("init", [o]), !0 === o.options.accessibility && o.initADA(), o.options.autoplay && (o.paused = !1, o.autoPlay())
}, e.prototype.initADA = function() {
var e = this,
o = Math.ceil(e.slideCount / e.options.slidesToShow),
i = e.getNavigableIndexes().filter(function(t) {
return t >= 0 && t < e.slideCount
});
e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({
"aria-hidden": "true",
tabindex: "-1"
}).find("a, input, button, select").attr({
tabindex: "-1"
}), null !== e.$dots && (e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(o) {
var n = i.indexOf(o);
t(this).attr({
role: "tabpanel",
id: "slick-slide" + e.instanceUid + o,
tabindex: -1
}), -1 !== n && t(this).attr({
"aria-describedby": "slick-slide-control" + e.instanceUid + n
})
}), e.$dots.attr("role", "tablist").find("li").each(function(n) {
var a = i[n];
t(this).attr({
role: "presentation"
}), t(this).find("button").first().attr({
role: "tab",
id: "slick-slide-control" + e.instanceUid + n,
"aria-controls": "slick-slide" + e.instanceUid + a,
"aria-label": n + 1 + " of " + o,
"aria-selected": null,
tabindex: "-1"
})
}).eq(e.currentSlide).find("button").attr({
"aria-selected": "true",
tabindex: "0"
}).end());
for (var n = e.currentSlide, a = n + e.options.slidesToShow; n < a; n++) e.$slides.eq(n).attr("tabindex", 0);
e.activateADA()
}, e.prototype.initArrowEvents = function() {
var t = this;
!0 === t.options.arrows && t.slideCount > t.options.slidesToShow && (t.$prevArrow.off("click.slick").on("click.slick", {
message: "previous"
}, t.changeSlide), t.$nextArrow.off("click.slick").on("click.slick", {
message: "next"
}, t.changeSlide), !0 === t.options.accessibility && (t.$prevArrow.on("keydown.slick", t.keyHandler), t.$nextArrow.on("keydown.slick", t.keyHandler)))
}, e.prototype.initDotEvents = function() {
var e = this;
!0 === e.options.dots && (t("li", e.$dots).on("click.slick", {
message: "index"
}, e.changeSlide), !0 === e.options.accessibility && e.$dots.on("keydown.slick", e.keyHandler)), !0 === e.options.dots && !0 === e.options.pauseOnDotsHover && t("li", e.$dots).on("mouseenter.slick", t.proxy(e.interrupt, e, !0)).on("mouseleave.slick", t.proxy(e.interrupt, e, !1))
}, e.prototype.initSlideEvents = function() {
var e = this;
e.options.pauseOnHover && (e.$list.on("mouseenter.slick", t.proxy(e.interrupt, e, !0)), e.$list.on("mouseleave.slick", t.proxy(e.interrupt, e, !1)))
}, e.prototype.initializeEvents = function() {
var e = this;
e.initArrowEvents(), e.initDotEvents(), e.initSlideEvents(), e.$list.on("touchstart.slick mousedown.slick", {
action: "start"
}, e.swipeHandler), e.$list.on("touchmove.slick mousemove.slick", {
action: "move"
}, e.swipeHandler), e.$list.on("touchend.slick mouseup.slick", {
action: "end"
}, e.swipeHandler), e.$list.on("touchcancel.slick mouseleave.slick", {
action: "end"
}, e.swipeHandler), e.$list.on("click.slick", e.clickHandler), t(document).on(e.visibilityChange, t.proxy(e.visibility, e)), !0 === e.options.accessibility && e.$list.on("keydown.slick", e.keyHandler), !0 === e.options.focusOnSelect && t(e.$slideTrack).children().on("click.slick", e.selectHandler), t(window).on("orientationchange.slick.slick-" + e.instanceUid, t.proxy(e.orientationChange, e)), t(window).on("resize.slick.slick-" + e.instanceUid, t.proxy(e.resize, e)), t("[draggable!=true]", e.$slideTrack).on("dragstart", e.preventDefault), t(window).on("load.slick.slick-" + e.instanceUid, e.setPosition), t(e.setPosition)
}, e.prototype.initUI = function() {
var t = this;
!0 === t.options.arrows && t.slideCount > t.options.slidesToShow && (t.$prevArrow.show(), t.$nextArrow.show()), !0 === t.options.dots && t.slideCount > t.options.slidesToShow && t.$dots.show()
}, e.prototype.keyHandler = function(t) {
var e = this;
t.target.tagName.match("TEXTAREA|INPUT|SELECT") || (37 === t.keyCode && !0 === e.options.accessibility ? e.changeSlide({
data: {
message: !0 === e.options.rtl ? "next" : "previous"
}
}) : 39 === t.keyCode && !0 === e.options.accessibility && e.changeSlide({
data: {
message: !0 === e.options.rtl ? "previous" : "next"
}
}))
}, e.prototype.lazyLoad = function() {
function e(e) {
t("img[data-lazy]", e).each(function() {
var e = t(this),
o = t(this).attr("data-lazy"),
i = t(this).attr("data-srcset"),
n = t(this).attr("data-sizes") || a.$slider.attr("data-sizes"),
r = document.createElement("img");
r.onload = function() {
e.animate({
opacity: 0
}, 100, function() {
i && (e.attr("srcset", i), n && e.attr("sizes", n)), e.attr("src", o).animate({
opacity: 1
}, 200, function() {
e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")
}), a.$slider.trigger("lazyLoaded", [a, e, o])
})
}, r.onerror = function() {
e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"), a.$slider.trigger("lazyLoadError", [a, e, o])
}, r.src = o
})
}
var o, i, n, a = this;
if (!0 === a.options.centerMode ? !0 === a.options.infinite ? n = (i = a.currentSlide + (a.options.slidesToShow / 2 + 1)) + a.options.slidesToShow + 2 : (i = Math.max(0, a.currentSlide - (a.options.slidesToShow / 2 + 1)), n = a.options.slidesToShow / 2 + 1 + 2 + a.currentSlide) : (i = a.options.infinite ? a.options.slidesToShow + a.currentSlide : a.currentSlide, n = Math.ceil(i + a.options.slidesToShow), !0 === a.options.fade && (i > 0 && i--, n <= a.slideCount && n++)), o = a.$slider.find(".slick-slide").slice(i, n), "anticipated" === a.options.lazyLoad)
for (var r = i - 1, s = n, l = a.$slider.find(".slick-slide"), d = 0; d < a.options.slidesToScroll; d++) r < 0 && (r = a.slideCount - 1), o = (o = o.add(l.eq(r))).add(l.eq(s)), r--, s++;
e(o), a.slideCount <= a.options.slidesToShow ? e(a.$slider.find(".slick-slide")) : a.currentSlide >= a.slideCount - a.options.slidesToShow ? e(a.$slider.find(".slick-cloned").slice(0, a.options.slidesToShow)) : 0 === a.currentSlide && e(a.$slider.find(".slick-cloned").slice(-1 * a.options.slidesToShow))
}, e.prototype.loadSlider = function() {
var t = this;
t.setPosition(), t.$slideTrack.css({
opacity: 1
}), t.$slider.removeClass("slick-loading"), t.initUI(), "progressive" === t.options.lazyLoad && t.progressiveLazyLoad()
}, e.prototype.next = e.prototype.slickNext = function() {
this.changeSlide({
data: {
message: "next"
}
})
}, e.prototype.orientationChange = function() {
var t = this;
t.checkResponsive(), t.setPosition()
}, e.prototype.pause = e.prototype.slickPause = function() {
var t = this;
t.autoPlayClear(), t.paused = !0
}, e.prototype.play = e.prototype.slickPlay = function() {
var t = this;
t.autoPlay(), t.options.autoplay = !0, t.paused = !1, t.focussed = !1, t.interrupted = !1
}, e.prototype.postSlide = function(e) {
var o = this;
o.unslicked || (o.$slider.trigger("afterChange", [o, e]), o.animating = !1, o.slideCount > o.options.slidesToShow && o.setPosition(), o.swipeLeft = null, o.options.autoplay && o.autoPlay(), !0 === o.options.accessibility && (o.initADA(), o.options.autoplay || t(o.$slides.get(o.currentSlide)).attr("tabindex", 0).focus()))
}, e.prototype.prev = e.prototype.slickPrev = function() {
this.changeSlide({
data: {
message: "previous"
}
})
}, e.prototype.preventDefault = function(t) {
t.preventDefault()
}, e.prototype.progressiveLazyLoad = function(e) {
e = e || 1;
var o, i, n, a, r, s = this,
l = t("img[data-lazy]", s.$slider);
l.length ? (o = l.first(), i = o.attr("data-lazy"), n = o.attr("data-srcset"), a = o.attr("data-sizes") || s.$slider.attr("data-sizes"), (r = document.createElement("img")).onload = function() {
n && (o.attr("srcset", n), a && o.attr("sizes", a)), o.attr("src", i).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"), !0 === s.options.adaptiveHeight && s.setPosition(), s.$slider.trigger("lazyLoaded", [s, o, i]), s.progressiveLazyLoad()
}, r.onerror = function() {
e < 3 ? setTimeout(function() {
s.progressiveLazyLoad(e + 1)
}, 500) : (o.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"), s.$slider.trigger("lazyLoadError", [s, o, i]), s.progressiveLazyLoad())
}, r.src = i) : s.$slider.trigger("allImagesLoaded", [s])
}, e.prototype.refresh = function(e) {
var o, i, n = this;
i = n.slideCount - n.options.slidesToShow, !n.options.infinite && n.currentSlide > i && (n.currentSlide = i), n.slideCount <= n.options.slidesToShow && (n.currentSlide = 0), o = n.currentSlide, n.destroy(!0), t.extend(n, n.initials, {
currentSlide: o
}), n.init(), e || n.changeSlide({
data: {
message: "index",
index: o
}
}, !1)
}, e.prototype.registerBreakpoints = function() {
var e, o, i, n = this,
a = n.options.responsive || null;
if ("array" === t.type(a) && a.length) {
n.respondTo = n.options.respondTo || "window";
for (e in a)
if (i = n.breakpoints.length - 1, a.hasOwnProperty(e)) {
for (o = a[e].breakpoint; i >= 0;) n.breakpoints[i] && n.breakpoints[i] === o && n.breakpoints.splice(i, 1), i--;
n.breakpoints.push(o), n.breakpointSettings[o] = a[e].settings
}
n.breakpoints.sort(function(t, e) {
return n.options.mobileFirst ? t - e : e - t
})
}
}, e.prototype.reinit = function() {
var e = this;
e.$slides = e.$slideTrack.children(e.options.slide).addClass("slick-slide"), e.slideCount = e.$slides.length, e.currentSlide >= e.slideCount && 0 !== e.currentSlide && (e.currentSlide = e.currentSlide - e.options.slidesToScroll), e.slideCount <= e.options.slidesToShow && (e.currentSlide = 0), e.registerBreakpoints(), e.setProps(), e.setupInfinite(), e.buildArrows(), e.updateArrows(), e.initArrowEvents(), e.buildDots(), e.updateDots(), e.initDotEvents(), e.cleanUpSlideEvents(), e.initSlideEvents(), e.checkResponsive(!1, !0), !0 === e.options.focusOnSelect && t(e.$slideTrack).children().on("click.slick", e.selectHandler), e.setSlideClasses("number" == typeof e.currentSlide ? e.currentSlide : 0), e.setPosition(), e.focusHandler(), e.paused = !e.options.autoplay, e.autoPlay(), e.$slider.trigger("reInit", [e])
}, e.prototype.resize = function() {
var e = this;
t(window).width() !== e.windowWidth && (clearTimeout(e.windowDelay), e.windowDelay = window.setTimeout(function() {
e.windowWidth = t(window).width(), e.checkResponsive(), e.unslicked || e.setPosition()
}, 50))
}, e.prototype.removeSlide = e.prototype.slickRemove = function(t, e, o) {
var i = this;
if (t = "boolean" == typeof t ? !0 === (e = t) ? 0 : i.slideCount - 1 : !0 === e ? --t : t, i.slideCount < 1 || t < 0 || t > i.slideCount - 1) return !1;
i.unload(), !0 === o ? i.$slideTrack.children().remove() : i.$slideTrack.children(this.options.slide).eq(t).remove(), i.$slides = i.$slideTrack.children(this.options.slide), i.$slideTrack.children(this.options.slide).detach(), i.$slideTrack.append(i.$slides), i.$slidesCache = i.$slides, i.reinit()
}, e.prototype.setCSS = function(t) {
var e, o, i = this,
n = {};
!0 === i.options.rtl && (t = -t), e = "left" == i.positionProp ? Math.ceil(t) + "px" : "0px", o = "top" == i.positionProp ? Math.ceil(t) + "px" : "0px", n[i.positionProp] = t, !1 === i.transformsEnabled ? i.$slideTrack.css(n) : (n = {}, !1 === i.cssTransitions ? (n[i.animType] = "translate(" + e + ", " + o + ")", i.$slideTrack.css(n)) : (n[i.animType] = "translate3d(" + e + ", " + o + ", 0px)", i.$slideTrack.css(n)))
}, e.prototype.setDimensions = function() {
var t = this;
!1 === t.options.vertical ? !0 === t.options.centerMode && t.$list.css({
padding: "0px " + t.options.centerPadding
}) : (t.$list.height(t.$slides.first().outerHeight(!0) * t.options.slidesToShow), !0 === t.options.centerMode && t.$list.css({
padding: t.options.centerPadding + " 0px"
})), t.listWidth = t.$list.width(), t.listHeight = t.$list.height(), !1 === t.options.vertical && !1 === t.options.variableWidth ? (t.slideWidth = Math.ceil(t.listWidth / t.options.slidesToShow), t.$slideTrack.width(Math.ceil(t.slideWidth * t.$slideTrack.children(".slick-slide").length))) : !0 === t.options.variableWidth ? t.$slideTrack.width(5e3 * t.slideCount) : (t.slideWidth = Math.ceil(t.listWidth), t.$slideTrack.height(Math.ceil(t.$slides.first().outerHeight(!0) * t.$slideTrack.children(".slick-slide").length)));
var e = t.$slides.first().outerWidth(!0) - t.$slides.first().width();
!1 === t.options.variableWidth && t.$slideTrack.children(".slick-slide").width(t.slideWidth - e)
}, e.prototype.setFade = function() {
var e, o = this;
o.$slides.each(function(i, n) {
e = o.slideWidth * i * -1, !0 === o.options.rtl ? t(n).css({
position: "relative",
right: e,
top: 0,
zIndex: o.options.zIndex - 2,
opacity: 0
}) : t(n).css({
position: "relative",
left: e,
top: 0,
zIndex: o.options.zIndex - 2,
opacity: 0
})
}), o.$slides.eq(o.currentSlide).css({
zIndex: o.options.zIndex - 1,
opacity: 1
})
}, e.prototype.setHeight = function() {
var t = this;
if (1 === t.options.slidesToShow && !0 === t.options.adaptiveHeight && !1 === t.options.vertical) {
var e = t.$slides.eq(t.currentSlide).outerHeight(!0);
t.$list.css("height", e)
}
}, e.prototype.setOption = e.prototype.slickSetOption = function() {
var e, o, i, n, a, r = this,
s = !1;
if ("object" === t.type(arguments[0]) ? (i = arguments[0], s = arguments[1], a = "multiple") : "string" === t.type(arguments[0]) && (i = arguments[0], n = arguments[1], s = arguments[2], "responsive" === arguments[0] && "array" === t.type(arguments[1]) ? a = "responsive" : void 0 !== arguments[1] && (a = "single")), "single" === a) r.options[i] = n;
else if ("multiple" === a) t.each(i, function(t, e) {
r.options[t] = e
});
else if ("responsive" === a)
for (o in n)
if ("array" !== t.type(r.options.responsive)) r.options.responsive = [n[o]];
else {
for (e = r.options.responsive.length - 1; e >= 0;) r.options.responsive[e].breakpoint === n[o].breakpoint && r.options.responsive.splice(e, 1), e--;
r.options.responsive.push(n[o])
}
s && (r.unload(), r.reinit())
}, e.prototype.setPosition = function() {
var t = this;
t.setDimensions(), t.setHeight(), !1 === t.options.fade ? t.setCSS(t.getLeft(t.currentSlide)) : t.setFade(), t.$slider.trigger("setPosition", [t])
}, e.prototype.setProps = function() {
var t = this,
e = document.body.style;
t.positionProp = !0 === t.options.vertical ? "top" : "left", "top" === t.positionProp ? t.$slider.addClass("slick-vertical") : t.$slider.removeClass("slick-vertical"), void 0 === e.WebkitTransition && void 0 === e.MozTransition && void 0 === e.msTransition || !0 === t.options.useCSS && (t.cssTransitions = !0), t.options.fade && ("number" == typeof t.options.zIndex ? t.options.zIndex < 3 && (t.options.zIndex = 3) : t.options.zIndex = t.defaults.zIndex), void 0 !== e.OTransform && (t.animType = "OTransform", t.transformType = "-o-transform", t.transitionType = "OTransition", void 0 === e.perspectiveProperty && void 0 === e.webkitPerspective && (t.animType = !1)), void 0 !== e.MozTransform && (t.animType = "MozTransform", t.transformType = "-moz-transform", t.transitionType = "MozTransition", void 0 === e.perspectiveProperty && void 0 === e.MozPerspective && (t.animType = !1)), void 0 !== e.webkitTransform && (t.animType = "webkitTransform", t.transformType = "-webkit-transform", t.transitionType = "webkitTransition", void 0 === e.perspectiveProperty && void 0 === e.webkitPerspective && (t.animType = !1)), void 0 !== e.msTransform && (t.animType = "msTransform", t.transformType = "-ms-transform", t.transitionType = "msTransition", void 0 === e.msTransform && (t.animType = !1)), void 0 !== e.transform && !1 !== t.animType && (t.animType = "transform", t.transformType = "transform", t.transitionType = "transition"), t.transformsEnabled = t.options.useTransform && null !== t.animType && !1 !== t.animType
}, e.prototype.setSlideClasses = function(t) {
var e, o, i, n, a = this;
o = a.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden", "true"), a.$slides.eq(t).addClass("slick-current"), !0 === a.options.centerMode ? (e = Math.floor(a.options.slidesToShow / 2), !0 === a.options.infinite && (t >= e && t <= a.slideCount - 1 - e ? a.$slides.slice(t - e, t + e + 1).addClass("slick-active").attr("aria-hidden", "false") : (i = a.options.slidesToShow + t, o.slice(i - e + 1, i + e + 2).addClass("slick-active").attr("aria-hidden", "false")), 0 === t ? o.eq(o.length - 1 - a.options.slidesToShow).addClass("slick-center") : t === a.slideCount - 1 && o.eq(a.options.slidesToShow).addClass("slick-center")), a.$slides.eq(t).addClass("slick-center")) : t >= 0 && t <= a.slideCount - a.options.slidesToShow ? a.$slides.slice(t, t + a.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false") : o.length <= a.options.slidesToShow ? o.addClass("slick-active").attr("aria-hidden", "false") : (n = a.slideCount % a.options.slidesToShow, i = !0 === a.options.infinite ? a.options.slidesToShow + t : t, a.options.slidesToShow == a.options.slidesToScroll && a.slideCount - t < a.options.slidesToShow ? o.slice(i - (a.options.slidesToShow - n), i + n).addClass("slick-active").attr("aria-hidden", "false") : o.slice(i, i + a.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false")), "ondemand" !== a.options.lazyLoad && "anticipated" !== a.options.lazyLoad || a.lazyLoad()
}, e.prototype.setupInfinite = function() {
var e, o, i, n = this;
if (!0 === n.options.fade && (n.options.centerMode = !1), !0 === n.options.infinite && !1 === n.options.fade && (o = null, n.slideCount > n.options.slidesToShow)) {
for (i = !0 === n.options.centerMode ? n.options.slidesToShow + 1 : n.options.slidesToShow, e = n.slideCount; e > n.slideCount - i; e -= 1) o = e - 1, t(n.$slides[o]).clone(!0).attr("id", "").attr("data-slick-index", o - n.slideCount).prependTo(n.$slideTrack).addClass("slick-cloned");
for (e = 0; e < i + n.slideCount; e += 1) o = e, t(n.$slides[o]).clone(!0).attr("id", "").attr("data-slick-index", o + n.slideCount).appendTo(n.$slideTrack).addClass("slick-cloned");
n.$slideTrack.find(".slick-cloned").find("[id]").each(function() {
t(this).attr("id", "")
})
}
}, e.prototype.interrupt = function(t) {
var e = this;
t || e.autoPlay(), e.interrupted = t
}, e.prototype.selectHandler = function(e) {
var o = this,
i = t(e.target).is(".slick-slide") ? t(e.target) : t(e.target).parents(".slick-slide"),
n = parseInt(i.attr("data-slick-index"));
n || (n = 0), o.slideCount <= o.options.slidesToShow ? o.slideHandler(n, !1, !0) : o.slideHandler(n)
}, e.prototype.slideHandler = function(t, e, o) {
var i, n, a, r, s, l = null,
d = this;
if (e = e || !1, !(!0 === d.animating && !0 === d.options.waitForAnimate || !0 === d.options.fade && d.currentSlide === t))
if (!1 === e && d.asNavFor(t), i = t, l = d.getLeft(i), r = d.getLeft(d.currentSlide), d.currentLeft = null === d.swipeLeft ? r : d.swipeLeft, !1 === d.options.infinite && !1 === d.options.centerMode && (t < 0 || t > d.getDotCount() * d.options.slidesToScroll)) !1 === d.options.fade && (i = d.currentSlide, !0 !== o ? d.animateSlide(r, function() {
d.postSlide(i)
}) : d.postSlide(i));
else if (!1 === d.options.infinite && !0 === d.options.centerMode && (t < 0 || t > d.slideCount - d.options.slidesToScroll)) !1 === d.options.fade && (i = d.currentSlide, !0 !== o ? d.animateSlide(r, function() {
d.postSlide(i)
}) : d.postSlide(i));
else {
if (d.options.autoplay && clearInterval(d.autoPlayTimer), n = i < 0 ? d.slideCount % d.options.slidesToScroll != 0 ? d.slideCount - d.slideCount % d.options.slidesToScroll : d.slideCount + i : i >= d.slideCount ? d.slideCount % d.options.slidesToScroll != 0 ? 0 : i - d.slideCount : i, d.animating = !0, d.$slider.trigger("beforeChange", [d, d.currentSlide, n]), a = d.currentSlide, d.currentSlide = n, d.setSlideClasses(d.currentSlide), d.options.asNavFor && (s = (s = d.getNavTarget()).slick("getSlick")).slideCount <= s.options.slidesToShow && s.setSlideClasses(d.currentSlide), d.updateDots(), d.updateArrows(), !0 === d.options.fade) return !0 !== o ? (d.fadeSlideOut(a), d.fadeSlide(n, function() {
d.postSlide(n)
})) : d.postSlide(n), void d.animateHeight();
!0 !== o ? d.animateSlide(l, function() {
d.postSlide(n)
}) : d.postSlide(n)
}
}, e.prototype.startLoad = function() {
var t = this;
!0 === t.options.arrows && t.slideCount > t.options.slidesToShow && (t.$prevArrow.hide(), t.$nextArrow.hide()), !0 === t.options.dots && t.slideCount > t.options.slidesToShow && t.$dots.hide(), t.$slider.addClass("slick-loading")
}, e.prototype.swipeDirection = function() {
var t, e, o, i, n = this;
return t = n.touchObject.startX - n.touchObject.curX, e = n.touchObject.startY - n.touchObject.curY, o = Math.atan2(e, t), (i = Math.round(180 * o / Math.PI)) < 0 && (i = 360 - Math.abs(i)), i <= 45 && i >= 0 ? !1 === n.options.rtl ? "left" : "right" : i <= 360 && i >= 315 ? !1 === n.options.rtl ? "left" : "right" : i >= 135 && i <= 225 ? !1 === n.options.rtl ? "right" : "left" : !0 === n.options.verticalSwiping ? i >= 35 && i <= 135 ? "down" : "up" : "vertical"
}, e.prototype.swipeEnd = function(t) {
var e, o, i = this;
if (i.dragging = !1, i.swiping = !1, i.scrolling) return i.scrolling = !1, !1;
if (i.interrupted = !1, i.shouldClick = !(i.touchObject.swipeLength > 10), void 0 === i.touchObject.curX) return !1;
if (!0 === i.touchObject.edgeHit && i.$slider.trigger("edge", [i, i.swipeDirection()]), i.touchObject.swipeLength >= i.touchObject.minSwipe) {
switch (o = i.swipeDirection()) {
case "left":
case "down":
e = i.options.swipeToSlide ? i.checkNavigable(i.currentSlide + i.getSlideCount()) : i.currentSlide + i.getSlideCount(), i.currentDirection = 0;
break;
case "right":
case "up":
e = i.options.swipeToSlide ? i.checkNavigable(i.currentSlide - i.getSlideCount()) : i.currentSlide - i.getSlideCount(), i.currentDirection = 1
}
"vertical" != o && (i.slideHandler(e), i.touchObject = {}, i.$slider.trigger("swipe", [i, o]))
} else i.touchObject.startX !== i.touchObject.curX && (i.slideHandler(i.currentSlide), i.touchObject = {})
}, e.prototype.swipeHandler = function(t) {
var e = this;
if (!(!1 === e.options.swipe || "ontouchend" in document && !1 === e.options.swipe || !1 === e.options.draggable && -1 !== t.type.indexOf("mouse"))) switch (e.touchObject.fingerCount = t.originalEvent && void 0 !== t.originalEvent.touches ? t.originalEvent.touches.length : 1, e.touchObject.minSwipe = e.listWidth / e.options.touchThreshold, !0 === e.options.verticalSwiping && (e.touchObject.minSwipe = e.listHeight / e.options.touchThreshold), t.data.action) {
case "start":
e.swipeStart(t);
break;
case "move":
e.swipeMove(t);
break;
case "end":
e.swipeEnd(t)
}
}, e.prototype.swipeMove = function(t) {
var e, o, i, n, a, r, s = this;
return a = void 0 !== t.originalEvent ? t.originalEvent.touches : null, !(!s.dragging || s.scrolling || a && 1 !== a.length) && (e = s.getLeft(s.currentSlide), s.touchObject.curX = void 0 !== a ? a[0].pageX : t.clientX, s.touchObject.curY = void 0 !== a ? a[0].pageY : t.clientY, s.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(s.touchObject.curX - s.touchObject.startX, 2))), r = Math.round(Math.sqrt(Math.pow(s.touchObject.curY - s.touchObject.startY, 2))), !s.options.verticalSwiping && !s.swiping && r > 4 ? (s.scrolling = !0, !1) : (!0 === s.options.verticalSwiping && (s.touchObject.swipeLength = r), o = s.swipeDirection(), void 0 !== t.originalEvent && s.touchObject.swipeLength > 4 && (s.swiping = !0, t.preventDefault()), n = (!1 === s.options.rtl ? 1 : -1) * (s.touchObject.curX > s.touchObject.startX ? 1 : -1), !0 === s.options.verticalSwiping && (n = s.touchObject.curY > s.touchObject.startY ? 1 : -1), i = s.touchObject.swipeLength, s.touchObject.edgeHit = !1, !1 === s.options.infinite && (0 === s.currentSlide && "right" === o || s.currentSlide >= s.getDotCount() && "left" === o) && (i = s.touchObject.swipeLength * s.options.edgeFriction, s.touchObject.edgeHit = !0), !1 === s.options.vertical ? s.swipeLeft = e + i * n : s.swipeLeft = e + i * (s.$list.height() / s.listWidth) * n, !0 === s.options.verticalSwiping && (s.swipeLeft = e + i * n), !0 !== s.options.fade && !1 !== s.options.touchMove && (!0 === s.animating ? (s.swipeLeft = null, !1) : void s.setCSS(s.swipeLeft))))
}, e.prototype.swipeStart = function(t) {
var e, o = this;
if (o.interrupted = !0, 1 !== o.touchObject.fingerCount || o.slideCount <= o.options.slidesToShow) return o.touchObject = {}, !1;
void 0 !== t.originalEvent && void 0 !== t.originalEvent.touches && (e = t.originalEvent.touches[0]), o.touchObject.startX = o.touchObject.curX = void 0 !== e ? e.pageX : t.clientX, o.touchObject.startY = o.touchObject.curY = void 0 !== e ? e.pageY : t.clientY, o.dragging = !0
}, e.prototype.unfilterSlides = e.prototype.slickUnfilter = function() {
var t = this;
null !== t.$slidesCache && (t.unload(), t.$slideTrack.children(this.options.slide).detach(), t.$slidesCache.appendTo(t.$slideTrack), t.reinit())
}, e.prototype.unload = function() {
var e = this;
t(".slick-cloned", e.$slider).remove(), e.$dots && e.$dots.remove(), e.$prevArrow && e.htmlExpr.test(e.options.prevArrow) && e.$prevArrow.remove(), e.$nextArrow && e.htmlExpr.test(e.options.nextArrow) && e.$nextArrow.remove(), e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden", "true").css("width", "")
}, e.prototype.unslick = function(t) {
var e = this;
e.$slider.trigger("unslick", [e, t]), e.destroy()
}, e.prototype.updateArrows = function() {
var t = this;
Math.floor(t.options.slidesToShow / 2), !0 === t.options.arrows && t.slideCount > t.options.slidesToShow && !t.options.infinite && (t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), t.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), 0 === t.currentSlide ? (t.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true"), t.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : t.currentSlide >= t.slideCount - t.options.slidesToShow && !1 === t.options.centerMode ? (t.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : t.currentSlide >= t.slideCount - 1 && !0 === t.options.centerMode && (t.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false")))
}, e.prototype.updateDots = function() {
var t = this;
null !== t.$dots && (t.$dots.find("li").removeClass("slick-active").end(), t.$dots.find("li").eq(Math.floor(t.currentSlide / t.options.slidesToScroll)).addClass("slick-active"))
}, e.prototype.visibility = function() {
var t = this;
t.options.autoplay && (document[t.hidden] ? t.interrupted = !0 : t.interrupted = !1)
}, t.fn.slick = function() {
var t, o, i = this,
n = arguments[0],
a = Array.prototype.slice.call(arguments, 1),
r = i.length;
for (t = 0; t < r; t++)
if ("object" == typeof n || void 0 === n ? i[t].slick = new e(i[t], n) : o = i[t].slick[n].apply(i[t].slick, a), void 0 !== o) return o;
return i
}
}), String.prototype.printf = function(t) {
var e = !1,
o = arguments,
i = -1;
return "string" == typeof o[0] && (e = !0), t instanceof Array || e ? this.replace(/\%s/g, function() {
if (i++, e) {
if ("string" == typeof o[i]) return o[i];
throw new Error("Arguments element is an invalid type")
}
return t[i]
}) : this.replace(/{([^{}]*)}/g, function(e, o) {
var i = t[o];
return "string" == typeof i || "number" == typeof i ? i : e
})
},
function(t) {
"use strict";
t.fn.colorApply = function(e) {
var o = t.extend({
scope: t(document),
page: t("body").data("page")
}, e),
i = {
init: function() {
return this.setHeaderColor().setFooterColor().setElementsColor().setColorsByPage(o.page), this
},
setOptions: function(t, e) {
return o[t] = e, this
},
getOptions: function(t) {
return o[t]
},
setHeaderColor: function() {
return this.setOptions("scope", t("#NavSuperior")), t(".icon-busca", this.getOptions("scope")).addClass("color-tone-1"), t("#NavSuperior").addClass("bg-tone-1"), t(".nav-cliente a, .carrinho-compras li, .carrinho-compras a", this.getOptions("scope")).addClass("color-tone-2"), t(".busca-botao", this.getOptions("scope")).addClass("bg-tone-2"), t(".nav-cliente", this.getOptions("scope")).addClass("color-tone-5"), t("#busca-palavra", this.getOptions("scope")).addClass("color-tone-7"), this
},
setFooterColor: function() {
return this.setOptions("scope", t("#NavInferior")), t(".nav-pages", this.getOptions("scope")).addClass("bg-tone-1"), t("#NavInferior").addClass("bg-tone-4"), t(".redes-sociais a, .rodape-info .atendimento-fale-conosco, .atendimento .atendimento-fale-conosco a", this.getOptions("scope")).addClass("color-tone-6"), t(".nav-pages li, .nav-pages a, .rodape-info h6, .rodape-info li, .atendimento li, .atendimento a, .copyright-mensagem", this.getOptions("scope")).not(".atendimento-fale-conosco, .atendimento-fale-conosco a").addClass("color-tone-10"), t(".nav-pages a").hover(function() {
t(this).removeClass("color-tone-10").addClass("color-tone-6")
}, function() {
t(this).removeClass("color-tone-6").addClass("color-tone-10")
}), t(".rodape-info, .rodape-info > ul > li", this.getOptions("scope")).addClass("border-tone-10"), t(".copyright-mensagem").addClass("bg-tone-10"), this
},
setElementsColor: function() {
return this.setOptions("scope", t("#div2bg")), t(".menu-esquerdo .nivel-2 a, .news h5, .news .news-nome, .news-nome-label, .breadcrumb, .breadcrumb a", this.getOptions("scope")).addClass("color-tone-1"), t(".menu-esquerdo h3", this.getOptions("scope")).addClass("bg-tone-1"), t("#menu-esquerdo, .menu-esquerdo .nivel-2, .menu-esquerdo .nivel-2 a, .breadcrumb", this.getOptions("scope")).addClass("border-tone-1"), t(".por-preco, .precoAvista, .txt-por, .precoAvista, #a_partir, .PrecoPrincipal", this.getOptions("scope")).addClass("color-tone-2"), t(".news-botao", this.getOptions("scope")).addClass("bg-tone-2"), t(".menu-esquerdo h3 a, .menu-esquerdo h3 p, .menu-esquerdo .menu-icons", this.getOptions("scope")).addClass("color-tone-3"), t(".menu-esquerdo h3", this.getOptions("scope")).addClass("border-tone-2"), t(".menu-esquerdo .nivel-2").addClass("bg-tone-3"), t(".menu-esquerdo .nivel-2 li", this.getOptions("scope")).hover(function() {
t(this).addClass("bg-tone-5")
}, function() {
t(this).removeClass("bg-tone-5")
}), t(".vitrine-geral li, .vitrine-imagem", this.getOptions("scope")).addClass("border-tone-5"), t(".vitrine-imagem", this.getOptions("scope")).addClass("border-opacity-25"), t("#news", this.getOptions("scope")).addClass("bg-tone-5"), t(".vitrine-geral .preco-de, .vitrine-geral .vitrine-parcela, #news-email", this.getOptions("scope")).addClass("color-tone-7"), t(".vitrine-geral .vitrine-nome", this.getOptions("scope")).addClass("color-tone-9"), this
},
setColorsByPage: function(t) {
switch (t) {
case "catalogo":
case "busca":
this.setVitrine();
break;
case "carrinho":
case "finalizar_dados":
case "finalizar_pagamento":
case "finalizar_finalizar":
case "finalizar_presentes":
case "login_layout":
case "cadastro_layout":
this.setCheckout();
break;
case "produto":
this.setProduto()
}
return this
},
setProduto: function() {
return this.setOptions("scope", t("#Page")), t(".produto-nome, .varTit, #quantidade > label, #ProdAbas a, .produtos-relacionados-text, .cepbox-text, .icon-video", this.getOptions("scope")).addClass("color-tone-1"), t(".varCont").addClass("border-tone-1"), t(".produto-preco, .produto-calcular-frete", this.getOptions("scope")).addClass("bg-tone-5"), t(".produto-preco, .produto-calcular-frete", this.getOptions("scope")).addClass("border-tone-5"), t(".produto-formas-pagamento a", this.getOptions("scope")).addClass("color-tone-6"), t(".produto-dados, .relacionado-preco, .select", this.getOptions("scope")).addClass("color-tone-7"), t(".select, .produto-imagem-miniatura", this.getOptions("scope")).addClass("border-tone-7"), t(".relacionado-nome", this.getOptions("scope")).addClass("color-tone-9"), this
},
setVitrine: function() {
return this.setOptions("scope", t("#Page")), t(".catalogo-nome, .filtros, .visual-type, .visual-type a, .catalogo-pages, .btn-proxima-pagina a, .btn-proxima-pagina, .btn-pagina-anterior, .btn-pagina-anterior a, .nomeProd a", this.getOptions("scope")).addClass("color-tone-1"), t(".catalogo-filtros", this.getOptions("scope")).addClass("bg-tone-1 bg-opacity-15"), t(".catalogo-nome, .catalogo-pagination, #destaqueCatalogo", this.getOptions("scope")).addClass("border-tone-1"), t(".selectedPg", this.getOptions("scope")).addClass("bg-tone-2"), t(".btns-paginator, .btns-paginator a", this.getOptions("scope")).not(".btn-proxima-pagina, .btn-pagina-anterior, .btn-proxima-pagina a, .btn-pagina-anterior a").addClass("color-tone-7"), this
},
setCheckout: function() {
return this.setOptions("scope", t("#Page")), t(".carrinho-tabs li", this.getOptions("scope")).addClass("bg-tone-1"), t(".passo-num, .carrinho-heading, h1, h3", this.getOptions("scope")).addClass("color-tone-1"), t(".carrinho-tabs .passo-num", this.getOptions("scope")).addClass("bg-tone-5"), this
}
};
return this.each(function() {
i.init()
})
}
}(jQuery),
function(t) {
"use strict";
t.fn.formComplete = function() {
t(this).each(function() {
var e, o = [],
i = 0;
t("input, textarea", this).each(function() {
var e = t(this).val();
"" !== t.trim(e) && (o[i++] = e, t(this).focusin(function() {
t.trim(t(this).val()) === e && t(this).val("")
}).focusout(function() {
"" === t.trim(t(this).val()) && t(this).val(e)
}))
}), t(this).submit(function() {
var i = 0;
t("input, textarea", this).each(function() {
var n = t(this).val();
"" !== t.trim(n) && (e = o[i++], n === e && "hidden" !== t(this).attr("type") && t(this).val(""))
})
})
})
}
}(jQuery),
function(t) {
"use strict";
t.fn.subMenus = function(e) {
var o = t.extend({
buttons: ".menu-icons",
container: "li",
subs: ".nivel-2",
tema: "tema_basico",
closeEfect: "slide",
closeSpeedy: "fast",
openSpeedy: "fast",
closeMouseLeave: !1,
classNameClick: "ativa-hover",
iconsMenu: ".menu-icons",
classMenuClosed: "icon-menu-fechado",
classMenuOpen: "icon-menu-aberto",
codIcoAberto: "",
codIcoFechado: "",
link: !1,
closeAll: !1
}, e),
i = this,
n = {
init: function() {
t(i).each(function() {
o.closeMouseLeave && t(o.container, this).mouseleave(function() {
t(this).removeClass(o.classNameClick), n.selectedClose(t(o.subs, this))
}), t(o.buttons, this).click(function() {
var e = t(this).parents(o.container),
i = e.children(o.subs),
a = e.children().children(o.iconsMenu);
return !i.length || (o.closeMouseLeave && e.addClass(o.classNameClick), o.closeAll ? !(!n.isVisible(i) || !o.link) || (n.slideCloseAll(i, a, !0), !1) : n.isVisible(i) ? !!o.link || (n.selectedClose(i, a), !1) : (n.selectedOpen(i, a), !1))
})
})
},
alterIcon: function(e, i) {
i ? (t(o.iconsMenu).removeClass(o.classMenuOpen).addClass(o.classMenuClosed), t(o.iconsMenu).html("" + o.codIcoAberto + "")) : e.hasClass(o.classMenuOpen) ? (e.removeClass(o.classMenuOpen).addClass(o.classMenuClosed), n.lteIE7() && e.html("" + o.codIcoAberto + "")) : (e.removeClass(o.classMenuClosed).addClass(o.classMenuOpen), n.lteIE7() && e.html("" + o.codIcoFechado + ""))
},
isVisible: function(t) {
return t.is(":visible")
},
slideCloseAll: function(e, i, a) {
n.alterIcon(i, !0), "slide" === o.closeEfect ? t(o.subs).slideUp(o.closeSpeedy, function() {
a && n.selectedOpen(e, i)
}) : "fade" === o.closeEfect ? t(o.subs).fadeOut(o.closeSpeedy, function() {
a && n.selectedOpen(e, i)
}) : t(o.subs).hide(o.closeSpeedy, function() {
a && n.selectedOpen(e, i)
})
},
selectedClose: function(t, e) {
n.alterIcon(e, !1), "slide" === o.closeEfect ? t.slideUp(o.openSpeedy) : "fade" === o.closeEfect ? t.fadeOut(o.openSpeedy) : t.hide(o.openSpeedy)
},
selectedOpen: function(t, e) {
n.alterIcon(e, !1), "slide" === o.closeEfect ? t.slideDown(o.openSpeedy) : "fade" === o.closeEfect ? t.fadeIn(o.openSpeedy) : t.show(o.openSpeedy)
},
lteIE7: function() {
var t = navigator.appName,
e = navigator.appVersion,
o = parseFloat(e.indexOf("MSIE")) + 1,
i = parseFloat(e.substring(o + 4, o + 7));
return "Microsoft Internet Explorer" === t && 7 >= i
}
};
return this.each(function() {
n.init()
})
}
}(jQuery),
function(t, e, o, i) {
var n = t(e);
t.fn.lazyload = function(a) {
function r() {
var e = 0;
l.each(function() {
var o = t(this);
if (!d.skip_invisible || o.is(":visible"))
if (t.abovethetop(this, d) || t.leftofbegin(this, d));
else if (t.belowthefold(this, d) || t.rightoffold(this, d)) {
if (++e > d.failure_limit) return !1
} else o.trigger("appear"), e = 0
})
}
var s, l = this,
d = {
threshold: 0,
failure_limit: 0,
event: "scroll",
effect: "show",
container: e,
data_attribute: "original",
skip_invisible: !0,
appear: null,
load: null,
placeholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"
};
return a && (i !== a.failurelimit && (a.failure_limit = a.failurelimit, delete a.failurelimit), i !== a.effectspeed && (a.effect_speed = a.effectspeed, delete a.effectspeed), t.extend(d, a)), s = d.container === i || d.container === e ? n : t(d.container), 0 === d.event.indexOf("scroll") && s.bind(d.event, function() {
return r()
}), this.each(function() {
var e = this,
o = t(e);
e.loaded = !1, (o.attr("src") === i || !1 === o.attr("src")) && o.is("img") && o.attr("src", d.placeholder), o.one("appear", function() {
if (!this.loaded) {
if (d.appear) {
var i = l.length;
d.appear.call(e, i, d)
}
t("").bind("load", function() {
var i = o.attr("data-" + d.data_attribute);
o.hide(), o.is("img") ? o.attr("src", i) : o.css("background-image", "url('" + i + "')"), o[d.effect](d.effect_speed), e.loaded = !0;
var n = t.grep(l, function(t) {
return !t.loaded
});
if (l = t(n), d.load) {
var a = l.length;
d.load.call(e, a, d)
}
}).attr("src", o.attr("data-" + d.data_attribute))
}
}), 0 !== d.event.indexOf("scroll") && o.bind(d.event, function() {
e.loaded || o.trigger("appear")
})
}), n.bind("resize", function() {
r()
}), /(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion) && n.bind("pageshow", function(e) {
e.originalEvent && e.originalEvent.persisted && l.each(function() {
t(this).trigger("appear")
})
}), t(o).ready(function() {
r()
}), this
}, t.belowthefold = function(o, a) {
return (a.container === i || a.container === e ? (e.innerHeight ? e.innerHeight : n.height()) + n.scrollTop() : t(a.container).offset().top + t(a.container).height()) <= t(o).offset().top - a.threshold
}, t.rightoffold = function(o, a) {
return (a.container === i || a.container === e ? n.width() + n.scrollLeft() : t(a.container).offset().left + t(a.container).width()) <= t(o).offset().left - a.threshold
}, t.abovethetop = function(o, a) {
return (a.container === i || a.container === e ? n.scrollTop() : t(a.container).offset().top) >= t(o).offset().top + a.threshold + t(o).height()
}, t.leftofbegin = function(o, a) {
return (a.container === i || a.container === e ? n.scrollLeft() : t(a.container).offset().left) >= t(o).offset().left + a.threshold + t(o).width()
}, t.inviewport = function(e, o) {
return !(t.rightoffold(e, o) || t.leftofbegin(e, o) || t.belowthefold(e, o) || t.abovethetop(e, o))
}, t.extend(t.expr[":"], {
"below-the-fold": function(e) {
return t.belowthefold(e, {
threshold: 0
})
},
"above-the-top": function(e) {
return !t.belowthefold(e, {
threshold: 0
})
},
"right-of-screen": function(e) {
return t.rightoffold(e, {
threshold: 0
})
},
"left-of-screen": function(e) {
return !t.rightoffold(e, {
threshold: 0
})
},
"in-viewport": function(e) {
return t.inviewport(e, {
threshold: 0
})
},
"above-the-fold": function(e) {
return !t.belowthefold(e, {
threshold: 0
})
},
"right-of-fold": function(e) {
return t.rightoffold(e, {
threshold: 0
})
},
"left-of-fold": function(e) {
return !t.rightoffold(e, {
threshold: 0
})
}
})
}(jQuery, window, document),
function(t) {
"function" == typeof define && define.amd ? define(["jquery"], t) : t(window.jQuery || window.Zepto)
}(function(t) {
var e = function(e, o, i) {
var n, a = this,
r = (e = t(e)).val();
o = "function" == typeof o ? o(e.val(), void 0, e, i) : o;
var s = {
invalid: [],
getCaret: function() {
try {
var t, o = 0,
i = e.get(0),
n = document.selection,
a = i.selectionStart;
return n && !~navigator.appVersion.indexOf("MSIE 10") ? ((t = n.createRange()).moveStart("character", e.is("input") ? -e.val().length : -e.text().length), o = t.text.length) : (a || "0" === a) && (o = a), o
} catch (t) {}
},
setCaret: function(t) {
try {
if (e.is(":focus")) {
var o, i = e.get(0);
i.setSelectionRange ? i.setSelectionRange(t, t) : i.createTextRange && ((o = i.createTextRange()).collapse(!0), o.moveEnd("character", t), o.moveStart("character", t), o.select())
}
} catch (t) {}
},
events: function() {
e.on("keyup.mask", s.behaviour).on("paste.mask drop.mask", function() {
setTimeout(function() {
e.keydown().keyup()
}, 100)
}).on("change.mask", function() {
e.data("changed", !0)
}).on("blur.mask", function() {
r === e.val() || e.data("changed") || e.trigger("change"), e.data("changed", !1)
}).on("keydown.mask, blur.mask", function() {
r = e.val()
}).on("focusout.mask", function() {
i.clearIfNotMatch && !n.test(s.val()) && s.val("")
})
},
getRegexMask: function() {
for (var t, e, i, n, r = [], s = 0; s < o.length; s++)(t = a.translation[o[s]]) ? (e = t.pattern.toString().replace(/.{1}$|^.{1}/g, ""), i = t.optional, (t = t.recursive) ? (r.push(o[s]), n = {
digit: o[s],
pattern: e
}) : r.push(i || t ? e + "?" : e)) : r.push(o[s].replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
return r = r.join(""), n && (r = r.replace(RegExp("(" + n.digit + "(.*" + n.digit + ")?)"), "($1)?").replace(RegExp(n.digit, "g"), n.pattern)), RegExp(r)
},
destroyEvents: function() {
e.off("keydown keyup paste drop blur focusout ".split(" ").join(".mask "))
},
val: function(t) {
var o = e.is("input") ? "val" : "text";
return 0 < arguments.length ? (e[o](t), o = e) : o = e[o](), o
},
getMCharsBeforeCount: function(t, e) {
for (var i = 0, n = 0, r = o.length; r > n && t > n; n++) a.translation[o.charAt(n)] || (t = e ? t + 1 : t, i++);
return i
},
caretPos: function(t, e, i, n) {
return a.translation[o.charAt(Math.min(t - 1, o.length - 1))] ? Math.min(t + i - e - n, i) : s.caretPos(t + 1, e, i, n)
},
behaviour: function(e) {
e = e || window.event, s.invalid = [];
var o = e.keyCode || e.which;
if (-1 === t.inArray(o, a.byPassKeys)) {
var i = s.getCaret(),
n = s.val(),
r = n.length,
l = r > i,
d = s.getMasked(),
c = d.length,
u = s.getMCharsBeforeCount(c - 1) - s.getMCharsBeforeCount(r - 1);
return d !== n && s.val(d), !l || 65 === o && e.ctrlKey || (8 !== o && 46 !== o && (i = s.caretPos(i, r, c, u)), s.setCaret(i)), s.callbacks(e)
}
},
getMasked: function(t) {
var e, n, r = [],
l = s.val(),
d = 0,
c = o.length,
u = 0,
p = l.length,
h = 1,
f = "push",
m = -1;
for (i.reverse ? (f = "unshift", h = -1, e = 0, d = c - 1, u = p - 1, n = function() {
return d > -1 && u > -1
}) : (e = c - 1, n = function() {
return c > d && p > u
}); n();) {
var g = o.charAt(d),
v = l.charAt(u),
y = a.translation[g];
y ? (v.match(y.pattern) ? (r[f](v), y.recursive && (-1 === m ? m = d : d === e && (d = m - h), e === m && (d -= h)), d += h) : y.optional ? (d += h, u -= h) : y.fallback ? (r[f](y.fallback), d += h, u -= h) : s.invalid.push({
p: u,
v: v,
e: y.pattern
}), u += h) : (t || r[f](g), v === g && (u += h), d += h)
}
return t = o.charAt(e), c !== p + 1 || a.translation[t] || r.push(t), r.join("")
},
callbacks: function(t) {
var n = s.val(),
a = n !== r,
l = [n, t, e, i],
d = function(t, e, o) {
"function" == typeof i[t] && e && i[t].apply(this, o)
};
d("onChange", !0 === a, l), d("onKeyPress", !0 === a, l), d("onComplete", n.length === o.length, l), d("onInvalid", 0 < s.invalid.length, [n, t, e, s.invalid, i])
}
};
a.mask = o, a.options = i, a.remove = function() {
var t = s.getCaret();
return s.destroyEvents(), s.val(a.getCleanVal()), s.setCaret(t - s.getMCharsBeforeCount(t)), e
}, a.getCleanVal = function() {
return s.getMasked(!0)
}, a.init = function(o) {
o = o || !1, i = i || {}, a.byPassKeys = t.jMaskGlobals.byPassKeys, a.translation = t.jMaskGlobals.translation, a.translation = t.extend({}, a.translation, i.translation), a = t.extend(!0, {}, a, i), n = s.getRegexMask(), !1 === o ? (i.placeholder && e.attr("placeholder", i.placeholder), e.attr("autocomplete", "off"), s.destroyEvents(), s.events(), s.val() != s.getMasked() && (o = s.getCaret(), s.val(s.getMasked()), s.setCaret(o + s.getMCharsBeforeCount(o, !0)))) : (s.events(), s.val(s.getMasked()))
}, a.init(!e.is("input"))
};
t.maskWatchers = {};
var o = function() {
var o = t(this),
n = {},
a = o.attr("data-mask");
return o.attr("data-mask-reverse") && (n.reverse = !0), o.attr("data-mask-clearifnotmatch") && (n.clearIfNotMatch = !0), i(o, a, n) ? o.data("mask", new e(this, a, n)) : void 0
},
i = function(e, o, i) {
i = i || {}, e = t(e).data("mask");
var n = JSON.stringify;
try {
return "object" != typeof e || n(e.options) !== n(i) || e.mask !== o
} catch (t) {}
};
t.fn.mask = function(n, a) {
a = a || {};
var r = this.selector,
s = t.jMaskGlobals,
l = function() {
return i(this, n, a) ? t(this).data("mask", new e(this, n, a)) : void 0
};
t(this).each(l), s.watchInputs && r && "" !== r && (i(this, n, a) || !t.maskWatchers[r]) && (t.maskWatchers[r] = setInterval(function() {
t(document).find(r).each(l)
}, 300)), s.dataMask && t("*[data-mask]").each(o), s.watchDataMask && setInterval(function() {
t(document).find(s.nonInput).filter("*[data-mask]").each(o)
}, 300)
}, t.fn.unmask = function() {
return clearInterval(t.maskWatchers[this.selector]), delete t.maskWatchers[this.selector], this.each(function() {
t(this).data("mask") && t(this).data("mask").remove().removeData("mask")
})
}, t.fn.cleanVal = function() {
return this.data("mask").getCleanVal()
}, t.jMaskGlobals = {
nonInput: "td,span,div",
dataMask: !0,
watchInputs: !0,
watchDataMask: !1,
byPassKeys: [9, 16, 17, 18, 36, 37, 38, 39, 40, 91],
translation: {
0: {
pattern: /\d/
},
9: {
pattern: /\d/,
optional: !0
},
"#": {
pattern: /\d/,
recursive: !0
},
A: {
pattern: /[a-zA-Z0-9]/
},
S: {
pattern: /[a-zA-Z]/
}
}
}
});
var store = store || {};
store = function(t) {
"use strict";
function e() {
var t = i.document.find(i.dataStore);
return !!t.length && void(store.id = t.data(n.data.store))
}
function o(e) {
var o = t(e).find(i.dataModule);
return !!o.length && void o.each(function() {
var o = t(this).data(n.data.module);
return !(!o || !store[o] || "function" !== t.type(store[o].init)) && (store[o].init(e), void console.info("[Store] module [" + o + "] successfully initialized."))
})
}
var i = {
document: t(document),
dataStore: "[data-store]",
dataModule: "[data-module]"
},
n = {
data: {
store: "store",
module: "module"
}
},
a = {
onInit: function(t) {
e(), o(t)
}
};
return {
init: function(t) {
t = t || i.document, a.onInit(t)
},
id: null
}
}(jQuery), jQuery("document").ready(function() {
store.init()
});
var store = store || {};
store.render = function(t) {
"use strict";
function e(e) {
var n = t(e).find(i.dataRender);
return !!n.length && void n.each(function() {
o(t(this))
})
}
function o(e) {
if (!t(e).length || !t(e).data(n.data.render)) return !1;
var o = t(e).data(n.data.render),
a = n.elementUrl + o + "/?loja=" + store.id;
i.document.trigger(n.triggers.renderingElement, t(e)), t(e).load(a, function() {
console.info("[Render] Successfully rendered! (" + o + ")"), i.document.trigger(n.triggers.renderedElement, t(e))
})
}
var i = {
document: t(document),
dataRender: "[data-render]"
},
n = {
elementUrl: "/mvc/store/element/",
data: {
render: "render"
},
triggers: {
renderingElement: "tray:render:rendering_element",
renderedElement: "tray:render:rendered_element"
}
},
a = {
onInit: function(t) {
e(t)
},
onElementRendered: function() {
i.document.on(n.triggers.renderedElement, function(t, e) {
store.init(e)
})
}
};
return {
init: function(t) {
t = t || i.document, a.onInit(t), a.onElementRendered(t)
},
load: o
}
}(jQuery);
var application = application || {};
application.banner = function(t, e) {
"use strict";
function o(t, e) {
d[t] = e
}
function i() {
var t = d.$bannerPopup.data("url"),
e = d.$bannerPopup.data("width"),
o = d.$bannerPopup.data("height"),
i = "width=" + e + ", height=" + o + ", top=" + d.$bannerPopup.data("top") + ", left=" + d.$bannerPopup.data("left");
i += ",scrollbars=no, status=yes, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no", t && e && o && window.open(t, "popup", i)
}
function n() {
o("$galleryThumb", e(".banner-box-list-option")), o("$galleryMain", e(".banner-display-box")), o("$galleryLinks", e("a", d.$galleryMain)), c.thumbClick().mouseOnBanner().bannerClick(), l()
}
function a(t) {
r(t), s(t.siblings())
}
function r(t) {
t.removeClass("disabled")
}
function s(t) {
t.addClass("disabled")
}
function l() {
var t, e = (d.$galleryThumb.length, d.$galleryThumb.not(".disabled"));
setInterval(function() {
e = d.$galleryThumb.not(".disabled"), u.willSlide && (t = e.next(), (e = t.data("item") ? t : d.$galleryThumb.first()).trigger("click"))
}, u.interval)
}
var d = {},
c = {},
u = {
interval: 5e3,
willSlide: !0
};
return c.thumbClick = function() {
return d.$galleryThumb.on("click", function() {
a(e(this));
var t = ".item-" + e(this).data("item");
a(e(t, d.$galleryMain))
}), this
}, c.mouseOnBanner = function() {
return d.$bannerGallery.on("mouseenter", function() {
u.willSlide = !1
}).on("mouseleave", function() {
u.willSlide = !0
}), this
}, c.bannerClick = function() {
return d.$galleryLinks.on("click", function() {
e.ajax({
type: "POST",
url: "/mvc/loja/banners/click/loja:" + application.store,
data: {
banner: e(".banner-content").data("id")
}
})
}), this
}, {
loadModule: function() {
o("$bannerFloating", e("#BannerFlutuante")), o("$bannerPopup", e('[data-banner="popup"]')), o("$bannerGallery", e('[data-banner="gallery"]')), d.$bannerPopup && i(), d.$bannerGallery.length > 0 && n()
},
closeBannerFloating: function() {
d.$bannerFloating.fadeOut()
}
}
}(document, jQuery);
var application = application || {};
application.cart = function(t, e) {
"use strict";
function o() {
e.getJSON(a.cart, {
loja: application.store,
hash: (new Date).getTime()
}, function(t) {
t.cart && i(t.cart)
})
}
function i(t) {
n.cartQuantity && n.cartQuantity.html(t.amount), n.cartTotal && n.cartTotal.html(t.price)
}
var n = {
cartQuantity: e('[data-cart="amount"]'),
cartTotal: e('[data-cart="price"]')
},
a = {
cart: "/mvc/store/cart/count"
};
return {
loadModule: function() {
o()
},
getUrl: function() {
return a
}
}
}(document, jQuery);
var store = store || {};
store.cartPreview = function(t) {
"use strict";
function e(e) {
var o = t(e).find(r.cartPreviewData);
return !!o.length && void o.each(function() {
var o = t(this).data(l.data.cartPreview);
return !(!o || !store.cartPreview[o] || "function" !== t.type(store.cartPreview[o].init)) && (store.cartPreview[o].init(e), void console.info("[CartPreview] module [" + o + "] successfully initialized."))
})
}
function o(e) {
var o = {
acao: "excluir",
id_item: e.data(l.data.cartPreviewDel),
loja: store.id
},
i = "carrinho.php?" + t.param(o),
n = {
loja: o.loja,
callback: i
},
a = "/mvc/store/element/snippets/cart_preview/?" + t.param(n);
r.document.trigger(l.triggers.removingItem, o.id_item), t.get(a).done(function(t) {
console.info("[CartPreview] Successfully deleted item! (" + o.id_item + ")"), r.document.trigger(l.triggers.removedItem, t)
})
}
function i() {
if (!r.document.find(r.cartPreview).length) return !1;
var t = r.document.find(r.cartPreviewLoading);
r.document.find(r.cartPreview).html(t.removeClass(s.trayHide))
}
function n(t) {
return !!r.document.find(r.cartPreview).length && void r.document.find(r.cartPreview).after(t).remove()
}
function a(t, e) {
e || (e = void 0), l.triggers[t + "Modal"] && r.document.find(r.cartModal).length && r.document.trigger(l.triggers[t + "Modal"], e), l.triggers[t + "LightWindow"] && r.document.find(r.cartLightWindow).length && r.document.trigger(l.triggers[t + "LightWindow"], e)
}
var r = {
document: t(document),
cartPreviewData: "[data-cart-preview]",
cartPreview: "[data-cart-preview][data-cart-preview!='modal'][data-cart-preview!='lightwindow']",
cartModal: "[data-cart-preview='modal']",
cartLightWindow: "[data-cart-preview='lightwindow']",
itemDelete: "[data-cart-preview-del]",
cartPreviewLoading: "[data-cart-preview-loading]"
},
s = {
trayHide: "tray-hide"
},
l = {
data: {
cartPreview: "cart-preview",
cartPreviewDel: "cart-preview-del"
},
triggers: {
addingItem: "tray:cart_preview:adding_item",
addedItem: "tray:cart_preview:added_item",
removingItem: "tray:cart_preview:removing_item",
removedItem: "tray:cart_preview:removed_item",
addingItemModal: "tray:cart_preview_modal:adding_item",
addedItemModal: "tray:cart_preview_modal:added_item",
removingItemModal: "tray:cart_preview_modal:removing_item",
removedItemModal: "tray:cart_preview_modal:removed_item",
addingItemLightWindow: "tray:cart_preview_lightwindow:adding_item",
addedItemLightWindow: "tray:cart_preview_lightwindow:added_item",
removingItemLightWindow: "tray:cart_preview_lightwindow:removing_item",
removedItemLightWindow: "tray:cart_preview_lightwindow:removed_item"
}
},
d = {
onInit: function(t) {
e(t)
},
onAddingItemCart: function() {
r.document.on(l.triggers.addingItem, function() {
i(), a("addingItem")
})
},
onAddedItemCart: function() {
r.document.on(l.triggers.addedItem, function(t, e) {
n(e), a("addedItem", e)
})
},
onRemovingItemCart: function() {
r.document.on(l.triggers.removingItem, function() {
i(), a("removingItem")
})
},
onRemovedItemCart: function() {
r.document.on(l.triggers.removedItem, function(t, e) {
n(e), a("removedItem", e)
})
},
onClickItemDelete: function() {
r.document.on("click", r.itemDelete, function() {
o(t(this))
})
}
};
return {
init: function(t) {
t = t || r.document, d.onAddingItemCart(), d.onAddedItemCart(), d.onRemovingItemCart(), d.onRemovedItemCart(), d.onClickItemDelete(), d.onInit(t)
}
}
}(jQuery);
var store = store || {};
store.cartPreview = store.cartPreview || {}, store.cartPreview.modal = function(t) {
"use strict";
function e(o) {
if (o) return setTimeout(function() {
e()
}, o);
var i = t(n.cartModal).find(n.cartModalDialog);
if (!i.length || t(n.cartModal).is(":hidden")) return !1;
var a = window.innerHeight,
r = window.innerWidth,
s = "none";
t(n.cartModalBody, i).css("max-height", s);
var l = t(i).outerHeight(),
d = 600;
if (l > a) {
var c = t(n.cartModalBody, i).outerHeight();
l = (s = a - (l - c) - 60) + (l - c) + 15, t(n.cartModalBody, i).css("max-height", s)
}
var u = {
top: a / 2,
"margin-top": -l / 2,
width: d,
"margin-left": -d / 2
};
d > r && (d = r - 20, u.width = d, u["margin-left"] = -d / 2), i.css(u), console.info("[CartPreview] Modal successfully centralized!")
}
function o() {
if (!n.document.find(n.cartModalBody).length) return !1;
var t = n.document.find(n.cartPreviewLoading);
n.document.find(n.cartModalBody).html(t.removeClass(a.trayHide)), n.document.find(n.cartModalFooter).html("")
}
function i(t) {
return !!n.document.find(n.cartModal).length && (n.document.find(n.cartModal).modal("hide").after(t).remove(), n.document.find(n.cartModal).on("shown.bs.modal", s.onOpenModal).on("hidden.bs.modal", s.onCloseModal).modal("show"), void e(100))
}
var n = {
document: t(document),
window: t(window),
cartModal: "[data-cart-preview='modal']",
cartModalDialog: "[data-cart-modal-dialog]",
cartModalBody: "[data-cart-modal-body]",
cartModalFooter: "[data-cart-modal-footer]",
cartPreviewLoading: "[data-cart-preview-loading]",
body: t("body"),
zopim: []
},
a = {
trayHide: "tray-hide"
},
r = {
data: {
cartPreviewDel: "cart-preview-del"
},
triggers: {
addingItem: "tray:cart_preview_modal:adding_item",
addedItem: "tray:cart_preview_modal:added_item",
removingItem: "tray:cart_preview_modal:removing_item",
removedItem: "tray:cart_preview_modal:removed_item"
}
},
s = {
onAddingItemCart: function() {
n.document.on(r.triggers.addingItem, function() {
o(), t(n.cartModal).on("shown.bs.modal", s.onOpenModal).on("hidden.bs.modal", s.onCloseModal).modal("show"), e(100)
})
},
onAddedItemCart: function() {
n.document.on(r.triggers.addedItem, function(t, e) {
i(e)
})
},
onRemovingItemCart: function() {
n.document.on(r.triggers.removingItem, function() {
o(), e(100)
})
},
onRemovedItemCart: function() {
n.document.on(r.triggers.removedItem, function(t, e) {
i(e)
})
},
onResizeWindow: function() {
n.window.on("resize", function() {
e(200)
})
},
onOpenModal: function() {
768 >= window.innerWidth && (jQuery(".zopim ").hide(), console.info("[CartPreview] Modal opened mobile and chat hidden"))
},
onCloseModal: function() {
768 >= window.innerWidth && (jQuery(".zopim ").show(), console.info("[CartPreview] Modal closed mobile and chat showing"))
}
};
return {
init: function() {
s.onAddingItemCart(), s.onAddedItemCart(), s.onRemovingItemCart(), s.onRemovedItemCart(), s.onResizeWindow()
},
centralize: e
}
}(jQuery);
var store = store || {};
store.continueShopping = function(t) {
"use strict";
function e() {
t(".blocoAlerta").hide(), o(t(s.form).attr("action"), "POST", t(s.form).serialize())
}
function o(e, o, i) {
var n = document.getElementsByTagName("html")[0].getAttribute("data-store");
jQuery.ajax({
url: "/mvc/store/element/snippets/cart_preview/?loja=" + n + "&callback=" + encodeURIComponent(e),
type: o,
data: i,
beforeSend: function() {
t(document).trigger(l.triggers.addingItem)
},
success: function(e) {
t(document).trigger(l.triggers.addedItem, e)
}
})
}
function i() {
return s.checkboxList.attr("data-mandatory-variant") && parseInt(s.menuVars.attr("data-mandatory"))
}
function n() {
return s.giftsContainer.length && parseInt(s.giftsContainer.attr("data-gift-required"))
}
function a(o) {
var a = t(this).find(":checkbox");
s.selectedVariant = t("#selectedVariant"), s.checkboxList = t("#opcoes0 .listaVarMultipla"), s.menuVars = t("#menuVars"), s.giftsContainer = t(".brinde_produto"), s.giftId = t(".brinde_produto #brinde");
var l = t(this).find("#span_erro_carrinho:first");
return i() && !a.is(":checked") && s.selectedVariant.length && !parseInt(s.selectedVariant.val()) ? (l.show(), event.preventDefault(), !1) : n() && !parseInt(s.giftId.val()) ? (l.text(s.giftsContainer.attr("data-gift-required-message")), l.show(), event.preventDefault(), !1) : 1 == r ? (o.stopImmediatePropagation(), e(), !1) : void 0
}
var r = 0,
s = {
form: "#form_comprar",
selectedVariant: t("#selectedVariant"),
checkboxList: t("#opcoes0 .listaVarMultipla"),
menuVars: t("#menuVars")
},
l = {
triggers: {
addingItem: "tray:cart_preview:adding_item",
addedItem: "tray:cart_preview:added_item"
}
},
d = {
addEventContinueShopping: function() {
jQuery(document).on("continue_shopping", function(t, e) {
o(e.action, e.type, e.data)
})
},
getActionContinueShopping: function() {
var e = document.getElementsByTagName("html")[0].getAttribute("data-store");
t.ajax({
type: "POST",
dataType: "json",
url: "/mvc/loja/loja/continueShopping/loja:" + e,
contentType: "application/x-www-form-urlencoded; charset=ISO-8859-1",
success: function(t) {
r = t.action_continue_shopping
}
})
},
buyInCatalog: function() {
jQuery(".button-buy-catalog").on("click", function() {
var t = jQuery(this).attr("item-href");
1 == r ? o(t, "POST", null) : window.location = t
})
}
};
return {
init: function() {
d.getActionContinueShopping(), d.addEventContinueShopping(), d.buyInCatalog(), t("body").on("submit", "#form_comprar", a)
}
}
}(jQuery), jQuery(document).ready(function() {
store.continueShopping.init()
});
var application = application || {};
application.customer = function(t, e) {
"use strict";
function o() {
e.getJSON(a.customer, {
loja: application.store
}, function(t) {
(t = t.data) && i(t)
})
}
function i(t) {
n.customerName && 1 == t.logged ? (n.customerName.html(t.name), n.customerLogged.removeClass("tray-hide")) : n.customerNotLogged && n.customerNotLogged.removeClass("tray-hide")
}
var n = {
customerName: e('[data-customer="name"]'),
customerLogged: e('[data-logged-user="true"]'),
customerNotLogged: e('[data-logged-user="false"]')
},
a = {
customer: "/mvc/store/greeting"
};
return {
loadModule: function() {
o()
},
getUrl: function() {
return a
}
}
}(document, jQuery);
var application = application || {};
application.filter = function(t, e) {
"use strict";
function o(t, e) {
return e ? (a[t] = e, a[t]) : void 0
}
function i(t) {
return a[t] || !1
}
function n() {
var t = i("form"),
e = i("selects");
return !(!t.length || t.length && !e.length)
}
var a = {},
r = {};
return r.submitOnChange = function() {
var t = i("form");
return i("selects").on("change", function() {
"filtrar_marca" == e(this).attr("id") && "" == e(this).val() && e("input[name='marca']").remove(), t.submit()
}), this
}, {
loadModule: function() {
o("form", e("form[data-form='filter']")), o("selects", e("select", i("form"))), n() && r.submitOnChange()
}
}
}(document, jQuery);
var application = application || {};
application.formAjax = function(document, $) {
"use strict";
function init() {
null != elements.modalLink && events.formAjax()
}
function sendData(t) {
t.preventDefault(), elements.formAjax = $("form[data-ajax]");
var e = elements.formAjax.serialize();
$.ajax({
type: "POST",
url: elements.formAjax.attr("action"),
data: e,
success: updateDOM,
beforeSend: function() {
elements.formAjax.find("#send_link").hide(), elements.formAjax.find(".loader").show()
},
complete: function() {
elements.formAjax.find(".loader").hide(), elements.formAjax.find("#send_link").show()
}
})
}
function openModal(event) {
event.preventDefault(), elements.modalTitle.text($(this).attr("data-title")), elements.modalDialog.width($(this).attr("data-modal-width")), elements.modalContent.height($(this).attr("data-modal-height") ? $(this).attr("data-modal-height") : "auto"), elements.modalContent.css("overflow-y", $(this).attr("data-modal-height") ? "auto" : "hidden");
try {
var url = eval($(this).attr("data-url"))
} catch (t) {
var url = $(this).attr("data-url")
}
elements.modalFormIframe.attr("src", url), $.ajax({
type: "GET",
url: url,
dataType: "html",
success: function(t) {
elements.modalContent.html(t)
},
beforeSend: function() {
elements.modalLoader.show()
},
complete: function() {
elements.modalLoader.hide(), centerModalDialog()
}
})
}
function clearModal() {
elements.modalContent.html("")
}
function updateDOM(t) {
elements.modalContent.html(t)
}
function centerModalDialog() {
elements.body.find(".modal-dialog").css({
"margin-top": function() {
return -$(this).outerHeight() / 2
},
"margin-left": function() {
return -$(this).outerWidth() / 2
}
})
}
var elements = {
modalTitle: $(".modal-title"),
modalDialog: $(".modal-dialog"),
modalLoader: $(".modal-body .loader"),
modalContent: $("#modal-form-content"),
modalLink: $('[data-target="#modal-form"]'),
body: $("body"),
modalFormIframe: $("#modal-form-iframe")
},
events = {};
return events.formAjax = function() {
elements.body.on("click", '[data-target="#modal-form"]', openModal), elements.body.on("hidden.bs.modal", ".modal", clearModal), elements.body.on("submit", "form[data-ajax]", sendData), elements.body.on("shown.bs.modal", ".modal", centerModalDialog), $(window).on("resize", centerModalDialog)
}, {
loadModule: init
}
}(document, jQuery);
var status = !0,
application = application || {};
application.login = function(t, e) {
"use strict";
function o() {
e("tray-login").appendTo("body"), e(i.loginBtn).bind("click", function() {
e("tray-login").show()
})
}
var i = {
loginBtn: ".caixa-login .botao-efetuar-login, .caixa-login .bt-efetua-login"
};
return {
loadModule: function() {
o()
}
}
}(document, jQuery);
var application = application || {};
application.payment_options = function(t, e) {
"use strict";
function o() {
e("body").on("hidden.bs.modal", ".modal", function() {
i.modalContent.html("")
})
}
var i = {
container: e("#formasPagto"),
modalSwitch: e("#linkPagParcelado"),
modalLoader: e(".modal-body .loader"),
modalContent: e("#modal-content")
},
n = {
list: ".Forma1 li a",
icons: ".Forma2 li a",
methods1: ".Forma1 li",
modalDialog: e(".modal-dialog")
},
a = {};
return a.toggle = function() {
i.container.on("click", n.list, function(t) {
t.preventDefault(), e(this).next().toggle()
}), i.container.on("click", n.icons, function(t) {
t.preventDefault();
var o = e(this).data("target");
e(n.methods1).hide(), e(o).parent().show()
})
}, a.modal = function() {
o(), i.container.on("click", "#linkPagParcelado", function(t) {
t.preventDefault();
var o = e(this).attr("data-modal-width");
e.ajax({
type: "GET",
url: e(this).attr("data-url"),
dataType: "html",
success: function(t) {
i.modalContent.html(t)
},
beforeSend: function() {
n.modalDialog.width(o), i.modalLoader.show()
},
complete: function() {
i.modalLoader.hide()
}
})
})
}, {
loadModule: function() {
a.toggle(), a.modal()
}
}
}(document, jQuery);
var application = application || {};
application.product = function(t, e) {
"use strict";
function o() {
var t = localStorage.getItem("data-exhibition");
t && e('[data-exhibition="' + t + '"]').trigger("click")
}
function i() {
var t = h.container.size(),
e = h.btnList.size() || h.btnGallery.size();
return t && e
}
function n(t) {
var e = t.attr("data-class"),
o = h.btnGallery.attr("data-class");
o = o + " " + o + "-" + h.btnGallery.attr("data-columns"), h.container.addClass(e), h.container.removeClass(o), localStorage.setItem("data-exhibition", t.attr("data-exhibition"))
}
function a(t) {
var e = h.btnList.attr("data-class"),
o = t.attr("data-class");
o = o + " " + o + "-" + t.attr("data-columns"), h.container.addClass(o), h.container.removeClass(e), localStorage.setItem("data-exhibition", t.attr("data-exhibition"))
}
function r() {
var t, o;
e.get("/loja/funcoes/session_comparacao.php", function(i) {
JSON.parse(i), localStorage.setItem("products-compared", i), m = JSON.parse(localStorage.getItem("products-compared")) || [];
for (var n = h.compareLinksVisible.length - 1; n >= 0; n--) t = e(h.compareLinksVisible[n]), o = e(h.compareLinks, t), s(t)
})
}
function s(t) {
var e = p(c(t.attr("href")), "id_produto"),
o = t.data("compare"),
i = m.indexOf(e) > -1;
(i && "add" == o || !i && "remove" == o) && u(t)
}
function l(t) {
var o = c(t.attr("href")),
i = t.data("compare");
e.post(t.attr("href"), o, function() {
"add" == i ? -1 === m.indexOf(o.id_produto) && m.push(o.id_produto) : m.splice(m.indexOf(o.id_produto), 1), d(), u(t)
})
}
function d() {
localStorage.setItem("products-compared", JSON.stringify(m))
}
function c(t) {
var o = {},
i = t.split("/").reverse()[0].split("?")[1].split("&");
return e.each(i, function(t, e) {
var i = e.split("=");
o[i[0]] = i[1]
}), o
}
function u(t) {
var e = "compare-hidden";
t.toggleClass(e), t.siblings("[data-compare]").toggleClass(e)
}
function p(t, e) {
return t[e] || !1
}
var h = {
btnList: e("[data-exhibition='list']"),
btnGallery: e("[data-exhibition='gallery']"),
container: e("[data-exhibition='container']"),
compareLinks: e("[data-compare]"),
compareLinksVisible: e("[data-compare]:visible"),
formComments: e("#form-comments"),
formBuy: e("#form_comprar"),
errorContainer: e(".blocoAlerta"),
modalForm: e("#modal-form"),
modal: e(".modal-dialog"),
showPaymentMethodsLink: e("#showPaymentMethods")
},
f = {},
m = [],
g = {
events: function() {
g.acceptTerm(), g.buildShowPaymentMethodsLink()
},
acceptTerm: function() {
e(h.modal).on("click", "#acceptTerm", function() {
return !!e("#aceita_termo").is(":checked") && (h.modalForm.modal("hide"), void h.formBuy.submit())
})
},
buildShowPaymentMethodsLink: function() {
var t = window.location.href.split("#")[0];
h.showPaymentMethodsLink.attr("href", t + "#formaPagto")
}
},
v = {
elements: {
form: e("#form-comments"),
error: e(".blocoAlerta"),
success: e(".blocoSucesso"),
btnSubmit: e("#bt-submit-comments"),
ratingStars: e(".stars .starn"),
rate: e("#rate"),
container: e("#comentario_cliente"),
rest: e("#restante"),
inputs: {
comment: e("#mensagem_coment"),
rating: e("#nota_comentario")
}
},
events: function() {
v.elements.btnSubmit.click(function(t) {
t.preventDefault(), v.elements.form.submit()
}), v.elements.form.submit(function(t) {
t.preventDefault(), v.isValid() && v.submit()
}), v.elements.ratingStars.click(function() {
v.elements.rate.html(e(this).data("message")), v.elements.inputs.rating.val(e(this).data("id"))
}), v.elements.inputs.comment.keyup(function() {
var t = 512 - e(this).val().length;
return 0 > t ? (e(this).val(e(this).val().substring(0, 512)), !1) : void v.elements.rest.html(t)
})
},
submit: function() {
e.ajax({
type: "POST",
dataType: "json",
url: v.elements.form.attr("action"),
data: v.elements.form.serializeArray(),
success: function() {
v.elements.success.show(), v.elements.container.hide()
}
})
},
isValid: function() {
return v.elements.error.html("").hide(), v.elements.form.find(":input").each(function() {
return e(this)[0].checkValidity() ? void 0 : void v.elements.error.html(e(this).attr("data-message")).show()
}), v.elements.form[0].checkValidity()
}
};
return f.setExhibitionType = function() {
h.btnList.on("click", function(t) {
t.preventDefault(), n(e(this))
}), h.btnGallery.on("click", function(t) {
t.preventDefault(), a(e(this))
})
}, f.onCompare = function() {
h.compareLinks.on("click", function(t) {
t.preventDefault(), l(e(this))
})
}, {
loadModule: function() {
i() && (f.setExhibitionType(), o()), h.compareLinks.length > 0 && (r(), f.onCompare()), g.events(), v.events()
}
}
}(document, jQuery);
var application = application || {};
application.productBuyForm = function(t, e) {
"use strict";
function o() {
var t = a.discountContent.attr("data-url");
return !(!t || 0 == t.length) && void e.ajax({
type: "GET",
url: t,
success: function(t) {
a.discountContent.length && a.discountContent.replaceWith(t)
},
dataType: "html"
})
}
function i() {
return a.checkboxList.attr("data-mandatory-variant") && parseInt(a.menuVars.attr("data-mandatory"))
}
function n() {
return a.giftsContainer.length && parseInt(a.giftsContainer.attr("data-gift-required"))
}
var a = {
body: e("body"),
productBuy: e("#button-buy"),
checkboxList: e("#opcoes0 .listaVarMultipla"),
discountContent: e("#product-discount-content"),
loadingProductContainer: e("#loading-product-container"),
selectedVariant: e("#selectedVariant"),
menuVars: e("#menuVars"),
giftsContainer: e(".brinde_produto"),
giftId: e(".brinde_produto #brinde")
},
r = {};
return r.productBuyForm = function() {
a.productBuy.on("click", function() {
if (i()) {
var t = e(this).parents("form:first").find(":checkbox"),
o = t.get(0);
o.setCustomValidity(a.checkboxList.attr("data-mandatory-message")), t.is(":checked") && o.setCustomValidity("")
}
}), a.body.on("submit", "#form_comprar", function(t) {
var o = e(this).find(":checkbox"),
r = e(this).find("#span_erro_carrinho:first");
return !i() || o.is(":checked") || parseInt(a.selectedVariant.val()) ? !(n() && !parseInt(a.giftId.val())) || (r.text(a.giftsContainer.attr("data-gift-required-message")), r.show(), t.preventDefault(), !1) : (r.show(), t.preventDefault(), !1)
})
}, {
loadModule: function() {
o(), r.productBuyForm()
}
}
}(document, jQuery);
var application = application || {};
application.productCompare = function(t, e) {
"use strict";
function o(t, o) {
return !(!t || 0 == t.length) && void e.ajax({
type: "POST",
url: t,
data: o,
success: function(t) {
"object" === e.type(t) && e(location).attr("href", t.redirect)
},
dataType: "json"
})
}
function i(t) {
t.preventDefault ? t.preventDefault() : t.returnValue = !1, data = {
product_id: a.productToCompareLink.attr("data-product-id"),
category_id: a.productToCompareLink.attr("data-category-id")
}, o(n(a.compareProduct.prop("checked")), data)
}
function n(t) {
var e = "";
return e = t ? "addToCompare" : "removeFromCompare", a.productToCompareLink.attr("data-url").printf(e)
}
var a = {
productToCompareLink: e("#productToCompareLink"),
compareProduct: e("#compareProduct")
},
r = {};
return r.compare = function() {
a.compareProduct.change(function(t) {
i(t)
})
}, {
loadModule: function() {
null != a.compareProduct && r.compare()
}
}
}(document, jQuery);
var application = application || {};
application.productGallery = function(t, e) {
"use strict";
function o() {
f = {
modalTitle: e(".modal-title"),
modalDialog: e(".modal-dialog"),
productPhoto: e("#foto_p"),
modalLoader: e(".modal-body .loader"),
modalContent: e("#modal-content"),
galleryCarousel: e("#carousel"),
imgViewNoImage: e("#imgViewNoImage"),
imgThumb: e(".thumbPic"),
body: e("body"),
photoTab: e("#abaFoto"),
videoTab: e("#abaVideo"),
imgLinks: e(".imgLinks")
}
}
function i() {
e("body").on("hidden.bs.modal", ".modal", function() {
f.modalContent.html("")
})
}
function n() {
e("body").on("click", "#fotoabas ul li", function() {
var t = e(".fullGallery");
t.hide(), t.eq(e(this).index()).show()
})
}
function a() {
f.productPhoto.ready(function() {
"undefined" != typeof imgViewNoImage && f.productPhoto.removeAttr("data-toggle")
})
}
function r(t) {
var o = e(t.relatedTarget);
"foto_p" == o.attr("id") && (s(o), u())
}
function s(t) {
f.modalTitle.text(t.attr("data-title")), f.modalDialog.width(t.attr("data-modal-width")), e.ajax({
type: "GET",
url: t.attr("data-url"),
dataType: "html",
success: function(t) {
f.modalContent.html(t)
},
beforeSend: function() {
f.modalLoader.show()
},
complete: function() {
f.modalLoader.hide(), u()
}
})
}
function l() {
f.imgLinks.on("click", function() {
s(e(this))
})
}
function d() {
f.galleryCarousel.children().size() > 4 && f.galleryCarousel.hasClass("jcarousel-skin-tango") && f.galleryCarousel.jcarousel({
itemFallbackDimension: 300
})
}
function c() {
return e(".cloud-zoom, .cloud-zoom-gallery").length > 0 ? null : void f.imgThumb.on("click", function() {
var t = e("#foto_p span");
t.hide(), t.eq(e(this).index()).show()
})
}
function u() {
f.body.find(".modal-dialog").css({
"margin-top": function() {
return -e(this).outerHeight() / 2
},
"margin-left": function() {
return -e(this).outerWidth() / 2
}
})
}
function i() {
f.modalContent.html("")
}
function p(t, o) {
return !o.is(":visible") && (e("#visualBlock .conteudo").hide(), e("#visualBlock .aberta").attr("class", ""), o.show(), void t.attr("class", "aberta"))
}
function h() {
f.photoTab.on("click", function() {
p(e(this), e("#colFotos"))
}), f.videoTab.on("click", function() {
p(e(this), e("#colVideo"))
})
}
var f = {},
m = {};
return m.productGallery = function() {
l(), a(), n(), i(), c(), h(), f.body.on("shown.bs.modal", ".modal", r), e(window).on("resize", u), f.body.on("hidden.bs.modal", ".modal", i)
}, {
loadModule: function() {
o(), null != f.productPhoto && null != f.imgThumb && m.productGallery(), null != f.galleryCarousel && d()
}
}
}(document, jQuery);
var application = application || {};
application.productHistory = function(t, e) {
"use strict";
function o(t) {
t.preventDefault();
var o = e(this).attr("href");
e.get(o, function(t) {
r.products.replaceWith(t), a()
})
}
function i(t) {
t.preventDefault();
var o = e(this).attr("href");
e.get(o, function() {
r.historyContainer.remove()
})
}
function n() {
var t = (new Date).getTime();
e.post("/mvc/loja/navegacao/index/loja:" + application.store + "/" + t, {
pagina: l.page,
parametro: l.param
}, function(t) {
0 == e(t).filter("#NavVisitados").length ? r.historyContainer.html(t) : r.historyContainer.replaceWith(t), a()
})
}
function a() {
r.historyContainer = e("#NavVisitados"), r.pageLinks = e(".visitados .linksPag a"), r.clearHistory = e(".visitados #clearHistory"), r.products = e(".visitados #visitados_prod"), r.pageLinks.click(o), r.clearHistory.click(i)
}
var r = {
historyContainer: e("#NavVisitados")
},
s = {},
l = {
page: e("#NavVisitados").attr("data-page"),
param: e("#NavVisitados").attr("data-param")
};
return s.productHistory = function() {
n()
}, {
loadModule: function() {
s.productHistory()
}
}
}(document, jQuery);
var application = application || {};
application.productKit = function(t, e) {
"use strict";
var o = {
trayKitList: ".tray-kit-list",
btnShowAllProductsKit: '[data-id="show-all-products-kit"]'
},
i = {
minimizeElement: function() {
e(o.btnShowAllProductsKit).hide(), e(o.trayKitList + " li").length <= 3 || e(o.trayKitList + " [data-has-variant]").length > 0 || (e(o.btnShowAllProductsKit).show(), e(o.trayKitList + " [data-minimize-block]").hide())
},
maximizeElement: function() {
e(o.btnShowAllProductsKit).on("click", function() {
e(o.trayKitList + " [data-minimize-block]").show(), e(o.btnShowAllProductsKit).hide()
})
}
};
return {
loadModule: function() {
i.minimizeElement(), i.maximizeElement()
}
}
}(document, jQuery);
var application = application || {};
application.letmeknow = function(t, e) {
"use strict";
function o() {
n = {
letMeKnowSubmit: e("#letMeKnow"),
letMeKnowMail: e("#email_avise"),
letMeKnowError: e("#div_erro"),
selectedVariant: e("#selectedVariant"),
letmeknowSuccess: e("#nao_disp")
}
}
function i(t, o) {
return !(!t || 0 == t.length) && void e.ajax({
type: "POST",
url: t,
data: o,
beforeSend: function() {
n.letMeKnowError.html(""), n.letMeKnowError.hide()
},
success: function(t) {
n.letmeknowSuccess.html(t)
},
statusCode: {
500: function(t) {
n.letMeKnowError.html(t.responseText), n.letMeKnowError.show()
}
},
dataType: "html"
})
}
var n = {},
a = {};
return a.letmeknow = function() {
n.letMeKnowSubmit.on("click", function(t) {
t.preventDefault();
var e = {
product_id: n.letMeKnowSubmit.attr("data-product-id"),
email: n.letMeKnowMail.val()
};
if (n.selectedVariant.length > 0) {
var o = n.selectedVariant.val();
e.variant_id = o
}
i(n.letMeKnowSubmit.attr("data-url"), e)
})
}, {
loadModule: function() {
o(), a.letmeknow()
}
}
}(document, jQuery);
var application = application || {};
application.productSteps = function(t) {
"use strict";
function e() {
t(".passo1").each(function() {
t(this).addClass("passo"), t(this).removeClass("passo1")
}), t(".passo2").each(function() {
t(this).addClass("passo"), t(this).removeClass("passo2")
}), t(".passo3").each(function() {
t(this).addClass("passo"), t(this).removeClass("passo3")
})
}
function o() {
e(), t(".passo").each(function(e) {
t(this).addClass("passo" + (e + 1)), t(this).removeClass("passo")
})
}
return {
loadModule: function() {
o()
},
setSteps: o
}
}(jQuery);
var application = application || {};
application.productTab = function(t, e) {
"use strict";
function o(t) {
t.preventDefault(), s.tabLink.parents("ul").children("li").removeClass("aberta"), e(this).parent().addClass("aberta");
var o = e(this).attr("data-tab-container-id");
s.tabContainer = e(o), n(s.tabContainer, e(this).attr("data-tab-url"))
}
function i() {
s.tabLink.parents("ul").children("li").removeClass("aberta"), s.paymentTabLink.parents("li").addClass("aberta"), s.tabContainer = e("#formasPagto"), n(s.tabContainer, s.paymentTabLink.attr("data-tab-url"))
}
function n(t, o) {
return o && 0 != o.length ? void e.ajax({
type: "GET",
url: o,
dataType: "html",
success: function(e) {
t.html(e)
},
beforeSend: function() {
s.tabLoading.show(), t.children(".loader").show()
},
complete: function() {
s.tabLoading.hide(), a(t)
}
}) : (a(t), !1)
}
function a(t) {
t.children(".loader").hide(), s.tabContainers.hide(), t.show()
}
function r() {
s.tabContainers.hide(), s.tabLink.first().trigger("click")
}
var s = {
tabLink: e('#ProdBlock:not(.relProdBox) ul li[id^="Aba"] a'),
tabContainers: e("#ProdBlock:not(.relProdBox) > .prodBox"),
linkShowPaymentMethods: e("#showPaymentMethods"),
paymentTabLink: e('a[data-tab-container-id="#formasPagto"]'),
tabLoading: e("#loading-tab-container")
},
l = {};
return l.tabs = function() {
s.tabLink.on("click", o), s.linkShowPaymentMethods = e("#showPaymentMethods"), s.linkShowPaymentMethods.on("click", i), r()
}, {
loadModule: function() {
null != s.tabLink && null != s.tabContainers && l.tabs()
}
}
}(document, jQuery);
var application = application || {};
application.search = function(t, e) {
"use strict";
function o(t, e) {
return e ? (g[t] = e, !0) : void 0
}
function i(t) {
return g[t] || !1
}
function n() {
o("$suggestionForm", e('form[data-search="suggestion"]')), o("$suggestionInput", e('input[data-input="suggestion"]', i("$suggestionForm")))
}
function a(t) {
if (t.length > 0) {
if (t.is("input")) {
var e = t.attr("type");
return "text" === e || "search" === e
}
if (t.is("form") && "suggestion" === t.data("search")) return !0
}
}
function r(t) {
t.length > 1 && (clearInterval(m), m = setTimeout(function() {
e.getJSON(y + t, {
loja: application.store
}, function(t) {
var e = t.suggestions;
try {
if (!e || 1 != e.status) throw e.message;
s(e.html)
} catch (t) {
console.error(t)
}
})
}, 300))
}
function s(t) {
o("$suggestionContainer", e('[data-container="suggestion"]')), i("$suggestionContainer").length > 0 ? d(t) : l(t), h()
}
function l(t) {
i("$suggestionInput").parent().append(t)
}
function d(t) {
i("$suggestionContainer").replaceWith(t)
}
function c() {
var t = i("$suggestionForm");
t && t.submit()
}
function u() {
i("$suggestionInput").attr("autocomplete", "off")
}
function p(t) {
o("$suggestionContainer", e('[data-container="suggestion"]', i("$suggestionForm")));
var n, a = e(".suggestion-words .slcted", i("$suggestionContainer")),
r = "slcted";
a.size() || (a = e(".suggestion-words span:first", i("$suggestionContainer"))).addClass(r), t === w ? n = a.next("span") : t === b && (n = a.prev("span")), n.size() && (a.removeClass(r), n.addClass(r), f(n.html()))
}
function h() {
e(".suggestion-words span").click(function() {
f(e(this).html()), c()
})
}
function f(t) {
i("$suggestionInput").val(t)
}
var m, g = {},
v = {},
y = "/mvc/store/elastic/suggestions/get/",
b = 38,
w = 40;
return v.onKeyUp = function() {
var t, o = i("$suggestionInput");
return navigator.userAgent.match(/Android/i) ? o.bind("input", function(t) {
r(e(t.target).val())
}) : o.bind("keyup", function(o) {
o.keyCode >= 48 && o.keyCode <= 105 || 8 === o.keyCode ? (t = e(this).val(), r(t)) : 13 === o.keyCode ? i("$suggestionForm").find('button[type="submit"]').length : (o.keyCode === w || o.keyCode === b) && p(o.keyCode)
}), this
}, v.focusOut = function() {
return i("$suggestionInput").bind("focusout", function() {
clearInterval(m), m = null, setTimeout(function() {
e('[data-container="suggestion"]', i("$suggestionForm")).addClass("is-hidden")
}, 300)
}), this
}, {
loadModule: function() {
return n(), !(!a(i("$suggestionForm")) || !a(i("$suggestionInput"))) && (v.onKeyUp().focusOut(), void u())
},
isValidElement: a
}
}(document, jQuery);
var application = application || {};
application.shipping = function(t, e) {
"use strict";
function o(t) {
t.attr("data-toggle", ""), t.attr("data-target", ""), p.spanZipError.hide(), p.spanVariantError.hide()
}
function i(t) {
t.attr("data-toggle", "modal"), t.attr("data-target", "#modal")
}
function n(t) {
e.ajax({
type: "GET",
url: t,
dataType: "html",
success: function(t) {
p.modalContent.html(t)
},
beforeSend: function() {
p.modalLoader.show()
},
complete: function() {
p.modalLoader.hide(), u()
}
})
}
function a() {
p.modalContent.html("")
}
function r() {
var t = p.variants.find(":radio");
return t.length <= 0 || !!t.is(":checked")
}
function s() {
var t = !0,
e = p.variants.find("select");
return e.length <= 0 || (e.each(function(e, o) {
t = !(o.value.length <= 0)
}), t)
}
function l() {
return p.variants.length <= 0 || (!p.variants.attr("data-mandatory") || !(!r() || !s()))
}
function d() {
return l() ? !(p.zipCode1.val().length < 5 || p.zipCode2.val().length < 3) || (p.spanZipError.show(), !1) : (p.spanVariantError.show(), !1)
}
function c(t) {
t.val().length == t.attr("maxlength") && t.next().focus()
}
function u() {
p.modal.find(".modal-dialog").css({
"margin-top": function() {
return -e(this).outerHeight() / 2
},
"margin-left": function() {
return -e(this).outerWidth() / 2
}
})
}
var p = {
modal: e("#modal"),
modalTitle: e(".modal-title", "#modal"),
modalDialog: e(".modal-dialog", "#modal"),
btnShippingSimulator: e("#shippingSimulatorButton"),
modalLoader: e(".modal-body .loader", "#modal"),
modalContent: e("#modal-content", "#modal"),
spanZipError: e("#span_erro_cep"),
spanVariantError: e("#span_erro_variacao"),
zipCode1: e('[data-app="product.zip1"]'),
zipCode2: e('[data-app="product.zip2"]'),
amount: e("#quant"),
variants: e("#menuVars"),
buttonbuy: e("#button-buy"),
body: e("body")
},
h = {
amount: "#quant"
},
f = {};
return f.shippingSimulator = function() {
p.btnShippingSimulator.on("click", function() {
p.amount = e(h.amount);
var t = p.amount.length > 0 ? p.amount.val() : "1";
try {
a = e(this).attr("data-url").printf(p.zipCode1.val(), p.zipCode2.val(), t)
} catch (o) {
var a = e(this).attr("data-url").printf(p.zipCode1.val(), p.zipCode2.val(), t, "")
}
o(e(this)), d() && (i(e(this)), p.modalTitle.text(e(this).attr("data-title")), p.modalDialog.width(e(this).attr("data-modal-width")), n(a))
}), p.zipCode1.on("keyup", function() {
c(e(this))
}), p.zipCode2.on("keyup", function() {
c(e(this))
}), p.body.on("shown.bs.modal", "#modal", u), e(window).on("resize", u), p.body.on("hidden.bs.modal", "#modal", a)
}, {
loadModule: function() {
p.btnShippingSimulator.length > 0 && f.shippingSimulator()
}
}
}(document, jQuery);
var application = application || {};
application.svgFixer = function(t, e) {
"use strict";
function o() {
t.addEventListener("DOMContentLoaded", function() {
var o = e.location.href.replace(e.location.hash, "");
[].slice.call(t.querySelectorAll("use[*|href]")).filter(function(t) {
return 0 === t.getAttribute("xlink:href").indexOf("#")
}).forEach(function(t) {
t.setAttribute("xlink:href", o + t.getAttribute("xlink:href"))
})
}, !1)
}
return {
loadModule: function() {
o()
}
}
}(document, window);
var application = application || {};
application.variant = function(t, e) {
"use strict";
function o() {
j = {
body: e("body"),
labelRadioButtons: e(".lista-radios-input"),
priceBox: e("#product-priceBox"),
galleryBox: e("#visualBlock"),
formBox: e("#product-form-box"),
loadingProductContainer: e("#loading-product-container"),
shippingSimulatorButton: e("#shippingSimulatorButton"),
selectedVariant: e("#selectedVariant"),
variation_first_select: e("#variation_first_select"),
variation_second_select: e("#variation_second_select"),
menuVars: e("#menuVars[data-product-id]"),
tabLink: e("#ProdAbas ul li a"),
tabContainers: e(".prodBox").not("#descricao"),
linkShowPaymentMethods: e("#showPaymentMethods"),
paymentTabLink: e('a[data-tab-container-id="#formasPagto"]'),
zoomElement: e(".cloud-zoom, .cloud-zoom-gallery"),
showSizeAndColorType: e(".show_size_and_color_type"),
showSizeAndColorSecondaryType: e("#show_size_and_color_secondary_type"),
showSizeAndColorSelectedVariant: e("#show_size_and_color_main_type .lista_cor_variacao li .cor_selecionada"),
colorVariant: e("#show_size_and_color_main_type img.color_variant"),
buyVariantWithPhraseSelectedVariant: e("#buyVariantWithPhraseSelectedVariant"),
referenceCode: e("#product-reference"),
negociationContent: e("#negociar"),
wishListBox: e("#bloco-add-lista"),
variantBonus: e(".produto-bonus")
}
}
function i() {
if (T = j.shippingSimulatorButton.attr("data-url"), $ = j.paymentTabLink.attr("data-tab-url"), j.negociationContent.length > 0) {
var t = j.negociationContent.children();
x = t.first().attr("data-url")
}
j.wishListBox.find("a").each(function(t) {
_[t] = e(this).attr("href")
})
}
function n() {
j.labelRadioButtons.length > 0 && k(j.labelRadioButtons), j.variation_first_select.val() && b(j.variation_first_select), j.showSizeAndColorSelectedVariant.length > 0 && C(j.showSizeAndColorSelectedVariant.parent())
}
function a(t, o, i, n, a) {
return !(!t || 0 == t.length) && void e.ajax({
type: "GET",
url: t,
data: o,
success: a,
beforeSend: i,
complete: n,
dataType: "html"
})
}
function r(t) {
var o = j.referenceCode.attr("data-url");
return !(!o || 0 == o.length) && e.ajax({
type: "GET",
url: o,
data: {
variant_id: t,
product_id: j.menuVars.attr("data-product-id")
},
success: function(t) {
e.trim(t).length > 0 ? (j.referenceCode.html(t), j.referenceCode.parent().show()) : j.referenceCode.parent().hide()
},
dataType: "html"
})
}
function s(t) {
var o = j.menuVars.attr("data-url-gallery");
return !(!o || 0 == o.length) && e.ajax({
type: "GET",
url: o,
data: {
variant_id: t,
product_id: j.menuVars.attr("data-product-id")
},
success: function(t) {
e.trim(t).length > 0 && j.galleryBox.html(t), application.productGallery.loadModule()
},
dataType: "html"
})
}
function l(t) {
j.loadingProductContainer.show(), e.when(s(t)).then(function() {
j.loadingProductContainer.hide(), o(), j.linkShowPaymentMethods.addClass("color-tone-6"), j.zoomElement.length > 0 && j.zoomElement.CloudZoom(), application.productSteps.setSteps()
}, function() {
j.loadingProductContainer.hide()
})
}
function d(t) {
var o = j.priceBox.attr("data-url-pricebox");
return !(!o || 0 == o.length) && e.ajax({
type: "GET",
url: o,
data: {
variant_id: t,
product_id: j.menuVars.attr("data-product-id")
},
success: function(t) {
j.priceBox.html(t), application.letmeknow.loadModule(), j.variantBonus.html(e(t).find(".produto-bonus").html()), "undefined" != typeof InformacaoAdicional && null !== InformacaoAdicional.params && InformacaoAdicional.calculaPrecoProduto(), "function" == typeof application.variant.productAdditionalInformation && application.variant.productAdditionalInformation(t)
},
dataType: "html"
})
}
function c(t) {
var o = j.formBox.attr("data-url-form");
return !(!o || 0 == o.length) && e.ajax({
type: "GET",
url: o,
data: {
variant_id: t,
product_id: j.menuVars.attr("data-product-id")
},
success: function(t) {
j.formBox.html(t)
},
dataType: "html"
})
}
function u(t) {
if (void 0 != x) {
var e = x + t;
j.negociationContent.children().first().attr("data-url", e)
}
}
function p(t) {
if (void 0 != T) {
var e = T.printf("%s", "%s", "%s", t);
j.shippingSimulatorButton.attr("data-url", e)
}
}
function h(t) {
_.length && j.wishListBox.find("a").each(function(o) {
var i = _[o].printf(t);
e(this).attr("href", i)
})
}
function f() {
j.paymentTabLink.parents("li:first").hasClass("aberta") && j.paymentTabLink.click()
}
function m(t) {
if (void 0 !== $) {
var e = $.printf(t);
j.paymentTabLink.attr("data-tab-url", e)
}
}
function g(t) {
j.selectedVariant.val(t)
}
function v(t) {
void 0 !== t && (j.buyVariantWithPhraseSelectedVariant.val("|" + t + "|"), g(t), y(t), p(t), h(t), u(t), m(t), r(t), f())
}
function y(t) {
j.loadingProductContainer.show(), e.when(s(t), d(t), c(t)).then(function() {
j.loadingProductContainer.hide(), o(), j.linkShowPaymentMethods.addClass("color-tone-6"), j.zoomElement.length > 0 && j.zoomElement.CloudZoom(), application.productSteps.setSteps()
}, function() {
j.loadingProductContainer.hide()
})
}
function b(t) {
return j.variation_second_select.length <= 0 ? void v(t.val()) : void w(t)
}
function w(t) {
var e = t.val();
a(t.attr("data-url"), {
variant: e,
product_id: j.menuVars.attr("data-product-id")
}, function() {
j.variation_second_select.html("")
}, function() {}, function(t) {
j.variation_second_select.html(t)
})
}
function k(t) {
if (S(t)) {
var o = e(t).find(":checked");
e("ul.lista_radios li").removeClass("selecionada"), o.closest("li").addClass("selecionada"), v(o.val())
}
}
function C(t) {
S(t) && v(t.attr("data-id"))
}
function S(t) {
return !(j.showSizeAndColorSecondaryType.length > 0 && 0 == t.parents("#show_size_and_color_secondary_type").length)
}
var T, $, x, j = {},
A = {},
_ = [];
return A.variant = function() {
j.labelRadioButtons.on("change", function() {
k(e(this))
}), j.variation_first_select.change(function() {
b(e(this))
}), j.body.on("change", "#second_dropdown", function() {
v(e(this).val())
}), j.body.on("click", "#showPaymentMethods", function() {
j.paymentTabLink.trigger("click")
}), j.showSizeAndColorType.on("click", ".lista_cor_variacao li", function() {
C(e(this))
}), j.colorVariant.on("click", function() {
l(e(this).attr("data-id"))
})
}, {
loadModule: function() {
o(), i(), A.variant(), n(), f()
}
}
}(document, jQuery);
var application = application || {};
application.variantKit = function(t, e) {
"use strict";
function o(t) {
f = t
}
function i() {
return f
}
function n(t) {
e("ul.lista_radios li", i()).removeClass(g.selected), t.closest("li").addClass(g.selected)
}
function a(t) {
var e = t.parents(m.showSizeAndColorType);
e.find("#cor_nome").text("( " + t.attr("data-title") + " )"), e.find("ul li [id^=cor]").removeClass(g.selectedColor), t.find("[id^=cor]").addClass(g.selectedColor)
}
function r(t, o) {
return e(m.variationSecondSelect, i()).length <= 0 ? void s(t) : void l(t, o)
}
function s(t) {
void 0 !== t && e(m.selectedVariant, i()).val(t)
}
function l(t, o) {
e.ajax({
type: "GET",
url: o,
data: {
variant: t,
product_id: i().attr("data-product-id"),
product_kit_id: i().attr("data-product-kit-id")
},
beforeSend: function() {
e(m.variationSecondSelect, i()).html("")
},
success: function(t) {
e(m.variationSecondSelect, i()).html(t), v.variants()
},
dataType: "html",
async: !1
})
}
function d(t) {
var o = !1;
return e(m.selectedVariant).each(function() {
return e(this).val() ? void 0 : (o = !0, !1)
}), !o || (e("#form_comprar").find("#span_erro_carrinho_kit").show(), t.stopImmediatePropagation(), !1)
}
function c(t, o) {
var i = t.parents(".tray-kit-item");
o || (o = e(m.imageItem, i).attr("data-image")), e(m.imageItem + " img", i).attr("src", o)
}
function u(t, o) {
var i = t.parents(".tray-kit-item");
o && 0 != o || (o = i.attr("data-price")), i.find(m.inputItensPrice).val(o);
var n = 0;
e(m.inputItensPrice).each(function() {
n += parseFloat(e(this).val().replace(",", ""))
}), e("#preco_atual").val(n.toFixed(2)), e("#variacaoPreco").html(p(n)), e("#info_preco").html(""), "undefined" != typeof InformacaoAdicional && null !== InformacaoAdicional.params && InformacaoAdicional.calculaPrecoProduto()
}
function p(t) {
return t = t.toFixed(2).replace(/\D+/g, ""), (t = t.replace(/([0-9]{2})$/g, ",$1")).length > 6 && (t = t.replace(/([0-9]{3}),([0-9]{2}$)/g, ".$1,$2")), t
}
function h() {
e(m.listaRadiosInput).each(function() {
e(this).find("input:checked").length && (o(e(this).parents(m.menuVars)), n(e(this)), s(e(this).find("input:checked").val()), c(e(this), e(this).attr("data-image")), u(e(this), e(this).attr("data-price")))
}), e(m.variationFirstSelect).each(function() {
o(e(this).parents(m.menuVars)), r(e(this).val(), e(this).attr("data-url")), c(e(this), e(this).find(":selected").attr("data-image")), u(e(this), e(this).find(":selected").attr("data-price"))
}), e(m.listaCorVariacao + " li").each(function() {
(e(this).find("img").hasClass(g.selectedColor) || e(this).find("div").hasClass(g.selectedColor)) && (o(e(this).parents(m.menuVars)), r(e(this).attr("data-id"), i().attr("data-url")))
}), e(m.listaRadiosInputShowSizeAndColor).each(function() {
e(this).find("input:checked").length && (o(e(this).parents(m.menuVars)), r(e(this).find("input:checked").val(), i().attr("data-url")))
}), e('[data-id="show_size_and_color_main_type"]').length > 0 && e("body").on("submit", "#form_comprar", d)
}
var f, m = {
menuVars: '[data-id="menuVars"]',
selectedVariant: '[data-id="selectedVariant"]',
variationFirstSelect: '[data-id="variation_first_select"]',
variationSecondSelect: '[data-id="variation_second_select"]',
secondDropdown: '[data-id="second_dropdown"]',
listaRadiosInput: '[data-id="lista-radios-input"]',
imageItem: ".tray-kit-image",
inputItensPrice: '[data-id="price-itens-kit"]',
listaCorVariacao: '[data-id="lista_cor_variacao"]',
showSizeAndColorType: ".show_size_and_color_type",
showSizeAndColorSelectedVariant: '[data-id="show_size_and_color_main_type"] ul li .cor_selecionada',
listaRadiosInputShowSizeAndColor: '[data-id="lista-radios-input-show-size-and-color"]',
secondDropdownShowSizeAndColor: '[data-id="second-dropdown-show-size-and-color"]'
},
g = {
selectedColor: "cor_selecionada",
selected: "selecionada"
},
v = {
variants: function() {
e(m.variationFirstSelect).off(), e(m.variationFirstSelect).on("change", function() {
o(e(this).parents(m.menuVars)), r(e(this).val(), e(this).attr("data-url")), c(e(this), e(this).find(":selected").attr("data-image")), u(e(this), e(this).find(":selected").attr("data-price"))
}), e(m.secondDropdown).off(), e(m.secondDropdown).on("change", function() {
o(e(this).parents(m.menuVars)), s(e(this).val()), c(e(this), e(this).find(":selected").attr("data-image")), u(e(this), e(this).find(":selected").attr("data-price"))
}), e(m.listaRadiosInput).off(), e(m.listaRadiosInput).on("change", function() {
o(e(this).parents(m.menuVars));
var t = e(this).find(":checked");
n(t), s(t.val()), c(e(this), e(this).attr("data-image")), u(e(this), e(this).attr("data-price"))
}), e(m.listaCorVariacao + " li").off(), e(m.listaCorVariacao + " li").on("click", function() {
o(e(this).parents(m.menuVars)), a(e(this)), r(e(this).attr("data-id"), i().attr("data-url")), c(e(this), e(this).attr("data-image")), u(e(this), e(this).attr("data-price"))
}), e(m.listaRadiosInputShowSizeAndColor).off(), e(m.listaRadiosInputShowSizeAndColor).on("change", function() {
o(e(this).parents(m.menuVars)), r(e(this).find(":checked").val(), i().attr("data-url")), c(e(this), e(this).attr("data-image")), u(e(this), e(this).attr("data-price"))
}), e(m.secondDropdownShowSizeAndColor + " li").off(), e(m.secondDropdownShowSizeAndColor + " li").on("click", function() {
o(e(this).parents(m.menuVars)), s(e(this).attr("data-id")), a(e(this)), c(e(this), e(this).attr("data-image")), u(e(this), e(this).attr("data-price"))
})
}
};
return {
loadModule: function() {
v.variants(), h()
}
}
}(document, jQuery), "undefined" == typeof console && (console = {}, console.log = function() {}, console.info = function() {});
var application = application || {};
! function(t, e) {
"use strict";
var o = {
controller: t.getAttribute("data-controller"),
action: t.getAttribute("data-action"),
store: t.getAttribute("data-store")
};
if (o.store) {
if (e.getJSON("/nocache/app.php?loja=" + o.store, function(o) {
t.setAttribute("data-session", o.hash), e("html").trigger("tray-session")
}), application.store = o.store, application.cart.loadModule(), application.customer.loadModule(), application.banner.loadModule(), application.search.loadModule(), application.filter.loadModule(), application.login.loadModule(), application.svgFixer.loadModule(), application.product.loadModule(), application.productKit.loadModule(), application.variantKit.loadModule(), application.formAjax.loadModule(), application.productGallery.loadModule(), application.shipping.loadModule(), application.productTab.loadModule(), application.productCompare.loadModule(), application.productHistory.loadModule(), application.variant.loadModule(), application.letmeknow.loadModule(), application.productBuyForm.loadModule(), application.payment_options.loadModule(), application.productSteps.loadModule(), e.fn.lazyload && e(".lazy").lazyload({
threshold: 300
}), e.fn.mask) {
e("[data-mask]").mask("000.000.000.000.000,00", {
reverse: !0
})
}
} else console.error("Store ID not found")
}(document.getElementsByTagName("html")[0], jQuery), window.$zopim || function(t, e) {
var o = $zopim = function(t) {
o._.push(t)
},
i = o.s = t.createElement(e),
n = t.getElementsByTagName(e)[0];
o.set = function(t) {
o.set._.push(t)
}, o._ = [], o.set._ = [], i.async = !0, i.setAttribute("charset", "utf-8"), i.src = "xsadsad", o.t = +new Date, i.type = "text/javascript", n.parentNode.insertBefore(i, n)
}(document, "script"), jQuery.noConflict();
var nextArrowHtml = '',
offerCountdownTimeInterval = {},
prevArrowHtml = '',
productsSuggestionSearch;
jQuery("#style, #font").attr("media", "all"), jQuery(document).ready(function() {
if (jQuery("html.mobile").length) jQuery(".category-menu-link").click(function(t) {
t.preventDefault(), jQuery("body").toggleClass("menu-active")
}), jQuery(".mobile-menu .categories > ul > li.has-subcategory > a").click(function(t) {
t.preventDefault(), jQuery(".mobile-menu .categories > ul > li").not(jQuery(this).closest("li")).removeClass("active"), jQuery(this).closest("li").toggleClass("active")
}), jQuery(".smartfilter h3, .sidebar-adm h2").click(function() {
jQuery(this).toggleClass("active")
}), jQuery(".smartfilter .box-filter h4, .sidebar-adm div h3").click(function() {
jQuery(this).toggleClass("active")
});
else {
var t = function(t, e) {
var o = "Meu carrinho (" + e.cart.amount + ")
";
if (jQuery("html").hasClass("page-checkout_cart")) o += '', o += "- ", o += "
:)
", o += " ", o += "- ", o += "
Olá!
", o += "Você já está no carrinho
", o += " ", o += "
";
else if ("error" != t && e.cart.Products.length) {
o += '', o += "
", o += "
", o += "
"
} else o += '', o += "- ", o += "
:(
", o += " ", o += "- ", o += "
Ops!
", o += "Seu carrinho está vazio
", o += " ", o += "
";
return o
};
jQuery.ajax({
datatype: "json",
type: "GET",
url: "/mvc/store/cart/count",
complete: function(e, o) {
jQuery(".category-menu .cart-preview").html(t(o, e.responseJSON))
}
}), jQuery(".category-menu > ul > li").hover(function() {
if (jQuery(".overlay").addClass("active category-menu"), jQuery(".header-innerlay").addClass("active"), jQuery(this).hasClass("has-subcategory")) {
var t = jQuery(".category-menu").width(),
e = jQuery(this).position().left,
o = e + jQuery(this).width();
if (t - o > 643) return;
o >= 643 ? jQuery(this).addClass("align-right") : jQuery(this).find("> div").css("left", "-" + e + "px")
}
}, function() {
jQuery(".overlay").removeClass("active category-menu"), jQuery(".header-innerlay").removeClass("active"), jQuery(this).find("> div").css("left", "initial"), jQuery(this).removeClass("align-right")
}), jQuery(window).scroll(function() {
!jQuery("nav.category-menu").hasClass("fixed-header") && jQuery(this).scrollTop() > 300 ? (jQuery("nav.category-menu").addClass("fixed-header"), jQuery(".back-to-top, .floating-buy").fadeIn()) : jQuery("nav.category-menu").hasClass("fixed-header") && jQuery(this).scrollTop() < 200 && (jQuery("nav.category-menu").removeClass("fixed-header"), jQuery(".back-to-top, .floating-buy").fadeOut())
}), jQuery(".back-to-top").click(function(t) {
t.preventDefault(), jQuery("html, body").animate({
scrollTop: 0
}, 800), location.hash = "#topo"
}), jQuery(".floating-buy > div > span").click(function() {
jQuery(".floating-buy").toggleClass("floating-buy-hidden")
}), jQuery(".floating-buy .btn-success").click(function() {
jQuery("#form_comprar .btn-success").click()
})
}
if (jQuery(".search-key").focus(function() {
jQuery(".overlay").addClass("active product-search"), jQuery(".header-innerlay").addClass("active")
}), jQuery(".search-key").blur(function(t) {
t.relatedTarget || (jQuery(".overlay").removeClass("active product-search"), jQuery(".header-innerlay").removeClass("active"))
}), jQuery(".search-key").keyup(function() {
var t = jQuery(this).val();
clearTimeout(productsSuggestionSearch), productsSuggestionSearch = setTimeout(function() {
buildProductsSuggestionBlock(t)
}, 500)
}), jQuery(".top-selling-products .product-carousel, .featured-products .product-carousel").slick({
autoplay: !0,
nextArrow: nextArrowHtml,
prevArrow: prevArrowHtml,
responsive: [{
breakpoint: 992,
settings: {
slidesToShow: 3,
slidesToScroll: 3
}
}, {
breakpoint: 768,
settings: {
slidesToShow: 2,
slidesToScroll: 2
}
}, {
breakpoint: 500,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}],
slidesToScroll: 4,
slidesToShow: 4
}), jQuery("footer .contact section > div > div > ul").slick({
dots: !0,
nextArrow: nextArrowHtml,
prevArrow: prevArrowHtml,
slidesToScroll: 4,
slidesToShow: 4,
vertical: !0,
verticalSwiping: !0
}), jQuery("#form_comprar #qty").blur(function() {
var t = jQuery(this);
if (t.val() < 1) return t.val(1)
}), jQuery("#form_comprar .quantity button").click(function() {
var t = jQuery("#qty"),
e = parseInt(t.val()) + jQuery(this).data("count");
jQuery(this).data("count");
return e > 0 ? t.val(e) : t.val(1)
}), jQuery(".variants").length) {
var e = getVariantsPrice();
jQuery('#menuVars .lista-radios-input > input[type="radio"]').click(function() {
var t = "_" + jQuery(this).val();
jQuery("#form_comprar .price-wrapper > p, .floating-buy > div > p").html(e[t].priceOutOfOffer ? "De R$ " + e[t].priceOutOfOffer : null), jQuery("#form_comprar .price-wrapper > div p:first, .floating-buy > div .parcels > p:first").text(e[t].parcel1.qtyParcels + "x de R$ " + e[t].parcel1.value + " iguais"), jQuery("#form_comprar .price-wrapper > div p:last, .floating-buy > div .parcels > p:last").text(e[t].parcel2.qtyParcels + "x de R$ " + e[t].parcel2.value + " iguais"), jQuery("#form_comprar .price-wrapper h3 span, .floating-buy > div > h3 span").text("R$ " + e[t].price), jQuery("html, body").animate({
scrollTop: jQuery("#buy-button").offset().top - 328
}, 800), jQuery("#buy-button").focus(), location.hash = "#buy-button"
}), jQuery(".product-details").on("submit", "#form_comprar", function() {
jQuery('#form_comprar input[name="radioVariant0"]:checked').val() || jQuery('#form_comprar input[name="radioVariant1"]:checked').val() || (jQuery("html, body").animate({
scrollTop: jQuery("#variant-error").offset().top - 328
}, 800), location.hash = "#variant-error")
}), 1 == jQuery("#menuVars .lista-radios-input > input").length && jQuery("#menuVars .lista-radios-input > input").closest(".lista-radios-input").click()
}
if (jQuery(".payments > a").click(function(t) {
t.preventDefault(), jQuery("#ProdAbas #Aba3 > a").click(), jQuery("html, body").animate({
scrollTop: jQuery("#ProdBlock").offset().top - 328
}, 800)
}), jQuery("#cpf_gravado").val() || jQuery("#cnpj_gravado").val() || jQuery("#PessoaJuridica").click(), jQuery(".page-central_troca .blocoAlerta > span").length || jQuery('.page-central_troca form[name="form1"]').append(''), jQuery(".page-central_gera_troca #form10").length && jQuery(".page-central_gera_troca #form10").append(''), jQuery(".page-central_senha #frm2").length && jQuery(".page-central_senha #frm2").append(''), jQuery(".formulario-contato").length && jQuery(".formulario-contato").append(''), jQuery(".page-search #vitrine-catalogo form").length) {
var o = '';
o += "
O que pode ter acontecido?
", o += "
", o += "- Não existem resultados para o termo buscado;
", o += "- Ocorreu algum erro na digitação;
", o += "- O produto está indisponível;
", o += "
", o += "
O que eu posso fazer?
", o += "
", o += "- Verifique se aconteceu algum erro de digitação e refaça a busca;
", o += "- Tente pesquisar por termos mais genéricos;
", o += '- Clique aqui e nos envie uma mensagem, que iremos te ajudar ;D
', o += "
", o += "
", jQuery(".page-search #vitrine-catalogo h1.color").append(o), jQuery(".page-search #vitrine-catalogo form").append('')
}
if (jQuery(".page-customer .board form").length && jQuery(".page-customer .board form").append(''), jQuery(".page-checkout_cart #cesta_produtos .AvancarTopo").length) {
var i;
jQuery(".page-checkout_cart #cesta_produtos .AvancarTopo").after(''), jQuery("#tabela_carrinho .qntd").focus(function() {
i = jQuery(this).val()
}), jQuery("#tabela_carrinho .qntd").change(function() {
var t = jQuery(this),
e = parseInt(t.val());
return Number.isInteger(e) && e > 0 && e < 100 ? t.siblings(".refresh").click() : t.val(i)
})
}
jQuery(document).scroll(function() {
CheckIfProductIsVisibleAndShowIt()
}), setTimeout(function() {
CheckIfProductIsVisibleAndShowIt()
}, 1e3), initializeOfferCountdown()
});