$(document).ready(function(){
						   
	// Fix png images (in compatibility mode)
	$.ifixpng('images/gif/transparent.gif');
	$('.png, .MainMenuBlue').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').hover(function(){
		$(this).css("background", "url('images/png/menu_rollover.png')").ifixpng();
	}, function(){
		$(this).iunfixpng().css("background", "");
	})

	// Preload all rollovers
	$(".RollOver").each(function() {
		rollsrc = $(this).attr("src");
		var ext = rollsrc.match(/(.{3}$)/)[1];
		rollON = rollsrc.replace('.' + ext, "_over." + ext);
		$("<img>").attr("src", rollON);
	});

	// Setup javascript for rollovers
	$('.RollOver').hover(function(){
		imgsrc = $(this).attr("src");
		var ext = rollsrc.match(/(.{3}$)/)[1];
		matches = imgsrc.match(/_over/);
		if(!matches){
			imgsrcON = imgsrc.replace('.' + ext, "_over." + ext);
			$(this).attr("src", imgsrcON);
		}
	}, function(){
		$(this).attr("src", imgsrc);
	})
});