
this.tooltip = function(){	

	xOffset = 10;
	yOffset = 20;		
	
	$("input,textarea,select,a").hover(function(e){
										  
		this.t = this.title;
		this.title = "";
		this.tip = "";
		 
		if(this.t != '') {
			
			this.tip+= "<div id='tooltip'>";
			this.tip+= "<div class='tip_top'></div>";
			this.tip+= "<div class='tip_bg'>";
			this.tip+= this.t;
			this.tip+= "</div>";
			this.tip+= "<div class='tip_bottom'></div>";
			this.tip+= "</div>";
			
			$("body").append(this.tip);
			
			$("#tooltip")
				.css("top",(e.pageY - xOffset) + "px")
				.css("left",(e.pageX + yOffset) + "px")
				//.css("opacity",.7)
				.slideDown("slow");		
		}
    
    });	
	
	$("input,textarea,select,a").mouseout(function() {
		this.title = this.t;

		$("#tooltip").slideUp("fast");
		$("#tooltip").remove();
	});
	
	$("input,textarea,select,a").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			


   
	
};


$(document).ready(function(){
	tooltip();
});
