(function(){var win=window,doc=document,mooVersion=win.MooTools.version.substring(0,3),legacy=mooVersion==="1.2"||mooVersion==="1.1",legacyEvent=legacy||mooVersion==="1.3",$extend=win.$extend||function(){return Object.append.apply(Object,arguments)};win.AuroraAdapter={init:function(pathAnim){var fxProto=Fx.prototype,fxStart=fxProto.start,morphProto=Fx.Morph.prototype,morphCompute=morphProto.compute;fxProto.start=function(from,to){var fx=this,elem=fx.element;if(from.d){fx.paths=pathAnim.init(elem,elem.d,fx.toD)}fxStart.apply(fx,arguments);return this};morphProto.compute=function(from,to,delta){var fx=this,paths=fx.paths;if(paths){fx.element.attr("d",pathAnim.step(paths[0],paths[1],delta,fx.toD))}else{return morphCompute.apply(fx,arguments)}}},getScript:function(scriptLocation,callback){var head=doc.getElementsByTagName("head")[0];var script=doc.createElement("script");script.type="text/javascript";script.src=scriptLocation;script.onload=callback;head.appendChild(script)},animate:function(el,params,options){var isSVGElement=el.attr,effect,complete=options&&options.complete;if(isSVGElement&&!el.setStyle){el.getStyle=el.attr;el.setStyle=function(){var args=arguments;el.attr.call(el,args[0],args[1][0])};el.$family=function(){return true}}win.AuroraAdapter.stop(el);effect=new Fx.Morph(isSVGElement?el:$_(el),$extend({transition:Fx.Transitions.Quad.easeInOut},options));if(isSVGElement){effect.element=el}if(params.d){effect.toD=params.d}if(complete){effect.addEvent("complete",complete)}effect.start(params);el.fx=effect},each:function(arr,fn){return legacy?$each(arr,fn):Array.each(arr,fn)},map:function(arr,fn){return arr.map(fn)},grep:function(arr,fn){return arr.filter(fn)},merge:function(){var args=arguments,args13=[{}],i=args.length,ret;if(legacy){ret=$merge.apply(null,args)}else{while(i--){if(typeof args[i]!=="boolean"){args13[i+1]=args[i]}}ret=Object.merge.apply(Object,args13)}return ret},offset:function(el){var offsets=$_(el).getOffsets();return{left:offsets.x,top:offsets.y}},extendWithEvents:function(el){if(!el.addEvent){if(el.nodeName){el=$_(el)}else{$extend(el,new Events())}}},addEvent:function(el,event,fn){var xel=Ext.get(el);if(xel){xel.addListener(event,fn)}else{if(!el.addListener){Ext.apply(el,new Ext.util.Observable())}el.addListener(event,fn)}},removeEvent:function(el,event,fn){if(el.removeListener&&el.purgeListeners){if(event&&fn){el.removeListener(event,fn)}else{el.purgeListeners()}}else{var xel=Ext.get(el);if(xel){if(event&&fn){xel.removeListener(event,fn)}else{xel.purgeAllListeners()}}}},fireEvent:function(el,event,eventArguments,defaultFunction){var o={type:event,target:el};if(Ext.isArray(eventArguments)&&eventArguments.length){Ext.apply(o,eventArguments[0])}else{Ext.apply(o,eventArguments)}if(el.fireEvent){var fire="el.fireEvent(event, o";if(eventArguments){for(var i=1,l=eventArguments.length;i<l;i++){fire+=",eventArguments["+i+"]"}}fire+=")";eval(fire)}if(defaultFunction){defaultFunction(o)}},stop:function(el){if(el.fx){el.fx.cancel()}}}}());