// National Trust AGM, 2007 - javascript setup 

/*

These scripts use the jQuery framework to provide the animated elements of the template.

--**These scripts need optimising...a lot!!!**--

*/
$(document).ready(function(){


	//Hide initial animated elements
	$("div#notifyFriend").hide();
	//$("div#viewSession").hide();

	//setup toggle functions

	//notify a friend
	$("a#toggleNotify").toggle(function(){
		//hide other layers if open first
		$("div#viewSession").animate({ height: 'hide' }, 'slow');							
		$("div#notifyFriend").animate({ height: 'show'  }, 'slow');
	},function(){
		$("div#notifyFriend").animate({ height: 'hide'  }, 'slow');
	});
	
	//view session
	$("a#toggleViewSession").toggle(function(){
		$("div#notifyFriend").animate({ height: 'hide' }, 'slow');							 
		$("div#viewSession").animate({ height: 'show' }, 'slow');
	},function(){
		$("div#viewSession").animate({ height: 'hide' }, 'slow');
	});

});