/* edited from wp-content/themes/boozurk/boozurk.js to work with dokuwiki */ function cooltips(){ // alert("123"); var baloon = jQuery('
'); baloon.appendTo("body"); var timeoutID; jQuery(".minibutton").each(function() { jQuery(".minibutton").hover(function(){ // jQuery("body").delegate(".minibutton", 'hover', function() { var $this = jQuery(this); // console.log($this); // alert("rollover"); /* var offset,h_pos,pin_pos; if ($this.attr('title') || typeof($this.attr('original-title')) != 'string') { $this.attr('original-title', $this.attr('title') || '').removeAttr('title'); } */ baloon.html($this.attr('original-title')); offset = $this.offset(); baloon.css({top: 0, left: 0, display: 'block'}).removeClass('to_left to_right'); if ( offset.left > ( jQuery(window).width() - 250 ) ) { h_pos = offset.left - baloon.outerWidth() + ( $this.outerWidth() / 2 ); pin_pos = 'to_left'; } else { h_pos = offset.left + ( $this.outerWidth() / 2 ); pin_pos = 'to_right'; } baloon.css({top: offset.top - baloon.outerHeight() - 10, left: h_pos}).addClass(pin_pos); window.clearTimeout(timeoutID); baloon.stop().css({opacity: 0}).animate({opacity: 0.9}); }); }); // baloon.fadeOut(); jQuery(".minibutton").mouseleave(function(){ baloon.stop().css({opacity: 0}).animate({opacity: 0.9}); jQuery(".cooltip").fadeOut(200); }); function runtwo(){ timeoutID = window.setTimeout( function(){baloon.fadeOut()}, 200); } // runone(); // runtwo(); } cooltips();