function highlightCurrentPage()
{
	/* Highlight the currently selected page */
	var path = location.pathname.substring(1);
	if(!path) path = "index/"
	$(".nav li").each(function() {
		if($(this).children("a").is("a[@href$='/" + path + "']")) {
			$(this).addClass("selected");
		}
	});
}

function unhighlightCurrentPage()
{
	/* Highlight the currently selected page */
	var path = location.pathname.substring(1);
	if(!path) path = "index/"
	$(".nav li").each(function() {
		//$(this).removeClass("selected");
	});
}

$(document).ready(function()
{
    //highlightCurrentPage();
    
	/* Configure "mouseovers" for navigation bar */
	$(".nav li").hover(
	function() {
	    //unhighlightCurrentPage();
	    
	    $(this).addClass("jshover");		
		$(this).addClass("selected");
	},
	function() {
	    //highlightCurrentPage();
	    
	    $(this).removeClass("jshover");
		$(this).removeClass("selected");
	});
		
});
