var geckoShopify,ThemeIdLoT4,sp_nt_storage=!1,Enablestorage=!0,tuttimer=[],designMode=Shopify.designMode||!1;try{sp_nt_storage="undefined"!=typeof Storage&&Enablestorage,localStorage.setItem("gecko","test"),localStorage.removeItem("gecko"),ThemeIdLoT4=localStorage.getItem(ThemeNameT42)}catch(t){sp_nt_storage=!1}var nt_currency=sp_nt_storage?localStorage.getItem("nt_currency"):null,app_review=nt_settings.app_review;!function(p){"use strict";var h,e,a,n,t;(h=p("body")).hasClass("rtl_true"),e=p("#ld_cl_bar"),a=p(window).width(),n=nt_settings.timezone,t='.shopify-error a[href^="#"], [data-js-scrolid]',geckoShopify={init:function(){this.hTransparent(),this.bannerCountdown(),this.The4WrappTable(),this.InitCountdown(),this.InitSeCountdown(),this.fullHeightRow(),this.parallax(),this.prisotope(),this.ScrollId(),this.BGVideoSection(),this.InitHTMLVideo(),this.sidePopup(),this.linkAcc(),this.linktrigger(),this.cartCookies(),this.loadingBar(),this.colorConsoleLog(nt_settings.theme_ver,"The4.co","#008060","#4959bd"),p(window).resize(),window.dispatchEvent(new Event("resize")),h.addClass("shopify-ready")},isMobile:function(){return/Android|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent||navigator.vendor||window.opera)},colorConsoleLog:function(t,e,a,n){nt_settings.disabled_ver_console||console.log("%c ".concat(t," %c ").concat(e," %c"),"background:".concat(a||"#35495f"," ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff"),"background:".concat(n||"#41b883"," ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff"),"background:transparent")},prisotope:function(){if(!(0.shopify-section:first"),o=n.find(".se_height_full");o.length<1||(t=p(window).height(),(e=o.offset().top)")},parallax:function(){function e(t){var e=t||p(".nt_parallax_true.lazyloaded:not(.js_ralax_doned)");e.addClass("js_ralax_doned").jarallax({speed:e.attr("data-speed")||.8})}0!=p(".nt_parallax_true").length&&(e(),p(".nt_parallax_true:not(.lazyloaded)").one("lazyloaded",function(t){setTimeout(function(){e()},200)}))},refresh_flickity:function(t){var e=t.attr("data-flickity")||t.attr("data-flickityjs")||"{}";t.flickity(JSON.parse(e))},refresh_packery:function(t){var e=t.attr("data-packery")||"{}";t.packery(JSON.parse(e))},refresh_isotope:function(t){var e=t.attr("data-isotope")||"{}";t.isotope(JSON.parse(e))},FixHeight:function(){p(".type_carousel .js_carousel").on("change.flickity",function(t,e){var a=p(t.currentTarget);if(a.find(".nt_pr:last-child").hasClass("is-selected")){var n=p(window).width(),o=[];if(0==(e=(1025<=n?15==a.data("cl")?5:12/a.data("cl"):768<=n?12/a.data("tb"):12/a.data("mb"))-a.find(".nt_pr.is-selected").length))return;a.find(".nt_pr").each(function(t){o.push(p(this).outerHeight(!0))});var i=o.slice(0,e);a.find(".nt_pr.is-selected").each(function(t){i.push(p(this).outerHeight(!0))});var s=Math.max.apply(this,i);a.find(".flickity-viewport").css({height:s+"px"})}})},BGVideoSection:function(){0!=p(".js_video").length&&($script("//www.youtube.com/iframe_api","loaded_v_js"),h.on("youTubeReady",function(){p(".js_video").each(function(t){geckoShopify.refresh_Youtube(p(this))})}))},InitHTMLVideo:function(){0!=p(".vid_nt_js").length&&Modernizr.video&&p(".vid_nt_js").each(function(){var t=p(this),e=t.parent().find(".img_vid_js");t.addClass("lazyload"),t.on("lazyloaded",function(){t[0].play(),t.addClass("vid_ready"),e.addClass("lazyload")}),t.on("playing",function(){e.remove()})})},hTransparent:function(t){if(!h.hasClass("h_banner_false")){var n=p("#shopify-section-header_banner"),o="h_banner_"+n.find(".h__banner").attr("data-ver");("closed"!=Cookies.get(o)||designMode)&&(function(){h.removeClass("h_calc_ready"),n.css("height","");var t=n.outerHeight();h.addClass("h_calc_ready"),n.css({height:0}),setTimeout(function(){n.css({height:t})},8),setTimeout(function(){n.css({height:"auto"})},800)}(),n.on("click",".h_banner_close",function(t){t.preventDefault();var e=n.outerHeight();n.css({height:e}),setTimeout(function(){n.css({height:0})},8);var a=parseInt(n.find(".h__banner").attr("data-date"));a&&!designMode&&Cookies.set(o,"closed",{expires:a,path:"/"})}))}},getDateCountdown:function(t){if(void 0!==t){var e=t.replace("24:00:00","23:59:59");if("not4"!=n)try{e=moment.tz(t.replace(/\//g,"-"),n).toDate()}catch(t){console.log("Timezone error: "+n)}else e=new Date(e);return e}},InitCountdown:function(){var t=p(".pr_coun_dt:not(.done_cd)");if(0!=t.length){var a=nt_settings.prItemCountdown;t.each(function(){var e=p(this);e.countdown(geckoShopify.getDateCountdown(e.data("date")),{elapse:!0}).on("update.countdown",function(t){t.elapsed?e.closest(".pr_deal_dt").html("").addClass("expired_cdt4"):e.html(t.strftime(a))}).addClass("done_cd").closest(".pr_deal_dt").addClass("donetmcd")})}},InitSeCountdown:function(){var t=p(".sepr_coun_dt:not(.done_cd)");if(0!=t.length){var a=nt_settings.countdown_days,n=nt_settings.countdown_hours,o=nt_settings.countdown_mins,i=nt_settings.countdown_sec;t.each(function(){var e=p(this);e.countdown(geckoShopify.getDateCountdown(e.data("date")),function(t){e.html(t.strftime('%-D '+a+' %H '+n+' %M '+o+' %S '+i+""))}).addClass("done_cd").closest(".sepr_deal_dt").addClass("donetmcd")})}},bannerCountdown:function(){if(0!=p("[data-hbanner_cd]").length){var s=nt_settings.bannerCountdown;p("[data-hbanner_cd]").each(function(){!function(t){var e=t.data("loop"),a=t.data("date"),n=moment();if(parseInt(n.format("YYYYMMDD")),n').attr("href",e))}}}(jQuery_T4NT),jQuery_T4NT(document).ready(function(t){t("body");"/challenge#contact_form"==location.pathname+location.hash&&setTimeout(function(){t("html, body").animate({scrollTop:0},800)},50),"true"!=ThemeIdLoT4&&"true"!=ThemeIdT4&&t(ThemePuT4).removeClass("hide hidden"),geckoShopify.init(),1024nt_settings.dragThreshold&&t.preventDefault()}},{passive:!1})}}();