$(document).ready(function(){
	//Preload images
	$("a.level_1").each(function(i){
		preimg = $(this).css('background-image').replace('url("', '').replace('")','').replace('.png', '_hover.png');
		jQuery("<img>").attr("src", preimg);
		if($(this).hasClass("selected")){
			$(this).css('background-image', $(this).css('background-image').replace('.png', '_hover.png'));
		}
	});

	$("a.level_1").mouseover(function(){
		if(!$(this).hasClass("selected")){
			$(this).css('background-image', $(this).css('background-image').replace('.png', '_hover.png'));
		}
	});
	
	$("a.level_1").mouseout(function(){
		if(!$(this).hasClass("selected")){
			$(this).css('background-image', $(this).css('background-image').replace('_hover.png', '.png'));
		}
	});
});
