// Lazy Load
$(function() {
	$("#content img").lazyload({
		 placeholder : "/layout/ajax-loader.gif",
		 effect : "fadeIn"
	});
});

function mainmenu(){
$("#navigation ul ul ").css({display: "none"}); // Opera Fix
$("#navigation li").hover(function(){
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).fadeIn(300);
		},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
		});
}

// jQuery-Anweisungen
$(document).ready(init);

function init()
	{

	mainmenu();
	
	// Mainnavigation Effect
	$("#navigation img").hover(
	 function()
	 {
		this.src = this.src.replace("FFD300","FFFFFF");
	 },
	 function()
	 {
		this.src = this.src.replace("FFFFFF","FFD300");
	 }
	);
	
	
	$("#navigation a").hover(
	function(){
		$(this).animate({ marginTop: '4px' },100);
	},
	function(){
		$(this).animate({ marginTop: '0px' },100);
	});
	
	
	
	// Saisonbox effect
	$("#saisonbox a").hover(
	function(){
		$(this).animate({ paddingRight: '0px' },200);
	},
	function(){
		$(this).animate({ paddingRight: '10px' },200);
	});
	
	$("#subnav a").hover(
	function(){
		$(this).animate({ paddingRight:'15px' },200);
	},
	function(){
		$(this).animate({ paddingRight:'0px' },200);
	});
	
	
	
	// Gallery Album Rollover-Effect
	
	
	
	// Woodbox hover
	$("#woodbox a.link img").hover(
	 function()
	 {
		this.src = this.src.replace("_off","_on");
	 },
	 function()
	 {
		this.src = this.src.replace("_on","_off");
	 }
	);
	
	
	
	
	
	$("#pageNav a.back2events").hover(
	function(){
		$(this).animate({ paddingTop:'8px' },200);
	},
	function(){
		$(this).animate({ paddingTop:'0px' },200);
	});
	
	
	
	$("a.back2overview").hover(
	function(){
		$(this).animate({ paddingLeft:'12px' },200);
	},
	function(){
		$(this).animate({ paddingLeft:'0px' },200);
	});
	
	$("#image a.previous").hover(
	function(){
		$(this).animate({ opacity:0.65 },200);
	},
	function(){
		$(this).animate({ opacity:1.0 },200);
	});
	
	$("#image a.next").hover(
	function(){
		$(this).animate({ opacity:0.65 },200);
	},
	function(){
		$(this).animate({ opacity:1.0 },200);
	});
	
	$("#pictureView #image img").hide().delay(100).fadeIn(300);
	
	$("#empf a").hover(
	function(){
		$(this).animate({ 
			marginBottom: '0px', marginTop: '5px'
		},100);
	},
	function(){
		$(this).animate({ 
			marginBottom: '5px', marginTop: '0px'
		},100);
	});
	
	
}
