jQuery fix and styles added for gallery