window.addEvent('domready', function() {
	$$('#side-menu').removeClass('nojs');
	var selItem = $$('#side-menu b')[0];
	var selItemFx = false;
	if (selItem) {
		selItemFx = new Fx.Morph(selItem, {
			link: 'cancel',
			transition: Fx.Transitions.Sine.easeOut,
			duration: 500
		});
	}
	else {
		selItem = false;
	}
	$$('#side-menu a').each(function(el) {
		var fx = new Fx.Morph(el, {
			link: 'cancel',
			transition: Fx.Transitions.Sine.easeOut,
			duration: 500
		});
		el.addEvent('mouseenter', function() {
			fx.start({
				'background-color': '#FFFFFF',
				'padding-left': 20
			});
			if (selItemFx) {
				selItemFx.start({'background-color': '#EBEFE6','padding-left':5});
			}
		});
		el.addEvent('mouseleave', function() {
			fx.start({
				'background-color': '#EBEFE6',
				'padding-left': 5
			});
			if (selItemFx) {
				selItemFx.start({'background-color': '#FFFFFF','padding-left':20});
			}
		});
	});
});

window.addEvent('domready', function() {
	$$('#top-menu').removeClass('nojs');
	var selItem = $$('#top-menu b')[0]
	var selItemFx = false;
	if (selItem) {
		selItemFx = new Fx.Morph(selItem, {
			link: 'cancel',
			transition: Fx.Transitions.Sine.easeOut,
			duration: 500
		});
	}
	else {
		selItem = false;
	}
	$$('#top-menu a').each(function(el) {
		var defaultFg = el.getStyle('color');
		var fx = new Fx.Morph(el, {
			link: 'cancel',
			transition: Fx.Transitions.Sine.easeOut,
			duration: 500
		});
		el.addEvent('mouseenter', function() {
			fx.start({
				'color': '#9FA837',
				'border-bottom-color': '#9FA837'
			});
			if (selItemFx) {
				selItemFx.start({'color':'#333333'});
			}
		});
		el.addEvent('mouseleave', function() {
			fx.start({
				'color': defaultFg,
				'border-bottom-color': '#EBEFE6'
			});
			if (selItemFx) {
				selItemFx.start({'color':'#9FA837'});
			}
		});
	});
});