var obj = null;

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

$(document).ready(function() {
	$('#menu > li').hover(function() {
		if (obj) {
			obj.find('ul').fadeOut('slow');
			obj = null;
		} //if
		
		$(this).find('ul').fadeIn('fast');
	}, function() {
		obj = $(this);
		setTimeout(
			"checkHover()",
			500);
	});
});

/*jQuery().ready(function(){	
	// applying the settings
	jQuery('#menu').Accordion({
		active: 'li.current',
		header: 'li',
		alwaysOpen: false,
		animated: true,
		showSpeed: 400,
		hideSpeed: 800
	});
	/*jQuery('#xtraMenu').Accordion({
		active: 'h4.selected',
		header: 'h4.head',
		alwaysOpen: false,
		animated: true,
		showSpeed: 400,
		hideSpeed: 800
	});
});*/
