using jQuery deferred objects to load images before starting game loop