$(document).ready(function(){
	
	// twitchy flyover menu

	$("#nav_works").mouseenter(function(){
		$("#navFlyout").fadeIn(200);
	});

	$("#nav_works").mouseleave(function(){
		//         $("#navFlyout:not").mouseenter(function(){
		// 	$("#navFlyout").hide();
		// });
		$("#navFlyout").hide();
	});

	$("#navFlyout").mouseover(function(){
		$(this).show();
	});

	$("#navFlyout").mouseleave(function(){

        $("nav_works:not").mouseenter(function(){
			$("#navFlyout").hide();
		});
        
		// if ($("#name").size() > 0)
        // { ... your logic without any jQuery methods ... }

		// need an if then loop here 
		// if mouseover on exit is to navworks, no fadeout

		$(this).hide();

		// $(this).fadeOut(200);
		
	});

	$("#navFlyout").click(function(){
		$(this).fadeOut(200);
	});


	$('#eventPopup').cluetip({
		width: '650px',
		height: 'auto',
		activation: 'click',
		attribute: 'rel',  // use for HTML; use title for title
		sticky: true,
		showTitle: false,
		closePosition: 'bottom',
		closeText: 'CLOSE',
		cluetipClass: 'privacyBox',
		dropShadowSteps: 10,
	});



	// $("#navLinks:not('#nav_works')").mouseenter(function(){
	// 	$("#navFlyout").hide();
	// });
 
});  //document
