Added waiting on dependencies before running queued inline calls to $(document).ready()