$(document).ready(function() {
	var nav = $("#tnav");  
	nav.find("li").each(function() {  
		if ($(this).find("div").length > 0) {  
	        $(this).mouseenter(function() {
	        	$(this).addClass("rolled");
	            $(this).find("div").stop(true, true).fadeIn(100); 
	        });
	        $(this).mouseleave(function() {  
	            $(this).removeClass("rolled");
	            $(this).find("div").stop(true, true).fadeOut(200);  
	        });  
	    }  
	});
	
	var dropper = $(".dropper");  
	if ($(dropper).find("div").length > 0) {  
        $(dropper).click(function() {
        	$(this).addClass("rolled");
            $(this).find("div").stop(true, true).fadeIn(100); 
        });
        $(dropper).mouseleave(function() {  
            $(this).removeClass("rolled");
            $(this).find("div").stop(true, true).fadeOut(200);  
        });  
    }  

	$(".tooltipTag[title]").tooltip('#tooltip');
	$(".formTip[title]").tooltip('#tooltipForm');
	
	
	
	
});  


function popAlert(t, b) {
		$("#popAlertTitle").html(t);
		$("#popAlertBody").html(b);
		$("#popAlert").overlay({          
			expose: { 
				color: '#333', 
				loadSpeed: 200, 
				opacity: 0.9 
			}, 
			// disable this for modal dialog-type of overlays 
			closeOnClick: false, 
			// we want to use the programming API 
			api: true 
		// load it immediately after the construction 
		}).load();
	}
