A jquery plugin to manage state changes triggered by events.