extract overlaps and gather them, and use jQuery's built-in method for type checking