$(document).ready(function(){
	var _d = 300;
	var _hold = $('.nav');
	_hold.each(function(){
		var _items = $('li', $(this));
		_items.each(function(){
			$('div:eq(0)', $(this)).css({height: 0});
		})
		_items.mouseenter(function(){
			var _this = $(this);
			_this.addClass('hover');
			var _drop = $('div:eq(0)', _this);
			if (_drop.length){
				var _h = _drop.find('ul:eq(0)').outerHeight(true);
				if (_drop.is(':hidden')){
					_drop.animate({height: _h}, {duration:_d, queue: false})
				}
			}
		}).mouseleave(function(){
			var _this = $(this);
			var _drop = $('div:eq(0)', _this);
			if (_drop.length){
				var _h = _drop.find('ul:eq(0)').outerHeight(true);
				if (_drop.is(':visible')){
					_drop.animate({height: 0}, {duration:_d, queue: false, complete: function(){
						_this.removeClass('hover');
					}})
				}
			} else {
				_this.removeClass('hover');
			}
		})
	})
})