Modified pageReady.js