put code inside a jQuery plugin