jQuery(function($){var globalMenuWidth=$(document).find(".lws-tabs-zone").find("ul").outerWidth();var scrollTopButton=$("<div>",{class:"lws_scroll_top lws-scrolltop-button lws-icon lws-icon-nav-up "});$("body").append(scrollTopButton);$("#lws-toc-menu").on("click",'a[href^="#"]',function(e){e.preventDefault();var href=$(this).attr("href");var target=$(href);if(target.length>0){$("html, body").animate({scrollTop:target.get(0).offsetTop+100},1e3)}return false});window.onscroll=function(event){var scroll=$(window).scrollTop();var stButton=$(".lws_scroll_top");if(scroll>500){stButton.css("opacity","100")}else{stButton.css("opacity","0")}};$(".lws_scroll_top").on("click",function(e){$("html, body").animate({scrollTop:0},1e3)});$(".tab-menu-item.has-children").click(function(){var tab=$(this);if(tab.hasClass("lws-mtab-open")){$(this).removeClass("lws-mtab-open").find(".tab-submenu-grid").stop().fadeOut()}else{tab.addClass("lws-mtab-open").find(".tab-submenu-grid").stop().fadeIn()}}).mouseleave(function(){$(this).removeClass("lws-mtab-open").find(".tab-submenu-grid").stop().fadeOut()});$(".lws-tabs-sm-menubutton").click(function(){var menu=$(this).closest(".lws-tabs-small-menu").find(".lws-mtab-ul-0");if(menu.css("display")=="none"){menu.css("display","flex")}else{menu.css("display","none")}});$.fn.manageTopMenu=function(){var topBar=this.find("#lws-TopBar");topBar.outerWidth()<=400?topBar.find(".lws-adm-titlebar").css("display","none"):topBar.find(".lws-adm-titlebar").css("display","flex");var tabsZone=this.find(".lws-tabs-zone");var tabsSmallMenu=tabsZone.find(".lws-tabs-small-menu");var tabsMenu=tabsZone.find(".lws-mtab-ul-0");if(globalMenuWidth>tabsZone.outerWidth()){tabsSmallMenu.css("display","flex");tabsMenu.detach().appendTo(tabsSmallMenu).css("display","none");tabsMenu.find(".lws-top-menu").css({position:"relative",top:"0px"})}else{tabsSmallMenu.css("display","none");tabsMenu.detach().appendTo(tabsZone).css("display","flex");tabsMenu.find(".lws-top-menu").css({position:"absolute",top:"41px"})}};$(document).manageTopMenu();$.fn.manageLeftMenu=function(){var toc=this.find(".lws-table-of-content");var lmenu=toc.find("#lws-toc-menu");toc.outerWidth()<550?lmenu.hide():lmenu.show()};$(document).manageLeftMenu();$(window).resize(function(){$(document).manageTopMenu();$(document).manageLeftMenu()})});
