Changed jquery stuff for previous/next to functions and called from index.html