$(document).ready(function(){
	
	jQuery.fn.delay = function(time, callback)
	{
	    return this.animate({ opacity: '+=0' }, time, callback);
	}
	
	function mainNaviAnimation() {
		var highestObj = 0;
	
		jQuery('.FUNCTION_navigation_sub').each(function(){
			if (jQuery(this).height() > highestObj) {
				highestObj = jQuery(this).height();
			}
		});
	
		jQuery('.FUNCTION_navigation_sub').animate({height:0, paddingTop:0},0);
		jQuery('.CONTAINER_mainNavi').hover(function(){
			jQuery('.FUNCTION_navigation_sub').stop(true).delay(250).animate({height: highestObj, paddingTop:13},500);
		},function(){
			jQuery('.FUNCTION_navigation_sub').stop(true).delay(250).animate({height: 0, paddingTop:0},300);
		});
	}
	
	function spezialNaviAnimation() {
		jQuery('#eicNaviBox').hover(
		//mouseenter
		function(){
			jQuery('.CONTAINER_eicNavi').stop().animate({width:3},300);
		//mouseleave
		}, function(){
			jQuery('.CONTAINER_eicNavi').stop().animate({width:1},300);
		});
		
		jQuery('.CONTAINER_eicNaviToggler').click(function(){
			jQuery('.CONTAINER_eicNavi').stop().animate({width:358},400);
		});
		
		
		jQuery('.STYLE_eicSubnaviItem').hover(
		//mouseover
		function(){
			jQuery(this).find('p,h3,span').css('textDecoration','underline');
		//mouseleave	
		}, function(){
			jQuery(this).find('p,h3,span').css('textDecoration','none');
		});
		
	}
	
	mainNaviAnimation();
	spezialNaviAnimation();
	
	
	
});