/*	

	Mootools pub/sub plugin by Peter Higgins (dante@dojotoolkit.org)

	Loosely based on Dojo publish/subscribe API, limited in scope. Rewritten blindly.

	Original is (c) Dojo Foundation 2004-2009. Released under either AFL or new BSD, see:
	http://dojofoundation.org/license for more information.

*/

(function(){
var _1={};
$publish=function(_2,_3){
_1[_2]&&_1[_2].each(function(cb){
cb.run(_3,cb);
});
};
$subscribe=function(_4,_5){
if(!_1[_4]){
_1[_4]=[];
}
_1[_4].push(_5);
return [_4,_5];
};
$unsubscribe=function(_6){
var t=_6[0];
_1[t]&&_1[t].each(function(_7,i){
if(_7==_6[1]){
_1[t].erase(_7);
}
});
};
})();