// JavaScript Document

//NIVOSLIDER
$(window).load(function() {
	$('#slider').nivoSlider();
});


$(document).ready(function() {    
	$("#navigation a")
		.css( {backgroundPosition: "0px 0px"} )
		.mouseenter(function(){
			$(this).stop().animate({backgroundPosition: '0px -129px'}, 1000, 'easeOutBounce')})
		.mouseleave(function(){
			$(this).stop().animate({backgroundPosition: '0px 0px'}, 1000,'easeOutBack')})	
	
	$('#topnav a.contact')
		.css( {backgroundPosition: "0 0"} )
		.mouseenter(function(){
			$(this).stop().animate({backgroundPosition: '0 -21px'}, 1000, 'easeOutBounce')})
		.mouseleave(function(){
			$(this).stop().animate({backgroundPosition: '0px 0px'}, 1000,'easeOutBack')})
	
	$('#topnav a.search')
		.css( {backgroundPosition: "-82px 0"} )
		.mouseenter(function(){
			$(this).stop().animate({backgroundPosition: '-82px -21px'}, 1000,'easeOutBack')})
		.mouseleave(function(){
			$(this).stop().animate({backgroundPosition: '-82px 0px'}, 1000,'easeOutBack')})

	$('#topnav a.impressum')
		.css( {backgroundPosition: "-164px 0"} )
		.mouseenter(function(){
			$(this).stop().animate({backgroundPosition: '-164px -21px'}, 1000,'easeOutBack')})
		.mouseleave(function(){
			$(this).stop().animate({backgroundPosition: '-164px 0px'}, 1000,'easeOutBack')})
			
	
	$("a.contact")
	.qtip({
	   content: 'Kontaktieren Sie mich!',
	   position: {
		   adjust: {
			   x: -105,
			   y: 10
			}
	   },
	   show: { 
	   		effect: {
				type: 'slide',
				length: 300
			}
		},
	   style: {
		   padding: 15,
		   background: '#e5e5de',
		   color: '#121212',
		   textAlign: 'center',
		   border: {
				width: 1,
        		radius: 3,
         		color: '#a45a0f'
		   },
		   tip: 'topMiddle',
	   }
	})
	
	$("a.search")
	.qtip({
	   content: 'Suche',
	   position: {
		   adjust: {
			   x: -50,
			   y: 10
			}
	   },
	   show: { 
	   		effect: {
				type: 'slide',
				length: 300
			}
		},
	   style: {
		   padding: 15,
		   background: '#e5e5de',
		   color: '#121212',
		   textAlign: 'center',
		   border: {
				width: 1,
        		radius: 3,
         		color: '#a45a0f'
		   },
		   tip: 'topMiddle',
	   }
	})
	
	$("a.impressum")
	.qtip({
	   content: 'Impressum',
	   position: {
		   adjust: {
			   x: -55,
			   y: 10
			}
	   },
	   show: { 
	   		effect: {
				type: 'slide',
				length: 300
			}
		},
	   style: {
		   padding: 15,
		   background: '#e5e5de',
		   color: '#121212',
		   textAlign: 'center',
		   border: {
				width: 1,
        		radius: 3,
         		color: '#a45a0f'
		   },
		   tip: 'topMiddle',
	   }
	})
});
