//Adiciona funções de submenu
var selected_dropdown_menu;
var menu_timer;
var time = 100;

$(".dropdown").hover(
	function(){
		clearTimeout(menu_timer);
		$(".dropdown").not('.current').removeClass("selected").parent().find('ul.submenu').hide();
		$(this).parent().find('ul.submenu').stop(true, true).show();
		selected_dropdown_menu = $(this);
	},
	function(){
		menu_timer = setTimeout(function(){
			selected_dropdown_menu.parent().find('ul.submenu').hide();
			selected_dropdown_menu.not('.current').removeClass("selected");
			selected_dropdown_menu = null;
		}, time);
	}
);

$(".submenu").hover(
	function(){
		clearTimeout(menu_timer);
		selected_dropdown_menu.addClass("selected");
	},
	function(){
		menu_timer = setTimeout(function(){
			selected_dropdown_menu.parent().find('ul.submenu').hide();
			selected_dropdown_menu.not('.current').removeClass("selected");
			selected_dropdown_menu = null;
		}, time);
	}
);