$(document).ready(function() {
	// Create a list of page names - the ordering is tied to the navigation ordering in header.html, so any changes there must be reflected here
	var pageList = ["index.shtml","walkableliving.shtml","condominiums.shtml","townhomes.shtml","directions.shtml","thebuilder.shtml","contactus.shtml"];
	// Read the current page location
	var currentURL = document.URL;
	// Locate the last slash in the URL
	var slashLocation = currentURL.lastIndexOf("/");
	// Set currentURL to the current page's filename
	currentURL = currentURL.substring(slashLocation+1);
	for (i = 0; i <= pageList.length; i++)
	{
		// Check to see if the currentURL matches any of the page filenames in the array
		if (currentURL === pageList[i])
		{
			// Set ID for the particular page element and change the background-position for the lower half of the image
			$("#nav" + parseInt(i+1) + " a").css("background-position","0 -50px");
		}
	}
});
