
	$('#menu').addClass('js-active');
	$('ul div', '#menu').css('visibility', 'hidden');
	$('.menu>li', '#menu').hover(function () {
		var ul = $('div:first', this);
		if (ul.length) {
			if (!ul[0].hei) ul[0].hei = ul.height();
			ul.css({
				height: 20,
				overflow: 'hidden'
			}).retarder(400, function (i) {
				i.css('visibility', 'visible').animate({
					height: ul[0].hei
				},
				{
					duration: 500,
					complete: function () {
						ul.css('overflow', 'visible')
					}
				})
			})
		}
	},
	function () {
		var ul = $('div:first', this);
		if (ul.length) {
			var css = {
				visibility: 'hidden',
				height: ul[0].hei
			};
			ul.stop().retarder(1, function (i) {
				i.css(css)
			})
		}
	});
	$('ul ul li', '#menu').hover(function () {
		var ul = $('div:first', this);
		if (ul.length) {
			if (!ul[0].wid) ul[0].wid = ul.width();
			ul.css({
				width: 0,
				overflow: 'hidden'
			}).retarder(100, function (i) {
				i.css('visibility', 'visible').animate({
					width: ul[0].wid
				},
				{
					duration: 500,
					complete: function () {
						ul.css('overflow', 'visible')
					}
				})
			})
		}
	},
	function () {
		var ul = $('div:first', this);
		if (ul.length) {
			var css = {
				visibility: 'hidden',
				width: ul[0].wid
			};
			ul.stop().retarder(1, function (i) {
				i.css(css)
			})
		}
	});
	var links = $('.menu>li>a, .menu>li>a span', '#menu').css({
		background: 'none'
	});
	$('#menu ul.menu').lavaLamp({
		speed: 600
	});
	if (! ($.browser.msie && $.browser.version.substr(0, 1) == '6')) {
		$('.menu>li>a span', '#menu').css({
			color: 'rgb(166,196,213)'
		}).hover(function () {
			$(this).animate({
				color: 'rgb(255,255,255)'
			},
			500)
		},
		function () {
			$(this).animate({
				color: 'rgb(166,196,213)'
			},
			200)
		});
		$('ul ul a', '#menu').css({
			color: 'rgb(255,255,255)'
		}).hover(function () {
			$(this).animate({
				backgroundColor: 'rgb(33,52,90)'
			},
			500)
		},
		function () {
			$(this).animate({
				backgroundColor: 'rgb(33,52,90)'
			},
			{
				duration: 100,
				complete: function () {
					$(this).css('backgroundColor', 'rgb(49,71,104)')
				}
			})
		})
	}
});
