
jQuery(document).ready(function(){
	
	// ================ //
	// main menu
	// ================ //
	//On Hover Over
	function main_dropdown_hover_over() {
		$(this).find(".drop_down_menu").show(); //Find sub and fade it in
		$(this).find(".drop_down_menu .drop_down_menu").hide();
	}
	
	//On Hover Out
	function main_dropdown_hover_out() {
		$(this).find(".drop_down_menu").hide();
	}
	
	

	var config_main = {
		over: main_dropdown_hover_over, // function = onMouseOver callback (REQUIRED)    
		timeout: 100, // number = milliseconds delay before onMouseOut    
		out: main_dropdown_hover_out // function = onMouseOut callback (REQUIRED)    
	};
	
	
	$(".Normal .drop_down_menu").css({ 'display': 'none' });
	$(".Normal").hoverIntent(config_main);
	
	
	
	
	// ================ //
	// Sub Menu 
	// ================ //
	
	//On Hover Over
	function sub_dropdown_hover_over() {
		
		// finds how far you are from the top of the web browser
		var get_position_top = $(this).position().top;
		
		//Find sub and fade it in
		$(this).find(".drop_down_menu.sub").show(); 
		
		// bumps the sub menu down to line up
		$(this).find(".drop_down_menu.sub").css({ 'top': get_position_top });
		
		// hides sub sub menus.
		$(this).find(".drop_down_menu.sub .drop_down_menu").hide();
	}
	
	//On Hover Out
	function sub_dropdown_hover_out() {
		$(this).find(".drop_down_menu.sub").hide();
	}
	

	var config_sub = {
		over: sub_dropdown_hover_over, // function = onMouseOver callback (REQUIRED)    
		timeout: 100, // number = milliseconds delay before onMouseOut    
		out: sub_dropdown_hover_out // function = onMouseOut callback (REQUIRED)    
	};

	
	$(".submenu .drop_down_menu.sub").css({ 'display': 'none' });
	$(".submenu").hoverIntent(config_sub);
	
	
	
});


