
function selectMenu(id) {
	// Hides all the divs within #body
	$('#body div').hide();
	// Shows just the specified div
	$('#'+id).show();
	$('.'+id).show();
	
	// Removes the current class from all menu items
	$('#menu li').removeClass('current');
	// Adds the current class to the specified menu
	$('#'+id+'menu').addClass('current');	
}

function goTo() {
	
	// Gets the # value	
	var hash = "";
	hash = document.location.hash.substring(1);
	
	// Replicated clicking the menu item of the # value
	if (hash.length > 0) {
		try {
	 		selectMenu(hash);
		} catch(err) {}
	}
}