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=$(e.target).attr("href");var target=$(href);if(target.length>0){$('html, body').animate({scrollTop:target.get(0).offsetTop+100},1000)}
return!1});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},1000)});$('.lws_scroll_link').on('click',function(e){var elt=$($(e.target).attr("href"));if(elt.length>0){$("html, body").stop().animate({scrollTop:elt.get(0).offsetTop-120},1000,"swing");return!1}});$('.tab-menu-item.has-children').on('click',function(e){var tab=$(e.target);if(tab.hasClass('lws-mtab-open')){tab.removeClass('lws-mtab-open').find('.tab-submenu-grid').stop().fadeOut()}else{tab.addClass('lws-mtab-open').find('.tab-submenu-grid').stop().fadeIn()}}).on('mouseleave',function(e){$(e.target).removeClass('lws-mtab-open').find('.tab-submenu-grid').stop().fadeOut()});$('.lws-tabs-sm-menubutton').on('click',function(e){var menu=$($(e.target)).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).on('resize',function(){$(document).manageTopMenu();$(document).manageLeftMenu()})})