var Tooltips=new Class({Implements:[Events,Options],options:{},initialize:function(b){this.setOptions(b);this.attchTooltips()},attchTooltips:function(){$$(".fpTip a").each(function(b){this.createStructure(b);b.addEvents({mouseover:function(){b.getElement("div").fade("in")}.bind(this),mouseout:function(){b.getElement("div").fade("out")}.bind(this),click:function(){}})},this)},createStructure:function(b){var a=b.get("rel").split("|").associate(["type","room","desc","image","title","backgroundColour"]); this.tipCont=(new Element("div",{"class":"tipCont",styles:{opacity:0}})).inject(b,"top");if(a.type==="gallery")this.tipText=(new Element("span",{"class":"tipText",html:(a.image!=""?'<img src="'+a.image+'" height="50" />':"")+a.room+" | <em>"+a.desc+'</em><span class="clear"></span><span class="peak"></span>'})).inject(this.tipCont);else if(a.type==="exhibition")this.tipText=(new Element("span",{"class":"tipText",html:'<span class="tipHeader">'+a.room+" | <em>"+a.desc+"</em></span>"+(a.image!=""?'<span class="tipImageWrapper"'+ (a.backgroundColour!=""?'style="background: '+a.backgroundColour+'"':"")+'><img src="'+a.image+'" width="65" /><span>'+a.title+'</span></span><span class="clear"></span><span class="peak"></span>':"")})).inject(this.tipCont)}});
