Would window.load vs document.ready matter for this function?