From http://stackoverflow.com/questions/13777644/a-template-for-a-jquery-plugin-with-options-and-accessible-methods