/*
 * 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 */		
	
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$(".tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<div id='tooltip'>"+ this.t +"</div>");
		//$("#tooltip").fadeTo("slow",1)
		$("#tooltip")
			.css("top",(e.pageY - 40) + "px")
			.css("left",(e.pageX + 20) + "px")
			.fadeIn("slow");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });



	$(".tooltip_resim").hover(function(e){											  
		this.tt = this.title;
		this.title = "";									  
		$("body").append("<div id='tooltip_resim'>"+ this.tt +"</div>");
		//$("#tooltip").fadeTo("slow",1)
		$("#tooltip_resim")
			.css("top",(e.pageY - 40) + "px")
			.css("left",(e.pageX + 40) + "px")
			.fadeIn("slow");		
    },
	function(){
		this.title = this.tt;		
		$("#tooltip_resim").remove();
    });	
	
	
	
	$(".tooltiptema").hover(function(e){											  
		this.ttt = this.title;
		
		this.title = "";									  
		$("body").append("<div id='tooltiptema'>"+ this.ttt +"</div>");
		//$("#tooltip").fadeTo("slow",1)
		$("#tooltiptema")
			.css("top",(e.pageY - 40) + "px")
			.css("left",(e.pageX - 30) + "px")
			.css("display","block");		
    },
	function(){
		this.title = this.ttt;		
		$("#tooltiptema").remove();
    });	

	
	
	$(".tooltiptema").mousemove(function(e){
		$("#tooltiptema")
			.css("top",(e.pageY - 40) + "px")
			.css("left",(e.pageX - 30) + "px");
	});	
	
};




