
var $t = jQuery.noConflict();

this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 10;
		yOffset = 30;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$t("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$t("body").append("<p id='preview'><img src='"+ this.href +"' alt='Anteprima Spot' />"+ c +"</p>");								 
		$t("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$t("#preview").remove();
    });	
	$t("a.preview").mousemove(function(e){
		$t("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


// starting the script on page load
$t(document).ready(function(){
	imagePreview();
});


// per imput form
this.tooltipI = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$t("input.tooltipI").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$t("body").append("<p id='tooltipI'>"+ this.t +"</p>");
		$t("#tooltipI")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$t("#tooltipI").remove();
    });	
	$t("input.tooltipI").mousemove(function(e){
		$t("#tooltipI")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};



// starting the script on page load
$t(document).ready(function(){
	tooltipI();
});



// per immagini con link
this.tooltipH = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$t("a.tooltipH").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$t("body").append("<p id='tooltipH'>"+ this.t +"</p>");
		$t("#tooltipH")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$t("#tooltipH").remove();
    });	
	$t("a.tooltipH").mousemove(function(e){
		$t("#tooltipH")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};



// starting the script on page load
$t(document).ready(function(){
	tooltipH();
});


// per immagini SENZA link
this.tooltipS = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$t("span.tooltipS").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$t("body").append("<p id='tooltipS'>"+ this.t +"</p>");
		$t("#tooltipS")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$t("#tooltipS").remove();
    });	
	$t("span.tooltipS").mousemove(function(e){
		$t("#tooltipS")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};



// starting the script on page load
$t(document).ready(function(){
	tooltipS();
});




