This is a basic template for jquery plugins. It contains nothing but the structure and helpful comments. It should be a good start to build your own plugin.