var tooltipLock = false;
jQuery(document).ready(function(){
	jQuery('a.tooltip').mouseenter(function(){
	    	if(tooltipLock==true) return;
	    	tooltipLock = true;
		jQuery("#tooltip_content").html(jQuery(this).attr("param"));
		var position = jQuery(this).position();
		var width = jQuery("#tooltip").width();
		var height = jQuery("#tooltip").height();
		pos_left = (120+position.left-width)+"px";
		pos_top = (position.top-height)+"px";
		jQuery("#tooltip").css({"left": pos_left,  "top" : pos_top});
		if(jQuery.support.opacity)
			jQuery("#tooltip").fadeIn('fast');
		else
			jQuery("#tooltip").css({"left": pos_left,  "top" : pos_top}).show();
		
	}).mouseout(function(){
		if(jQuery.support.opacity){
			jQuery("#tooltip").fadeOut(50, function(){tooltipLock=false;});
		}else{
			jQuery("#tooltip").hide();
			tooltipLock=false;
		}
		jQuery(this).css({"backgroundColor":'white'});
	}).each(function(){
		jQuery(this).attr("param", jQuery(this).attr("title")).attr("title","");
	});
//	$("body").append('<div id="tooltip" style=""><div id="tooltip_header">&nbsp;</div><div id="tooltip_content">&nbsp;</div><div id="tooltip_footer">&nbsp;</div></div>');
});

