$('div#main-menu a').each(function () {
    if ($(this)[0].pathname == window.location.pathname) {
        $(this).addClass('active').removeAttr('href');
        return false;
    }
});

$('div#account-dropdown').removeClass('simple').dropdown();

$('div#main-menu a').each(function () {

    let cur_path = window.location.pathname.split('/')[1],
        a_path = $(this)[0].pathname.split('/')[1];

    if (cur_path === a_path) {
        $(this).addClass('active').removeAttr('href');
        return false;
    }
});

$('div#main-menu .dropdown').removeClass('simple').dropdown();


Add nested pages to active
Add nested pages to active
