var ActionBarMenuAnimator=Class.create();ActionBarMenuAnimator.prototype={initialize:function(key){this.key=key;this.hide_timer="";this.shown=false;this.animating=false;return this;},toggle:function(e){var element=Event.element(e);if(element==$(this.key+'_options')||element.descendantOf(this.key+'_options')){if(!this.shown&&!this.animating){if(this.hide_timer){clearTimeout(this.hide_timer);this.hide_timer='';}
this.animating=true;this.shown=true;$('hover_'+this.key).style.top='31px';new Effect.Appear($('hover_'+this.key),{duration:0.3});new Effect.Move($('hover_'+this.key),{y:-5,x:0,duration:0.3});var self=this;setTimeout(function(){self.animating=false;},300);}}
else{if(this.shown){var self=this;this.hide_timer=setTimeout(function(){self.hide();},200);}}},hide:function(){this.animating=true;this.shown=false;new Effect.Fade($('hover_'+this.key),{duration:0.3});new Effect.Move($('hover_'+this.key),{x:0,y:5,duration:0.3});var self=this;setTimeout(function(){self.animating=false;$('hover_'+self.key).style.top='31px';},310);}};