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

	var position = new Array();
	position[1] = 25;
	position[2] = 110;
	position[3] = 205;
	position[4] = 285;
	position[5] = 425;
	position[6] = 560;
	position[7] = 680;
	position[8] = 780;

	var width = new Array();
	width[1] = 90;
	width[2] = 100;
	width[3] = 85;
	width[4] = 140;
	width[5] = 130;
	width[6] = 115;
	width[7] = 90;
	width[8] = 140;

	var current = $('active').get('rel');
	//var current = 5;
	$('over').setStyles({'left':position[current],'width':width[current]});
	
	$('id'+current).setStyle('color','white');
	
	function animate(id){ $('over').morph({'left' : position[id] , 'width' : width[id] }); }			
	$$('div#main-menu a').addEvents({
		'mouseover' : function(){
		animate(this.get('id').match(/[0-9]+/)[0]);
	 	}, 'mouseout':function(){
		animate(current);
	 	}
	});

	var left_size = $('left').getSize();
	var right_size = $('right').getSize();
	if(left_size.y > right_size.y) 
	$$('.right_content').setStyle('height',left_size.y-130+'px');

});
