var tooltip={showfadeeffect:[true,"slow"],hidefadeeffect:[false,"fast"],useroffset:[10,10],loadingHTML:'',positiontip:function($tooltip,e){var docwidth=(window.innerWidth)?window.innerWidth-15:tooltip.iebody.clientWidth-15;var docheight=(window.innerHeight)?window.innerHeight-18:tooltip.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});$tooltip.bgiframe();},showtip:function($tooltip,e){if(this.showfadeeffect[0])$tooltip.hide().fadeIn(this.showfadeeffect[1]);else $tooltip.show();},hidetip:function($tooltip,e){if(this.hidefadeeffect[0])$tooltip.fadeOut(this.hidefadeeffect[1]);else $tooltip.hide();}}
jQuery(document).ready(function(){tooltip.iebody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;var tips=[];$('*[title^="tip:"]').each(function(index){this.titlehtml=jQuery.trim(this.getAttribute('title').split('tip:')[1]);this.titleposition=index+' pos';tips.push($('<div class="tip"></div>').appendTo('body'));var $target=$(this);$target.removeAttr('title');$target.hover(function(e){var $tooltip=tips[parseInt(this.titleposition)];$tooltip.html(this.titlehtml);tooltip.positiontip($tooltip,e);tooltip.showtip($tooltip,e);},function(e){var $tooltip=tips[parseInt(this.titleposition)];tooltip.hidetip($tooltip,e);})
$target.bind("mousemove",function(e){var $tooltip=tips[parseInt(this.titleposition)];tooltip.positiontip($tooltip,e);});});var ajaxtips=[];$('*[title^="ajaxtip:"]').each(function(index){this.titleurl=jQuery.trim(this.getAttribute('title').split('ajaxtip:')[1]);this.titleposition=index+' pos';ajaxtips.push($('<div class="ajaxtip"></div>').appendTo('body'));var $target=$(this);$target.removeAttr('title');$target.hover(function(e){var $tooltip=ajaxtips[parseInt(this.titleposition)];if(!$tooltip.get(0).loadsuccess){if(tooltip.loadingHTML!='')$tooltip.html(tooltip.loadingHTML).show();$tooltip.load(this.titleurl,'',function(){tooltip.positiontip($tooltip,e);tooltip.showtip($tooltip,e);$tooltip.get(0).loadsuccess=true;});}
else{tooltip.positiontip($tooltip,e);tooltip.showtip($tooltip,e);}},function(e){var $tooltip=ajaxtips[parseInt(this.titleposition)];tooltip.hidetip($tooltip,e);})
$target.bind("mousemove",function(e){var $tooltip=ajaxtips[parseInt(this.titleposition)];tooltip.positiontip($tooltip,e);});});});
