// MENU

var obj = null;
var confirm = 0;

function checkHover(cf) {
	if (obj && cf == confirm) {
		obj.find('ul').hide();
	}
}

$(function() {	
	$('ul.menu li').hover(function() {
		if (obj == $(this)) {
			obj = null;
			return;
		}
		if (obj) {
			obj.find('ul').hide();
			obj = null;
		}
		$(this).find('ul').show();
	}, function() {
		obj = $(this);
		confirm++;
		setTimeout("checkHover("+confirm+")", 3000);
	});
});