	// JavaScript Document

$(document).ready(function(){


$('#datepicker').datepicker();

$('.subnav2').animate({
  opacity: 1
}, 0);

// Animation Lionel Haarausfall /////////////////////////////////// 

$('#haarausfall').click(function() {
  $('.hover').stop().animate({
    opacity: 0
  }, 1200, function() {
    // Animation complete.
    		$('#haarausfall').addClass('weg');
    		$('#haarausfall').removeClass('da');
    		$('#haareinfall').addClass('da');
    		$('#haareinfall').removeClass('weg');
  });
});

$('#haareinfall').click(function() {
  $('.hover').stop().animate({
    opacity: 1
  }, 1200, function() {
    // Animation complete.
    		$('#haarausfall').addClass('da');
    		$('#haarausfall').removeClass('weg');
    		$('#haareinfall').addClass('weg');
    		$('#haareinfall').removeClass('da');
  });
});







// Animation Subnav /////////////////////////////////// 
// Animation Subnav 1
$('#nav1, #subnav1').mouseenter(function() {
		$('#nav1').addClass('current');

	$('#subnav1').stop().animate({
		marginTop:0,
		opacity:1
		}, 500, function() {
		// Animation complete.
		$('#nav1').addClass('current');

	});

});

$('#nav1, #subnav1').mouseleave(function() {
		$('#nav1').removeClass('current');

	$('#subnav1').stop().animate({
		marginTop:-330,
		opacity:0
		}, 500, function() {
		// Animation complete.
	});

});


// Animation Subnav 2
$('#nav2, #subnav2').mouseenter(function() {
		$('#nav2').addClass('current');

	$('#subnav2').stop().animate({
		marginTop:0,
		opacity:1
		}, 500, function() {
		// Animation complete.

	});

});

$('#nav2, #subnav2').mouseleave(function() {
		$('#nav2').removeClass('current');

	$('#subnav2').stop().animate({
		marginTop:-330,
		opacity:0
		}, 500, function() {
		// Animation complete.
	});

});


// Animation Subnav 3
$('#nav3, #subnav3').mouseenter(function() {
		$('#nav3').addClass('current');

	$('#subnav3').stop().animate({
		marginTop:0,
		opacity:1
		}, 500, function() {
		// Animation complete.

	});

});

$('#nav3, #subnav3').mouseleave(function() {
		$('#nav3').removeClass('current');

	$('#subnav3').stop().animate({
		marginTop:-330,
		opacity:0
		}, 500, function() {
		// Animation complete.
	});

});


// Animation Subnav 4
$('#nav4, #subnav4').mouseenter(function() {
		$('#nav4').addClass('current');

	$('#subnav4').stop().animate({
		marginTop:0,
		opacity:1
		}, 500, function() {
		// Animation complete.

	});

});

$('#nav4, #subnav4').mouseleave(function() {
		$('#nav4').removeClass('current');

	$('#subnav4').stop().animate({
		marginTop:-330,
		opacity:0
		}, 500, function() {
		// Animation complete.
	});

});

// End Animation Subnav /////////////////////////////////// 




// Subnav Links /////////////////////////////////// 

$('.subnav_weiter').addClass('farbe_links_gruen');


$('.subnav_link').mouseenter(function() {
		$(this).find('.subnav_weiter').addClass('farbe_links');
		$(this).find('.subnav_weiter').removeClass('farbe_links_gruen');

});

$('.subnav_link').mouseleave(function() {
		$(this).find('.subnav_weiter').addClass('farbe_links_gruen');
		$(this).find('.subnav_weiter').removeClass('farbe_links');

});








 });
 
 

