// JavaScript Document
$(document).ready(function() {
	$('#navbar .rightcorner > ul > li > a').hover(
		function() {
			$('#navbar ul ul:visible').hide('fast');
			$(this).next('ul').show('fast');
		}
	);
	$('#navbar').bind('mouseleave',
		function() {
			var obj = $('#navbar ul ul:visible');
			if (obj.parent('li').not('.current').length > 0) {
				obj.hide('fast');
				$('#navbar .current ul').show('fast');
			}
		}
	);
	
/*	$('#navbar .rightcorner > ul > li > a').hoverIntent({
		sensitivity	: 	3, // number = sensitivity threshold (must be 1 or higher)    
		interval	:	200, // number = milliseconds for onMouseOver polling interval    
		over		:	function() {
							$('#navbar ul ul:visible').hide('slow');
							$(this).next('ul').show('slow');
							console.debug('over');
						},  // function = onMouseOver callback (REQUIRED)    
		timeout		:	800, // number = milliseconds delay before onMouseOut    
		out			: 	function() {
							var obj = $('#navbar ul ul:visible');
							if (obj.parent('li').not('.current').length > 0) {
								obj.hide('slow');
								$('#navbar .current ul').show('slow');
							}
							console.debug('out');
						} // function = onMouseOut callback (REQUIRED)    
	});
*/		
});
