/*
 * Tooltip script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 
/* TOOLTIP - MAXISCHEDA VOCI CAPARRA ---------------------------------------------  */
 
this.tooltip = function(){	
	/* IMPOSTO LA DISTANZA */
	xOffset = -10;	/* distanza verticale dal cursore */ 
	yOffset = -100;	/* distanza orizzontale dal cursore */		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
	
/* TOOLTIP - ICONE SERVIZI DOTAZIONE ---------------------------------------------  */
	
	/* IMPOSTO LA DISTANZA */
	xOffset = 10;	/* distanza verticale dal cursore */ 
	yOffset = 20;	/* distanza orizzontale dal cursore */		
		
	$("a.tooltip-ant-ico-dot").hover(function(e){											  
		this.t = this.title;
		this.title = "";					
		$("body").append("<p id='tooltip-ant-ico-dot'>"+ this.t +"</p>");
		$("#tooltip-ant-ico-dot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("300");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip-ant-ico-dot").remove();
    });	
	$("a.tooltip-ant-ico-dot").mousemove(function(e){
		$("#tooltip-ant-ico-dot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});

/* TOOLTIP - ICONE SERVIZI DOTAZIONE ---------------------------------------------  */
	
	/* IMPOSTO LA DISTANZA */
	xOffset = 10;	/* distanza verticale dal cursore */ 
	yOffset = 20;	/* distanza orizzontale dal cursore */		
		
	$("a.tooltip-ant-ico-dot-disatt").hover(function(e){											  
		this.t = this.title;
		this.title = "";					
		$("body").append("<p id='tooltip-ant-ico-dot-disatt'>"+ this.t +"</p>");
		$("#tooltip-ant-ico-dot-disatt")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("300");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip-ant-ico-dot-disatt").remove();
    });	
	$("a.tooltip-ant-ico-dot-disatt").mousemove(function(e){
		$("#tooltip-ant-ico-dot-disatt")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});	





};



// starting the script on page load
$(document).ready(function(){
	tooltip();
});
