jQuery('document').ready(function(){
	
//balances the height of the left column 
	var block1_h = $('#block1').height();
	var col1_h = $('#col1').height();	
	var new_h = col1_h;
	var reserved_h = block1_h+100;
	var allowed_h = col1_h-reserved_h;
	if ($('#nav2>ul>li.actif>ul').height() > allowed_h) new_h = $('#nav2>ul>li.actif>ul').height()+reserved_h;	//comparison with the height of the block containing the second level of the #nav2 menu	
	if ($('#col1 ul').height() > allowed_h)  new_h = $('#col1 ul').height()+reserved_h;	//comparison with the height of the newslist if there is one (I cant use #newslist coz there is this id twice on the page!!!)
	if (new_h > col1_h) $('#col1').css({'height': new_h+'px'});	//set new height
		
//fixes menu's text vertical centering
	$("#nav2>ul>li>a").each(function(i, o){
		if ($(o).text().length > 12) $(o).css({lineHeight: '1.1', paddingTop: '5px'});
	});	
	
/*
	$('#nav2>ul>li>ul>li>a').each(function(i, o){
		$(o).bind('mouseover', function(){
		  //console.log($(o));
			//console.log($(o).css('paddingLeft'));
			if ($(o).css('paddingLeft') == '0px') $(o).animate({paddingLeft:'20px'}, 'slow');
			return false;
		});
		$(o).bind('mouseout', function(){
			console.log($(':animated', o));
			if ($(o).css('paddingLeft') != '0px') $(o).animate({paddingLeft:'0px'}, 'slow');
			return false;
		});
	});
*/
	
});
