window.YM||(window.YM={});window.YM.navigationMenu=function(){return $(document).ready(function(){$(".dropdown-menu.navigation-menu, .mobile-menu-cats-wrapper").on("click.navigationMenu",function(n){var t=$(n.target).closest("a"),i;return t.length==0?!1:t.is(".navigation-menu-toggle")?(i=t.closest("li").find(".collapse").collapse("toggle")[0],t.closest(".navigation-menu-cats").find(".collapse.in, .collapsing").filter(function(){return this!=i}).collapse("hide"),!1):void 0})}),{isVisible:function(){return $(".dropdown-menu.navigation-menu").is(":visible")},show:function(n){YM.navigationMenu.isVisible()||$("#toggle-navigation-menu").dropdown("toggle");$.isFunction(n)&&n()},hide:function(n){YM.navigationMenu.isVisible()&&$("#toggle-navigation-menu").dropdown("toggle");$.isFunction(n)&&n()},toggle:function(n){YM.navigationMenu.isVisible()?YM.navigationMenu.hide(n):YM.navigationMenu.show(n)}}}();window.YM.Buy=function(){return{getScrollTopVisible:function(n,t){var i=0,r=$(n),u,f,s,e,o,c,l;if(r.length>0&&!r.is("body")){if(i=r.offset().top+(r.is(".tabcontentblock")?1:0),u=0,f=r.closest(".modal-scrollable").length!=0,f?i=r.closest(".modal-scrollable").scrollTop()+i-$(window).scrollTop():(s=$(".main-header.sticky"),s.length>0?(e=s.data("scrollCondensedHeader"),u=i>=e.options.offset?e.condensedHeight:e.fullHeight):(o=$(".nav-desktop"),o.length>0&&o.css("position")=="fixed"&&(u=o.outerHeight())),i=i-u),i=i-(t||0),!f){var h=$(".sticky-nav-placeholder"),a=h.find(".sticky-nav-container"),v=h.length>0?h.offset().top-u:0,y=a.length>0?a.outerHeight():0;i>v&&(i=i-y)}i<0&&(i=0);c=f?r.closest(".modal-scrollable").prop("scrollHeight"):$(document).height();l=$(window).height();c-i<l&&(i=c-l)}return i},scrollTo:function(n,t,i,r){var f=$(n),e,u;return f.length>0?(e=window.YM.Buy.getScrollTopVisible(n,t),(i===undefined||i===null)&&(i=800),u=f.closest(".modal-scrollable"),u.length==0&&(u=$("body, html")),u.animate({scrollTop:e},i,"swing",function(){var t,i,n;u.is(".modal-scrollable")||(t=$(".sticky-nav-container"),t.length>0&&f.attr("id")&&(i=t.find('a[href="#'+f.attr("id")+'"]'),i.length>0&&(n=i.closest("li"),n.hasClass("active")||(n.closest("ul").find("li").removeClass("active"),n.addClass("active")))));$.isFunction(r)&&r()}),!0):!1}}}();$(document).ready(function(){var t;$("#msg-cookie-close").on("click",function(n){var t=undefined,i=$(".main-header.sticky");i.length>0&&(t=function(){i.scrollCondensedHeader("layout")});$("#msg-cookie").slideUp({duration:400,step:t});Cookies.set(YM.Shared.CookieNames.CookieMessage,YM.Shared.CookieValues.CookieMessageHidden,{expires:1e3,path:"/",sameSite:"None",secure:!0});n.preventDefault()});$("#screen-lang-dropdown a[data-language]").on("click",function(n){var t=$(this);YD.security.setPrefScreenLanguage(t.data("language")).always(function(){window.location=t.attr("href")});n.preventDefault()});$("a.change-vat-mode").on("click",function(n){YD.security.setPrefShowPricesInclVat($(this).data("value")).always(function(){window.location.reload(!0)});n.preventDefault()});if(t=$(".sticky-nav-placeholder"),t.length>0){var n=t.find(".sticky-nav-container"),u=$(".main-header"),f=$(".nav-desktop"),i=$(document.body),r=$(window);function e(){if(u.is(".sticky")){var n=u.data("scrollCondensedHeader");return n.condensedHeight}return f.css("position")=="fixed"?f.outerHeight():0}function o(){var t=e();i.data("bs.scrollspy")?(i.data("bs.scrollspy").options.offset=t+n.outerHeight(),i.scrollspy("refresh")):i.scrollspy({target:".sticky-nav-container",offset:t+n.outerHeight()})}r.on("load resize",o);o();r.on("load scroll resize",function(){var i=e(),u=Math.max(t.offset().top-i,0);r.scrollTop()>=u?(n.hasClass("fixed")||n.addClass("fixed"),n.css("top")!=i+"px"&&n.css("top",i)):n.hasClass("fixed")&&(n.removeClass("fixed"),n.is(".sticky-nav-container-buttons")||n.css("top",""));n.find("li.active").length==0&&n.find("li").first().addClass("active")})}$(document).on("click",'a[href^="#"]',function(n){var i=$(this),t;i.attr("data-slide")||i.attr("data-toggle")||(t=i.attr("href"),t.length>1&&window.YM.Buy.scrollTo(t=="#top"?$("body"):$(t+" , a[name="+t.substring(1)+"]"),i.data("topspacing")||0)&&n.preventDefault())})})