$(document).ready(function(){
	
    $('.qtrans_language_chooser li, .wround').append('<img src="'+root+'images/white_round_l.png" alt="" style="position: absolute; top: 0; left: -2px;" />');
    $('.qtrans_language_chooser li, .wround').append('<img src="'+root+'images/white_round_r.png" alt="" style="position: absolute; right: -2px; top:0;" />');
    
	$('div#footer ul li:first-child').append('<img src="'+root+'images/white_round_l.png" alt="" style="position: absolute; top: 0; left: -2px;" />');
	$('div#footer ul li:last-child').append('<img src="'+root+'images/white_round_l.png" alt="" style="position: absolute; top: 0; right: -2px;" />');
	$('div#footer ul li:last-child a').css('border',0);
	
	$('div#menu ul ul li').bind('mouseover',function(){
		$(this).parent().prev('a').addClass('hovered');
	});
	$('div#menu ul ul li').bind('mouseout',function(){
		$(this).parent().prev('a').removeClass('hovered');
	});
	$('div#menu ul li').bind('mouseover',function(){
		$(this).children('a').addClass('hovered');
	});
	$('div#menu ul li').bind('mouseout',function(){
		$(this).children('a').removeClass('hovered');
	});

	$('div#menu2 ul li:last').addClass('last');
	
	if ($.browser.msie && $.browser.version == '7.0') {
		$(function(){
			var zIndexNumber = 800;
			$('div,li,img').not('div#content div,div#background2,div.blockUI').each(function(){
				$(this).css('zIndex', zIndexNumber);
				zIndexNumber -= 5;
			});
		});
	}
	resizing();
	$(window).resize(function() {
	  resizing();
	});
});


function resizing(){
	var topF = $('div#blackLine').position().top; 
	var heightF = $('div#blackLine').height();
	if((topF + heightF) < $(document).height() ){
		$('div#blackLine').css({
			position: 'absolute',
			top: $(document).height() - (heightF+parseInt($('div#blackLine').css('paddingTop')))
		});
	}
}


