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