// JavaScript Document
window.addEvent('domready', function(){
		$('menus').getElements('li.menu_heads').each( function( elem ){
		var list = elem.getElement('ul.links');
		var myFx = new Fx.Slide(list).hide();
		elem.addEvents({
			'mouseenter' : function(){
				myFx.cancel();
				myFx.slideIn();
			},
			'mouseleave' : function(){
				myFx.cancel();
				myFx.slideOut();
			}
		});
	})
	
	if($$('#date').length > 0)
	{ 
	myCal = new Calendar({ date: 'Y-m-d' }); 
	myCal2 = new Calendar({ dateFR: 'd F Y'}, { days: ['dimanche', 'lundi', 'mardi', 'mecredi', 'jeudi', 'vendredi', 'samedi'], months: ['jan', 'f&eacute;v', 'mars', 'avril', 'mai', 'juin', 'juil', 'ao&ucirc;t', 'sept', 'oct', 'nov', 'd&eacute;c']});
	};
	if($$('#date1').length > 0)
	{ 
	myCala = new Calendar({ date1: 'Y-m-d'});
	myCalb = new Calendar({ date2: 'Y-m-d'});
	myCalc = new Calendar({ date3: 'Y-m-d'}); 
	};
	
	if($$('#contactForm').length > 0)
	{ 
	$('contactForm').addEvent('submit', function(e) {

		//Prevents the default submit event from loading a new page.

		e.stop();

		//Empty the log and show the spinning indicator.

		var log = $('respondHere').empty().addClass('ajax-loading');

		//Set the options of the form's Request handler. 

		//("this" refers to the $('myForm') element).

		this.set('send', {onComplete: function(response) { 

			log.removeClass('ajax-loading');

			log.set('html', response);

		}});

		//Send the form.

		this.send();

	});
	
	
}
Element.implement({
		//implement show
		show: function() {
			this.setStyle('display','');
		},
		//implement hide
		hide: function() {
			this.setStyle('display','none');
		}
	});

if($$('#mb_inline').length > 0)
	{Mediabox.open('#mb_inline', '', '800 640');
	};
});