Added jQuery to control the page change