Updated to accept objects with selectors and functions that define when an element is in view instead of just selectors. If no isInView function is defined, defaults to a centerIsVisible function.