(function($) {
	
	$.fn.hoverButton = function(options) {
		var defaults = {
			fadeInTime: 250,
			fadeOutTime: 2000
		};
		var options = $.extend(defaults, options);
		
		return this.each(function() {
			$(this).hover(function() {
				// on hovering over, find the element we want to fade *up*
			    var fade = $('> div', this);
			    
			    // if the element is currently being animated (to a fadeOut)...
			    if (fade.is(':animated')) {
			      // ...take it's current opacity back up to 1
			      fade.stop().fadeTo(options.fadeInTime, 1);
			    } else {
			      // fade in quickly
			      fade.fadeIn(options.fadeInTime);
			    }
			}, function() {
				// on hovering out, fade the element out
			    var fade = $('> div', this);
			    if (fade.is(':animated')) {
			      fade.stop().fadeTo(options.fadeOutTime, 0);
			    } else {
			      // fade away slowly
			      fade.fadeOut(options.fadeOutTime);
			    }
			});
		});
	};

})(jQuery);