/*1344222463,176820662*/

if (window.CavalryLogger) { CavalryLogger.start_js(["+21JG"]); }

function Beep(a,b){copyProperties(this,b);this.unread=true;this._owner=a;this._node=$(HTML(this.html).getNodes()[0]);NotificationList.localizeUrls(this._node);Style.set(this._node,'opacity',0);Event.listen(DOM.find(this._node,'span.beeper_x'),'click',this.remove.bind(this));Event.listen(this._node,'mouseover',this.onMouseOver.bind(this));Event.listen(this._node,'mouseout',this.onMouseOut.bind(this));}copyProperties(Beep.prototype,{onMouseOver:function(event){CSS.addClass(this._node,'UIBeep_Selected');this._selected=true;this.setEdges();},onMouseOut:function(event){CSS.removeClass(this._node,'UIBeep_Selected');this._selected=false;this.setEdges();},xout:function(){this._owner.pause();var a=function(){this._owner.unpause();}.bind(this);},remove:function(event){if(event)event.kill();DOM.remove(this._node);this._owner.beeps.remove(this.beepId);if(this._owner.beeps.isEmpty()){this._owner.reset();}else this._owner.updateEdges();},markRead:function(){this.unread=false;},endFade:function(){if(this._node)CSS.removeClass(this._node,'UIBeep_Fading');},fadeIn:function(a){animation(this._node).to('opacity',1).ease(animation.ease.both).duration(a).show().go();},setEdges:function(){if(this._isTop)this.setTop(true);if(this._isBottom)this.setBottom(true);},setBottom:function(a){this._isBottom=a;CSS.conditionClass(this._node,'UIBeep_Bottom',a);},setTop:function(a){this._isTop=a;CSS.conditionClass(this._node,'UIBeep_Top',a);},getNode:function(){return this._node;}});