sprint 4: make the function into a jQuery plugin