function loadScript(url, cb) {
var d = document,
s = d.createElement('script');
s.src = url;
s.onload = cb;
d.head.appendChild(s);
}
function loadScripts(urls, cb) {
loadScript( urls.shift(), function() {
if (urls.length) {
return loadScripts(urls, cb);
}
cb && cb();
} );
}