$(document).ready(function(){    
 
    $('.select-tags').select2();

    // Menu Class Active Start
    $('.submenu li').each(function () {        
        var location = window.location.href;
        location = location.split('?')[0];
        var newLocation = $(this).find('a:first').attr('href');      
        var modifiedLocation = location.substr(location.length - newLocation.length);
    
        if (newLocation == modifiedLocation) {
        
            $(this).addClass('mm-active').siblings().removeClass('mm-active');
            $(this).find('a').addClass('mm-active').siblings().removeClass('mm-active');
            $(this).parent().parent().addClass("mm-active").siblings().removeClass('mm-active');
            return false;
        }
        return true;
    });
    // Menu Class Active End


});