Built Multipage Gallery Functionality