menu_init = function() {
	var $menu = $("#menu");
	var hideItem = function(m) {
		m.removeClass("menu_hover").children("ul").hide();
	};
	
	var showItem = function(m) {
		if ( typeof(my) != 'undefined' && my.menu.fixo ) {
			if ( m.index() == my.menu.fixo.index() && $menu.children("li.menu_hover").length > 0  ) {
				return;
			}
		}
		m.addClass("menu_hover").children("ul").show();
	};
	
	$menu.children("li").each(function() {
		var $el = $(this);
		$el.hoverIntent({
			over : function() {
				hideItem($menu.children("li.menu_hover"));
				if ( typeof(my) != 'undefined' && my.menu.fixo ) {
					hideItem(my.menu.fixo);
				}
				showItem($el);
			},
			timeout : 500,
			out : function() {
				hideItem($el);
				if ( typeof(my) != 'undefined' && my.menu.fixo ) {
					showItem(my.menu.fixo);
				}
			}
		});
	});
};
