change document ready to window load