!function(e){e(window).load(function(){e(".page-template-template-frontpage .front-page").css({opacity:1,position:"static"}),e(".page-template-template-frontpage").addClass("loaded")});var n=0;e(window).scroll(function(t){var a=e(window).scrollTop()||document.documentElement.scrollTop;e(window).width()>786&&(n>a?(e(".header-menu").addClass("header-menu-fixed"),ae(".header-cover").height()&&(e(".header-menu").css({top:"-60px"}),e(".header-menu").removeClass("header-menu-fixed")),n=a<=0?0:a)}),e(window).width()<786?e(".header-brand").addClass("header-brand-full"):e(".header-brand").removeClass("header-brand-full"),e(window).scroll(function(n){e(window).scrollTop()>60&&e(window).width()>786?e(".header-brand").addClass("header-brand-small"):e(".header-brand").removeClass("header-brand-small")}),e(window).resize(function(n){e(window).width()<786?(e(".header-brand").addClass("header-brand-full"),e(".header-menu").css({top:"0"}),e(".header-menu").removeClass("header-menu-fixed")):e(".header-brand").removeClass("header-brand-full"),e(window).width()>786?e(".primary-menu").css({display:"flex"}):(e(".primary-menu").hide(),e(".primary-menu-toggle").addClass("fa-icon-bars").removeClass("fa-icon-close"),e(".primary-menu-toggle small").text("Menu"))}),e(document).on("click",".menu-item-type-search a",function(n){n.preventDefault(),e(this).next().fadeToggle(400).css({display:"flex"}),e(this).toggleClass("fa-icon-search").toggleClass("fa-icon-close")}),e(document).on("click",".menu-item-has-children > a, .page_item_has_children > a",function(n){n.preventDefault(),e(this).hasClass("current-menu-item")?(e(this).removeClass("current-menu-item"),e(this).parent().find("> ul, > .menu > ul").slideUp().removeClass("sub-menu-open")):e(this).closest(".sub-menu-open").length?(e(this).addClass("current-menu-item"),e(this).parent().find("> ul, > .menu > ul").slideDown().addClass("sub-menu-open")):(e(this).closest(".menu").find(".menu-item-has-children > ul, .menu-item-has-children > .menu > ul, .page_item_has_children > ul, .page_item_has_children > .menu > ul").slideUp().removeClass("sub-menu-open"),e(this).closest(".menu").find(".menu-item-has-children > a, .menu-item-has-children > .menu > a, .page_item_has_children > a, .page_item_has_children > .menu > a").removeClass("current-menu-item"),e(this).addClass("current-menu-item"),e(this).parent().find("> ul, > .menu > ul").slideDown().addClass("sub-menu-open")),!1===e(this).parent().find("> ul, > .menu > ul").visible()&&(e(this).parent().parent().hasClass("primary-menu")?e(this).parent().find("> ul, > .menu > ul").css({left:-1*parseInt(e(this).parent().find("> ul, > .menu > ul").width()-e(this).parent().width())+"px"}):e(this).parent().find("> ul, > .menu > ul").css({left:-1*parseInt(e(this).parent().find("> ul, > .menu > ul").width()+1)+"px"}))}),e(document).on("click","a.primary-menu-toggle",function(n){n.preventDefault(),e(".primary-menu").slideToggle(),e(this).toggleClass("fa-icon-bars").toggleClass("fa-icon-close"),e("small",this).toggleText("Close","Menu")}),e(document).on("click","a.mobile-menu-toggle",function(n){n.preventDefault(),e(".mobile-menu").animate({width:"toggle",opacity:"toggle"},400),e(".body-overlay").length?e(".body-overlay").remove():e("body").append('
')}),e(document).on("click",".body-overlay",function(n){e(".mobile-menu").animate({width:"toggle",opacity:"toggle"},400),e(this).remove()}),e(".footer-widgets .widgets").each(function(n,t){var a=e(t).find(".widgets-container").length;e(t).children(".widgets-container").css({flex:"0 0 calc("+100/a+"% - 2rem)"})});var t=1,a=0,i=e(".footer-gallery .container").width();function l(){e(".grid-item").each(function(n,t){var a=e(".grid"),i=e(this),l=e(".grid-item-body",this),o=parseInt(a.css("grid-auto-rows").replace("px","")),s=parseInt(a.css("grid-row-gap").replace("px","")),r=Math.ceil((l.height()+s)/(o+s));i.css("grid-row-end","span "+r)})}e(".footer-gallery .gallery .gallery-item").each(function(n,t){a+=e(t).outerWidth(!0)}),e(".footer-gallery .gallery").width(a),setInterval(function(){t>a/i?e(".footer-gallery .gallery").animate({"margin-left":"0"}):e(".footer-gallery .gallery").animate({"margin-left":"-="+i+"px"}),t++},4e3),setTimeout(function(){e(".grid-loading").hide(),e(".grid").animate({opacity:1,"max-height":"100%"},800),l()},1600),e(window).resize(function(e){l()}),e(document).on("click",".post-comments-list .comment-content",function(n){"240px"===e(this).css("max-height")?(e(this).css({"max-height":"unset","overflow-y":"none"}),e(this).addClass("comment-content-open")):(e(this).css({"max-height":"240px","overflow-y":"hidden"}),e(this).removeClass("comment-content-open"))}),e(".pagination-button-prev a").attr("href",e(".pagination-button-prev a").attr("href")+"#main-content"),e(".pagination-button-next a").attr("href",e(".pagination-button-next a").attr("href")+"#main-content"),e(document).on("click","a.to-the-top",function(e){e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"})}),window.location.hash&&e("html, body").animate({scrollTop:e(window.location.hash).offset().top},1200);var o=document.getElementById("header-parallax");if(null!==o)new Parallax(o);var s=document.getElementById("product-parallax");if(null!==s)new Parallax(s)}(jQuery);