function loadScript(id, callback) {
        var res = resMap[id] || {};
        var url = res.pkg
                    ? pkgMap[res.pkg].url
                    : (res.url || id);

        if (url in scriptsMap) {
            return;
        }
        scriptsMap[url] = true;

        var queue = loadingMap[id] || (loadingMap[id] = []);
        queue.push(callback);

        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = url;
        head.appendChild(script);
    }
file: mod.js
ver: 1.0.2
auth: zhangjiachen@baidu.com
update: 16:30 2013/6/21