$(document).ready(function(){	
	$('#home #navigation li a').each(function() {
		var image = $(this).find('img').attr('src').replace('hell', 'dunkel');
		$(this).prepend('<div style="background: transparent url('+image+') no-repeat;width:143px;height:403px;position:absolute;"></div>');
		
		$(this).hover(function() {
			$(this).find('div').stop().animate({opacity: 0}, {duration: 200});
		},function(){
			$(this).find('div').stop().animate({opacity: 1}, {duration: 150});
		});
	});
	
	$('#page #navigation li a').each(function() {
		var img = $(this).find('img').attr('src');
		var hover_img = $(this).find('img').attr('src').replace('.png', '-current.png');
		$(this).prepend('<span style="display:block;background: transparent url('+hover_img+') center no-repeat;position:absolute;width:143px;height:28px;cursor:hand;"></span>');
		$(this).find('span').css({'opacity':0});
		
		$(this).hover(function() {
			$(this).find('span').stop().animate({opacity: 1}, {duration: 200});
		},function(){
			$(this).find('span').stop().animate({opacity: 0}, {duration: 150});
		});
	});
	
	$("#subnavigation li:not(.current)").hover( function() {
		$(this).addClass("current");
	},
	function() {
		$(this).removeClass("current");
	})	
}); 
