jquery deferred events for initialization