/*
 * Tooltip script 
 *
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Youssef ELALAOUI (http://jcargoo.org)
 * 
* Details: http://jcargoo.org
 *
 */
 


this.tooltip = function(){	
	/* CONFIGURATION */		
		xOffset = 15;
		yOffset = 15;		
	/* END CONFIGURATION */		
	//$(".tooltip").hover( function(e){
	//	alert("x: "+ $(".tooltip").pageX + " -  y: "+ $(".tooltip").pageY);
		area = $("area");
		//alert(area.size());
		$("area").each( function(i){
			//alert(area[i].title);
			
			t = $(this).attr("title");
			//this.title = "";									  
			$("body").append("<p id='"+ $(this).attr("alt") +"' class='tooltip'>"+ t +"</p>");
			//$("#tooltip").fadeIn("fast");
			
			$("#"+ $(this).attr("alt"))
				.css("top",(   $(this).attr("name")) + "px")
				.css("left",(  $(this).attr("rel")) + "px")
				.fadeIn("fast");	
		});
  /* });,
	
		$("a.tooltip").title = t;		
		//$("#tooltip").remove();
    });*/	
	/*$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});	*/		
};