// JavaScript Document

$(document).ready(function() {

var path = location.pathname;

    // Handle links to the current path
    if (path) {
        $('a[href$="' + path + '"]').parents().filter('li').addClass('active');
    }


 // Handle links to parts of the current path
    var parts = path.split('/')
    for (i = 0; i < parts.length; i++) {
        if (parts[i].length > 0) {
            $('a[href$="/' + parts[i] + '"]').addClass('active');
        }
    }

});