	$(function(){
		var previousHash = '';
		var defaultNavLink = null;
		var checkURL = function(){
			var currentHash = window.location.hash;
			if (previousHash != currentHash) { // URL has changed.
				if (currentHash.length) {   // handles the eventuality of going "back" to the original page
					$('a[href='+currentHash+']').click(); // Activate the link content
				} else {
					$(defaultNavLink).click(); // Activate the default page
				}
				previousHash = currentHash; // syncronize the hashes
			}
		}
		// Enable the Menu
		$('#menu a.flipper')
			.eq(0) // This is where we select the element to highlight first.  Also dictates the visible page.
				.addClass('selected')  // Give class "selected"
				.each(function(){$($(this).attr('href')).addClass('selected')}) // give class "selected" to the content it links to
				.each(function(){defaultNavLink = this})
			.end()
			.click(function(e){
				$this = $(this);
				$hash = $this.attr('href');
				$target = $($hash);
				previousHash = $hash // Prevent the checker from reacting to clicks.
				$target
					.siblings('.selected').removeClass('selected')
					.fadeOut(500,function(){$target.fadeIn(500).addClass('selected')});
				$this.addClass('selected').parent().siblings().find('a').removeClass('selected');
			});
		$('#content div.page').not('.selected').hide();
		// Setup a checker for back and forward buttons
		window.setInterval(checkURL, 250);
	});

