//
// Round Buttons
//
(function ($) {
	//
	// plugin definition
	//
	$.fn.button = function (options) {
		// build main options before element iteration
		var opts = $.extend({}, $.fn.button.defaults, options);
		// iterate and reformat each matched element
		return this.each(function () {
			var $this = $(this);
			// build element specific options
			var data = $this.metadata();
			//debug(inspect(data));
			var o = data ? $.extend({}, opts, data) : opts;

			$this.addClass("ui-state-default").addClass("ui-corner-all")
			.hover(function () { $this.addClass("ui-state-hover"); }, function () { $(this).removeClass("ui-state-hover"); })
			.mousedown(function () { $this.addClass("ui-state-active"); })
			.mouseup(function () { $this.removeClass("ui-state-active"); });
		});
	};
	//
	// plugin defaults
	//
	$.fn.button.defaults = {};

})(jQuery);


