$(document).ready(function(){function v(){(!document.fullScreenElement||document.fullScreenElement===null)&&(document.mozFullScreen||document.webkitIsFullScreen)?document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen():document.documentElement.requestFullScreen?document.documentElement.requestFullScreen():document.documentElement.mozRequestFullScreen?document.documentElement.mozRequestFullScreen():document.documentElement.webkitRequestFullScreen&&document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}function y(n){$(n).block({message:'',css:{border:"none",padding:"0px",width:"20px",height:"20px",backgroundColor:"transparent"},overlayCSS:{backgroundColor:"#fff",opacity:.9,cursor:"wait"}})}function p(n){$(n).unblock()}var o,u,n;$(".show-search").click(function(){$(".search-form").css("margin-top","0")});$(".close-search").click(function(){$(".search-form").css("margin-top","-60px")});$(".toggle-fullscreen").click(function(){v()});Waves.displayEffect();$('[data-toggle~="tooltip"]').tooltip({container:"body"});o=Array.prototype.slice.call(document.querySelectorAll(".js-switch"));o.forEach(function(n){var t=new Switchery(n,{isUseClass:!0})});$(".panel-collapse").click(function(){$(this).closest(".panel").children(".panel-body").slideToggle("fast")});$(".panel-reload").click(function(){var n=$(this).closest(".panel").children(".panel-body");y(n);window.setTimeout(function(){p(n)},1e3)});$(".panel-remove").click(function(){$(this).closest(".panel").hide()});$(".push-sidebar").click(function(){var n=$(".sidebar");n.hasClass("visible")?(n.removeClass("visible"),$(".page-inner").removeClass("sidebar-visible")):(n.addClass("visible"),$(".page-inner").addClass("sidebar-visible"))});$(".sortable").sortable({connectWith:".sortable",items:".panel",helper:"original",revert:!0,placeholder:"panel-placeholder",forcePlaceholderSize:!0,opacity:.95,cursor:"move"});u=$("input[type=checkbox]:not(.switchery), input[type=radio]:not(.no-uniform)");u.size()>0&&u.each(function(){$(this).uniform()});$.fn.toggleAttr=function(n,t){var i=t===undefined;return this.each(function(){i&&!$(this).is("["+n+"]")||!i&&t?$(this).attr(n,n):$(this).removeAttr(n)})};$(".sidebar .accordion-menu li .sub-menu").slideUp(0);$(".sidebar .accordion-menu li.open .sub-menu").slideDown(0);$(".small-sidebar .sidebar .accordion-menu li.open .sub-menu").hide(0);$(".sidebar .accordion-menu > li.droplink > a").click(function(){if(!$("body").hasClass(".small-sidebar")&&!$("body").hasClass(".page-horizontal-bar")&&!$("body").hasClass(".hover-menu")){var i=$(".sidebar .menu"),r=$(".page-sidebar-inner"),u=$(".page-content"),t=$(this).next(),f=$(this);return i.find("li").removeClass("open"),$(".sub-menu").slideUp(200,function(){n()}),n(),t.is(":visible")?t.slideUp(200,function(){n()}):($(this).parent("li").addClass("open"),$(this).next(".sub-menu").slideDown(200,function(){n()})),!1}});$(".sidebar .accordion-menu .sub-menu li.droplink > a").click(function(){var i=$(this).parent().parent(),r=$(".page-sidebar-inner"),u=$(".page-content"),t=$(this).next(),f=$(this);return i.find("li").removeClass("open"),n(),t.is(":visible")?t.slideUp(200,function(){n()}):($(this).parent("li").addClass("open"),$(this).next(".sub-menu").slideDown(200,function(){n()})),!1});n=function(){var t=$(".page-inner"),i=$(".page-sidebar"),u=$("body"),n,r=$(".page-footer").outerHeight(),f=$(".page-content").height();t.attr("style","min-height:"+i.height()+"px !important");u.hasClass("page-sidebar-fixed")?n=i.height()+r:(n=i.height()+r,n<$(window).height()&&(n=$(window).height()));n>=t.height()&&t.attr("style","min-height:"+n+"px !important")};n();window.onresize=n;$(".slimscroll").slimscroll({allowPageScroll:!0});var t=document.querySelector(".fixed-header-check"),i=document.querySelector(".fixed-sidebar-check"),nt=document.querySelector(".toggle-sidebar-check"),s=document.querySelector(".boxed-layout-check"),h=document.querySelector(".compact-menu-check"),f=document.querySelector(".hover-menu-check"),w=function(){$("body").hasClass("page-header-fixed")||t.checked!=0||t.click();$("body").hasClass("page-sidebar-fixed")&&i.checked==1&&i.click();$("body").hasClass("compact-menu")&&h.checked==1&&h.click();$("body").hasClass("hover-menu")&&f.checked==1&&f.click();$(".page-content").hasClass("container")&&s.checked==1&&s.click();$(".theme-color").attr("href","/css/themes/white.css");n()},e=$(".navbar .logo-box a span").text(),r=e.slice(0,1),c=function(){$("body").toggleClass("small-sidebar");$(".navbar .logo-box a span").html($(".navbar .logo-box a span").text()==r?e:r);n()},b=function(){$("body").hasClass("page-horizontal-bar")&&$("body").hasClass("page-sidebar-fixed")&&$("body").hasClass("page-header-fixed")&&(i.click(),alert("Static header isn't compatible with fixed horizontal nav mode. Modern will set static mode on horizontal nav."));$("body").toggleClass("page-header-fixed");n()},tt=function(){!$("body").hasClass("page-horizontal-bar")||$("body").hasClass("page-sidebar-fixed")||$("body").hasClass("page-header-fixed")||(t.click(),alert("Fixed horizontal nav isn't compatible with static header mode. Modern will set fixed mode on header."));$("body").hasClass("hover-menu")&&!$("body").hasClass("page-sidebar-fixed")&&(f.click(),alert("Fixed sidebar isn't compatible with hover menu mode. Modern will set accordion mode on menu."));$("body").toggleClass("page-sidebar-fixed");$("body").hasClass(".page-sidebar-fixed")&&$(".page-sidebar-inner").slimScroll({destroy:!0});$(".page-sidebar-inner").slimScroll();n()},it=function(){$(".sidebar").toggleClass("horizontal-bar");$(".sidebar").toggleClass("page-sidebar");$("body").toggleClass("page-horizontal-bar");$("body").hasClass("page-sidebar-fixed")&&!$("body").hasClass("page-header-fixed")&&(t.click(),alert("Static header isn't compatible with fixed horizontal nav mode. Modern will set static mode on horizontal nav."));n()},rt=function(){$(".page-content").toggleClass("container");n()},ut=function(){$("body").toggleClass("compact-menu");n()},ft=function(){!$("body").hasClass("hover-menu")&&$("body").hasClass("page-sidebar-fixed")&&(i.click(),alert("Fixed sidebar isn't compatible with hover menu mode. Modern will set static mode on sidebar."));$("body").toggleClass("hover-menu");n()};if($(".small-sidebar .navbar .logo-box a span").html($(".navbar .logo-box a span").text()==r?e:r),$(".theme-settings").length||$(".sidebar-toggle").click(function(){c()}),$(".theme-settings").length&&(t.onchange=function(){b()},$(".sidebar-toggle").click(function(){c()}),$(".reset-options").click(function(){w()}),$(".colorbox").click(function(){var n=$(this).attr("data-css");return $(".theme-color").attr("href","assets/css/themes/"+n+".css"),!1}),$("body").hasClass("page-sidebar-fixed")||i.checked!=1||$("body").addClass("page-sidebar-fixed"),$("body").hasClass("page-header-fixed")||t.checked!=1||$("body").addClass("page-header-fixed"),$("body").hasClass("page-header-fixed")&&t.checked==0&&$(".fixed-header-check").prop("checked",!0)),$(".chat").length){var l=document.getElementById("cbp-spmenu-s1"),k=document.getElementById("showRight"),d=document.getElementById("closeRight"),a=document.getElementById("cbp-spmenu-s2"),g=document.getElementById("closeRight2"),et=document.body;k.onclick=function(){classie.toggle(l,"cbp-spmenu-open")};d.onclick=function(){classie.toggle(l,"cbp-spmenu-open")};g.onclick=function(){classie.toggle(a,"cbp-spmenu-open")};$(".showRight2").click(function(){classie.toggle(a,"cbp-spmenu-open")});$(".chat-write form input").keypress(function(n){if(n.which==13&&!$(this).val().length==0)$('