function ga_send_event(category, action, label, value) { return; }
window.dataLayer = window.dataLayer || [];
dataLayer.push({ ecommerce: null }); dataLayer.push({ event: "view_item_list", ecommerce: { items: [ {"item_id":"739300404","item_name":"HAVAIANAS FLORESCER GLOW (33\/34)","item_variant":"33\/34","price":179.9,"item_category2":"MAIS VENDIDOS","item_category":"HAVAIANAS","item_list_id":"home","item_list_name":"Home"}, {"item_id":"944563232","item_name":"HAVAIANAS BORBOLETINHAS (33\/34, Branco)","item_variant":"33\/34, Branco","price":179.9,"item_category":"HAVAIANAS","item_list_id":"home","item_list_name":"Home"}, {"item_id":"980019133","item_name":"HAVAIANAS LA\u00c7O GLOW (33\/34, Dourado)","item_variant":"33\/34, Dourado","price":179.9,"item_category":"HAVAIANAS","item_list_id":"home","item_list_name":"Home"}, {"item_id":"975600448","item_name":"HAVAIANAS CORA\u00c7\u00c3O VERMELHO (33\/34)","item_variant":"33\/34","price":174.9,"item_category":"HAVAIANAS","item_list_id":"home","item_list_name":"Home"}, {"item_id":"421805670","item_name":"HAVAIANAS SEREIA GLAM (33\/34)","item_variant":"33\/34","price":179.9,"item_category2":"MAIS VENDIDOS","item_category":"HAVAIANAS","item_list_id":"home","item_list_name":"Home"}, {"item_id":"945094233","item_name":"HAVAIANAS ANIMALS GOLD (33\/34)","item_variant":"33\/34","price":179.9,"item_category":"HAVAIANAS","item_list_id":"home","item_list_name":"Home"}, {"item_id":"983315248","item_name":"HAVAIANAS BORBOLETA NEW (Branco, 33\/34)","item_variant":"Branco, 33\/34","price":179.9,"item_category":"HAVAIANAS","item_list_id":"home","item_list_name":"Home"}, {"item_id":"949050442","item_name":"HAVAIANAS SQUARE LOVE PINK (33\/34)","item_variant":"33\/34","price":174.9,"item_category":"HAVAIANAS","item_list_id":"home","item_list_name":"Home"}, ] } });
Destaques

com
Pix
6
x
de
R$29,98
sem juros

com
Pix
6
x
de
R$29,98
sem juros

com
Pix
6
x
de
R$29,98
sem juros

com
Pix
6
x
de
R$29,15
sem juros

com
Pix
6
x
de
R$29,98
sem juros

com
Pix
6
x
de
R$29,98
sem juros

com
Pix
6
x
de
R$29,98
sem juros

