jQuery(document).ready(function($) {	
	$('#content div:not(.selected) p').hide('fast');
	$("#content div.tour").hoverIntent({
		sensitivity: 7, 
		interval: 500, 
		over: showMe, 
		timeout: 700, 
		out: hideMe
	});
	openByPound();

});

function showMe(){ 
	if(!jQuery(this).is('.selected') ){
		//first remove selected from any others (accommodation for initial selected
		jQuery("#content div.selected").removeClass('selected').find('p').hide('slow');	
		jQuery(this).addClass('selected').find('p').show('slow', function(){
			jQuery(this).css("min-height","195px")
		});
	}
}

function hideMe(){ $(this).removeClass('selected').find('p').css("min-height","0px").hide('slow');}



function openByPound(){
	if(location.hash!=""){
		var mySel = "a[name='"+unescape(location.hash).substring(1,location.hash.length)+"']";

		//first remove selected from any others (accommodation for initial selected
		jQuery("#content div.selected").removeClass('selected').find('p').hide();	
		jQuery(mySel).parent().addClass('selected').find('p').show('slow', function(){
			jQuery(this).css("min-height","195px");
			jQuery.scrollTo( mySel, 800 ); 
		});
		
	}
}
