jQuery.noConflict(); 
this.tooltip = 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 */		
	
	jQuery("img").hover(
		function(e){											  
			this.t = jQuery(this).attr('title');
			if(typeof(this.t) != 'undefined'){
				jQuery(this).attr('title', '');
				this.title = "";									  
				jQuery("body").append("<p id='tooltip'>"+ this.t +"</p>");
				jQuery("#tooltip")
					.css("top",(e.pageY - xOffset) + "px")
					.css("left",(e.pageX + yOffset) + "px")
					.fadeIn("fast");
			}
					
    	},
		function(){
			if(typeof(this.t) != 'undefined'){
				this.title = this.t;
				jQuery(this).attr('title', this.t);			
				jQuery("#tooltip").remove();
			}
    	}
    );	
	jQuery("img").mousemove(function(e){
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});
		
	
	jQuery("a").hover(
		function(e){											  
				this.t = jQuery(this).attr('title');
				if(typeof(this.t) != 'undefined'){
					jQuery(this).attr('title', '');
				
					this.title = "";									  
					jQuery("body").append("<p id='tooltip'>"+ this.t +"</p>");
					jQuery("#tooltip")
						.css("top",(e.pageY - xOffset) + "px")
						.css("left",(e.pageX + yOffset) + "px")
						.fadeIn("fast");
				}		
    	},
		function(){
			if(typeof(this.t) != 'undefined'){
				this.title = this.t;
				jQuery(this).attr('title', this.t);			
				jQuery("#tooltip").remove();
			}
    	}
    );	
    
    jQuery("a").click(
    	function(){
			if(typeof(this.t) != 'undefined'){
				this.title = this.t;
				jQuery(this).attr('title', this.t);			
				jQuery("#tooltip").remove();
			}
    	}
    ); 
       
	jQuery("a").mousemove(function(e){
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});
	
	jQuery("dfn").hover(
		function(e){											  
			this.t = jQuery(this).attr('title');
			if(typeof(this.t) != 'undefined'){
				jQuery(this).attr('title', '');
				
				this.title = "";									  
				jQuery("body").append("<p id='tooltip'>"+ this.t +"</p>");
				jQuery("#tooltip")
					.css("top",(e.pageY - xOffset) + "px")
					.css("left",(e.pageX + yOffset) + "px")
					.fadeIn("fast");
			}		
    	},
		function(){
			if(typeof(this.t) != 'undefined'){
				this.title = this.t;
				jQuery(this).attr('title', this.t);			
				jQuery("#tooltip").remove();
			}
    	}
    );	
	jQuery("dfn").mousemove(function(e){
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});
	
	jQuery("span").hover(
		function(e){											  
			this.t = jQuery(this).attr('title');
			if(typeof(this.t) != 'undefined'){
				jQuery(this).attr('title', '');
				
				this.title = "";									  
				jQuery("body").append("<p id='tooltip'>"+ this.t +"</p>");
				jQuery("#tooltip")
					.css("top",(e.pageY - xOffset) + "px")
					.css("left",(e.pageX + yOffset) + "px")
					.fadeIn("fast");
			}		
    	},
		function(){
			if(typeof(this.t) != 'undefined'){
				this.title = this.t;
				jQuery(this).attr('title', this.t);			
				jQuery("#tooltip").remove();
			}
    	}
    );	
	jQuery("span").mousemove(function(e){
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});		
};



// starting the script on page load
jQuery(document).ready(function(){
	tooltip();
});