var Balloons = { tween: null, init: function()
{ var tags = $$('a.balloon'); tags.forEach( function (t) { t.onmouseover = function() { Balloons.show(t);}
t.onmouseout = function() { Balloons.hide(t);}
});}, show: function( t )
{ if (Balloons.tween != null) { Balloons.tween.cancel();}
var b = t.getProperty('rel').toString(); $(b).setStyles({ 'display': 'block', 'visible': 'hidden', 'opacity': 0
}); var top = parseInt(t.getPosition().y - $(b).getSize().y) - 10; var left = parseInt(t.getPosition().x); $(b).setStyles({ 'visible': 'show', 'top': top, 'left': left
}); Balloons.tween = new Fx.Morph($(b), {duration: 600, transition: Fx.Transitions.Sine.easeOut}); Balloons.tween.start({'opacity': 1});}, hide: function( t )
{ var b = t.getProperty('rel').toString(); $(b).setStyles({ 'display': 'none', 'opacity': 0
});}
}; window.addEvent('domready', Balloons.init);