

// fade another element on hover
// @author mh
(function($) {
	$.fn.hoverFade = function(options){
		var opts = $.extend({}, $.fn.hoverFade.defaults, options);
	
		var self = this;
		var $this = $(this);
		
		return $this.each(function(){
			var el = $(opts.fadeEl, this);
			el.css({
				display: 'block',
				opacity: 0
			});
			
			$(this).hover(function(){
				el.stop().fadeTo(opts.fadeInSpeed, 1);
			}, function(){
				el.stop().fadeTo(opts.fadeOutSpeed, 0);
			});
		});
	}
	
	$.fn.hoverFade.defaults = {
		fadeEl: '> .hover',
		fadeInSpeed: 'fast',
		fadeOutSpeed: 'fast'
	};
})(jQuery);