/* 
 * Copyright 2008 by Robert Baumgartner; the.godking.com
 * All rights reserved
 * 
 * You may use this script, as long as this copyright information won't be removed nor changed.
 * 
 */

tooltipClass=".Tips2"; // replace with your class, for multiple classes, separate with comma.

function str_replace(search, replace, subject) { return subject.split(search).join(replace); }
this.tooltip=function(){xOffset=10;yOffset=20;fadeInTime=400;jQuery(tooltipClass).hover(function(e){this.t=this.title;this.title="";this.t=str_replace("::", "<br />", this.t);this.t=str_replace("[!]", "<span class='tooltipTitle'>", this.t);this.t=str_replace("[/!]", "</span><br />", this.t);this.t=str_replace("[", "<", this.t);this.t=str_replace("]", ">", this.t);if(this.t != "") {jQuery("body").append("<p id='tooltip'>"+this.t+"</p>");jQuery("#tooltip").css("top",(e.pageY-xOffset)+"px").css("left",(e.pageX+yOffset)+"px").fadeIn(fadeInTime);}},function(){this.title=this.t;jQuery("#tooltip").remove();});jQuery(tooltipClass).mousemove(function(e){jQuery("#tooltip").css("top",(e.pageY-xOffset)+"px").css("left",(e.pageX+yOffset)+"px");});};jQuery(document).ready(function(){tooltip();});