(function($){$.fn.tooltip=function(options){var defaults={cssClass:"",delay:0,duration:500,xOffset:15,yOffset:15,opacity:0,fadeDuration:400,eventshow:'mouseover',eventhide:'mouseleave',ajaxSource:'href',closebutton:'no',fixed:false};var options=$.extend(defaults,options);return this.each(function(index){var $this=$(this);$tooltip=$("#divTooltip");$tooltipC=$("#divTooltipC");$tooltipT=$("#divTooltipT");$tooltip.hide();if($tooltip.length==0){$tooltip=$('
');$('body').append($tooltip);$tooltip.hide();}
function show(e){e=e?e:window.event;if(options.closebutton=='yes'){$tooltipT.html("Sluiten
");}
clearTimeout($tooltip.data("hideTimeoutId"));$tooltip.removeClass($tooltip.attr("class"));$tooltip.css("width","");$tooltip.css("height","");$tooltip.addClass(options.cssClass);$tooltip.css("opacity",1-options.opacity/100);$tooltip.css("position","absolute");$tooltip.data("title",$this.attr("title"));$this.attr("title","");$tooltip.data("alt",$this.attr("alt"));$this.attr("alt","");$tooltipC.html($tooltip.data("title"));var el=$this.attr(options.ajaxSource);if(el!=undefined&&el!=""&&el!="#")
$tooltipC.html($.ajax({url:$this.attr(options.ajaxSource),async:false}).responseText);if(options.fixed===false){winw=$(window).width();w=$tooltip.width();xOffset=options.xOffset;if(w+xOffset+50winw/2){$tooltip.width(e.clientX-50);$tooltip.css("left",$(document).scrollLeft()+ 25);}
else{$tooltip.width((winw-e.clientX)-50);$tooltip.css("left",$(document).scrollLeft()+ e.clientX+xOffset);}}
winh=$(window).height();h=$tooltip.height();yOffset=options.yOffset;if(h+yOffset+ 50