

var tooltipTimeout;

$(".fc_top").hover(function(event)
    {
    r = $(this).attr('rel');
    t= $('.fc_'+r+' .fc_title').html();
    c= $('.fc_'+r+' .fc_text').html();
    x = event.pageX;
    y = event.pageY;
    
    
    tooltipTimeout = setTimeout(showTooltip, 500);
    },hideTooltip);

function showTooltip(event)
    {
   
    var tooltip = $('<div id="ttp"><div id="ttp_title">'+t+'</div>'+c+'</div>');
    tooltip.fadeIn().appendTo($("#body1"));
    
    	p = $('#ttp').height();
    	
    	$('#ttp').css('left',window.xPos+10+"px");
    	$('#ttp').css('top',window.yPos-30-p+"px");
		
    	$(document).mousemove(function(e){
    	
    	$('#ttp').css('left',e.pageX+10+"px");
    	$('#ttp').css('top',e.pageY-30-p+"px");
   		
   		}); 
   		
   		 
    
    }

function hideTooltip()
    {
    clearTimeout(tooltipTimeout);
    $("#ttp").fadeOut().remove();
    }


   $(document).mousemove(function(e){
      window.xPos = e.pageX;
      window.yPos = e.pageY;
   }); 

