// This code created by Juan Garcia. www.jrgarcia.net
(function($) {
	$.fn.navigation = function(){
		var menuitems = $('ul#navigation > *');
		$.each(menuitems, function() {
			if($(this).find('ul').length > 0){
				$(this).bind('mouseover', menuhi);
				$(this).bind('mouseout', menulo);
			}
		});
		function menuhi(){
			var theight = $(this).height() * $(this).find('ul li').length;
			$(this).find('ul').stop().animate({ height:theight }, $(this).find('ul li').length * 50);
		}
		function menulo(){
			$(this).find('ul').stop().animate({ height:'0' }, $(this).find('ul li').length * 50);
		}
		function menusubhi(){
			$(this).parent().parent().css({'overflow':'visible'});
		}
	};
})(jQuery);