var obj = null;

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

jQuery(function() {
	
	/** begin submenu **/
	jQuery('#header ul > li').hover(
		function() {
			if (obj) {
				obj.find('ul').css('display', 'none');
				obj = null;
			}
			jQuery(this).find('ul').fadeIn();
		},
		function() {
			obj = jQuery(this);
			setTimeout("checkHover()", 1000);
		}
	);
	
});
