$(document).ready(function() {
	
	//determine page URL
	pageURL = document.location.href;
	
	$("#leftNav a").each(function() {
		linkURL = this.href;
		
		/* strip 'index.php' from path checking */
		pageURL = pageURL.split("index.php")[0];
		linkURL = linkURL.split("index.php")[0];

		//compare page URL to left nav URLs (bolding current page)
		if(linkURL == pageURL) {
			this.className += " bold";
			
			if(this.parentNode.parentNode.id == "leftNav") {
				subNav = this.parentNode.children;// primary nav level
			} else {
				subNav = this.parentNode.parentNode.children; //secondary nav level
			}
			jQuery.each(subNav, function(){ 
				this.style.display = "block";
			});
			
			//end iteration
			return false;
		}
		
		
	});

});
