deferUntilReady:  reference the window and document objects from global

Reference the window and document objects from global object