(function ($) {
	var FindbookShelfExtensions = {
		updateAttribute: function (attribute, value) {
			return this.filter ('.fbshelf-' + attribute).text (value);
		},
		shelfTitle: function (newTitle) {
			return this.updateAttribute ('title', newTitle);
		},
		shelfCount: function (newCount) {
			return this.updateAttribute ('count', newCount);
		}
	};
	$.extend({
		findbookShelf: function (shelfID) {
			return $.extend($('.fbshelf-id-' + shelfID), FindbookShelfExtensions);
		}
	});
}) (jQuery);

