taking page change event out of document ready