sdk inside document.ready