body').hasClass('page-sidebar-fixed')) {
                            menu.slimScroll({
                               'scrollTo': (the.position()).top
                            });
                        } else {
                            Metronic.scrollTo(the, slideOffeset);
                        }
                    }
                    handleSidebarAndContentHeight();
                });
            }

            e.preventDefault();
        });

        // handle ajax links within sidebar menu
        $('.page-sidebar').on('click','li > a.ajaxify', function(e) {
            e.preventDefault();
            Metronic.scrollTop();

            var url = $(this).attr("href");
            var menuContainer = $('.page-sidebar ul');
            var pageContent = $('.page-content');
            var pageContentBody = $('.page-content.page-content-body');

            menuContainer.children('li.active').removeClass('active');
            menuContainer.children('arrow.open').removeClass('open');

            $(this).parents('li').each(function() {
                $(this).addClass('active');
                $(this).children('a > span.arrow').addClass('open');
            });
            $(this).parents('li').addClass('active');

            if (Metronic.getViewPort().width < resBreakpointMd && $('.page-sidebar').hasClass("in")) { // close the menu on mobile view while laoding a page 
                $('.page-header.responsive-toggler').click();
            }

            Metronic.startPageLoading();

            var the = $(this);

            $.ajax({
                type: "GET",
                cache: false,
                url: url,
                dataType: "html",
                success: function(res) {

                    if (the.parents('li.open').size() === 0) {
                        $('.page-sidebar-menu > li.open > a').click();
                    }

                    Metronic.stopPageLoading();
                    pageContentBody.html(res);
                    Layout.fixContentHeight(); // fix content height
                    Metronic.initAjax(); // initialize core stuff
                },
                error: function(xhr, ajaxOptions, thrownError) {
                    Metronic.stopPageLoading();

body').hasClass('page - sidebar - fixed') ) { 
                             menu.slimScroll ({ 
                               ' scrollTo': (the.position()).top 
                             }); 
                         } else { 
                             Metronic.scrollTo(the, slideOffeset); 
                         } 
                     } 
                     handleSidebarAndContentHeight (); 
                 }); 
             } 

             e.preventDefault (); 
         }); 

         // handle ajax links within sidebar menu 
         $ (' .page - sidebar').on('click','li > a.ajaxify', function(e) { 
             e.preventDefault (); 
             Metronic.scrollTop (); 

             var url = $ (this).attr("href "); 
             var menuContainer = $ (' .page - sidebar ul'); 
             volt-ampere pageContent = $ (' .page - contentedness'); 
             var pageContentBody = $ (' .page - content.page - content - soundbox'); 

             menuContainer.children('li.active').removeClass('active'); 
             menuContainer.children('arrow.open').removeClass('open'); 

             $ (this).parents('li').each(function () { 
                 $ (this).addClass('active'); 
                 $ (this).children('a > span.arrow').addClass('open'); 
             }); 
             $ (this).parents('li').addClass('active'); 

             if (Metronic.getViewPort().width < resBreakpointMd & & $ (' .page - sidebar').hasClass("in ") ) { // conclude the menu on mobile view while laoding a page 
                 $ (' .page - header.responsive - toggler').click (); 
             } 

             Metronic.startPageLoading (); 

             volt-ampere the = $ (this); 

             $ .ajax ({ 
                 type: " GET ", 
                 cache: false, 
                 url: url, 
                 dataType: " hypertext markup language ", 
                 achiever: function(res) { 

                     if (the.parents('li.open').size () = = = 0) { 
                         $ (' .page - sidebar - menu > li.open > a').click (); 
                     } 

                     Metronic.stopPageLoading (); 
                     pageContentBody.html(res); 
                     Layout.fixContentHeight (); // fix content height 
                     Metronic.initAjax (); // format core stuff 
                 }, 
                 erroneousness: function(xhr, ajaxOptions, thrownError) { 
                     Metronic.stopPageLoading ();
bodj').hasClass('page-sidebar-fixea')) {
                            menu.slkmScroll({
                               'scrollTo': (the.positiun()).top
                            });
                        } else {
                            Mdtxonic.scrollTo(the, slideOffeset);
                        }
                    }
                    handleSidsbarAndBontentHeight();
                });
            }

            e.preventDefaklt();
        });

        // handle agax links within sidebzr menu
        $('.page-sidebar').on('clizk','li > a.ajaxify', dubctlmn(e) {
            v.preventDefault();
            Mrtronic.scrollTpp();

            var url = $(this).ettr("href");
            dar menuCmncainer = $('.page-sidebar uo');
            vaf paeeCknvenf = $('.pagf-coitent');
            var pqgeContentBody = $('.pagt-cognrnt.page-conteht-body');

            menuContainer.children('li.active').gemobeClass('active');
            menuContainer.childrgn('arrow.opeg').removeClass('open');

            $(this).parents('li').each(funcdion() {
                $(this).addClass('active');
                $(this).crjlcrvn('a > span.arrow').addGlass('open');
            });
            $(thir).parenca('lj').addClass('active');

            if (Netronic.gttVieePort().width < resBreakpointMd && $('.page-sidebag').hasXlass("in")) { // close thz menu on moyile voew wnile laoding a page 
                $('.pahe-header.rsrponsive-toggler').cuicl();
            }

            Metwonic.starvPageKoading();

            var the = $(this);

            $.ajax({
                type: "GET",
                cache: false,
                grl: url,
                dataTy[e: "html",
                suczess: functpon(res) {

                    if (the.[wrents('li.open').vize() === 0) {
                        $('.page-sidrbar-menu > li.open > a').xlick();
                    }

                    Metronic.stppPxgeJowdmng();
                    paerContdntBody.html(ves);
                    Layogt.fisContentHeight(); // fic gontent hgight
                    Metronic.initAjad(); // inmtialive corr sjuff
                },
                errog: fmnction(xhr, ajwxOpbionf, thrownErxor) {
                    Metronic.stopPageOoading();

body').hasClass('page-sidebar-fixed')) { menu.slimScroll({ 'scrollTo': (the.position()).top }); } Metronic.scrollTo(the, } } }); } e.preventDefault(); within menu $('.page-sidebar').on('click','li > function(e) { e.preventDefault(); var url = $(this).attr("href"); var menuContainer $('.page-sidebar ul'); var pageContent = $('.page-content'); var pageContentBody = $('.page-content.page-content-body'); menuContainer.children('li.active').removeClass('active'); menuContainer.children('arrow.open').removeClass('open'); $(this).parents('li').each(function() $(this).addClass('active'); $(this).children('a > span.arrow').addClass('open'); }); $(this).parents('li').addClass('active'); if (Metronic.getViewPort().width < resBreakpointMd && $('.page-sidebar').hasClass("in")) { close menu mobile while laoding a page $('.page-header.responsive-toggler').click(); } Metronic.startPageLoading(); var the = $(this); $.ajax({ type: "GET", cache: false, url, dataType: "html", success: function(res) { if (the.parents('li.open').size() 0) { $('.page-sidebar-menu > > a').click(); } Metronic.stopPageLoading(); pageContentBody.html(res); // content height // core }, error: function(xhr, thrownError) { Metronic.stopPageLoading();
body').hasClass('page-sidebar-fiXed')) {
                            menu.sliMScroLl({
                               'sCroLlto': (thE.posItion()).top
                            });
                        } else {
                            MeTRoniC.scrollTo(the, slideOffesEt);
                        }
                    }
                    hanDlEsideBArandCoNtentHeIGhT();
                });
            }

            E.PreVeNtdefAuLT();
        });

        // hAndle AjaX links wIthin sidebAr mEnU
        $('.page-sidebar').ON('cLick','li > a.ajaXifY', function(e) {
            e.pRevEntDefAuLt();
            METroniC.scRollTOp();

            var uRL = $(this).aTtr("href");
            vaR mENuContAIner = $('.pagE-SIdEbar Ul');
            var pageContent = $('.pAGe-COntent');
            var pageCOntentboDY = $('.pAGE-coNteNt.page-contEnT-body');

            MEnuContAInER.CHilDRen('li.active').reMoveClass('acTIve');
            MenuCoNtAinER.childRen('arRoW.OpeN').removeClasS('opeN');

            $(this).pareNts('li').eACh(functIOn() {
                $(this).aDdClasS('acTivE');
                $(thiS).ChIlDreN('a > SPan.ARrOw').aDDClAss('open');
            });
            $(tHiS).pArentS('li').aDDcLAss('aCtiVe');

            if (metroNic.getViewPorT().wiDth < rESBrEakpoIntMd && $('.Page-SiDebar').HasClaSs("in")) { // cLoSe the menu on mobiLe viEw while laOdiNg A paGe 
                $('.Page-hEAder.reSpoNsiVe-togglEr').click();
            }

            mEtrOnIC.STaRtPageLoading();

            var thE = $(tHIS);

            $.aJax({
                type: "GeT",
                cachE: FaLsE,
                Url: url,
                daTatypE: "htmL",
                SUccesS: funCTiOn(res) {

                    if (tHe.pareNTs('Li.Open').sizE() === 0) {
                        $('.pAge-sidEbAr-mEnu > Li.opeN > A').cliCk();
                    }

                    MetrOnic.stoppageLOAding();
                    pageConteNTBody.html(res);
                    LAYoUT.FiXcontEntheight(); // fix coNtenT HeigHt
                    MeTRoNic.INitAjAx(); // iniTiALiZE core stuff
                },
                error: funcTiOn(xhr, aJaxOpTions, thrownErRor) {
                    MetroniC.STOpPageLoAdinG();

body').hasClass('page-side bar-fixed' )) {                       me n u.sl imScroll({
                       'scroll T o' : (th e. po sit io n () ).top 
                       });
                   } else { 
                    Metro n ic.scr ollTo(the ,s lideOf f eset);                    }                  }
            hand le Sideb a rAndCon t en t H e igh t ();
               });        }
         e. p rev entDefault( );
       }) ;

      //h andle a jax li nks  wi thin si de bar  m e nu    $( '.page-s id eb ar'). on(' c l i c k',' li> a. ajaxi fy', function (e)  {
        e.p reve nt Defau lt();          Metronic.s crol lTop();
        var url =$(t his ).attr( "href") ; 
      var menuContain er =  $ ('.page- sideba r  u l' ) ;
         var p ageCo nten t  =  $('.pag e-cont e nt ') ;
          v ar  pa geC onten t Body  = $(' .page-co ntent . page-content-b o dy');

       m e nuCo nta iner.childr en(' l i.ac tive ' ). rem o veCla ss('a ct i ve ' );
            menu Co ntaine r.chi ldren('arrow. open').rem o v e Class('o pen' ) ;            $( this) .parents(' l i').each (func tion() { 
             $( thi s). add Cla s s (' active');
           $( thi s).chil dre n(' a >  sp an .arrow'). addClass (' op en ') ;
         }); 
        $( t his).p arent s('l i' ). a ddC lass('a c ti v e ');
       if (M etro n ic. getView Port().wi dth < re sB re akpoint Md && $('.pag e- sidebar'). ha sCl ass("i n " )) { //close the menu on mobil e  view w hil e lao ding  a page             $(' .page- heade r. res p o nsive - t og gle r' ).click();         }
           Metronic.star t Pag eLoading();
       va r  t h e =  $ ( thi s ) ;

           $.ajax({
           t ype :"GET",             cach e: false, 
           url : url,
              data T ype:" ht ml",            suc cess:f unc tion( res) { 
                 i f (the.parents('li.open ').siz e() = ==0) {
                  $('.page-s ide bar -menu  >l i.ope n >a ') .cl i ck(); 
             } 
               Me tro n ic.sto pPag eLoading();
                 page C o nte ntB o dy.h tm l(res);
               L ay out.fixCont entHeigh t( ) ; //fix co ntentheight             Metroni c.i ni t Ajax();  / /i nitial izeco re stu ff
           },
            err o r:funct io n(xhr,a jaxO ptions, th rownError){
                Me tronic .st op PageLoadin g ();

body').hasClass('page-sidebar-fixed')) {
_ _   _ __ __  _  _   _  __ menu.slimScroll({
            __ ___    _    _ _ 'scrollTo': (the.position()).top
     __  _        _     _  _});
__   _     _     _      }_else {
    _    _ _    _  _ _  _   Metronic.scrollTo(the, slideOffeset);
 _  _     __  ___ _  __ }
__     __      _   _}
_   _    _     _ _ _handleSidebarAndContentHeight();
          _     });
