jQuery.fn.imgbubbles=function(a){var c=jQuery;var b=c.extend({},{factor:2,speed:"fast"},a);return this.each(function(){var e=c(this);var d=e.find("li img");d.each(function(){var h=c(this);var i=h.offsetParent();var f={width:this.offsetWidth,height:this.offsetHeight};var l={width:f.width*b.factor,height:f.height*b.factor};var k=[-(l.width-f.width)/2,-(l.height-f.height)/2];h.data("specs",{od:f,nd:l,ncoords:k});if(h.attr("alt")){var j=c('<div class="tooltip" style="z-index:1001" />').html(h.attr("alt")).css("visibility","hidden").appendTo(h.offsetParent());var g={width:j.outerWidth(),height:j.outerHeight()};j.data("specs",{d:g,ocoords:[k[0]-g.width/2+l.width/2,k[1]-g.height/2],ncoords:[-g.width/2+f.width/2,-g.height]});h.data("$tip",j)}});e.mouseover(function(j){if(j.target.tagName=="IMG"){var i=c(j.target),m=i.data("$tip");var h=i.data("specs");var l=h.ncoords;var g=h.od;var k=h.nd;i.stop().css("zIndex",1000).animate({left:l[0],top:l[1],width:k.width,height:k.height},b.speed);if(i.attr("alt")){var f=m.data("specs");m.css({zIndex:1000,visibility:"visible",left:-f.d.width/2+g.width/2,top:-f.d.height}).animate({left:l[0]-f.d.width/2+k.width/2,top:l[1]-f.d.height},b.speed)}}});e.mouseout(function(j){if(j.target.tagName=="IMG"){var i=c(j.target),l=i.data("$tip");var h=i.data("specs");var g=h.od;var k=h.nd;i.stop().css("zIndex",999).animate({left:0,top:0,width:g.width,height:g.height},b.speed);if(i.attr("alt")){var f=l.data("specs");l.css({zIndex:999,visibility:"hidden"})}}})})};
