JavaScript only version of jQuery's document.ready method