The following video tutorial covers the basics for creating a jQuery plugin. A note of caution: the author doesn't wrap the plugin body with the usual self-executing function having jQuery as its parameter. Please don't follow his example and always use the following code:
(function($) { // plugin body )(jQuery)