$(document).ready(function(){
						   
	// Preload images
	$("<img>").attr("src", "images/png/menu.state.rollover.png");
	$("<img>").attr("src", "images/png/news.rollover.png");
						   
	// Fix png images (in compatibility mode)
	if($.browser.msie && $.browser.version < 7){
		$.ifixpng('images/gif/transparent.gif');
		$('.png, .MainMenu-Current').ifixpng();
	}
	
	$('.DropDrop').hover(function(){
		$(this).find('.Panel').css('left', $(this).position().left);
		$(this).find('.Panel').css('visibility', 'visible');
	}, function(){
		$(this).find('.Panel').css('visibility', 'hidden');
	})
	
	// Menu rollovers
	$('.MainMenu-Off').hover(function(){
		$(this).attr("class", "MainMenu-Rollover");
	}, function(){
		$(this).attr("class", "MainMenu-Off");
	})
	$('.MainMenu-Current').hover(function(){
		$(this).attr("class", "MainMenu-Rollover");
	}, function(){
		$(this).attr("class", "MainMenu-Current");
	})
			   
	// Fix background texture
	function updateWindow(){ $("#Gradient").attr("height", $(window).height()); }
	$(window).resize(function(){ updateWindow(); });
	updateWindow();
	
	// Latest news rollovers
	$('.NewsItem').hover(function(){
		$(this).find('span').css('color', '#ffffff');
		$(this).css("background", "url('images/png/news.rollover.png')");
		if($.browser.msie && $.browser.version < 7) $(this).ifixpng();
	}, function(){
		if($.browser.msie && $.browser.version < 7) $(this).iunfixpng();
		$(this).css("background", "");
		$(this).find('span').css('color', '#9e9e9e');
	})

});
