Чтобы сделать функцию доступной для объектов jQuery, вы добавляете ее в прототип jQuery (fn - ярлык для прототипа в jQuery), например:
jQuery.fn.myFunction = function() {
// Usually iterate over the items and return for chainability
// 'this' is the elements returns by the selector
return this.each(function() {
// do something to each item matching the selector
}
}
Обычно это называется jQuery плагин .
Пример - http://jsfiddle.net/VwPrm/