/*
 * 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(){	
		xOffset = 10;
		yOffset = 35;		
		$("body").append("<div id='tooltip'></div>");
	$(".tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";
		$("#tooltip").fadeIn(10,function(){ if ($.browser.msie) { this.style.removeAttribute('filter');} });	
		$("#tooltip").html(this.t);
		//$("#tooltip").dropShadow();//plugin include gerekir
		$("#tooltip")
			.css("top",(e.pageY + yOffset) + "px")
			.css("left",(e.pageX + xOffset) + "px");
				
    },
	function(){
		this.title = this.t;		
		$("#tooltip").fadeOut(10);
    });	
	$(".tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - yOffset) + "px")
			.css("left",(e.pageX + xOffset) + "px");
	});			
};



this.tooltipyayinlar = function(){	
	
	$("body").append("<div id='tooltip'></div>");
	$(".tooltipyayinlar").hover(function(e){											  
		this.t = this.title;
		this.title = "";
		$("#tooltip").fadeIn(10,function(){ if ($.browser.msie) { this.style.removeAttribute('filter');} });	
		$("#tooltip").html(this.t);
		
		xOffset = 30
		yOffset = -100;	
		$("#tooltip")
			.css("top",(e.pageY + yOffset) + "px")
			.css("left",(e.pageX + xOffset) + "px");
				
    },
	function(){
		this.title = this.t;		
		$("#tooltip").fadeOut(10);
    });	
	$(".tooltipyayinlar").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY + yOffset) + "px")
			.css("left",(e.pageX + xOffset) + "px");
		
	});		
	
	$(".tooltipyayinlar_ar").hover(function(e){											  
		this.t = this.title;
		this.title = "";
		$("#tooltip").fadeIn(10,function(){ if ($.browser.msie) { this.style.removeAttribute('filter');} });	
		$("#tooltip").html(this.t);
		var genislik = $("#tooltip").width();
		
		xOffset = 0-genislik-30
		yOffset = -100	
		$("#tooltip")
			.css("top",(e.pageY + yOffset) + "px")
			.css("left",(e.pageX + xOffset) + "px");
				
    },
	function(){
		this.title = this.t;		
		$("#tooltip").fadeOut(10);
    });	
	$(".tooltipyayinlar_ar").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY + yOffset) + "px")
			.css("left",(e.pageX + xOffset) + "px");
		
	});		
	
	
};


