var MooImageTip=new Class({Implements:[Options,Events],options:{offset:{x:-150,y:10},className:'imagetip',tipId:'mooimagetip',follow:true,fx:{}},initialize:function(options){var $this=this;this.setOptions(options);$$('.'+$this.options.className).each(function(item){$(item).addEvents({'mouseenter':function(e){var alt=$(item).getProperty('alt');var image=$(item).getProperty('idog');if(!image)return;if(!alt)alt=$(item).getProperty('alt_original');if($($this.options.tipId))$($this.options.tipId).destroy();var tip=new Element('p',{'id':$this.options.tipId});new Element('img',{'src':image,'alt':alt}).inject(tip);if(alt&&alt!=""){new Element('br').inject(tip);new Element('span',{'text':alt}).inject(tip)}$(item).setProperty('alt_original',alt);$(item).setProperty('alt','');tip.setStyles({'position':'absolute','left':e.page.x+$this.options.offset.x,'top':e.page.y+$this.options.offset.y});tip.set('tween',$this.options.fx);tip.fade('hide').inject($(document.body),'bottom').fade('in');$this.fireEvent('shown',[$this,tip])},'mouseleave':function(){var tip=$($this.options.tipId);var tween=tip.get('tween');tween.start('opacity',0).chain(function(){tip.destroy();$this.fireEvent('hide',[$this])});$this.fireEvent('hiding',[$this,tip])},'mousemove':function(e){if(!$this.options.follow)return;if($($this.options.tipId))$($this.options.tipId).setStyles({'left':e.page.x+$this.options.offset.x,'top':e.page.y+$this.options.offset.y});$this.fireEvent('moving')}})});return this},getTipId:function(){return this.options.tipId}});var MooImage0Text=new Class({Implements:[Options,Events],options:{offset:{x:-150,y:10},className:'image0text',tipId:'image0text',follow:true,fx:{}},initialize:function(options){var $this=this;this.setOptions(options);$$('.'+$this.options.className).each(function(item){$(item).addEvents({'mouseenter':function(e){var alt=$(item).getProperty('alt');var image=$(item).getProperty('idog');if(!image)return;if(!alt)alt=$(item).getProperty('alt_original');if($($this.options.tipId))$($this.options.tipId).destroy();var tip=new Element('p',{'id':$this.options.tipId});new Element('img',{'src':image,'alt':alt}).inject(tip);if(alt&&alt!=""){new Element('br').inject(tip)}$(item).setProperty('alt_original',alt);$(item).setProperty('alt','');tip.setStyles({'position':'absolute','left':e.page.x+$this.options.offset.x,'top':e.page.y+$this.options.offset.y});tip.set('tween',$this.options.fx);tip.fade('hide').inject($(document.body),'bottom').fade('in');$this.fireEvent('shown',[$this,tip])},'mouseleave':function(){var tip=$($this.options.tipId);var tween=tip.get('tween');tween.start('opacity',0).chain(function(){tip.destroy();$this.fireEvent('hide',[$this])});$this.fireEvent('hiding',[$this,tip])},'mousemove':function(e){if(!$this.options.follow)return;if($($this.options.tipId))$($this.options.tipId).setStyles({'left':e.page.x+$this.options.offset.x,'top':e.page.y+$this.options.offset.y});$this.fireEvent('moving')}})});return this},getTipId:function(){return this.options.tipId}});
