For this site navigation I have to add the course 'active' towards the li element based on whether it matches the present URL.

Nav HTML:

<ul id="nav">
    <div id="wrapper">
        <li><a href="/">Home</a></li>
        <li><a href="/tagged/Review">Reviews</a></li>
        <li><a href="/tagged/First_Look">First Looks</a></li>
        <li><a href="/tagged/Commentary">Commentaries</a></li>
        <li><a href="/tagged/Walkthrough">Walkthroughs</a></li>
        <li><a href="/tagged/Achievement">Achievements</a></li>
    </div>
</ul>

If you wish to use "pure" ("vanilla") JavaScript, make use of the following code(presuming that <ul id="nav"> is available):

window.onload = function() { 
    var all_links = document.getElementById("nav").getElementsByTagName("a"),
        i=0, len=all_links.length,
        full_path = location.href.split('#')[0]; //Ignore hashes?

    // Loop through each link.
    for(; i<len; i++) {
        if(all_links[i].href.split("#")[0] == full_path) {
            all_links[i].className += " active";
        }
    }
}

Using jQuery:

$(document).ready(function(){
    var full_path = location.href.split("#")[0];
    $("#nav a").each(function(){
        var $this = $(this);
        if($this.prop("href").split("#")[0] == full_path) {
            $this.addClass("active");
        }
    });
});

I believe, within this situation, is much better alternation in server side.

Using javascript that you can do:

var target = 0;
switch( window.location.pathname )
{
    case "/tagged/Review":
        target = 1;
        break;

    case "/tagged/First_Look":
        target = 2;
        break;
    /* add other cases */
}

document.getElementById("nav").getElementByTagName("li")[target].classList.add("active");

Place the code after loaded DOM.

If jquery, you should use:

var target = 0;
switch( window.location.pathname )
{
    case "/tagged/Review":
        target = 1;
        break;

    case "/tagged/First_Look":
        target = 2;
        break;
    /* add other cases */
}

$($("#nav li")[target]).addClass("active");

EDIT

window.onload or $.ready is the best way to determine if the document is loaded.