var Douban=new Object();//定义Douban为Object
//定义方法EventM..用来生成再生一个它的子对象
Douban.EventMonitor = function(){
    this.listeners = new Object();
}
//给EventMonitor新增broadcast功能
Douban.EventMonitor.prototype.broadcast=function(widgetObj, msg, data){
    var lst = this.listeners[msg];    if(lst != null){
        for(var o in lst){
            lst[o](widgetObj, data);
        }
    }
}
Douban.EventMonitor.prototype.subscribe=function(msg, callback){
    var lst = this.listeners[msg];
    if (lst) {
        lst.push(callback);
    } else {
        this.listeners[msg] = [callback];
    }
}
Douban.EventMonitor.prototype.unsubscribe=function(msg, callback){
    var lst = this.listener[msg];
    if (lst != null){
        lst = lst.filter(function(ele, index, arr){return ele!=callback;});
    }
}// Page scope event-monitor obj.监视页面范围对象
var event_monitor = new Douban.EventMonitor();function load_event_monitor(root) {
    var re = /a_(\w+)/;
    var fns = {};
    $(".j", root).each(function(i) {
        var m = re.exec(this.className);
        if (m) {
            var f = fns[m[1]];
            if (!f) {
                f = eval("Douban.init_"+m[1]);
                fns[m[1]] = f;
            }
            f && f(this);
        }
    });
}$(function() {
    load_event_monitor(document);
});
不知道完成什么功能,请高人帮俺完善.