!function($,e,t){"use strict";$(document).ready(function(){$('a[data-toggle="chat"]').each(function(t,a){$(a).on("click",function(t){t.preventDefault(),public_vars.$body.toggleClass("chat-open"),$.isFunction($.fn.perfectScrollbar)&&setTimeout(function(){public_vars.$chat.find(".chat_inner").perfectScrollbar("update"),$(e).trigger("xenon.resize")},1)})}),$('a[data-toggle="settings-pane"]').each(function(t,a){$(a).on("click",function(t){t.preventDefault();var n=attrDefault($(a),"animate",!1)&&!isxs(),s={top:$(document).scrollTop(),toTop:0};public_vars.$body.hasClass("settings-pane-open")&&(s.toTop=s.top),TweenMax.to(s,n?.1:0,{top:s.toTop,roundProps:["top"],ease:s.toTop<10?null:Sine.easeOut,onUpdate:function(){$(e).scrollTop(s.top)},onComplete:function(){if(n)if(public_vars.$settingsPaneIn.addClass("with-animation"),public_vars.$settingsPane.is(":visible"))public_vars.$settingsPaneIn.addClass("closing"),TweenMax.to(public_vars.$settingsPane,.25,{css:{height:0},delay:.15,ease:Power1.easeInOut,onComplete:function(){public_vars.$body.removeClass("settings-pane-open"),public_vars.$settingsPane.css({height:""}),public_vars.$settingsPaneIn.removeClass("closing visible")}});else{public_vars.$body.addClass("settings-pane-open");var e=public_vars.$settingsPane.outerHeight(!0);public_vars.$settingsPane.css({height:0}),TweenMax.to(public_vars.$settingsPane,.25,{css:{height:e},ease:Circ.easeInOut,onComplete:function(){public_vars.$settingsPane.css({height:""})}}),public_vars.$settingsPaneIn.addClass("visible")}else public_vars.$body.toggleClass("settings-pane-open"),public_vars.$settingsPaneIn.removeClass("visible"),public_vars.$settingsPaneIn.removeClass("with-animation")}})})}),$('a[data-toggle="sidebar"]').each(function(t,a){$(a).on("click",function(t){t.preventDefault(),public_vars.$sidebarMenu.hasClass("collapsed")?(public_vars.$sidebarMenu.removeClass("collapsed"),ps_init()):(public_vars.$sidebarMenu.addClass("collapsed"),ps_destroy()),$(e).trigger("xenon.resize")})}),$('a[data-toggle="mobile-menu"]').on("click",function(e){e.preventDefault(),public_vars.$mainMenu.add(public_vars.$sidebarProfile).toggleClass("mobile-is-visible"),ps_destroy()}),$('a[data-toggle="mobile-menu-horizontal"]').on("click",function(e){e.preventDefault(),public_vars.$horizontalMenu.toggleClass("mobile-is-visible")}),$('a[data-toggle="mobile-menu-both"]').on("click",function(e){e.preventDefault(),public_vars.$mainMenu.toggleClass("mobile-is-visible both-menus-visible"),public_vars.$horizontalMenu.toggleClass("mobile-is-visible both-menus-visible")}),$('a[data-toggle="user-info-menu"]').on("click",function(e){e.preventDefault(),public_vars.$userInfoMenu.toggleClass("mobile-is-visible")}),$('a[data-toggle="user-info-menu-horizontal"]').on("click",function(e){e.preventDefault(),public_vars.$userInfoMenuHor.find(".nav.nav-userinfo").toggleClass("mobile-is-visible")}),$("body").on("click",'.panel a[data-toggle="remove"]',function(e){e.preventDefault();var t=$(this).closest(".panel"),a=t.parent();t.remove(),0==a.children().length&&a.remove()}),$("body").on("click",'.panel a[data-toggle="reload"]',function(e){e.preventDefault();var t=$(this).closest(".panel");t.append('<div class="panel-disabled"><div class="loader-1"></div></div>');var a=t.find(".panel-disabled");setTimeout(function(){a.fadeOut("fast",function(){a.remove()})},500+1500*Math.random())}),$("body").on("click",'.panel a[data-toggle="panel"]',function(e){e.preventDefault();var t=$(this).closest(".panel");t.toggleClass("collapsed")}),$("[data-loading-text]").each(function(e,t){var a=$(t);a.on("click",function(e){a.button("loading"),setTimeout(function(){a.button("reset")},1800)})}),$('[data-toggle="popover"]').each(function(e,t){var a=$(t),n=attrDefault(a,"placement","right"),s=attrDefault(a,"trigger","click"),i=a.get(0).className.match(/(popover-[a-z0-9]+)/i);a.popover({placement:n,trigger:s}),i&&(a.removeClass(i[1]),a.on("show.bs.popover",function(e){setTimeout(function(){var e=a.next();e.addClass(i[1])},0)}))}),$('[data-toggle="tooltip"]').each(function(e,t){var a=$(t),n=attrDefault(a,"placement","top"),s=attrDefault(a,"trigger","hover"),i=a.get(0).className.match(/(tooltip-[a-z0-9]+)/i);a.tooltip({placement:n,trigger:s}),i&&(a.removeClass(i[1]),a.on("show.bs.tooltip",function(e){setTimeout(function(){var e=a.next();e.addClass(i[1])},0)}))})})}(jQuery,window);