/*

 * 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

 *

 */

 





this.tooltip = function(){	

	/* CONFIG */			

		xOffset3 = 90;

		yOffset3 = 50;		

		// these 2 variable determine popup's distance from the cursor

		// you might want to adjust to get the right result		

	/* END CONFIG */			
	$(".tooltip3").hover(function(e){											  

		this.t = this.title;

		this.title = "";									  

		$("body").append("<p id='tooltip2'>" + "<img src='" + this.t + "'/>" +"</p>");
		
		$("#tooltip2")
		
			.delay(200)
			
			.css("top",(e.pageY - xOffset3) + "px")

			.css("left",(e.pageX + yOffset3) + "px")

			.fadeIn("slow");		

    },

	function(){

		this.title = this.t;		

		$("#tooltip2").remove();

    });	

	$(".tooltip3").mousemove(function(e){

		$("#tooltip2")

			.css("top",(e.pageY - xOffset3) + "px")

			.css("left",(e.pageX - yOffset3) + "px");

	});			



};









// starting the script on page load

$(document).ready(function(){

	tooltip();

});	
