// JavaScript (jQuery) 'Selected' Document

function selectedItem() {
	// get url string
	var location = new String(window.location);
	// get page/file name
	/* var pageName = new String(location.substring(location.lastIndexOf('/')+1));

	// check if pagename is blank, this assumes that it's the home page
	if(pageName == '' || pageName == '/') {
		pageName = 'index.html';		
	}
	*/
	/* var curPage = $(location).attr("pathname"); // leaves a preceding slash
	// alert(curPage); */
	
	$('.nav li a').each(function(){
		if(this.href == location){
			//alert(pageName);
			$(this).addClass('selected');	
		}
	});
}


$(document).ready(function() {
	selectedItem();
});
