window.addEvent('domready', function() {
	// use the slide Fx // use .chain(function(){}) to scroll to bottom....
	var myFx = new Fx.Scroll($(document.body),{
		wheelStops:false,
		duration: 500,
		wait: false
	});
	
	var theSlide = new Fx.Slide('content-body', {
		duration: 120,
		transition: Fx.Transitions.Sine.easeInOut
	});
	
	theSlide.hide();
	
	var trans = new Fx.Morph('content-body',{
		duration: 230, transition: Fx.Transitions.Sine.easeInOut
	});
	
	trans.set({
		'opacity': 0
	});
	
	$('_extender').addEvent('click',function(e) {
		e.stop();
		
		if (theSlide.open) {
			myFx.toElement('media-conti');
			trans.start({
				'opacity': 0
			}).chain(function() {
				theSlide.slideOut();
			});
		} else {
			theSlide.slideIn().chain(
				function() {
					myFx.toElement('_extender');
					var test = function(opts) { trans.start(opts); };
					test.delay(300,this,{ 'opacity':1 });
				});
		}
	});
		
	// equalize heights:
	var rh = $('rightCol').getStyle('height');
	rh = parseInt(rh.substring(0,rh.indexOf('px')));
	var lh = $('leftCol').getStyle('height');
	lh = parseInt(lh.substring(0,lh.indexOf('px')));
	if (lh <= rh) {
		$('leftCol').setStyle('height',$('rightCol').getStyle('height'));
	}
	else {
		$('rightCol').setStyle('height',$('leftCol').getStyle('height'));
	}

});