$(document).ready(function () {
	
	// Function for loading in content
	function pageload(hash) {
		$(contentDiv).html('<div id="loading" align="center"><img src="http://nicolas.ipwa.net/assets/loading.gif" alt="Loading..." height="32" width="32"  border="0" /></div>');
		if(hash) {
			$(contentDiv).load('web/' + hash + '.htm');
		} else {
			$(contentDiv).html(origContent);
		}
	}
	
	// Finds content div and stores original content
	var contentDiv = "#content";
	var origContent = $(contentDiv).html();
	
	// Initializes plug-in and calls pageload function
	$.historyInit(pageload);
	
	$('#menu a').click( function () {
		var hash = $(this).attr('rel');
		$.historyLoad(hash);
		return false;
	});
	
});

