// Active Tabs
$(function() {
    var pathname = location.pathname;
    var highlight;

    if(pathname == "/")
        highlight = $('#nav a:first');
    else {
    	var pathArray = window.location.pathname.split( '/' );
    	var secondLevelLocation = pathArray[1];

        if (secondLevelLocation)
            highlight = $('#nav li a[href$="/' + secondLevelLocation + '/"]');
    }
    highlight.addClass('active');
});