com
Pix
6
x
de
R$29,15
sem juros
Categorias principais
Promoções Até 50% OFF
/*! * Masonry PACKAGED v4.2.0 * Cascading grid layout library * http://masonry.desandro.com * MIT License * by David DeSandro */
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);r.isBoxSizeOuter=s=200==t(o.width),i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
/*!
* imagesLoaded PACKAGED v4.1.0
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/ !function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}(this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||[];return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}(window,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var i=0;i function createSwiper(selector, swiperParams, callback = null) {
/**
* Use timer to create new task instead of executing in the current one
* in order to split total blocking time
*/
setTimeout(function() {
const swiperInstance = new Swiper(selector, swiperParams);
if (callback) {
callback(swiperInstance);
}
}, 0);
} LS.ready.then(function(){ // Move to our_content
window.urls = {
"shippingUrl": "\/frete\/"
} function smoothScroll(targetPosition) {
let animation = new Animation(
new KeyframeEffect(
document.body,
{ top: targetPosition },
200
)
); animation.play(); return animation.finished;
} window.lazySizesConfig = window.lazySizesConfig || {};
lazySizesConfig.hFac = 0.1; var grid = document.querySelector('.js-masonry-grid');
if (grid) {
window.$masonry_grid = new Masonry( grid, {
// options
itemSelector: '.js-masonry-grid-item',
transitionDuration: 0,
horizontalOrder: true
}); imagesLoaded( grid ).on( 'progress', function() {
// layout Masonry after each image loads
$masonry_grid.layout();
});
} DOMContentLoaded.addEventOrExecute(() => { jQueryNuvem(document).on("click", ".js-accordion-toggle", function(e) {
e.preventDefault();
if(jQueryNuvem(this).hasClass("js-accordion-show-only")){
jQueryNuvem(this).hide();
}else{
jQueryNuvem(this).find(".js-accordion-toggle-inactive").toggle();
jQueryNuvem(this).find(".js-accordion-toggle-active").toggle();
}
jQueryNuvem(this).prev(".js-accordion-container").slideToggle();
}); jQueryNuvem(document).on("click", ".js-card-collapse-toggle", function(e) {
e.preventDefault();
jQueryNuvem(this).toggleClass('active');
jQueryNuvem(this).closest(".js-card-collapse").toggleClass('active').find(".js-card-body").slideToggle("fast");
}); jQueryNuvem(document).on("click", ".js-trigger-modal-zindex-top", function (e) {
e.preventDefault();
var modal_id = jQueryNuvem(this).attr("href");
jQueryNuvem(modal_id).detach().insertAfter(".modal-backdrop");
jQueryNuvem(".modal-backdrop").addClass("modal-backdrop-zindex-top");
}); if (window.innerWidth < 768) { jQueryNuvem(document).on("click", ".modal-backdrop", function (e) { jQueryNuvem(this).next(".js-modal-xs-centered").modal('toggle'); }); cleanURLHash = function(){ const uri = window.location.toString(); const clean_uri = uri.substring(0, uri.indexOf("#")); window.history.replaceState({}, document.title, clean_uri); }; goBackBrowser = function(){ cleanURLHash(); history.back(); }; if(window.location.href.indexOf("modal-fullscreen") > -1) {
cleanURLHash();
} jQueryNuvem(document).on("click", ".js-fullscreen-modal-open", function(e) {
e.preventDefault();
var modal_url_hash = jQueryNuvem(this).data("modalUrl");
window.location.hash = modal_url_hash;
jQueryNuvem(".modal-backdrop").addClass("js-modal-backdrop-fullscreen");
}); jQueryNuvem(document).on("click", ".js-fullscreen-modal-close, .js-modal-backdrop-fullscreen", function(e) {
e.preventDefault();
goBackBrowser();
}); window.onhashchange = function() {
if(window.location.href.indexOf("modal-fullscreen") <= -1) { jQueryNuvem("body").removeClass("overflow-none"); if(jQueryNuvem(".js-fullscreen-modal").hasClass("modal-xs-right-in")){ jQueryNuvem(".js-fullscreen-modal.modal-xs-right-in").toggleClass("modal-xs-right-in modal-xs-right-out"); setTimeout(function() { jQueryNuvem(".js-fullscreen-modal.modal-xs-right-in").hide(); }, 300); }else if(jQueryNuvem(".js-fullscreen-modal").hasClass("in")){ jQueryNuvem(".js-fullscreen-modal.in").modal('hide'); } } } } jQueryNuvem('.js-sheet-bottom').on('show.bs.modal', function (e) { setTimeout(function(){ jQueryNuvem('.modal-backdrop').addClass('sheet-bottom-backdrop'); }); }); var $notification_status_page = jQueryNuvem(".js-notification-status-page"); var $fixed_bottom_button = jQueryNuvem(".js-btn-fixed-bottom"); jQueryNuvem(".js-notification-close, .js-tooltip-close").on( "click", function(e) { e.preventDefault(); jQueryNuvem(e.currentTarget).closest(".js-notification, .js-tooltip").hide(); }); if ($notification_status_page.length > 0){
if (LS.shouldShowOrderStatusNotification($notification_status_page.data('url'))){
$notification_status_page.show();
};
jQueryNuvem(".js-notification-status-page-close").on( "click", function(e) {
e.preventDefault();
LS.dontShowOrderStatusNotificationAgain($notification_status_page.data('url'));
});
} setTimeout(function(){
if (cookieService.get('returning_customer') && LS.shouldShowQuickLoginNotification()) {
jQueryNuvem(".js-notification-quick-login").fadeIn();
return;
} },500); jQueryNuvem(".js-dismiss-quicklogin").on( "click", function(e) {
LS.dontShowQuickLoginNotification();
}); const footerLegal = jQueryNuvem(".js-footer-legal"); let footerOffset = 20; if (window.innerWidth > 768) {
footerOffset = 0;
} restoreNotifications = function(){ // Whatsapp button position
if (window.innerWidth < 768) {
$fixed_bottom_button.css("marginBottom", "10px");
}
footerLegal.removeAttr("style");
};
if (!window.cookieNotificationService.isAcknowledged()) {
jQueryNuvem(".js-notification-cookie-banner").show();
const cookieBannerHeight = jQueryNuvem(".js-notification-cookie-banner").outerHeight();
footerLegal.css("paddingBottom", cookieBannerHeight + footerOffset + "px");
if (window.innerWidth < 768) { $fixed_bottom_button.css("marginBottom", "120px"); }else { $fixed_bottom_button.css("marginBottom", "100px"); } } jQueryNuvem(".js-acknowledge-cookies").on( "click", function(e) { window.cookieNotificationService.acknowledge(); restoreNotifications(); }); var $top_nav = jQueryNuvem(".js-mobile-nav"); var $page_main_content = jQueryNuvem(".js-main-content"); var $mobile_categories_btn = jQueryNuvem(".js-toggle-mobile-categories"); var $main_categories_mobile_container = jQueryNuvem(".js-categories-mobile-container"); var $search_backdrop = jQueryNuvem(".js-search-backdrop"); var $delete_search = jQueryNuvem(".js-search-delete"); var $search_suggest = jQueryNuvem(".js-search-suggest"); // Mobile search jQueryNuvem(".js-toggle-mobile-search").on("click", function(e){ e.preventDefault; var $mobile_tab_navigation = jQueryNuvem(".js-mobile-nav-second-row"); jQueryNuvem(".js-mobile-first-row").toggle(); jQueryNuvem(".js-mobile-search-row").toggle(); $mobile_tab_navigation.toggle(); jQueryNuvem(".js-search-input").val(); $search_backdrop.toggle().toggleClass("search-open"); if(!jQueryNuvem("body").hasClass("mobile-categories-visible")){ jQueryNuvem("body").toggleClass("overflow-none"); }else{ jQueryNuvem("body").removeClass("mobile-categories-visible"); } $main_categories_mobile_container.hide(); jQueryNuvem(".js-mobile-nav-arrow").hide(); if($page_main_content.hasClass("move-up")){ $page_main_content.removeClass("move-up").addClass("move-down"); $search_backdrop.removeClass("move-up").addClass("move-down"); setTimeout(function() { $page_main_content.removeClass("move-down"); }, 200); }else{ $page_main_content.removeClass("move-down").addClass("move-up"); $search_backdrop.removeClass("move-down").addClass("move-up"); } if($mobile_categories_btn.hasClass("selected")){ $mobile_categories_btn.removeClass("selected"); jQueryNuvem(".js-current-page").addClass("selected"); } }); var $mobile_search_input = jQueryNuvem(".js-mobile-search-input"); jQueryNuvem(".js-toggle-mobile-search-open").on("click", function(e){ e.preventDefault; $mobile_search_input.trigger('focus'); }); jQueryNuvem(".js-search-back-btn").on("click", function(e){ jQueryNuvem(".js-search-suggest").hide(); $mobile_search_input.val(''); }); $mobile_search_input.on('keyup', function(){ $delete_search.show(); }); $mobile_search_input.on("focusout", function(){ var val = $mobile_search_input.val(); if(val == ''){ $delete_search.hide(); }else{ $delete_search.show(); } }); $delete_search.on("click", function(e){ e.preventDefault(); jQueryNuvem(e.currentTarget).hide(); $mobile_search_input.val('').trigger('focus'); $search_suggest.hide(); }); $top_nav.addClass("move-down").removeClass("move-up"); $mobile_categories_btn.on("click", function(e){ e.preventDefault(); jQueryNuvem("body").toggleClass("overflow-none mobile-categories-visible"); jQueryNuvem(".js-mobile-nav-arrow").toggle(); if($mobile_categories_btn.hasClass("selected")){ $mobile_categories_btn.removeClass("selected"); jQueryNuvem(".js-current-page").addClass("selected"); }else{ $mobile_categories_btn.addClass("selected"); jQueryNuvem(".js-current-page").removeClass("selected"); } $main_categories_mobile_container.toggle(); if($top_nav.hasClass("move-up")){ $main_categories_mobile_container.toggleClass("move-list-up"); } }); jQueryNuvem(".js-open-mobile-subcategory").on("click", function(e){ e.preventDefault(); var $this = jQueryNuvem(e.currentTarget); var this_link_id_val = $this.data("target"); var $subcategories_panel_to_be_visible = $this.closest(".js-categories-mobile-container").find("#" + this_link_id_val); $subcategories_panel_to_be_visible.detach().insertAfter(".js-categories-mobile-container > .js-mobile-nav-subcategories-panel:last-child");
$subcategories_panel_to_be_visible.addClass("modal-xs-right-out").show();
setTimeout(function(){
$subcategories_panel_to_be_visible.toggleClass("modal-xs-right-in modal-xs-right-out");
},100);
}); jQueryNuvem(".js-go-back-mobile-categories").on("click", function(e){
e.preventDefault();
var $this = jQueryNuvem(e.currentTarget);
var $subcategories_panel_to_be_closed = $this.closest(".js-mobile-nav-subcategories-panel");
jQueryNuvem(".js-mobile-nav-subcategories-panel").prop("scrollTop", 0);
$subcategories_panel_to_be_closed.toggleClass("modal-xs-right-in modal-xs-right-out");
setTimeout(function() {
$subcategories_panel_to_be_closed.removeClass("modal-xs-right-out").hide();
},300);
}); jQueryNuvem(".js-toggle-hamburger-panel").on("click", function(e){
e.preventDefault();
jQueryNuvem("body, .js-hamburger-overlay, .js-hamburger-panel, .js-main-content").toggleClass("hamburger-panel-animated");
}); jQueryNuvem(".js-toggle-page-accordion").on("click", function (e) {
e.preventDefault();
jQueryNuvem(e.currentTarget).toggleClass("selected").closest(".js-hamburger-panel-toggle-accordion").next(".js-pages-accordion").slideToggle(300);
}); // Show and hide part of nav depending scroll up or down
var didScroll;
var lastScrollTop = 0;
var delta = 20;
var navbarHeight = jQueryNuvem('header').outerHeight(); window.addEventListener("scroll", function(event){
didScroll = true;
}); setInterval(function() {
if (didScroll) {
hasScrolled();
didScroll = false;
}
}, 250); function hasScrolled() {
var st = window.pageYOffset; // Make sure they scroll more than delta
if(Math.abs(lastScrollTop - st) <= delta) return; // If they scrolled down and are past the navbar, add class .move-up. if (st > lastScrollTop && st > navbarHeight){
// Scroll Down
if(!jQueryNuvem("body").hasClass("mobile-categories-visible")){
$top_nav.addClass("move-up").removeClass("move-down");
}
jQueryNuvem(".backdrop").addClass("move-up").removeClass("move-down");
} else {
// Scroll Up
let documentHeight = Math.max(
document.body.scrollHeight,
document.body.offsetHeight,
document.documentElement.clientHeight,
document.documentElement.scrollHeight,
document.documentElement.offsetHeight
); if(st + window.innerHeight < documentHeight) {
if(!jQueryNuvem("body").hasClass("mobile-categories-visible")){
$top_nav.removeClass("move-up").addClass("move-down");
}
jQueryNuvem(".backdrop").removeClass("move-up").addClass("move-down");
}
}
lastScrollTop = st;
}
var top_nav_height = $top_nav.outerHeight();
var adbar_height = jQueryNuvem(".js-adbar").outerHeight();
if (window.innerWidth < 768) { jQueryNuvem(".js-logo-container").css("paddingTop" , (adbar_height + top_nav_height).toString() + 'px'); jQueryNuvem(".js-categories-mobile-tabs, .js-mobile-nav-subcategories-panel").css("paddingTop" , (adbar_height).toString() + 'px'); $top_nav.css("top" , adbar_height.toString() + 'px'); } var menu = jQueryNuvem('.js-nav-head-main'); var pos = menu.offset(); var fixedMenu = jQueryNuvem('.js-nav-head-fixed'); window.addEventListener("scroll", function(){ if(window.pageYOffset > pos.top + menu.height() && !fixedMenu.hasClass('fixed')){
smoothScroll(0).then(() => {
fixedMenu.addClass('fixed');
fixedMenu.css('top', '0'); });
} else if(window.pageYOffset <= pos.top && fixedMenu.hasClass('fixed')){ smoothScroll('-140px').then(() => {
fixedMenu.removeClass('fixed');
fixedMenu.css('top', '-140px'); }); jQueryNuvem(".js-nav-head-fixed .js-search-suggest").hide();
}
}); LS.search(jQueryNuvem(".js-search-input"), function(html, count){
$search_suggests = jQueryNuvem(this).closest(".js-search-container").next(".js-search-suggest");
if(count > 0){
$search_suggests.html(html).show();
}else{
$search_suggests.hide();
}
}, {
snipplet: 'navigation/search-results.tpl'
}); if (window.innerWidth > 768) { jQueryNuvem("body").on("click", function () {
jQueryNuvem(".js-search-suggest").hide();
}); jQueryNuvem(document).on("click", ".js-search-suggest a", function () {
jQueryNuvem(".js-search-suggest").show();
});
} jQueryNuvem(".js-search-suggest").on("click", ".js-search-suggest-all-link", function(e){
e.preventDefault();
$this_closest_form = jQueryNuvem(this).closest(".js-search-suggest").prev(".js-search-container").find(".js-search-form");
$this_closest_form.submit();
}); LS.newsletter_avoid_siteblindado_bot(); var width = window.innerWidth; if (width > 767) {
var slider_autoplay = {delay: 6000,};
} else {
var slider_autoplay = false;
} var homeSwiper = null;
createSwiper(
'.js-home-slider',
{
preloadImages: false,
lazy: true,
loop: true,
autoplay: slider_autoplay,
delay: 2000,
pagination: {
el: '.js-swiper-home-pagination',
clickable: true,
},
navigation: {
nextEl: '.js-swiper-home-next',
prevEl: '.js-swiper-home-prev',
},
},
function(swiperInstance) {
homeSwiper = swiperInstance;
}
); var homeMobileSwiper = null;
createSwiper(
'.js-home-slider-mobile',
{
preloadImages: false,
lazy: true,
loop: true,
autoplay: false,
pagination: {
el: '.js-swiper-home-pagination-mobile',
clickable: true,
},
navigation: {
nextEl: '.js-swiper-home-next-mobile',
prevEl: '.js-swiper-home-prev-mobile',
},
},
function(swiperInstance) {
homeMobileSwiper = swiperInstance;
}
); var width = window.outerWidth;
if (width < 767) {
createSwiper('.js-mobile-services', {
slidesPerView: 1,
watchOverflow: true,
centerInsufficientSlides: true,
pagination: {
el: '.js-mobile-service-pagination',
clickable: true,
},
});
}
createSwiper('.js-swiper-sale-products', {
lazy: true,
loop: true,
watchOverflow: true,
centerInsufficientSlides: true,
watchSlidesVisibility: true,
slideVisibleClass: 'js-swiper-slide-visible',
threshold: 5,
slidesPerView: 2,
slidesPerGroup: 2,
pagination: {
el: '.js-swiper-sale-products-pagination',
clickable: true,
},
navigation: {
nextEl: '.js-swiper-sale-products-next',
prevEl: '.js-swiper-sale-products-prev',
},
breakpoints: {
768: {
slidesPerView: 4,
slidesPerGroup: 4,
}
},
});
jQueryNuvem('.js-sort-by').on("change", function(e){
var params = LS.urlParams;
params['sort_by'] = jQueryNuvem(e.currentTarget).val();
var sort_params_array = [];
for (var key in params) {
if (!['results_only', 'page'].includes(key)) {
sort_params_array.push(key + '=' + params[key]);
}
}
var sort_params = sort_params_array.join('&');
window.location = window.location.pathname + '?' + sort_params;
});
jQueryNuvem(".js-toggle-mobile-filters").on("click", function (e) {
e.preventDefault();
jQueryNuvem(".js-mobile-filters-panel").toggleClass("modal-xs-right-in modal-xs-right-out");
jQueryNuvem("body").toggleClass("overflow-none");
});
jQueryNuvem(document).on("click", ".js-apply-filter, .js-remove-filter", function(e) {
e.preventDefault();
var filter_name = jQueryNuvem(this).data('filterName');
var filter_value = jQueryNuvem(this).attr('data-filter-value');
if(jQueryNuvem(this).hasClass("js-apply-filter")){
jQueryNuvem(this).find("[type=checkbox]").prop("checked", true);
LS.urlAddParam(
filter_name,
filter_value,
true
);
}else{
jQueryNuvem(this).find("[type=checkbox]").prop("checked", false);
LS.urlRemoveParam(
filter_name,
filter_value
);
}
if (jQueryNuvem(this).hasClass("js-filter-checkbox")){
if (window.innerWidth < 768) { jQueryNuvem(".js-filters-overlay").show(); if(jQueryNuvem(this).hasClass("js-apply-filter")){ jQueryNuvem(".js-applying-filter").show(); }else{ jQueryNuvem(".js-removing-filter").show(); } } jQueryNuvem(this).toggleClass("js-apply-filter js-remove-filter"); } }); jQueryNuvem(document).on("click", ".js-remove-all-filters", function(e) { e.preventDefault(); LS.urlRemoveAllParams(); }); jQueryNuvem(".js-mobile-paginator-input").on("focusout", function(e){ e.preventDefault(); LS.paginateMobile(); }); function get_max_installments_without_interests(number_of_installment, installment_data, max_installments_without_interests) { if (parseInt(number_of_installment) > parseInt(max_installments_without_interests[0])) {
if (installment_data.without_interests) {
return [number_of_installment, installment_data.installment_value.toFixed(2)];
}
}
return max_installments_without_interests;
} function get_max_installments_with_interests(number_of_installment, installment_data, max_installments_with_interests) {
if (parseInt(number_of_installment) > parseInt(max_installments_with_interests[0])) {
if (installment_data.without_interests == false) {
return [number_of_installment, installment_data.installment_value.toFixed(2)];
}
}
return max_installments_with_interests;
} function refreshInstallmentv2(price){
jQueryNuvem(".js-modal-installment-price").each(function( el ) {
const installment = Number(jQueryNuvem(el).data('installment'));
jQueryNuvem(el).text(LS.currency.display_short + (price/installment).toLocaleString('de-DE', {maximumFractionDigits: 2, minimumFractionDigits: 2}));
});
} function refreshPaymentDiscount(price){
jQueryNuvem(".js-price-with-discount" ).each(function( el ) {
const payment_discount = jQueryNuvem(el).data('paymentDiscount');
jQueryNuvem(el).text(LS.formatToCurrency(price - ((price * payment_discount) / 100)))
});
} function changeVariant(variant){
jQueryNuvem(".js-product-detail .js-shipping-calculator-response").hide();
jQueryNuvem("#shipping-variant-id").val(variant.id);
var parent = jQueryNuvem("body");
if (variant.element){
parent = jQueryNuvem(variant.element);
} var sku = parent.find('#sku');
if(sku.length) {
sku.text(variant.sku).show();
} var installment_helper = function($element, amount, price){
$element.find('.js-installment-amount').text(amount);
$element.find('.js-installment-price').attr("data-value", price);
$element.find('.js-installment-price').text(LS.currency.display_short + parseFloat(price).toLocaleString('de-DE', { minimumFractionDigits: 2 }));
if(variant.price_short && Math.abs(variant.price_number - price * amount) < 1) {
$element.find('.js-installment-total-price').text((variant.price_short).toLocaleString('de-DE', { minimumFractionDigits: 2 }));
} else {
$element.find('.js-installment-total-price').text(LS.currency.display_short + (price * amount).toLocaleString('de-DE', { minimumFractionDigits: 2 }));
}
};
if (variant.installments_data) {
var variant_installments = JSON.parse(variant.installments_data);
var max_installments_without_interests = [0,0];
var max_installments_with_interests = [0,0];
jQueryNuvem('.js-payment-provider-installments-row').hide();
for (let payment_method in variant_installments) {
var paymentMethodId = '#installment_' + payment_method.replace(" ", "_") + '_1';
var minimumInstallmentValue = jQueryNuvem(paymentMethodId).closest('.js-info-payment-method').attr("data-minimum-installment-value");
let installments = variant_installments[payment_method];
for (let number_of_installment in installments) {
let installment_data = installments[number_of_installment];
max_installments_without_interests = get_max_installments_without_interests(number_of_installment, installment_data, max_installments_without_interests);
max_installments_with_interests = get_max_installments_with_interests(number_of_installment, installment_data, max_installments_with_interests);
var installment_container_selector = '#installment_' + payment_method.replace(" ", "_") + '_' + number_of_installment;
if(minimumInstallmentValue <= installment_data.installment_value) { jQueryNuvem(installment_container_selector).show(); } if(!parent.hasClass("js-quickshop-container")){ installment_helper(jQueryNuvem(installment_container_selector), number_of_installment, installment_data.installment_value.toFixed(2)); } } } var $installments_container = jQueryNuvem(variant.element + ' .js-max-installments-container .js-max-installments'); var $installments_modal_link = jQueryNuvem(variant.element + ' #btn-installments'); var $payments_module = jQueryNuvem(variant.element + ' .js-product-payments-container'); var $installmens_card_icon = jQueryNuvem(variant.element + ' .js-installments-credit-card-icon'); var installments_to_use = max_installments_without_interests[0] > 1 ? max_installments_without_interests : max_installments_with_interests; if(installments_to_use[0] <= 1 ) { $installments_container.hide(); $installments_modal_link.hide(); $payments_module.hide(); $installmens_card_icon.hide(); } else { $installments_container.show(); $installments_modal_link.show(); $payments_module.show(); $installmens_card_icon.show(); installment_helper($installments_container, installments_to_use[0], installments_to_use[1]); } } if(!parent.hasClass("js-quickshop-container")){ jQueryNuvem('#installments-modal .js-installments-one-payment').text(variant.price_short).attr("data-value", variant.price_number); } if (variant.price_short){ parent.find('.js-price-display').text(variant.price_short).show(); parent.find('.js-price-display').attr("content", variant.price_number).data('productPrice', variant.price_number_raw); parent.find('.js-payment-discount-price-product').text(variant.price_with_payment_discount_short); parent.find('.js-payment-discount-price-product-container').show(); } else { parent.find('.js-price-display, .js-payment-discount-price-product-container').hide(); } if ((variant.compare_at_price_short) && !(parent.find(".js-price-display").css("display") == "none")) { parent.find('.js-compare-price-display').text(variant.compare_at_price_short).show(); if(variant.compare_at_price_number > variant.price_number){
const saved_compare_price_money = variant.compare_at_price_number - variant.price_number;
parent.find('.js-offer-saved-money').text(LS.formatToCurrency(saved_compare_price_money));
parent.find(".js-saved-money-message").show();
}else {
parent.find(".js-saved-money-message").hide();
}
} else {
parent.find('.js-compare-price-display, .js-saved-money-message').hide();
} var button = parent.find('.js-addtocart'); button.removeClass('cart').removeClass('contact').removeClass('nostock');
var $shipping_calculator_form = parent.find("#product-shipping-container");
if (!variant.available){
button.val('Sem\u0020Estoque');
button.addClass('nostock');
button.attr('disabled', 'disabled');
$shipping_calculator_form.hide();
} else if (variant.contact) {
button.val('Preço sob Consulta');
button.addClass('contact');
button.removeAttr('disabled');
$shipping_calculator_form.hide();
} else {
button.val('Comprar');
button.addClass('cart');
button.removeAttr('disabled');
$shipping_calculator_form.show();
} LS.updateShippingProduct(); zipcode_on_changevariant = jQueryNuvem("#product-shipping-container .js-shipping-input").val();
jQueryNuvem("#product-shipping-container .js-shipping-calculator-current-zip").text(zipcode_on_changevariant); } jQueryNuvem(document).on("change", ".js-variation-option", function(e) { var $parent = jQueryNuvem(this).closest(".js-product-variants");
var $variants_group = jQueryNuvem(this).closest(".js-product-variants-group");
var $quickshop_parent_wrapper = jQueryNuvem(this).closest(".js-quickshop-container"); if($quickshop_parent_wrapper.hasClass("js-quickshop-modal")){
var quick_id = jQueryNuvem(".js-quickshop-opened .js-quickshop-container").data("quickshopId");
}else{
var quick_id = $quickshop_parent_wrapper.data("quickshopId");
} if($parent.hasClass("js-product-quickshop-variants")){ var $quickshop_parent = jQueryNuvem(this).closest(".js-item-product"); if($quickshop_parent.hasClass("js-item-slide")){
var $quickshop_variant_selector = '.js-swiper-slide-visible .js-quickshop-container[data-quickshop-id="'+quick_id+'"]';
}else{
var $quickshop_variant_selector = '.js-quickshop-container[data-quickshop-id="'+quick_id+'"]';
} LS.changeVariant(changeVariant, $quickshop_variant_selector); } else {
LS.changeVariant(changeVariant, '#single-product');
} var $this_product_container = jQueryNuvem(this).closest(".js-product-container"); if($this_product_container.hasClass("js-quickshop-container")){
var this_quickshop_id = $this_product_container.attr("data-quickshop-id");
var $this_product_container = jQueryNuvem('.js-product-container[data-quickshop-id="'+this_quickshop_id+'"]');
}
var $this_compare_price = $this_product_container.find(".js-compare-price-display");
var $this_price = $this_product_container.find(".js-price-display");
var $installment_container = $this_product_container.find(".js-product-payments-container");
var $installment_text = $this_product_container.find(".js-max-installments-container");
var $this_add_to_cart = $this_product_container.find(".js-prod-submit-form"); // Get the current product discount percentage value
var current_percentage_value = $this_product_container.find(".js-offer-percentage"); // Get the current product price and promotional price
var compare_price_value = $this_compare_price.html();
var price_value = $this_price.html(); // Calculate new discount percentage based on difference between filtered old and new prices
const percentageDifference = window.moneyDifferenceCalculator.percentageDifferenceFromString(compare_price_value, price_value);
if(percentageDifference){
$this_product_container.find(".js-offer-percentage").text(percentageDifference);
$this_product_container.find(".js-offer-label").css("display" , "inline-flex");
} if ($this_compare_price.css("display") == "none" || !percentageDifference) {
$this_product_container.find(".js-offer-label").hide();
}
if ($this_add_to_cart.hasClass("nostock")) {
$this_product_container.find(".js-stock-label").show();
}
else {
$this_product_container.find(".js-stock-label").hide();
}
if ($this_price.css('display') == 'none'){
$installment_container.hide();
$installment_text.hide();
}else{
$installment_text.show();
}
}); jQueryNuvem(document).on("click", ".js-insta-variations", function(e) {
e.preventDefault();
$this = jQueryNuvem(this);
$this.siblings().removeClass("selected");
$this.addClass("selected"); var option_id = $this.attr('data-option');
$selected_option = $this.closest('.js-product-variants').find('.js-variation-option option').filter(function(el) {
return el.value == option_id;
});
$selected_option.prop('selected', true).trigger('change'); $this.closest("[class^='variation']").find('.js-insta-variation-label').html(option_id); }); LS.registerOnChangeVariant(function(variant){
jQueryNuvem(".js-product-thumb-zoom[data-image='"+variant.image+"'] img").trigger('click');
}); jQueryNuvem("#product_form").on("submit", function(e){
var button = jQueryNuvem(e.currentTarget).find('[type="submit"]');
button.attr('disabled', 'disabled');
if (button.hasClass('cart')){
button.val('Incluindo...');
}
if((jQueryNuvem(e.currentTarget).find('input.contact').length) || (jQueryNuvem(e.currentTarget).find('input.catalog').length)) {
e.preventDefault();
window.location = "\/contato\/?product=" + LS.product.id;
}
}); jQueryNuvem(document).on("keypress", ".js-cart-quantity-input", function (e) {
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
return false;
}
}); jQueryNuvem(document).on("focusout", ".js-cart-quantity-input", function (e) {
var itemID = jQueryNuvem(this).attr("data-item-id");
var itemVAL = jQueryNuvem(this).val();
if (itemVAL == 0) {
var r = confirm("Tem certeza de que deseja excluir este item?");
if (r == true) {
LS.removeItem(itemID, true);
} else {
jQueryNuvem(this).val(1);
}
} else {
LS.changeQuantity(itemID, itemVAL, true);
}
}); jQueryNuvem(".js-hide-alert").on("click", function(e){
e.preventDefault();
jQueryNuvem(e.currentTarget).closest(".alert").hide();
}); jQueryNuvem(".js-trigger-empty-cart-alert").on("click", function(e){
e.preventDefault();
let emptyCartAlert = jQueryNuvem(".js-mobile-nav-empty-cart-alert").fadeIn(100);
setTimeout(() => emptyCartAlert.fadeOut(500), 1500);
}); jQueryNuvem(document).on("click", ".js-addtocart:not(.js-addtocart-placeholder)", function (e) { var $productContainer = jQueryNuvem(this).closest('.js-product-container');
var $productButton = $productContainer.find("input[type='submit'].js-addtocart");
var $productButtonPlaceholder = $productContainer.find(".js-addtocart-placeholder");
var $productButtonText = $productButtonPlaceholder.find(".js-addtocart-text");
var $productButtonAdding = $productButtonPlaceholder.find(".js-addtocart-adding");
var $productButtonSuccess = $productButtonPlaceholder.find(".js-addtocart-success"); var isQuickShop = $productContainer.hasClass('js-quickshop-container'); if (!jQueryNuvem(this).hasClass('contact')) { e.preventDefault(); $productButton.hide();
$productButtonPlaceholder.css('display' , 'inline-block');
$productButtonText.fadeOut('fast');
$productButtonAdding.addClass("active"); var callback_add_to_cart = function(){ $productButtonAdding.removeClass("active");
$productButtonSuccess.addClass("active");
setTimeout(function(){
$productButtonSuccess.removeClass("active");
setTimeout(function(){
$productButtonText.fadeIn();
},100);
},2000); setTimeout(function(){
$productButtonPlaceholder.removeAttr("style").hide();
$productButton.css('display' , 'inline-block');
},3000); if (window.innerWidth < 768) {
mobileToggleAjaxCart();
window.location.hash = "modal-fullscreen-cart";
}else{
if(jQueryNuvem(".js-ajax-cart-panel").css('display') == 'none'){
jQueryNuvem("body").addClass("overflow-none");
}
jQueryNuvem(".js-ajax-backdrop").toggle();
ajax_cart_panel.toggle();
}
$productContainer.find(".js-addtocart").removeClass("m-bottom");
$productContainer.find(".js-added-to-cart-product-message").slideDown();
if (isQuickShop && (jQueryNuvem(".js-prod-submit-form").hasClass("js-variant-addtocart")) && window.innerWidth < 768) {
cleanURLHash();
window.location.hash = "modal-fullscreen-cart";
}
if (jQueryNuvem("#product-shipping-container .js-shipping-input").val()) {
zipcode_on_addtocart = jQueryNuvem("#product-shipping-container .js-shipping-input").val();
jQueryNuvem("#cart-shipping-container .js-shipping-input").val(zipcode_on_addtocart);
jQueryNuvem(".js-shipping-calculator-current-zip").text(zipcode_on_addtocart);
} else if (cookieService.get('calculator_zipcode')){
var zipcode_from_cookie = cookieService.get('calculator_zipcode');
jQueryNuvem('.js-shipping-input').val(zipcode_from_cookie);
jQueryNuvem(".js-shipping-calculator-current-zip").text(zipcode_from_cookie);
}
}
var callback_error = function(){
$productButtonAdding.removeClass("active");
$productButtonText.fadeIn();
$productButtonPlaceholder.removeAttr("style").hide();
$productButton.css('display' , 'inline-block');
}
$prod_form = jQueryNuvem(this).closest("form");
LS.addToCartEnhanced(
$prod_form,
'Comprar',
'Incluindo...',
'Oops! Não temos mais estoque para incluir este produto ao carrinho.',
false,
callback_add_to_cart,
callback_error
);
}
});
const ajax_cart_panel = jQueryNuvem(".js-ajax-cart-panel");
mobileToggleAjaxCart = function(){
if(!jQueryNuvem("body").hasClass("mobile-categories-visible")){
jQueryNuvem("body").toggleClass("overflow-none");
}
if(ajax_cart_panel.hasClass("modal-xs-right-in")){
ajax_cart_panel.toggleClass("modal-xs-right-in modal-xs-right-out");
setTimeout(function() {
ajax_cart_panel.hide();
}, 300);
}else{
ajax_cart_panel.show();
setTimeout(function() {
ajax_cart_panel.toggleClass("modal-xs-right-in modal-xs-right-out");
}, 300);
}
};
jQueryNuvem(document).on("click", ".js-toggle-cart", function (e) {
e.preventDefault();
if (window.innerWidth < 768) { mobileToggleAjaxCart(); }else{ jQueryNuvem(".js-ajax-backdrop").toggle(); ajax_cart_panel.toggle(); jQueryNuvem("body").toggleClass("overflow-none"); } }); selectShippingOption = function(elem, save_option) { jQueryNuvem(".js-shipping-method, .js-branch-method").removeClass('js-selected-shipping-method'); jQueryNuvem(elem).addClass('js-selected-shipping-method'); if (save_option) { LS.saveCalculatedShipping(true); } if(jQueryNuvem(elem).hasClass("js-shipping-method-hidden")){ if(jQueryNuvem(elem).hasClass("js-pickup-option")){ jQueryNuvem(".js-other-pickup-options, .js-show-other-pickup-options .js-shipping-see-less").show(); jQueryNuvem(".js-show-other-pickup-options .js-shipping-see-more").hide(); }else{ jQueryNuvem(".js-other-shipping-options, .js-show-more-shipping-options .js-shipping-see-less").show(); jQueryNuvem(".js-show-more-shipping-options .js-shipping-see-more").hide() } } }; if (cookieService.get('calculator_zipcode')) { var zipcode_from_cookie = cookieService.get('calculator_zipcode'); jQueryNuvem('#product-shipping-container .js-shipping-input').val(zipcode_from_cookie); jQueryNuvem(".js-shipping-calculator-current-zip").text(zipcode_from_cookie); jQueryNuvem(".js-shipping-calculator-head").addClass("with-zip").removeClass("with-form"); jQueryNuvem(".js-shipping-calculator-with-zipcode").addClass("transition-up-active"); jQueryNuvem(".js-shipping-calculator-spinner").show(); } else { jQueryNuvem(".js-shipping-calculator-form").addClass("transition-up-active"); } removeShippingSuboptions = function(){ var shipping_suboptions_id = jQueryNuvem(".js-modal-shipping-suboptions").attr("id"); jQueryNuvem("#" + shipping_suboptions_id).remove(); jQueryNuvem('.js-modal-overlay[data-modal-id="#' + shipping_suboptions_id + '"').remove(); }; jQueryNuvem(document).on("click", ".js-toggle-branches", function (e) { e.preventDefault(); jQueryNuvem(".js-store-branches-container").slideToggle("fast"); jQueryNuvem(".js-see-branches, .js-hide-branches").toggle();; }); jQueryNuvem(document).on("change", ".js-shipping-method, .js-branch-method", function (e) { selectShippingOption(this, true); jQueryNuvem(".js-shipping-method-unavailable").hide(); }); jQueryNuvem(document).on('shipping.options.checked', '.js-shipping-method', function (e) { let shippingPrice = jQueryNuvem(this).attr("data-price"); LS.addToTotal(shippingPrice); let total = (LS.data.cart.total / 100) + parseFloat(shippingPrice); jQueryNuvem(".js-cart-widget-total").html(LS.formatToCurrency(total)); selectShippingOption(this, false); }); jQueryNuvem(".js-shipping-input").on("keydown", function(e) { var key = e.which ? e.which : e.keyCode; var enterKey = 13; if (key === enterKey) { e.preventDefault(); jQueryNuvem(e.currentTarget).closest(".js-shipping-calculator-form").find(".js-calculate-shipping").trigger('click'); jQueryNuvem(e.currentTarget).trigger('blur'); } }); jQueryNuvem(".js-calculate-shipping").on("click", function(e) { e.preventDefault(); let shipping_input_val = jQueryNuvem(e.currentTarget).closest(".js-shipping-calculator-form").find(".js-shipping-input").val(); jQueryNuvem(".js-shipping-input").val(shipping_input_val); if (jQueryNuvem(".js-cart-item").length) { LS.calculateShippingAjax( jQueryNuvem('#cart-shipping-container').find(".js-shipping-input").val(), '\/frete\/', jQueryNuvem("#cart-shipping-container").closest(".js-shipping-calculator-container") ); } jQueryNuvem(".js-shipping-calculator-current-zip").html(shipping_input_val); removeShippingSuboptions(); }); jQueryNuvem(document).on("click", ".js-toggle-more-shipping-options", function(e) { e.preventDefault(); if(jQueryNuvem(this).hasClass("js-show-other-pickup-options")){ jQueryNuvem(".js-other-pickup-options").slideToggle(600); jQueryNuvem(".js-show-other-pickup-options .js-shipping-see-less, .js-show-other-pickup-options .js-shipping-see-more").toggle(); }else{ jQueryNuvem(".js-other-shipping-options").slideToggle(600); jQueryNuvem(".js-show-more-shipping-options .js-shipping-see-less, .js-show-more-shipping-options .js-shipping-see-more").toggle(); } }); calculateCartShippingOnLoad = function(){ if(jQueryNuvem("#cart-shipping-container .js-shipping-input").val()){ // If user already had calculated shipping: recalculate shipping setTimeout(function() { LS.calculateShippingAjax( jQueryNuvem('#cart-shipping-container').find(".js-shipping-input").val(), '\/frete\/', jQueryNuvem("#cart-shipping-container").closest(".js-shipping-calculator-container") ); removeShippingSuboptions(); }, 100); } if(jQueryNuvem(".js-branch-method").hasClass('js-selected-shipping-method')){ } }; jQueryNuvem(document).on("click", ".js-shipping-calculator-change-zipcode", function(e) { e.preventDefault(); jQueryNuvem(".js-shipping-calculator-response").fadeOut(100); jQueryNuvem(".js-shipping-calculator-head").addClass("with-form").removeClass("with-zip"); jQueryNuvem(".js-shipping-calculator-with-zipcode").removeClass("transition-up-active"); jQueryNuvem(".js-shipping-calculator-form").addClass("transition-up-active"); }); jQueryNuvem(document).on("click", ".js-save-shipping-country", function(e) { e.preventDefault(); var selected_country_url = jQueryNuvem(this).closest(".js-modal-shipping-country").find(".js-shipping-country-select option").filter((el) => el.selected).attr("data-country-url");
location.href = selected_country_url; jQueryNuvem(this).text('Aplicando...').addClass("disabled");
}); jQueryNuvem('.js-password-view').on("click", function (e) {
jQueryNuvem(e.currentTarget).toggleClass('password-view'); if(jQueryNuvem(e.currentTarget).hasClass('password-view')){
jQueryNuvem(e.currentTarget).parent().find(".js-password-input").attr('type', '');
jQueryNuvem(e.currentTarget).find(".js-eye-open, .js-eye-closed").toggle();
} else {
jQueryNuvem(e.currentTarget).parent().find(".js-password-input").attr('type', 'password');
jQueryNuvem(e.currentTarget).find(".js-eye-open, .js-eye-closed").toggle();
}
}); }); });
0&&s(e[a],t[a])}))}var a={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){var e="undefined"!=typeof document?document:{};return s(e,a),e}var n={document:a,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function o(){var e="undefined"!=typeof window?window:{};return s(e,n),e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e,t,i){return(p=h()?Reflect.construct:function(e,t,i){var s=[null];s.push.apply(s,t);var a=new(Function.bind.apply(e,s));return i&&d(a,i.prototype),a}).apply(null,arguments)}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,s)}function s(){return p(e,arguments,l(this).constructor)}return s.prototype=Object.create(e.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),d(s,e)})(e)}var c=function(e){var t,i;function s(t){var i,s,a;return i=e.call.apply(e,[this].concat(t))||this,s=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i),a=s.__proto__,Object.defineProperty(s,"__proto__",{get:function(){return a},set:function(e){a.__proto__=e}}),i}return i=e,(t=s).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,s}(u(Array));function v(e){void 0===e&&(e=[]);var t=[];return e.forEach((function(e){Array.isArray(e)?t.push.apply(t,v(e)):t.push(e)})),t}function f(e,t){return Array.prototype.filter.call(e,t)}function m(e,t){var i=o(),s=r(),a=[];if(!t&&e instanceof c)return e;if(!e)return new c(a);if("string"==typeof e){var n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){var l="div";0===n.indexOf("1)if(this.params.centeredSlides)this.visibleSlides.each((function(e){i.push(e)}));else for(t=0;t=s[h]&&i=s[h]&&(d=h);r.normalizeSlideIndex&&(d<0||void 0===d)&&(d=0)}if(a.indexOf(i)>=0)t=a.indexOf(i);else{var p=Math.min(r.slidesPerGroupSkip,d);t=p+Math.floor((d-p)/r.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),d!==n){var u=parseInt(this.slides.eq(d).attr("data-swiper-slide-index")||d,10);x(this,{snapIndex:t,realIndex:u,previousIndex:n,activeIndex:d}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),o!==u&&this.emit("realIndexChange"),(this.initialized||this.params.runCallbacksOnInit)&&this.emit("slideChange")}else t!==l&&(this.snapIndex=t,this.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this.params,i=m(e.target).closest("."+t.slideClass)[0],s=!1;if(i)for(var a=0;a=o.length&&(v=o.length-1),(h||n.initialSlide||0)===(d||0)&&i&&a.emit("beforeSlideChangeStart");var f,m=-o[v];if(a.updateProgress(m),n.normalizeSlideIndex)for(var g=0;g=i.length-s){e=-i.length+t+s,e+=s,this.slideTo(e,0,!1,!0)&&0!==l&&this.setTranslate((o?-this.translate:this.translate)-l)}this.allowSlidePrev=a,this.allowSlideNext=r,this.emit("loopFix")},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,i=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),i.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){if(!(this.support.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked||this.params.cssMode)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){this.support.touch||this.params.watchOverflow&&this.isLocked||this.params.cssMode||(this.el.style.cursor="")}},manipulation:{appendSlide:function(e){var t=this.$wrapperEl,i=this.params;if(i.loop&&this.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s