$(document).ready(function(){

	$('#wrapper').css({'margin-top':($(document).height()-$('#wrapper').height())/2}); // iecentrējam vertikāli

	$('.second').hide().css({'margin-bottom':'0px','position':'absolute'});
	$('.submenu').hover(
		function(){
			var id=String(this.id).replace('mm','');
			if(isMagicBrowser(1)){$('#mm'+id).css({'height':'15px'});} // IE bugfix
			$('#sm'+id).show();
		},
		function(){
			var id=String(this.id).replace('mm','');
			if(isMagicBrowser(1)){$('#mm'+id).css({'height':'19px'});} // IE bugfix
			$('#sm'+id).hide();
		}
	);
	$('.target-blank').attr({'target':'_blank'})

});