%PDF- %PDF-
Direktori : /home/lightco1/oldbackup/wp-content/themes/konte/js/ |
Current File : /home/lightco1/oldbackup/wp-content/themes/konte/js/scripts.min.js |
var konte=konte||{};(function(g){"use strict";konte.init=function(){this.data=konteData||{};this.preloader();this.focusSearchField();this.instantSearch();this.toggleListDropdown();this.addWishlistCounter();this.updateWishlistCounter();this.toggleHamburgerScreen();this.toggleHamburgerMenu();this.toggleVerticalMenu();this.toggleOffCanvas();this.toggleModals();this.loadMorePosts();this.fetchPostTotalShare();this.featuredContentCarousel();this.postsSliderWidget();this.stickySidebar();this.closeTopbar();this.stickyHeader();this.pageHeaderHeight();this.scrollDown();this.closeWCMessages();this.productQuantityButtons();this.singleProductAjaxAddToCart();this.cartPanel();this.reviewProduct();this.productLightBox();this.toggleProductTabs();this.productVariationSwatches();this.relatedProductsCarousel();this.singleProductV1();this.singleProductV2();this.singleProductV3();this.singleProductV4();this.singleProductV5();this.singleProductV6();this.singleProductV7();this.formFieldFocus();this.loginTabs();this.loginPanel();this.loginPanelAuthenticate();this.productsMasonry();this.productsCarousel();this.productThumbnailsSlider();this.productThumbnailZoom();this.productQuickView();this.loadMoreProducts();this.productsQuickSearch();this.productsTools();this.cartWidget();this.shopNotifications();this.pageTemplateSplit();this.videoBackground();this.pageTemplateFlexPosts();this.stickyScrollDown();this.stickySocials();this.openShareLinks();this.popup();this.fixVCRowsWithVerticalHeader();this.mobileMenu();this.responsiveProductGallery();this.responsiveProductV3();this.portfolioMasonry();this.portfolioFilter();this.backToTop();this.lazyLoadImages();this.updateCheckout();g(document.body).trigger("konte_initialized",this)};konte.updateCheckout=function(){if(!g(document.body).hasClass("woocommerce-checkout")){return}g(document.body).on("wc_fragments_loaded wc_fragments_refreshed",function(){g(document.body).trigger("update_checkout")})};konte.focusSearchField=function(){g(".header-search .search-field").on("focus",function(){var e=g(this).closest(".header-search").find(".quick-links");if(!e.length){return}e.addClass("open");g(this).addClass("focused")});g(document.body).on("click","div",function(e){var t=g(e.target);if(t.is(".header-search")||t.closest(".header-search").length){return}g(".quick-links",".header-search").removeClass("open");g(".search-field",".header-search").removeClass("focused")})};konte.instantSearch=function(){var t=null,o="",s={},n=null,r=g("#search-modal"),c=r.find(".modal-header"),l=r.find(".modal-content"),d=r.find("form"),u=d.find("input.search-field"),f=r.find(".search-result"),p=f.find(".view-more a"),i=r.find(".quick-links"),h=r.find("input[name=post_type]").val();if(!r.length){return}g(document.body).on("konte_modal_opened",function(e,t){if(t.is("#search-modal")){u.focus()}});new PerfectScrollbar(f.find(".searched-items").get(0),{suppressScrollX:true});r.on("keyup",".search-field",function(e){var t=false;if(typeof e.which==="undefined"){t=true}else if(typeof e.which==="number"&&e.which>0){t=!e.ctrlKey&&!e.metaKey&&!e.altKey}if(!t){return}i.fadeOut(400);if(n){clearTimeout(n)}n=setTimeout(function(){a()},200)}).on("click",".search-reset",function(){if(t){t.abort()}i.fadeIn(400);r.addClass("reset");f.fadeOut(function(){r.removeClass("searching searched search-found search-not-found invalid-length reset");l.removeAttr("style")})}).on("focusout",".search-field",function(){if(u.val().length<2){i.fadeIn(400);f.fadeOut(function(){r.removeClass("searching searched search-found search-not-found invalid-length");l.removeAttr("style")})}});function a(){var e=u.val(),i=e;if(o===e){return}o=e;if(e.length<2){r.removeClass("searched searching search-found search-not-found");return}var a=d.attr("action")+"?"+d.serialize();g(".view-more-results",f).slideUp(10);r.removeClass("search-found search-not-found searched").addClass("searching");if(i in s){m(s[i])}else{t=g.post(a,{search_columns:6,konte_search_nonce:konte.data.product_search_nonce},function(e){if(!e){r.removeClass("searching");return}var t=g("#primary",e);if("product"===h){var o=g("ul.products",t);if(o.length){s[i]={found:true,items:o,url:a}}else{s[i]={found:false,text:g(".woocommerce-info",t).text()}}}else{var n=g("#main article",t);if(n.length){n.addClass("col-md-4");s[i]={found:true,items:g('<div class="posts row" />').append(n),url:a}}else{s[i]={found:false,text:g(".no-results .nothing-found-message",t).text()}}}m(s[i])},"html")}}function m(e){var t="product"===h?"woocommerce":"",o=f.find(".searched-items");r.removeClass("searching");l.css("top",c.outerHeight()+65);if(e.found){var n=e.items.clone(),i=n.children();r.addClass("search-found");p.attr("href",e.url);o.addClass(t).html(n).append(f.find(".view-more").clone());if("product"===h){g(document.body).trigger("konte_loaded_products",[i])}for(var a=0;a<i.length;a++){g(i[a]).css("animation-delay",a*100+"ms")}i.addClass("animated konteFadeInUp");o.find(".view-more").css("animation-delay",++a*100+"ms").addClass("animated konteFadeInUp");f.slideDown()}else{r.addClass("search-not-found");o.removeClass(t).html(g('<div class="not-found" />').text(e.text));p.attr("href","#");f.slideDown()}r.addClass("searched");g(document.body).trigger("konte_lazy_load_images")}};konte.toggleListDropdown=function(){g(document.body).on("click",".list-dropdown ul li",function(){var e=g(this);e.closest(".list-dropdown").removeClass("open").find(".current .selected").text(e.text())});if("ontouchstart"in document.documentElement){g(document.body).on("click",".list-dropdown .current",function(e){e.preventDefault();g(this).closest(".list-dropdown").toggleClass("open")}).on("click",".list-dropdown ul li",function(){var e=g(this);e.closest(".list-dropdown").removeClass("open").find(".current .selected").text(e.text())}).on("click",function(e){var t=g(e.target);if(t.is(".list-dropdown")||t.closest(".list-dropdown").length){return}g(".list-dropdown").removeClass("open")})}};konte.addWishlistCounter=function(){g(".woocommerce-MyAccount-navigation-link--wishlist, .account-link--wishlist").append('<span class="counter wishlist-counter">'+konte.data.wishlist_count+"</span>")};konte.updateWishlistCounter=function(){var e=g("span.wishlist-counter");if(!e.length){return}g(document.body).on("added_to_wishlist",function(){e.text(function(){return parseInt(this.innerText,10)+1})}).on("removed_from_wishlist",function(){e.text(function(){var e=parseInt(this.innerText,10)-1;return Math.max(0,e)})})};konte.toggleHamburgerScreen=function(){g(document.body).on("click",".header-hamburger",function(e){e.preventDefault();var t=g(this),o=g("#"+t.data("target"));if(!o.length){return}var n=g("#fullscreen-menu",o),i=g(".filter-widgets",o),a=g(".social-icons",o),s=g(".currency",o),r=g(".language",o),c=100,l=0;if(!o.hasClass("content-animation-none")){if(o.hasClass("content-animation-fade")){c=160}if(n.length&&!n.data("delay")){g(".menu > li",n).each(function(){g(this).css("animation-delay",l*c+"ms");l++});n.data("delay",l)}else if(i.length&&!i.data("delay")){g(".widget",i).each(function(){g(this).css("animation-delay",l*c+"ms");l++});i.data("delay",l)}l=1;if(a.length&&!a.data("delay")){g(".menu > li",a).each(function(){g(this).css("animation-delay",l*c+"ms");l++});a.data("delay",l)}if(s.length&&!s.data("delay")){s.css("animation-delay",l*c+"ms");s.data("delay",l);l++}if(r.length&&!r.data("delay")){r.css("animation-delay",l*c+"ms");r.data("delay",l);l++}}o.fadeToggle(function(){g(".hamburger-menu",o).addClass("active")});o.addClass("open")}).on("click","#hamburger-fullscreen .button-close",function(e){e.stopPropagation();var t=g(this),o=g("#hamburger-fullscreen");t.removeClass("active");o.removeClass("open");setTimeout(function(){o.fadeOut()},420)});if(typeof PerfectScrollbar!=="undefined"){var e=g("#hamburger-fullscreen");if(e.length){new PerfectScrollbar(g(".hamburger-screen-content",e).get(0))}}};konte.toggleHamburgerMenu=function(){var e=g("#fullscreen-menu");if(!e.length){return}if(e.hasClass("click-open")){e.on("click",".menu li.menu-item-has-children > a",function(e){e.preventDefault();var t=g(this).parent();t.toggleClass("active").siblings().removeClass("active").children("ul").removeClass("open");t.children("ul").toggleClass("open");if(t.closest("ul").hasClass("sub-menu")){t.children("ul").slideToggle();t.siblings().find("ul").slideUp()}})}};konte.toggleVerticalMenu=function(){var e=g(".header-vertical .main-navigation");if(!e.length){return}var o=e.children(".menu").hasClass("nav-menu--submenu-slidedown");e.on("click","li.menu-item-has-children > a",function(e){var t=g(this).parent();t.toggleClass("active").siblings().removeClass("active").children("ul").removeClass("open");t.children("ul").toggleClass("open");if(o||t.closest("ul").hasClass("sub-menu")){t.children("ul").slideToggle();t.siblings().find("ul").slideUp();e.preventDefault()}})};konte.toggleOffCanvas=function(){g(document.body).on("click",'[data-toggle="off-canvas"]',function(e){var t="#"+g(this).data("target");if(g(t).hasClass("open")){konte.closeOffCanvas(t)}else if(konte.openOffCanvas(t)){e.preventDefault()}}).on("click",".offscreen-panel .button-close, .offscreen-panel .backdrop",function(e){e.preventDefault();konte.closeOffCanvas(this)}).on("keyup",function(e){if(e.keyCode===27){konte.closeOffCanvas()}})};konte.openOffCanvas=function(e){var t=g(e);if(!t.length){return false}t.fadeIn();t.addClass("open");g(document.body).addClass("offcanvas-opened "+t.attr("id")+"-opened").trigger("konte_off_canvas_opened",[t]);return true};konte.closeOffCanvas=function(e){if(!e){g(".offscreen-panel").each(function(){var e=g(this);if(!e.hasClass("open")){return}e.removeClass("open").fadeOut();g(document.body).removeClass(e.attr("id")+"-opened")})}else{e=g(e).closest(".offscreen-panel");e.removeClass("open").fadeOut();g(document.body).removeClass(e.attr("id")+"-opened")}g(document.body).removeClass("offcanvas-opened").trigger("konte_off_canvas_closed",[e])};konte.toggleModals=function(){g(document.body).on("click",'[data-toggle="modal"]',function(e){var t="#"+g(this).data("target");if(g(t).hasClass("open")){konte.closeModal(t)}else if(konte.openModal(t)){e.preventDefault()}}).on("click",".modal .button-close, .modal .backdrop",function(e){e.preventDefault();konte.closeModal(this)}).on("keyup",function(e){if(e.keyCode===27){konte.closeModal()}})};konte.openModal=function(e){var t=g(e);if(!t.length){return false}t.fadeIn();t.addClass("open");g(document.body).addClass("modal-opened "+t.attr("id")+"-opened").trigger("konte_modal_opened",[t]);return true};konte.closeModal=function(e){if(!e){g(".modal").removeClass("open").fadeOut();g(".modal").each(function(){var e=g(this);if(!e.hasClass("open")){return}e.removeClass("open").fadeOut();g(document.body).removeClass(e.attr("id")+"-opened")})}else{e=g(e).closest(".modal");e.removeClass("open").fadeOut();g(document.body).removeClass(e.attr("id")+"-opened")}g(document.body).removeClass("modal-opened").trigger("konte_modal_closed",[e])};konte.featuredContentCarousel=function(){var e=g("#featured-content-carousel"),t={rtl:!!konte.data.rtl,prevArrow:'<span class="slick-prev slick-arrow svg-icon icon-left icon-small"><svg width="16" height="16"><use xlink:href="#left"></use></svg></span>',nextArrow:'<span class="slick-next slick-arrow svg-icon icon-right icon-small"><svg width="16" height="16"><use xlink:href="#right"></use></svg></span>'};if(!e.length){return}if(e.hasClass("carousel")){t.infinite=false;t.slidesToShow=3;t.slidesToScroll=3;t.responsive=[{breakpoint:991,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:767,settings:{slidesToShow:1,slidesToScroll:1}}];e.on("init reInit breakpoint",function(e,t){t.$slides.each(function(){i(this)})})}else{if("fade"===e.data("effect")){t.fade=true}e.on("beforeChange",function(e,t,o,n){i(t.$slides.get(n))});e.on("init reInit breakpoint",function(e,t){i(t.$slides.get(t.currentSlide))})}e.slick(t);function i(e){var t=g(e);t.css("background-image","url("+t.data("lazy")+")");t.data("lazy_loaded",true);t.removeClass("loading")}};konte.loadMorePosts=function(){if(g(document.body).hasClass("page-template-flex-posts")){return}g(document.body).on("click",".navigation.next-posts-navigation a",function(e){e.preventDefault();var i=g(this),a=i.closest(".navigation"),s=i.attr("href");if(i.hasClass("loading")){return}i.addClass("loading");g.get(s,function(e){var t=g("#main",e),o=g(".hentry",t),n=g(".next-posts-navigation",t);o.each(function(e,t){g(t).css("animation-delay",e*100+"ms")});if(a.prev(".posts-wrapper").length){o.appendTo(a.prev(".posts-wrapper"))}else{o.insertBefore(a)}o.addClass("animated konteFadeInUp");if(n.length){i.replaceWith(g("a",n))}else{i.removeClass("loading");a.fadeOut()}if(a.hasClass("next-projects-navigation")){if(konte.data.portfolio_nav_ajax_url_change){window.history.pushState(null,"",s)}}else if(konte.data.blog_nav_ajax_url_change){window.history.pushState(null,"",s)}g(document.body).trigger("konte_posts_loaded",[o,true])})})};konte.fetchPostTotalShare=function(){g(".total-shares.fetching:visible").each(function(){var t=g(this),e=t.data("post_id");if(!e){return}g.post(konte.data.ajax_url,{action:"konte_get_total_shares",post_id:e,security:konte.data.share_nonce},function(e){t.removeClass("fetching");if(e.success){g(".count",t).html(e.data)}})})};konte.postsSliderWidget=function(){g(".posts-slider-widget .posts-slider").slick({rtl:!!konte.data.rtl,adaptiveHeight:true,autoplay:true,autoplaySpeed:3e3,prevArrow:'<span class="slick-prev slick-arrow svg-icon icon-left icon-small"><svg width="16" height="16"><use xlink:href="#left"></use></svg></span>',nextArrow:'<span class="slick-next slick-arrow svg-icon icon-right icon-small"><svg width="16" height="16"><use xlink:href="#right"></use></svg></span>'})};konte.stickySidebar=function(){if(g.fn.stick_in_parent&&g(window).width()>767){g("#secondary.sticky-sidebar").stick_in_parent()}g(document.body).on("wc_fragments_refreshed post-load konte_products_loaded",function(){g(document.body).trigger("sticky_kit:recalc")})};konte.closeTopbar=function(){g(document.body).on("click",".close-topbar",function(e){e.preventDefault();g("#topbar").slideUp()})};konte.stickyHeader=function(){if(!konte.data.sticky_header||"none"===konte.data.sticky_header){return}var t=g(window),e=g("#masthead"),o=e,n=g("#topbar"),i=0;if(e.hasClass("header-v10")){o=e.find(".header-main .header-right-items")}if(n.length){i+=n.outerHeight()}if("smart"===konte.data.sticky_header){i+=n.length?0:o.outerHeight();var a=new Headroom(o.get(0),{offset:i});a.init()}else{s(i);t.on("scroll",function(){s(i)})}function s(e){e=e?e:0;if(t.scrollTop()>=e){o.addClass("sticky")}else{o.removeClass("sticky")}}};konte.pageHeaderHeight=function(){var e=g(".page .page-header.full-height");if(!e.length){return}var t=g("#topbar"),o=g("#masthead"),n=g(window).height();if(t.length){n-=t.outerHeight()}if(!o.hasClass("transparent")){n-=o.outerHeight();e.css("marginTop","-"+g("#content").css("paddingTop"))}if(e.hasClass("title-front")){e.height(n)}else{e.find(".entry-thumbnail").height(n)}};konte.scrollDown=function(){g(document.body).on("click",".scroll",function(e){e.preventDefault();var t=g(this).parent().next().offset().top;g("html, body").animate({scrollTop:t})})};konte.closeWCMessages=function(){g(document.body).on("click",".woocommerce-message .close-message, .woocommerce-error .close-message, .woocommerce-info .close-message",function(e){e.preventDefault();g(this).closest("div").fadeOut()})};konte.productQuantityButtons=function(){g(document.body).on("click",".quantity .increase, .quantity .decrease",function(e){e.preventDefault();var t=g(this),o=t.siblings(".qty"),n=parseFloat(o.val()),i=parseFloat(o.attr("min")),a=parseFloat(o.attr("max")),s=parseFloat(o.attr("step"));n=n?n:0;i=i?i:0;a=a?a:n+1;s=s?s:1;if(t.hasClass("decrease")&&n>i){o.val(n-s);o.trigger("change")}if(t.hasClass("increase")&&n<a){o.val(n+s);o.trigger("change")}})};konte.singleProductAjaxAddToCart=function(){if("1"!==konte.data.product_ajax_addtocart){return}g(document.body).on("submit","form.cart",function(){var e=g(this),n=e.find(".single_add_to_cart_button"),t=e.attr("action")?e.attr("action"):window.location.href,o=e.serialize();if(e.closest("div.product").hasClass("product-type-external")){return}n.removeClass("added").addClass("loading disabled").prop("disabled",true);if(n.attr("name")){o+="&"+encodeURI(n.attr("name"))+"="+encodeURI(n.attr("value"))}g.ajax({url:t,data:o+"&konte_add_to_cart_nonce="+konte.data.add_to_cart_nonce,method:e.attr("method")?e.attr("method").toUpperCase():"POST",success:function(e){n.removeClass("loading disabled").addClass("added").prop("disabled",false);if(konte.data.cart_open_after_added!=="1"){var t=g(e).find(".woocommerce-error, .woocommerce-info, .woocommerce-message"),o=g(".konte-woocommerce-alert");if(t.length){if(!o.length){o=g('<div class="konte-woocommerce-alert"></div>');g(document.body).append(o)}o.html(t);setTimeout(function(){o.addClass("active")},500);if(t.hasClass("woocommerce-message")){setTimeout(function(){o.removeClass("active")},5e3)}}}if(g(e).find(".woocommerce-message").length){g(document.body).trigger("added_to_cart")}g(document.body).trigger("wc_fragment_refresh");if(typeof wc_add_to_cart_params!=="undefined"){if(wc_add_to_cart_params.cart_redirect_after_add==="yes"&&wc_add_to_cart_params.cart_url){window.location.href=wc_add_to_cart_params.cart_url}}}});return false});g(document.body).on("click",".konte-woocommerce-alert .close-message",function(e){e.preventDefault();g(this).closest(".konte-woocommerce-alert").removeClass("active")})};konte.cartPanel=function(){var e=g("#cart-panel");if(!e.length){return}if(typeof PerfectScrollbar!=="undefined"){new PerfectScrollbar(e.find(".panel-content").get(0))}if("1"===konte.data.cart_open_after_added){g(document.body).on("added_to_cart",function(){if(g("#cart-panel").hasClass("open")){return}konte.closeOffCanvas(false);konte.openOffCanvas("#cart-panel")})}};konte.reviewProduct=function(){setTimeout(function(){g("#respond p.stars a").prepend('<span class="svg-icon icon-star"><svg><use xlink:href="#star"></use></svg></span>')},100);g(document.body).on("click",".add-review",function(e){e.preventDefault();var t=g(this).closest("#reviews");g("#review_form_wrapper",t).fadeIn();g("#comments",t).fadeOut()}).on("click",".cancel-review a",function(e){e.preventDefault();var t=g(this).closest("#reviews");g("#review_form_wrapper",t).fadeOut();g("#comments",t).fadeIn()});g("#review_form").on("focus","input, textarea",function(){g(this).parent().addClass("focused")}).on("blur","input, textarea",function(){if(g(this).val()===""){g(this).parent().removeClass("focused")}}).find("input, textarea").each(function(){if(g(this).val()!==""){g(this).parent().addClass("focused")}})};konte.toggleProductTabs=function(){var e=g("div.product");if(e.hasClass("layout-v6")||e.hasClass("layout-v7")){return}g(document.body).off("click",".woocommerce-tabs.panels-offscreen .wc-tabs li a, .woocommerce-tabs.panels-offscreen ul.tabs li a").on("click",".woocommerce-tabs.panels-offscreen .wc-tabs li a",function(e){e.preventDefault();var t=g(this),o=t.closest(".wc-tabs-wrapper, .woocommerce-tabs"),n=o.find(".wc-tabs, ul.tabs"),i=o.find(".panels"),a=o.find(t.attr("href"));n.find("li").removeClass("active");t.closest("li").addClass("active");i.find(".panel").show();i.fadeIn();a.addClass("open");g(document.body).addClass("offcanvas-opened")}).on("click",".woocommerce-tabs .backdrop, .woocommerce-tabs .button-close",function(e){e.preventDefault();var t=g(this).closest(".wc-tabs-wrapper, .woocommerce-tabs"),o=t.find(".panels"),n=o.find(".panel.open");n.removeClass("open");t.find(".tabs").children("li").removeClass("active");o.fadeOut();if(n.is("#tab-reviews")){n.find("#review_form_wrapper").fadeOut();n.find("#comments").fadeIn()}g(document.body).removeClass("offcanvas-opened")}).on("keyup",function(e){if(e.keyCode===27){var t=g(".wc-tabs-wrapper, .woocommerce-tabs"),o=t.find(".panels"),n=o.find(".panel.open");n.removeClass("open");t.find(".tabs").children("li").removeClass("active");o.fadeOut();if(n.is("#tab-reviews")){n.find("#review_form_wrapper").fadeOut();n.find("#comments").fadeIn()}g(document.body).removeClass("offcanvas-opened")}});if(!window.location.hash){e.find(".wc-tabs, ul.tabs").first().find("li:first").removeClass("active")}else{e.find(".wc-tabs, ul.tabs").first().find("li.active a").trigger("click")}};konte.productFullWidth=function(t){var o=g(window);e();o.on("resize",function(){e()});function e(){var e=o.width();e-=konte.getVerticalHeaderWidth();t.width(e);if(konte.data.rtl){t.css("marginRight",-e/2)}else{t.css("marginLeft",-e/2)}}};konte.productLightBox=function(){if(typeof wc_single_product_params==="undefined"||wc_single_product_params.photoswipe_enabled!=="1"){return}g(".woocommerce-product-gallery").on("click",".zoomImg",function(){if(wc_single_product_params.flexslider_enabled){g(this).closest(".woocommerce-product-gallery").children(".woocommerce-product-gallery__trigger").trigger("click")}else{g(this).prev("a").trigger("click")}})};konte.productBackgroundFromGallery=function(o){if(typeof BackgroundColorTheif=="undefined"){return}var t=o.find(".woocommerce-product-gallery"),e=t.find(".wp-post-image"),n=new BackgroundColorTheif;e.one("load",function(){setTimeout(function(){i(e.get(0))},100)}).each(function(){if(this.complete){g(this).trigger("load")}});setTimeout(function(){var e=t.data("flexslider");if(!e){return}e.vars.before=function(e){setTimeout(function(){i(e.slides.filter(".flex-active-slide").find("a img").get(0))},150)}},150);t.on("jetpack-lazy-loaded-image",".wp-post-image",function(){g(this).one("load",function(){i(this)})});t.on("woocommerce_gallery_reset_slide_position",function(){i(e.get(0))});function i(e){if(e.src===""){return}if(e.classList.contains("jetpack-lazy-image")){if(!e.dataset["lazyLoaded"]){return}}var t=n.getBackGroundColor(e);o.get(0).style.backgroundColor="rgb("+t[0]+","+t[1]+","+t[2]+")"}};konte.productVariationSwatches=function(){g(document.body).on("tawcvs_initialized",function(){var e=g(".variations_form");konte.modifyVariationSwatches(e)})};konte.singleProductV1=function(){var e=g("div.product.layout-v1");if(!e.length||typeof BackgroundColorTheif=="undefined"){return}g(".woocommerce-product-gallery",e).one("jetpack-lazy-loaded-image load",".wp-post-image",function(){var o=g(this);if(o){setTimeout(function(){var e=o.closest(".woocommerce-product-gallery__image").height();var t=o.closest(".woocommerce-product-gallery");if(e&&t.length){t.height(e)}},100)}});konte.productFullWidth(e);e.css({paddingTop:g("#masthead").height()});if(!e.hasClass("background-set")&&konte.data.product_auto_background==="1"){konte.productBackgroundFromGallery(e)}};konte.singleProductV2=function(){var e=g("div.product.layout-v2");if(!e.length){return}var n=g(window),i=e.find(".summary"),a=false;konte.productFullWidth(e);if("1"===konte.data.product_image_zoom){e.find(".woocommerce-product-gallery .woocommerce-product-gallery__image").each(function(){konte.zoomSingleProductImage(this)})}if(g.fn.stick_in_parent){i.on("sticky_kit:bottom",function(){g(this).parent().css("position","static")});t();n.on("resize",t)}function t(){var e={};if(konte.data.sticky_header==="normal"){var t=g("#masthead").height(),o=g("#topbar");if(o.length){t+=o.height()}e={recalc_every:1,offset_top:t}}if(n.width()>991){if(!a){i.stick_in_parent(e)}a=true}else{i.trigger("sticky_kit:detach");a=false}}};konte.singleProductV3=function(){var n=g("div.product.layout-v3");if(!n.length){return}var i=g("#masthead");n.css({paddingTop:i.height()});g(".product-toolbar").css({top:i.height()});if(!n.hasClass("background-set")&&konte.data.product_auto_background==="1"){konte.productBackgroundFromGallery(n)}g(".woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:eq(0) .wp-post-image").one("load",e);setTimeout(function(){e()},200);g(window).on("resize",e);function e(){var e=g(window).height()-i.outerHeight()-g("#colophon").outerHeight()+19,t=g("#topbar"),o=g(".footer-main");if(t.length){e-=t.outerHeight()}if(o.length){e-=parseFloat(o.css("padding-top"))}n.find(".woocommerce-product-gallery").css({maxHeight:e,height:e})}};konte.singleProductV4=function(){var n=g("div.product.layout-v4");if(!n.length){return}setTimeout(function(){var e=n.find(".woocommerce-product-gallery"),t=e.find(".flex-control-thumbs"),o=parseInt(e.height()/t.children().first().height());if(t.children().length>o&&g(window).width()>768){t.slick({vertical:true,infinite:false,slidesToShow:o,slidesToScroll:1,verticalSwiping:true,prevArrow:'<span class="slick-prev slick-arrow svg-icon icon-left icon-small"><svg width="16" height="16"><use xlink:href="#left"></use></svg></span>',nextArrow:'<span class="slick-next slick-arrow svg-icon icon-right icon-small"><svg width="16" height="16"><use xlink:href="#right"></use></svg></span>'})}g("li",t).append("<span/>")},100);if("dropdown"===konte.data.product_quantity_input_style){n.find(".quantity .qty").quantityDropdown()}};konte.singleProductV5=function(){var n=g("div.product.layout-v5"),o=n.find(".summary"),i=o.children(".summary-inner"),a=g(window),e=g("#masthead").height(),s=false;if(!n.length){return}t();a.on("resize",function(){t()});o.css({paddingTop:e});i.css("max-height",a.height()-e);if(konte.data.product_image_zoom){n.find(".product-gallery-thumbnails .woocommerce-product-gallery__image").each(function(){konte.zoomSingleProductImage(this)})}if(g.fn.stick_in_parent){i.on("sticky_kit:bottom",function(){g(this).closest(".product-gallery-summary").addClass("summary-sticky-bottom")}).on("sticky_kit:unbottom",function(){g(this).closest(".product-gallery-summary").removeClass("summary-sticky-bottom")});setTimeout(function(){r()},100);a.on("resize",r)}function t(){var e=a.width(),t=e>1440?60:0;e-=konte.getVerticalHeaderWidth();n.width(e);if(konte.data.rtl){n.css("margin-right",-e/2);o.css("padding-left",e/2-g(".konte-container").width()/2+t)}else{n.css("margin-left",-e/2);o.css("padding-right",e/2-g(".konte-container").width()/2+t)}}function r(){var e={parent:n.get(0)};if(konte.data.sticky_header==="normal"){var t=g("#masthead").height(),o=g("#topbar");if(o.length){t+=o.height()}e={recalc_every:1,offset_top:t,parent:n.get(0)}}if(a.width()>991){if(!s){i.stick_in_parent(e)}s=true}else{i.trigger("sticky_kit:detach");s=false}}};konte.singleProductV6=function(){var n=g("div.product.layout-v6");if(!n.length){return}setTimeout(function(){var e=n.find(".woocommerce-product-gallery"),t=e.find(".flex-control-thumbs"),o=parseInt(e.height()/t.children().first().height());if(t.children().length>o&&g(window).width()>768){t.slick({vertical:true,infinite:false,slidesToShow:o,slidesToScroll:1,verticalSwiping:true,prevArrow:'<span class="slick-prev slick-arrow svg-icon icon-left icon-small"><svg width="16" height="16"><use xlink:href="#left"></use></svg></span>',nextArrow:'<span class="slick-next slick-arrow svg-icon icon-right icon-small"><svg width="16" height="16"><use xlink:href="#right"></use></svg></span>',responsive:[{breakpoint:992,settings:{vertical:false,arrows:false}}]}).trigger("resize")}g("li",t).append("<span/>")},100)};konte.singleProductV7=function(){var n=g("div.product.layout-v7");if(!n.length){return}setTimeout(function(){var e=n.find(".woocommerce-product-gallery"),t=e.find(".flex-control-thumbs"),o=parseInt(e.width()/(t.children().first().width()+10));if(t.children().length>o&&g(window).width()>768){if(konte.data.rlt){t.attr("dir","rtl")}t.slick({infinite:false,adaptiveHeight:true,slidesToShow:o,slidesToScroll:1,prevArrow:'<span class="slick-prev slick-arrow svg-icon icon-left icon-small"><svg width="16" height="16"><use xlink:href="#left"></use></svg></span>',nextArrow:'<span class="slick-next slick-arrow svg-icon icon-right icon-small"><svg width="16" height="16"><use xlink:href="#right"></use></svg></span>'})}g("li",t).append("<span/>")},100)};konte.relatedProductsCarousel=function(){if(typeof Swiper==="undefined"){return}var e=g(".products.related, .products.upsells");if(!e.length){return}var t=e.find("ul.products");t.wrap('<div class="konte-swiper-container swiper-container linked-products-carousel" style="opacity: 0;"></div>');t.after('<div class="swiper-pagination"></div>');t.addClass("swiper-wrapper");t.find("li.product").addClass("swiper-slide");var o=new Swiper(".linked-products-carousel",{loop:false,slidesPerView:1,slidesPerGroup:1,spaceBetween:40,speed:800,watchOverflow:true,pagination:{el:".swiper-pagination",type:"bullets",clickable:true,renderBullet:function(e,t){return'<span class="'+t+'"><span></span></span>'}},on:{init:function(){this.$el.css("opacity",1)}},breakpoints:{360:{slidesPerView:2,slidesPerGroup:2},768:{spaceBetween:20,slidesPerView:2,slidesPerGroup:2},992:{slidesPerView:3,slidesPerGroup:3},1200:{slidesPerView:4,slidesPerGroup:4}}})};konte.zoomSingleProductImage=function(e){if(typeof wc_single_product_params=="undefined"||!g.fn.zoom){return}var t=g(e),n=t.width(),i=false;t.each(function(e,t){var o=g(t).find("img");if(o.data("large_image_width")>n){i=true;return false}});if(i){var o=g.extend({touch:false},wc_single_product_params.zoom_options);if("ontouchstart"in document.documentElement){o.on="click"}t.trigger("zoom.destroy");t.zoom(o)}};konte.formFieldFocus=function(){g(document.body).on("focus",".form-row .input-text, .wpcf7-form-control",function(){g(this).parent().addClass("focused");if(g(this).is(".wpcf7-form-control")){g(this).closest("label").addClass("focused")}else{g(this).closest(".form-row").addClass("focused")}}).on("blur",".form-row .input-text, .wpcf7-form-control",function(){if(g(this).val()===""){if(g(this).is(".wpcf7-form-control")){g(this).closest("label").removeClass("focused")}else{g(this).closest(".form-row").removeClass("focused")}}}).find(".form-row .input-text, .wpcf7-form-control").each(function(){if(g(this).val()!=""){if(g(this).is(".wpcf7-form-control")){g(this).closest("label").addClass("focused")}else{g(this).closest(".form-row").addClass("focused")}}})};konte.loginTabs=function(){g(document.body).on("click",".login-tabs-nav .tab-nav",function(e){e.preventDefault();var t=g(this),o=t.parent().siblings(".u-columns");if(t.hasClass("active")){return}t.addClass("active").siblings().removeClass("active");o.children().eq(t.index()).addClass("active").siblings().removeClass("active")})};konte.loginPanel=function(){g(document.body).on("click","#login-panel .create-account",function(e){e.preventDefault();g(this).closest("form.login").fadeOut(function(){g(this).next("form.register").fadeIn()})}).on("click","#login-panel a.login",function(e){e.preventDefault();g(this).closest("form.register").fadeOut(function(){g(this).prev("form.login").fadeIn()})}).on("click",'[data-toggle="off-canvas"][data-target="login-panel"]',function(){g("#login-panel").find("form").hide().filter(".login").show()})};konte.loginPanelAuthenticate=function(){g("#login-panel").on("submit","form.login",function e(t){var o=g("input[name=username]",this).val(),n=g("input[name=password]",this).val(),i=g("input[name=rememberme]",this).is(":checked"),a=g("input[name=woocommerce-login-nonce]",this).val(),s=g("[type=submit]",this),r=g(this),c=r.next(".woocommerce-error");if(!o){g("input[name=username]",this).focus();return false}if(!n){g("input[name=password]",this).focus();return false}r.find(".woocommerce-error").remove();if(r.data("validated")){return true}s.html('<span class="spinner"></span>');if(c.length){c.fadeOut()}g.post(konte.data.ajax_url,{action:"konte_login_authenticate",security:a,username:o,password:n,remember:i},function(e){if(!e.success){if(!c.length){c=g('<div class="woocommerce-error" role="alert"/>');c.append('<span class="svg-icon icon-error size-normal message-icon"><svg role="img"><use href="#error" xlink:href="#error"></use></svg></span>').append('<ul class="error-message" />').append('<span class="svg-icon icon-close size-normal close-message"><svg role="img"><use href="#close" xlink:href="#close"></use></svg></span>');c.hide().prependTo(r)}c.find(".error-message").html("<li>"+e.data+"</li>");c.fadeIn();s.html(s.attr("value"))}else{r.data("validated",true).submit();s.html(s.data("signed"))}});t.preventDefault()}).on("click",".woocommerce-error .close-message",function(){g(this).closest(".woocommerce-error").fadeOut(function(){g(this).remove()});return false})};konte.productsMasonry=function(){var n=g("ul.products.layout-masonry"),i=g(window);if(!g.fn.masonry||!n.length){return}n.on("layoutComplete",s);a();i.on("resize",a);g(document.body).on("post-load konte_products_loaded",function(e,t,o){if(i.width()<992){return}if(o){n.masonry("appended",t).masonry()}else{n=g("ul.products.layout-masonry");n.on("layoutComplete",s);a()}});function a(){if(n.children().length<=1){return}if(i.width()<992){n.each(function(){var e=g(this);if(e.hasClass("masonry")){e.masonry("destroy")}})}else{n.each(function(){var e=g(this),t={itemSelector:"li.product",columnWidth:"li.product:nth-child(2)",percentPosition:true,transitionDuration:0,isRTL:!!konte.data.rtl};if(!e.hasClass("masonry")){e.masonry(t);e.imagesLoaded().progress(function(){e.masonry("layout")})}})}}function s(){var e=konte.data.rtl?"right":"left";n.children(":nth-child(10n+1), :nth-child(10n+6), :nth-child(10n+9)").css(e,"0").end().children(":nth-child(10n+2), :nth-child(10n+4)").css(e,"50%").end().children(":nth-child(10n+3), :nth-child(10n+5), :nth-child(10n+8), :nth-child(10n)").css(e,"75%").end().children(":nth-child(10n+7)").css(e,"25%")}};konte.productsCarousel=function(){var e=g(".products-carousel");if(!e.length){return}e.find("ul.products li.product").addClass("swiper-slide");var r=new Swiper(".products-carousel",{loop:false,slidesPerView:1,spaceBetween:40,scrollbar:{el:".swiper-scrollbar",hide:false,draggable:true},on:{init:function(){e.css("opacity",1)}},breakpoints:{360:{slidesPerView:2},992:{slidesPerView:3},1200:{slidesPerView:4}}});var c;r.on("reachEnd",function(){var a=g(".woocommerce-navigation.ajax-navigation");if(!a.length){return}if(c){return}var s=document.createElement("li");g(s).addClass("swiper-slide loading-placeholder").css({height:r.height-140}).append('<span class="spinner"></span>');r.appendSlide(s);r.update();c=g.get(a.find("a").attr("href"),function(e){var t=g("#main",e),o=g("ul.products",t),n=o.children(),i=g(".woocommerce-navigation.ajax-navigation",t);if(i.length){a.find("a").replaceWith(g("a",i))}else{a.fadeOut(function(){a.remove()})}g(s).remove();n.css({opacity:0});r.appendSlide(n.addClass("swiper-slide").get());r.update();n.animate({opacity:1});c=false;g(document.body).trigger("konte_products_loaded",[n,true])})})};konte.productThumbnailsSlider=function(){var o={slidesToShow:1,slidesToScroll:1,infinite:false,lazyLoad:"ondemand",dots:false,swipe:false,rtl:!!konte.data.rtl,prevArrow:'<span class="slick-prev slick-arrow svg-icon icon-left icon-small"><svg width="16" height="16"><use xlink:href="#left"></use></svg></span>',nextArrow:'<span class="slick-next slick-arrow svg-icon icon-right icon-small"><svg width="16" height="16"><use xlink:href="#right"></use></svg></span>'};if(konte.data.rtl){g(".product-thumbnails--slider").attr("dir","rtl")}g(".product-thumbnails--slider").slick(o);g(document.body).on("post-load",function(){if(konte.data.rtl){g(".product-thumbnails--slider","ul.products.hover-slider").attr("dir","rtl")}g(".product-thumbnails--slider","ul.products.hover-slider").slick(o)});g(document.body).on("konte_products_loaded",function(e,t){if(konte.data.rtl){g(".product-thumbnails--slider",t).attr("dir","rtl")}g(".product-thumbnails--slider",t).slick(o)})};konte.productThumbnailZoom=function(){g(".product-thumbnail-zoom").each(function(){var e=g(this);e.zoom({url:e.attr("data-zoom_image")})});g(document.body).on("post-load",function(){g(".product-thumbnail-zoom","ul.products.hover-zoom").each(function(){var e=g(this);e.zoom({url:e.attr("data-zoom_image")})})});g(document.body).on("konte_products_loaded",function(e,t){g(".product-thumbnail-zoom",t).each(function(){var e=g(this);e.zoom({url:e.attr("data-zoom_image")})})})};konte.productQuickView=function(){g(document.body).on("click",".quick_view_button",function(e){e.preventDefault();var t=g(this),o=t.data("product_id"),n=g("#"+t.data("target")),i=n.find(".woocommerce"),a=wc_add_to_cart_params?wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","product_quick_view"):konte.data.ajax_url;n.addClass("loading");i.find(".product").html("");g.post(a,{action:"konte_get_product_quickview",product_id:o,security:konte.data.product_quickview_nonce},function(e){i.find(".product").replaceWith(e.data);if(e.success){s();if("modal"==t.data("toggle")){r()}else{c()}}n.removeClass("loading");g(document.body).trigger("konte_product_quickview_loaded",[e,o,konte])}).fail(function(){window.location.herf=t.attr("href")});function s(){var e=i.find(".product"),t=e.find(".woocommerce-product-gallery"),o=e.find(".variations_form");t.on("click",".woocommerce-product-gallery__image a",function(e){e.preventDefault()});if(t.find(".woocommerce-product-gallery__image").length>1){t.flexslider({selector:".woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image",animation:"slide",animationLoop:false,animationSpeed:500,controlNav:true,directionNav:true,prevText:'<span class="svg-icon icon-left icon-small"><svg width="16" height="16"><use xlink:href="#left"></use></svg></span>',nextText:'<span class="svg-icon icon-right icon-small"><svg width="16" height="16"><use xlink:href="#right"></use></svg></span>',slideshow:false,rtl:!!konte.data.rtl,start:function(){t.css("opacity",1)}})}else{t.css("opacity",1)}o.wc_variation_form().find(".variations select:eq(0)").change();o.on("reset_image found_variation",function(){t.flexslider(0)});if(g.fn.tawcvs_variation_swatches_form){o.tawcvs_variation_swatches_form();konte.modifyVariationSwatches(o)}}function r(){var e=i.find(".product"),t=e.find(".woocommerce-product-gallery");t.find("img").css("height",e.outerHeight());if(konte.data.product_quickview_auto_background&&!e.hasClass("background-set")){e.imagesLoaded(function(){konte.productBackgroundFromGallery(e)})}if(typeof PerfectScrollbar!=="undefined"){new PerfectScrollbar(e.find(".summary").get(0))}}function c(){if(typeof PerfectScrollbar!=="undefined"){new PerfectScrollbar(i.find(".product").get(0))}}})};konte.modifyVariationSwatches=function(e){var t=false;if(e.find(".tawcvs-swatches").length){t=true}if(!t){e.removeClass("swatches-support")}e.off("tawcvs_no_matching_variations");e.on("tawcvs_no_matching_variations",function(){event.preventDefault();e.find(".woocommerce-variation.single_variation").show();if(typeof wc_add_to_cart_variation_params!=="undefined"){e.find(".single_variation").stop(true,true).slideDown().html('<p class="invalid-variation-combination">'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"</p>")}})};konte.loadMoreProducts=function(){g(document.body).on("click",".woocommerce-navigation.ajax-navigation a",function(e){e.preventDefault();var t=g(this);if(t.hasClass("loading")){return}t.addClass("loading");n(g(this))});if(g(document.body).hasClass("woocommerce-nav-infinite")){var e=false,t;g(window).on("scroll",function(){if(e){return}e=true;clearTimeout(t);o();setTimeout(function(){e=false},100);t=setTimeout(function(){e=false;o()},200)})}function o(){var t=g(".woocommerce-navigation.ajax-navigation"),o=g("a",t);if(konte.isVisible(t)&&o.length&&!o.hasClass("loading")){o.addClass("loading");n(o,function(e){o=t.find("a")})}}function n(a,s){var r=a.closest(".woocommerce-navigation"),c=a.attr("href");g.get(c,function(e){var t=g("#main",e),o=g("ul.products",t),n=o.children(),i=g(".woocommerce-navigation.ajax-navigation",t);n.each(function(e,t){g(t).css("animation-delay",e*100+"ms")});n.appendTo(r.prev("ul.products"));n.addClass("animated konteFadeInUp");if(i.length){a.replaceWith(g("a",i))}else{r.fadeOut(function(){r.remove()})}if("function"===typeof s){s(e)}g(document.body).trigger("konte_products_loaded",[n,true]);if(konte.data.shop_nav_ajax_url_change){window.history.pushState(null,"",c)}})}};konte.isVisible=function(e){if(e instanceof jQuery){e=e[0]}if(!e){return false}var t=e.getBoundingClientRect();return t.bottom>0&&t.right>0&&t.left<(window.innerWidth||document.documentElement.clientWidth)&&t.top<(window.innerHeight||document.documentElement.clientHeight)};konte.productsQuickSearch=function(){var l=g(".products-quick-search-form");if(g.fn.select2){l.find("select").select2({dir:konte.data.rtl?"rtl":"ltr",width:"auto",minimumResultsForSearch:-1,dropdownCssClass:"products-quick-search-options",dropdownParent:g(".products-quick-search-form")}).on("change",function(){l.addClass("changed")})}l.find("select").on("change",function(){l.addClass("changed")});l.on("submit",function(e){e.preventDefault();var s=g("ul.products.main-products"),r=l.find(":input:not(:checkbox):not(:button)"),c=l.attr("action"),t=c.indexOf("?")!==-1?"&":"?",o=r.filter(function(){return g(this).val()!=0}).serialize();if(o){c+=t+o}if(s.hasClass("layout-carousel")){window.location.href=c;return false}if(!s.length){s=g('<ul class="products"/>');l.closest(".products-toolbar").siblings(".woocommerce-info").replaceWith(s)}l.addClass("filtering");l.find("select").prop("disabled",true);s.addClass("loading").append('<li class="loading-screen"><span class="spinner"></span></li>');g(document.body).trigger("konte_quick_search_products_before_send_request",s);g.get(c,function(e){var t=g(e),o=t.find("#main ul.products"),n=s.next("nav");if(!o.length){o=t.find("#main .woocommerce-info");g(".products-tools").addClass("out");n.fadeOut();s.replaceWith(o)}else{var i=o.next("nav"),a=g("form.woocommerce-ordering");if(i.length){if(n.length){n.replaceWith(i).fadeIn()}else{s.after(i)}}else{n.fadeOut()}r.each(function(){var e=g(this),t=e.attr("name"),o=e.val();if(t==="orderby"){return}a.find('input[name="'+t+'"]').remove();if(o!==""&&o!=0){g('<input type="hidden" name="'+t+'">').val(o).appendTo(a)}});g(".products-toolbar .columns-switcher").replaceWith(t.find(".products-toolbar .columns-switcher"));g(".products-toolbar .woocommerce-result-count").replaceWith(t.find(".products-toolbar .woocommerce-result-count"));g(".products-toolbar .products-tabs").replaceWith(t.find(".products-toolbar .products-tabs"));g(".products-tools").removeClass("out");o.children().each(function(e,t){g(t).css("animation-delay",e*100+"ms")});s.replaceWith(o);o.find("li.product").addClass("animated konteFadeInUp");g(document.body).trigger("konte_products_loaded",[o.children(),false])}l.removeClass("changed filtering");l.find("select").prop("disabled",false);window.history.pushState(null,"",c);g(document.body).trigger("konte_products_quick_search_request_success",[o.children()])})})};konte.productsTools=function(){var n=g(window),e=g(".products-tools");if(g.fn.select2){e.find(".woocommerce-ordering select").select2({dir:konte.data.rtl?"rtl":"ltr",width:"auto",minimumResultsForSearch:-1,dropdownCssClass:"products-ordering",dropdownParent:e.find(".woocommerce-ordering")})}var i=e.find("#products-filter");if(i.length&&i.hasClass("dropdown-panel")){o();n.on("resize",o)}g(document.body).on("click",'.products-tools .toggle-filters[data-toggle="dropdown"]',function(e){e.preventDefault();g(g(this).attr("href")).fadeToggle(function(){g(this).toggleClass("open")})}).on("click",".products-filter.dropdown-panel .button-close",function(e){e.preventDefault();g(this).closest(".products-filter").fadeOut(function(){g(this).removeClass("open")})});g(document.body).on("konte_products_filter_before_send_request konte_products_filter_reseted",function(){if(i.hasClass("offscreen-panel")){konte.closeOffCanvas(i)}else{i.fadeOut(function(){i.removeClass("open")})}});g(".products-tools .products-filter-toggle").on("click","a.remove-filtered",function(e){e.preventDefault();var t=g(this);g('.products-filter__activated a.remove-filtered[data-name="'+t.data("name")+'"][data-value="'+t.data("value")+'"]',"#products-filter").trigger("click");t.remove()});if(i.hasClass("dropdown-panel")){t(null,null);g(document.body).on("konte_products_filter_widget_updated",t)}function t(e,t){var o=t?g(t).closest(".products-filter-widget"):g(".products-filter-widget","#products-filter");if(!o.length){return}var n=g(".products-tools .products-filter-toggle");n.find(".remove-filtered").remove();o.find(".products-filter__activated a.remove-filtered").clone().appendTo(n)}function o(){var e=g("#secondary"),t=n.width();if(t>=992){t-=konte.getVerticalHeaderWidth()}i.width(t);var o="margin-left";if(konte.data.rtl){o="margin-right"}if(t>=992){if(e.length){if(g(document.body).hasClass("sidebar-left")){i.css(o,-t/2-e.outerWidth()/2)}else{i.css(o,-t/2+e.outerWidth()/2)}}else{i.css(o,-t/2)}}else{i.css(o,-t/2)}}};konte.cartWidget=function(){if(typeof wc_add_to_cart_params===undefined){g(".woocommerce-mini-cart-item .quantity .qty").prop("disabled",true);g(document.body).on("wc_fragments_refreshed removed_from_cart",function(){g(".woocommerce-mini-cart-item .quantity .qty").prop("disabled",true)});return}var e={onChange:function(e){var t=e.$quantity.closest(".woocommerce-mini-cart-item"),o=t.find("a.remove").data("cart_item_key"),n=t.find(".woocommerce-mini-cart-item__qty").data("nonce"),i=wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","update_cart_item");if(g.fn.block){t.block({message:null,overlayCSS:{opacity:.6,background:"#fff"}})}g.post(i,{cart_item_key:o,qty:e.current,security:n},function(e){if(!e||!e.fragments){return}if(g.fn.unblock){t.unblock()}g(document.body).trigger("added_to_cart",[e.fragments,e.cart_hash])}).fail(function(){if(g.fn.unblock){t.unblock()}return})}};if(g.fn.quantityDropdown){g(".woocommerce-mini-cart-item .quantity .qty").quantityDropdown(e);g(document.body).on("wc_fragments_refreshed removed_from_cart added_to_cart",function(){g(".woocommerce-mini-cart-item .quantity .qty").quantityDropdown(e)})}};konte.shopNotifications=function(){if(!g.fn.notify){return}g.notify.addStyle("konte",{html:'<div><span class="svg-icon icon-success size-normal message-icon"><svg role="img"><use href="#success" xlink:href="#success"></use></svg></span><span data-notify-text/></div>'});if(konte.data.added_to_cart_notice){g(document.body).on("added_to_cart",function(){g.notify(konte.data.added_to_cart_message,{position:konte.data.rtl?"top left":"top right",autoHideDelay:2e3,className:"success",style:"konte",showAnimation:"fadeIn",hideAnimation:"fadeOut"})})}if(konte.data.added_to_wishlist_notice){g(document.body).on("added_to_wishlist",function(){g.notify(konte.data.added_to_wishlist_message,{autoHideDelay:2e3,className:"success",style:"konte",showAnimation:"fadeIn",hideAnimation:"fadeOut"})})}};konte.pageTemplateSplit=function(){if(!g(document.body).hasClass("page-template-split")){return}var t=g(window),o=g("#topbar"),e=null;if(t.width()>=992){e=new PerfectScrollbar(g(".split-page-content .entry-content").get(0))}t.on("resize",function(){g(".split-page.page").height(n());if(t.width()<992){if(e){e.destroy()}e=null}else{e=new PerfectScrollbar(g(".split-page-content .entry-content").get(0))}});g(".split-page.page").height(n());function n(){var e=t.height();if(o.length){e-=o.outerHeight()}return e}};konte.videoBackground=function(){var e=g(".video-background");if(!e.length){return}var s=null,t=e.data("mute"),r=e.parent();if(typeof YT===undefined){var o=document.createElement("script"),n=document.getElementsByTagName("head")[0];o.src="https://www.youtube.com/iframe_api";n.appendChild(o)}window.onYouTubePlayerAPIReady=function(){s=new YT.Player(e.attr("id"),{videoId:e.data("video_id"),events:{onReady:function(e){i();r.find(".video-background").css("opacity",1);if(t){e.target.mute()}e.target.playVideo()},onStateChange:function(e){if(e.data===YT.PlayerState.ENDED){e.target.playVideo()}}},playerVars:{autoplay:0,loop:1,autohide:1,modestbranding:0,rel:0,showinfo:0,controls:0,disablekb:1,enablejsapi:0,iv_load_policy:3}})};g(window).on("resize",i);function i(){if(!s){return}var e=r.width(),t,o=r.height(),n,i=16/9,a=r.find(".video-background");if(e/i<o){t=Math.ceil(o*i);s.setSize(t,o);a.css({left:(e-t)/2,top:0})}else{n=Math.ceil(e/i);s.setSize(e,n);a.css({left:0,top:(o-n)/2})}}};konte.pageTemplateFlexPosts=function(){var s=g("#flex-posts"),e=g(window);if(!s.length||!g.fn.masonry){return}var t={itemSelector:".flex_post",percentPosition:true,transitionDuration:0,isRTL:!!konte.data.rtl};s.on("layoutComplete",function(e){var t=s.children();if(konte.data.rtl){t.filter(function(){return parseInt(g(this).get(0).style.right)===0}).removeClass("left-item").addClass("right-item");t.filter(function(){return g(this).get(0).style.right==="50%"}).removeClass("right-item").addClass("left-item")}else{t.filter(function(){return parseInt(g(this).get(0).style.left)===0}).removeClass("right-item").addClass("left-item");t.filter(function(){return g(this).get(0).style.left==="50%"}).removeClass("left-item").addClass("right-item")}});n();e.on("resize",n);var o;s.on("jetpack-lazy-loaded-image","img",function(){if(!s.hasClass("masonry")){n()}clearTimeout(o);o=setTimeout(function(){s.masonry("layout")},100)});g("body.page-template-flex-posts").on("click",".navigation.next-posts-navigation a",function(e){e.preventDefault();var i=g(this),a=i.attr("href");if(i.hasClass("loading")){return}i.addClass("loading");g.get(a,function(e){var t=g("#main",e),o=g(".flex_post",t),n=g(".next-posts-navigation",t);o.addClass("animated").appendTo(s);s.masonry("appended",o).masonry();o.imagesLoaded().progress(function(){s.masonry("layout")});if(n.length){i.replaceWith(g("a",n))}else{i.removeClass("loading").closest(".next-posts-navigation").fadeOut()}window.history.pushState(null,"",a);if(typeof r!==undefined){o.attr("data-scroll","");r.bind(o.get())}g(document.body).trigger("konte_flex_posts_loaded",[o])})});if(typeof ScrollTrigger!==undefined){s.children().attr("data-scroll","").addClass("animated");var r=new ScrollTrigger({toggle:{visible:"konteFadeInUp",hidden:""},offset:{x:0,y:-20},once:true},document.body,window)}function n(){if(e.width()>=992){if(s.hasClass("masonry")){return}s.masonry(t);s.imagesLoaded().progress(function(){s.masonry("layout")})}else{if(!s.hasClass("masonry")){return}s.masonry("destroy")}}};konte.stickyScrollDown=function(){var e=g(window),t=g(".sticky-scrolldown"),o=false,n,i=g("#masthead").height();if(!t.length){return}t.on("click",function(){g("html, body").animate({scrollTop:e.scrollTop()+e.height()},800)});a();e.on("scroll",function(){if(o){return}if(e.width()<1440){return}o=true;clearTimeout(n);a();setTimeout(function(){o=false},100);n=setTimeout(function(){o=false;a()},200)});function a(){if(e.scrollTop()>=i){t.fadeOut()}else{t.fadeIn()}}};konte.stickySocials=function(){var e=g("#colophon"),t=g("#sticky-socials"),o=g(window),n=false,i;if(!t.length){return}a();o.on("scroll",function(){if(n){return}if(o.width()<1440){return}n=true;clearTimeout(i);a();setTimeout(function(){n=false},100);i=setTimeout(function(){n=false;a()},200)});function a(){if(o.scrollTop()+o.height()>=e.offset().top-200){t.fadeOut()}else{t.fadeIn()}}};konte.openShareLinks=function(){var t=g(window);g(document.body).on("click",".social-share-link",function(e){if(t.width()<=1024){return}e.preventDefault();o(g(this).attr("href"),"",500,550)});function o(e,t,o,n){var i=window.screenLeft!=undefined?window.screenLeft:window.screenX,a=window.screenTop!=undefined?window.screenTop:window.screenY,s=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,r=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,c=s/window.screen.availWidth,l=(s-o)/2/c+i,d=(r-n)/2/c+a;var u=window.open(e,t,"scrollbars=yes, width="+o/c+", height="+n/c+", top="+d+", left="+l);if(window.focus){u.focus()}}};konte.fixVCRowsWithVerticalHeader=function(){if(!g(document.body).hasClass("header-vertical")){return}g(document).on("vc-full-width-row-single",function(e,t){var o=konte.getVerticalHeaderWidth();t.el.css({width:t.width-o,left:t.offset+o});if(konte.data.rtl){t.el.css({right:t.offset+o})}else{t.el.css({left:t.offset+o})}})};konte.getVerticalHeaderWidth=function(){var e=0;if(g(document.body).hasClass("header-vertical")){var t=g("#masthead");if(t.hasClass("header-v10")){t=t.find(".header-main .header-left-items")}if(t.is(":visible")){e=t.outerWidth()}return e}return e};konte.responsiveVideos=function(){if(!g.fn.fitVids){return}g(".entry-content").fitVids()};konte.popup=function(){if(!konte.data.popup){return}var i=parseInt(konte.data.popup_frequency),e=parseInt(konte.data.popup_visible_delay);if(i>0&&document.cookie.match(/^(.*;)?\s*konte_popup\s*=\s*[^;]+(.*)?$/)){return}e=Math.max(e,0);e="delay"===konte.data.popup_visible?e:0;g(window).on("load",function(){setTimeout(function(){konte.openModal("#popup-modal")},e*1e3)});g(document.body).on("konte_modal_closed",function(e,t){if(!g(t).closest(".modal").hasClass("popup-modal")){return}var o=new Date,n=o.getTime();o.setTime(o.getTime()+i*24*60*60*1e3);document.cookie="konte_popup="+n+";expires="+o.toGMTString()+";path=/"});g(document.body).on("click",".popup-modal .close-popup-trigger",function(){konte.closeModal(".popup-modal")})};konte.preloader=function(){var t=g("#preloader");if(!konte.data.preloader||!t.length){return}var o=false;g(document.body).on("click","a[href^=mailto], a[href^=tel]",function(){o=true});g(window).on("beforeunload",function(e){if(!o){t.fadeIn()}o=false});t.fadeOut();window.onpageshow=function(e){if(e.persisted){t.fadeOut()}}};konte.mobileMenu=function(){var e=g("#mobile-menu");e.find("");e.find(".menu > .menu-item-has-children, .menu > li > ul > .menu-item-has-children").filter(function(){return g(this).hasClass("current-menu-item")||g(this).hasClass("current-menu-ancestor")}).addClass("open");e.on("click",".menu-item-has-children > a",function(e){var t=g(this).parent();if(t.hasClass("open")&&t.hasClass("clicked")&&"#"!==g(this).attr("href")){return true}e.stopPropagation();e.preventDefault();t.addClass("clicked");t.toggleClass("open").children("ul").slideToggle();t.siblings(".open").removeClass("open clicked").children("ul").slideUp()}).on("click",".menu-item-has-children > .toggle",function(e){e.stopPropagation();e.preventDefault();var t=g(this).parent();t.toggleClass("open").children("ul").slideToggle();t.siblings(".open").removeClass("open").children("ul").slideUp()});e.on("click",'[data-toggle="off-canvas"], [data-toggle="modal"]',function(){if("mobile-menu"!==g(this).data("target")){konte.closeModal();konte.closeOffCanvas()}})};konte.responsiveProductV3=function(){var e=g(window),t=g(".woocommerce div.product.layout-v3");if(!t.length){return}o();e.on("resize",o);function o(){if(e.width()<1200){g(".woocommerce-product-cart form.cart",t).insertBefore(g(".summary > .product_meta",t))}else{g(".summary > form.cart",t).appendTo(g(".woocommerce-product-cart",t))}}};konte.responsiveProductGallery=function(){if(konte.data.product_gallery_slider||!g.fn.wc_product_gallery){return}var e=g(window),t=g(".woocommerce div.product"),o=false,n={};if(!t.length){return}var i=g(".woocommerce-product-gallery",t),a=i.clone(),s=false;a.children(".woocommerce-product-gallery__trigger").remove();a.off();if(typeof wc_single_product_params!==undefined){o=wc_single_product_params.flexslider_enabled;n=wc_single_product_params.flexslider}r();e.on("resize",r);function r(){if(e.width()>=992){if(!s){return}if(typeof wc_single_product_params!==undefined){wc_single_product_params.flexslider_enabled=o;wc_single_product_params.flexslider=n}i.replaceWith(a.clone());i=g(".woocommerce-product-gallery",t);i.each(function(){g(this).wc_product_gallery()});g("form.variations_form select",t).trigger("change");if("1"===konte.data.product_image_zoom&&t.hasClass("layout-v2")){i.find(".woocommerce-product-gallery__image").each(function(){konte.zoomSingleProductImage(this)})}s=false}else{if(s){return}if(typeof wc_single_product_params!==undefined){wc_single_product_params.flexslider_enabled=true;wc_single_product_params.flexslider.controlNav=true}i.replaceWith(a.clone());i=g(".woocommerce-product-gallery",t);g(document.body).trigger("konte_lazy_load_images");setTimeout(function(){i.each(function(){g(this).wc_product_gallery()})},100);g("form.variations_form select",t).trigger("change");s=true}}};konte.portfolioMasonry=function(){var n=g(".portfolio-projects--masonry");if(!n.length||!g.fn.masonry){return}var i=g(window),e={itemSelector:".portfolio",percentPosition:true,transitionDuration:0,isRTL:!!konte.data.rtl};o();i.on("resize",o);g(document.body).on("konte_posts_loaded",function(e,t,o){if(i.width()<767){return}if(o){n.masonry("appended",t)}else{n.masonry("reloadItems")}setTimeout(function(){n.masonry("layout")},t.length*50+50);t.imagesLoaded().progress(function(){n.masonry("layout")})});var t;n.on("jetpack-lazy-loaded-image","img",function(){if(!n.hasClass("masonry")){o()}clearTimeout(t);t=setTimeout(function(){n.masonry("layout")},100)});function o(){if(i.width()>=767){if(n.hasClass("masonry")){n.masonry("layout")}n.masonry(e);n.imagesLoaded().progress(function(){n.masonry("layout")})}else{if(!n.hasClass("masonry")){return}n.masonry("destroy")}}};konte.portfolioFilter=function(){var e=g(".portfolio-filter"),a=g(".portfolio-projects"),s=a.siblings(".navigation");if(!e.length||!a.length){return}e.on("click","a",function(e){e.preventDefault();var t=g(this),o=t.siblings(".active"),i=t.attr("href");if(t.hasClass("active")){return}t.addClass("active");o.removeClass("active");a.fadeIn().addClass("loading").append('<div class="loading-screen"><span class="spinner"></span></div>');g.get(i,function(e){var t=g(".portfolio-projects",e),o=g(".hentry",t),n=t.siblings(".navigation");a.html("").removeClass("loading");if(!t.length){a.fadeOut();s.fadeOut();return}o.each(function(e,t){g(t).css("animation-delay",e*100+"ms")});a.append(o);o.addClass("animated konteFadeInUp");if(n.length){if(s.length){s.html(n.html()).fadeIn()}else{a.after(n);s=n}}else{s.fadeOut()}window.history.pushState(null,"",i);g(document.body).trigger("konte_posts_loaded",[o,false])}).fail(function(){t.removeClass("active");o.addClass("active");a.children(".loading-screen").remove();a.removeClass("loading")})})};konte.backToTop=function(){var e=g("#gotop"),t=g(window),o=false,n;e.on("click",function(e){e.preventDefault();g("html, body").animate({scrollTop:0},800)});if(e.length){i();t.on("scroll",function(){if(o){return}o=true;clearTimeout(n);i();setTimeout(function(){o=false},100);n=setTimeout(function(){o=false;i()},200)})}function i(){if(t.scrollTop()<t.height()*1.5){e.fadeOut()}else{e.fadeIn()}}};konte.lazyLoadImages=function(){var t;g(document.body).on("post-load konte_posts_loaded konte_products_loaded konte_products_quick_search_request_success konte_flex_posts_loaded konte_product_quickview_loaded konte_lazy_load_images",function(){try{t=new Event("jetpack-lazy-images-load",{bubbles:true,cancelable:true})}catch(e){t=document.createEvent("Event");t.initEvent("jetpack-lazy-images-load",true,true)}document.body.dispatchEvent(t)})};g(function(){konte.init()})})(jQuery);