
var ajaxtooltip={fadeeffect:[true,300],useroffset:[10,10],positiontip:function($tooltip,e){var docwidth=(window.innerWidth)?window.innerWidth-15:ajaxtooltip.iebody.clientWidth-15
var docheight=(window.innerHeight)?window.innerHeight-18:ajaxtooltip.iebody.clientHeight-15
var twidth=$tooltip.get(0).offsetWidth
var theight=$tooltip.get(0).offsetHeight
var tipx=e.pageX+this.useroffset[0]
var tipy=e.pageY+this.useroffset[1]
tipx=(e.clientX+twidth>docwidth)?tipx-twidth-(2*this.useroffset[0]):tipx
tipy=(e.clientY+theight>docheight)?tipy-theight-(2*this.useroffset[0]):tipy
$tooltip.css({left:tipx,top:tipy})},showtip:function($tooltip,e){if(this.fadeeffect[0])
$tooltip.fadeIn(this.fadeeffect[1])
else
$tooltip.show()},hidetip:function($tooltip,e){if(this.fadeeffect[0])
$tooltip.fadeOut(this.fadeeffect[1])
else
$tooltip.hide()}}
jQuery(document).ready(function(){ajaxtooltip.iebody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body
var tooltips=[]
jQuery('*[@title^="tip:"]').each(function(index){this.titleurl=jQuery.trim(this.getAttribute('title').split(':')[1])
this.titleposition=index+' pos'
tooltips.push(jQuery('<div class="ajaxtooltip"></div>').appendTo('body'))
var $target=jQuery(this)
$target.removeAttr('title')
$target.hover(function(e){var $tooltip=tooltips[parseInt(this.titleposition)]
ajaxtooltip.positiontip($tooltip,e)
ajaxtooltip.showtip($tooltip.html(this.titleurl),e)},function(e){var $tooltip=tooltips[parseInt(this.titleposition)]
ajaxtooltip.hidetip($tooltip,e)})
$target.bind("mousemove",function(e){var $tooltip=tooltips[parseInt(this.titleposition)]
ajaxtooltip.positiontip($tooltip,e)})});})
