rewrite to reflect jQuery plugin authoring standards and general functional principles