use queue.js to determine when all required resources have been loaded