// DropDown Menu Herzog Marine Center AG
// Author ayon GmbH

/**$(document).ready(function()
	{
		$('.subnavi-dropdown li:last-child').addClass('last');
		
		$('.subnavi-dropdown').parent('li').hover(function()
		{
			$(this).addClass("activeHover");												   
		});
		
		$('.subnavi-dropdown').parent('li').mouseleave(function()
		{
			$(this).removeClass();												   
		});
		
		$('#main-navigation ul li').mouseover(function()
		{
			$(this).find('.subnavi-dropdown').css('display','block')		
			
		});
		
		$('#main-navigation ul li').mouseleave(function()
		{
			$('.subnavi-dropdown').css('display','none')	
			
		});
		
		
		
	});**/

$(document).ready(function(){

	$("#main-navigation li").hover(function() { //When trigger is clicked...
		//Following events are applied to the subnav itself (moving subnav up and down)
		$(this).find(".subnavi-dropdown").css('display','block'); //Drop down the subnav on click

		$(this).parent().hover(function() {
		}, function(){
			$(this).find(".subnavi-dropdown").css('display','none'); //When the mouse hovers out of the subnav, move it back up
		});

		//Following events are applied to the trigger (Hover events for the trigger)
		}).hover(function() {
			$(this).addClass("activeHover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			$(this).removeClass("activeHover"); //On hover out, remove class "subhover"
			$(this).find(".subnavi-dropdown").css('display','none');
	});

});
