Keep track of the current page.
Removed unnecessary document.ready.