/* called immediately after loading*/

/*adjust heights*/
Event.observe(window, 'load', function() {adjustLeftBarHeight(); copyTipAFriendContent(); adjustTopMenuWidth();});
Event.observe(window, 'resize', function() {adjustLeftBarHeight();});  


/* functions */
function adjustLeftBarHeight(){
	
	max_bottom=document.viewport.getHeight();
	if ($('last_div').offsetTop > max_bottom){max_bottom=$('last_div').offsetTop}

	$('left_menu_wrapper').style.height = (max_bottom-$('main_left').offsetTop) + "px";
}


function copyTipAFriendContent(){	
	$('icon_recommend').innerHTML=$('print_link_wrapper_hidden').innerHTML;
}

/*the top menu a elements will get width depending on theri char number*/
function adjustTopMenuWidth(){
	$$('.top_menu a', '.top_menu_active a').each(function(el) {		
		//el.innerHTML.length
  		el.style.width=(10+(el.innerHTML.length * 6)) +'px';
		//el.style.border="1px solid red";
	});

}
