window.addEvent('domready', function(){

	var myEffect = new Fx.Morph('block-langue', {duration: 200, transition: Fx.Transitions.Quad.easeOut});

	$('langue-bouton').addEvent('click', function(event){
		event = new Event(event).stop();

		if(! $('langue-bouton').hasClass('active')) {
			$('langue-bouton').addClass('active');
		}

		height = $('block-langue').getStyle('height').toInt();
		if(height == 0) {
			myEffect.start({'height': [0, 256], 'opacity': [0, 1]});
		}
	});
	$('block-langue').addEvent('mouseleave', function(){

		if($('langue-bouton').hasClass('active')) {
			$('langue-bouton').removeClass('active');
		}

		height = $('block-langue').getStyle('height').toInt();
		if(height > 0) {
			myEffect.start({'height': [256, 0], 'opacity': [1, 0]});
		}
	});

});