	// PageLoad function
	// This function is called when:
	// 1. after calling jQuery.historyInit();
	// 2. after calling jQuery.historyLoad();
	// 3. after pushing "Go Back" button of a browser
	jQuery.noConflict();
	function pageload(hash) {
		// hash doesn't contain the first # character.
		if(hash)
		{
			// restore ajax loaded state
			if(hash == "About_Us") 
			{
				jQuery("#box_content").load("/sitePages/2/About_Us/1")
			}
			else if(hash == "Update_Listing")
			{
				jQuery("#box_content").load("/advertisements/update/free/0/0/0/1")
			}
			else if(hash == "Advertising")
			{
				jQuery("#box_content").load("/pages/advertising/0/1")
			}
			else if(hash == "Contact_Us")
			{
				jQuery("#box_content").load("/pages/contact/0/1")
			}
			else if(hash == "Terms")
			{
				jQuery("#box_content").load("/pages/terms/0/1")
			}
			else if(hash == "Privacy")
			{
				jQuery("#box_content").load("/pages/privacy/0/1")
			}
			else if(hash == "Exact_Payroll")
			{
				jQuery("#box_content").load("/pages/payroll/0/1")
			}
			else
			{
				jQuery("#box_content").load(hash + "/0/1");
			}
		} 
		jQuery("html, body").scrollTop(0);
	}
	
	jQuery(document).ready(function(){
		// Initialize history plugin.
		// The callback is called at once by present location.hash. 
		jQuery.historyInit(pageload);
		
		// set onlick event for buttons
		jQuery("a[rel='history']").click(function(){
			// 
			var hash = this.href;
			hash = hash.replace(/^.*#/, '');
			// moves to a new page. 
			// pageload is called at once. 
			// hash don't contain "#", "?"
			jQuery.historyLoad(hash);
			return false;
		});
	});