// + Tool Tip

function jquery_toolTip(elem, width, text) {
	el=$(elem);
  w=jQuery("#"+elem).innerWidth(); h=jQuery("#"+elem).innerHeight();
  offset=jQuery("#"+elem).offset();
  
  bd_w=jQuery(document).width();
  bd=document.getElementsByTagName("body")[0];
	dv=document.createElement("div");
  dv.style.display="none";
	dv.setAttribute("id","jquery_toolTip"+elem);
  bd.appendChild(dv);
  
  dv.innerHTML="<div class='jquery_toolTip'>"+text+"</div><center><img src='/images/arrow_toolTip.gif' style='position:relative; top:-1px;'></center>";
  
  dv_h=jQuery("#jquery_toolTip"+elem).height();
  dv_w=jQuery("#jquery_toolTip"+elem).outerWidth();
  
	dv.style.position='absolute';
	dv.style.zIndex=1000;
	dv.style.top=(offset["top"]-dv_h)+"px";
  left=offset["left"]-(w/2)-12;
  if(left+(w/2)>bd_w-10) left=bd_w-dv_w-10;
  
  dv.style.left=left+"px";
	dv.style.width=width+"px";
  jQuery("#jquery_toolTip"+elem).fadeIn("fast");
}
function jquery_toolTipHide(elem) {
	jQuery("#jquery_toolTip"+elem).fadeOut("fast", function() { bd.removeChild($("jquery_toolTip"+elem)); });
}
jQuery(document).ready(function() {
	jQuery(".toolTip").each(function(i) {
    jQuery("#"+this.id).mouseover(function() { jquery_toolTip(this.id, 125, $(this.id).title); });
    jQuery("#"+this.id).mouseout(function() { jquery_toolTipHide(this.id); });
  });
});
// - Tool Tip