added next/previous page buttons to thumbnail gallery