window.addEvent('domready', function() {

	//Check for Session Cookies saying we have already run the animation 
	var sessionCookie = Cookie.read('animationFlag');
	if(sessionCookie != "true")
	{
		//If there is no cookie run the animation and create a cookie.

		//Start logo morph
			var myEffect = new Fx.Morph($('logo'), {duration: 1000, transition: Fx.Transitions.Sine.easeIn});
 
			//The styles of the class referenced will be applied to the target Element.
			myEffect.start('#logo .morphed');
		//End logo morph
	
		//Create Session Cookie so animation only runs once
		var animationFlag = Cookie.write('animationFlag', 'true', {path: '/', domain: '.reedstreetyards.com'});
	}else
	{
		//If there is a cookie, then display logo without animation and set duration to 1 millisecond.
		//Start logo morph
			var myEffect = new Fx.Morph($('logo'), {duration: 1});
 
			//The styles of the class referenced will be applied to the target Element.
			myEffect.start('#logo .morphed');
		//End logo morph
		
	}		
});