jQuery plugin for automatic behavior with css class