/**
 * Created by IOAN on 9/29/2015.
 */
$(document).ready(function(){
    $('#alu').on('click', function(){
        var target = $(this).data('target');
        $(target).collapse('toggle');
    });

    $('body').click(function (event) {
        // only do this if navigation is visible, otherwise you see jump in navigation while collapse() is called
        if (!($(event.target).is('#navbar *')) && $(".navbar-collapse").is(":visible") && $(".navbar-toggle").is(":visible")) {
            $('.navbar-collapse').collapse('toggle');
        }
    });
});