$(document).ready(function(){
    
    var location = window.location.href;
    
    $("#navigation").find("a").each(function(){
        if ($(this).attr("href") == location.substring(location.length - $(this).attr("href").length))
        {
            $(this).attr("class", "active")
        }
    });
});