Adding next class
Better variable name.
Add previous link.
On second thought, don't have last page loop around to beginning.
Re-worked logic - to make it clearer, and avoid printing unnecessay pipes.
Adding first pass (VERY primitive) of swipe events.