Reordered the location of the document.ready code.