imprved photo gallery for multi-pages