/*************************
 *      Menu Jquery      *
 *************************/

function initMenu() {
    $('#menu ul').hide();
    $('#menu li a').click(

    function () {
        $(this).next().slideToggle('slow');

        if (this.className == "") $(this).attr("class", "active");
        else if (this.className == "active") $(this).attr("class", "");

        // Condição para atribuir return false
        var verificarLink = $(this).parent().find('> ul');

        if (verificarLink.length > 0) {
            return false;
        } else {
            return true;
        }
    }

    );
}
  
function runMenu(path){
    $(document).ready(function() 
    {
        // Menu
        initMenu();
        
        // Abre menu atual
        $("a[href*='" + path + "']").parent().parent().show();
        $("a[href*='" + path + "']").parent().parent().parent().find("a[href*='#']").addClass("active");
              
    });
}

$(document).ready(function () {


    // remove margin-bottom da última LI no submenu
    $('.nav li:last-child').css('padding-bottom','0');

    
});

