
// requires: prototype & scriptaculous
var protoaculous_included = (typeof Prototype != 'undefined' && typeof Scriptaculous != 'undefined');
if (protoaculous_included) {
	function rrfNavi_init() {
		//$('contentLeft').addClassName('rrfNaviClosed');
		$('contentLeft').style.zIndex = '1000';
		//$('contentLeft').style.height = '99px';
		//$('contentLeft').style.height = '625px'; // old Philly setup
		$('contentLeft').style.height = '544px';
		
		
		window.setTimeout(function() { new Effect.Morph($('contentLeft'), {style: 'height: 99px', afterFinish: function(){ $('contentLeft').addClassName('rrfNaviClosed'); }}); }, 1000);
		
		
		new rrfNaviObserver($('contentLeft'));
	}
	
	rrfNaviObserver = Class.create({
		initialize: function(ele) {
			this.ele = ele;
			
			Event.observe(this.ele, 'mouseover', this.over.bindAsEventListener(this));
			Event.observe(this.ele, 'mouseout', this.out.bindAsEventListener(this));
		},
		
		over: function(evt) {
			if (!checkMouseEnter(this.ele, evt)) return;
			new Effect.Morph(this.ele, {style: 'height: 800px'});
			this.ele.removeClassName('rrfNaviClosed');
		},
		out: function(evt) {
			if (!checkMouseLeave(this.ele, evt)) return;
			new Effect.Morph(this.ele, {style: 'height: 99px', afterFinish: function(){ $('contentLeft').addClassName('rrfNaviClosed'); }});
		}
	});
	
	//Event.observe(window, 'load', function() { window.setTimeout(rrfNavi_init, 2000); });
	Event.observe(window, 'load', rrfNavi_init);
}

