/*
 * http://www.filamentgroup.com/lab/styling_buttons_and_toolbars_with_the_jquery_ui_css_framework/
 * ButtonFrameworkCSS
 */

/*
(function($) {
	if (!$) return; // 19.11.2009 Ossig In case no jQuery is included.
	$(function() {
		$(".ge-button:not(.ui-state-disabled)")
			.hover(
				function() {
					$(this).addClass("ui-state-hover");
				},
				function() {
					$(this).removeClass("ui-state-hover");
				}
			)
			.mousedown(function() {
				$(this).parents('.ge-buttonset-single:first').find(".ge-button.ui-state-active").removeClass("ui-state-active");
				if ($(this).is('.ui-state-active.ge-button-toggleable, .ge-buttonset-multi .ui-state-active')) {
					$(this).removeClass("ui-state-active");
				} else {
					$(this).addClass("ui-state-active");
				}
			})
			.mouseup(function() {
				if (!$(this).is('.ge-button-toggleable, .ge-buttonset-single .ge-button, .ge-buttonset-multi .ge-button')) {
					$(this).removeClass("ui-state-active");
				}
			});
	});
})(jQuery);
*/

(function($) {
	if (!$) return; // 19.11.2009 Ossig In case no jQuery is included.
	$(function() {
		$(".ge-button:not(.ge-state-disabled)")
			.live("mouseover", function() {
				$(this).addClass("ui-state-hover");
			})
			.live("mouseout", function() {
				$(this).removeClass("ui-state-hover");
			})
			.live("mousedown", function() {
				$(this).parents('.ge-buttonset-single:first').find(".ge-button.ui-state-active").removeClass("ui-state-active");
				if ($(this).is('.ui-state-active.ge-button-toggleable, .ge-buttonset-multi .ui-state-active')) {
					$(this).removeClass("ui-state-active");
				} else {
					$(this).addClass("ui-state-active");
				}
			})
			.live("mouseup", function() {
				if (!$(this).is('.ge-button-toggleable, .ge-buttonset-single .ge-button, .ge-buttonset-multi .ge-button')) {
					$(this).removeClass("ui-state-active");
				}
			});
		/* 14.12.2009 Ossig Does not work.
		$("button:not(ge-state-disabled")
			.live("mousedown", function() { // 14.12.2009 Ossig "click" does not work.
				$(this).value = 1;
			});
		*/
	});
})(jQuery);