function checkElement (element, what, status) {
	if ((!status) || (status == "")) { status = 'active'; }
	if (element.getProperty('class') == status) { return true; }
	return false;
}

window.addEvent('domready', function() {
	var list = $$('#lang li');
	list.each(function(element) {
		var fx = new Fx.Styles(element, {duration:500, wait:false});
		element.addEvent('mouseenter', function(){
			if(!checkElement(element, 'class')) {
				fx.start({
					'margin-left': 0,
					color: '#000'
				});
			}
		});
		element.addEvent('mouseleave', function(){
			if(!checkElement(element, 'class')) {
				fx.start.delay(2000, fx, {
					'margin-left': -50,
					'color': '#fff'
				});
			}
		});
	});
});

