rewrite module to jQuery plugin and use CoffeeScript