//$(document).ready(function() {
//    $("#menu li").bind("mouseenter", function(e){
//        $(this).addClass("over");
//        $(this).find('ul').css('left', $(this).offset().left);
//    });
//    
//    $("#menu li").bind("mouseleave", function(e){
//        var self = $(this);
//        //timer = $.timer(1000, function (timer) {
//            self.removeClass("over");
//        //    timer.stop();
//        //});
//    });
//});

var obj = null;

function checkHover() {
	if (obj) {
		obj.find('ul').fadeOut();	
	} //if
} //checkHover

$(document).ready(function() {
	$('#menu > li').hover(function() {
		if (obj) {
			obj.find('ul').hide();
			obj = null;
		} //if
		$(this).find('ul').css('left', $(this).offset().left);
		$(this).find('ul').show();
	}, function() {
		obj = $(this);
		setTimeout(
			"checkHover()",
			800);
	});
});