function ObjectWithEvent(){this._events={}}ObjectWithEvent.prototype={bind:function(a,c){Array.isArray(this._events[a])||(this._events[a]=[]);this._events[a].push(c)},unbind:function(a,c){if(Array.isArray(this._events[a]))for(var b=0;b<this._events[a].length;++b)if(this._events[a][b]==c){this._events[a].splice(b,1);break}},trigger:function(a,c){if(this._events[a])for(var b=this._events[a],d=0;d<b.length;++d)b[d].apply(this,c)}};
