/**
 *	Jquery Fly Up List Extentsion.
 *
 *	@Auther: Richard Coan
 *	@since: Jan-4-2011
 */

(function($) {
	$.fn.flyUpNav = function(options){
		var defaults = {
			offset: false,	//Manual Offset - false|int(px)
			durationIn: 500,
			durationOut: 500,
			animationIn: "linear",
			animationOut: "linear"
		};
				
		var opt = $.extend(defaults, options); 
		
		this.each(function() {  
			var obj = $(this);			
			var o = $('h4', obj).outerHeight();
			var h = $('div.fun-inner', obj).outerHeight();
						
			$(obj).css('bottom','-'+h+'px');			
									
			$(obj).mouseenter(function() {
				$(obj).stop();
				$(obj).animate({"bottom":0}, opt.durationIn, opt.animationIn);
			});
			
			$(obj).mouseleave(function() {
				$(obj).stop();
				$(obj).animate({"bottom":-h}, opt.durationOut, opt.animationOut);
			});
		});
	}
})(jQuery);
