Using the module pattern to implement basic jquery functionality