function DynamicLoader(){function loadFiles(e,t){resultArray=[];var n=e.length;for(var r=0;r<n;r++){var i=function(){resultArray.push("done"),checkDone(resultArray,n)&&typeof t=="function"&&t()};loadFile(e[r],i,i)}}function loadFile(file,successCB,failureCB){typeof file!="string"&&(console.error("dynamicLoad: file is not of type string"),typeof failureCB=="function"&&failureCB());var filename=file.split("/").pop(),suffix="\n//# sourceURL="+filename;$.ajax({url:file,success:function(data){eval.call(window,data+suffix),typeof successCB=="function"&&successCB()},error:function(e){console.error("Failed to load  "+file),typeof failureCB=="function"&&failureCB()}})}function checkDone(e,t){for(var n=0;n<t;n++)if(e[n]!="done")return!1;return!0}this.loadFiles=loadFiles,this.loadFile=loadFile};