Added ajax for gallery