Updated gallery to support the option to select how many items should appear before and after the current active page number.
default is all for backwards compatability