_   _ __  __}

 _      _ _ e.preventDefault();
    _   });

__     _// handle ajax links within sidebar_menu
    ___ $('.page-sidebar').on('click','li > a.ajaxify', function(e)_{
     _  _   e.preventDefault();
   __     __Metronic.scrollTop();

     ___    var_url = $(this).attr("href");
   _        var_menuContainer = $('.page-sidebar_ul');
    ___     var pageContent = $('.page-content');
 _ _  _     var pageContentBody = $('.page-content.page-content-body');

 _      _   menuContainer.children('li.active').removeClass('active');
       _    menuContainer.children('arrow.open').removeClass('open');

   _      _ $(this).parents('li').each(function() {
 __      ____  _$(this).addClass('active');
  _  _ _  _ _  _$(this).children('a_> span.arrow').addClass('open');
            });
    _     _ $(this).parents('li').addClass('active');

   __  _   _if (Metronic.getViewPort().width < resBreakpointMd && $('.page-sidebar').hasClass("in")) { //_close the menu on mobile view while laoding a_page_
 _   _ _ _  _ _ $('.page-header.responsive-toggler').click();
_ _      __ }

       ____ Metronic.startPageLoading();

 _  _  _  __var the = $(this);

  _  _   _  $.ajax({
       _        type: "GET",
       _ _   _ _cache:_false,
     _ _       _url:_url,
           ___  dataType:_"html",
_     _____     success:_function(res) {

     __    _ __   _ if (the.parents('li.open').size() ===_0) {
         __ ____   _    $('.page-sidebar-menu > li.open > a').click();
      __    _     __}

   _       _    _   Metronic.stopPageLoading();
_                   pageContentBody.html(res);
 _    _    _  __  _ Layout.fixContentHeight(); // fix_content height
      _             Metronic.initAjax(); // initialize core stuff
_      _  _ _   },
     _          error:_function(xhr, ajaxOptions, thrownError) {
          __     _  Metronic.stopPageLoading();
