function initLightbox() {
	 $(function() {
        $('a[@rel*=lightbox]').lightBox();
    });
}

	var nl_vide = 0;
function viderNewsletter() {
	if(nl_vide == 0) {
		nl_vide = 1;
		document.inscription_text.email.value = "";
	}
}

function checkInscription() {
	var x = document.inscription_text.email.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(x))
		document.message.submit();
	else
		alert('Cette adresse mail est incorrecte, veuillez la ressaisir.');
}
jQuery.fn.toggleMenu = function(speed, easing, callback) {
	if(this.css("opacity") == 1)
		return this.animate({opacity: 0}, speed, easing, callback);
	else
		return this.animate({opacity: 1}, speed, easing, callback);
	};
jQuery.fn.toggleMenuOff = function(speed, easing, callback) {
		return this.animate({opacity: 0}, speed, easing, callback);
	};
	jQuery.fn.toggleMenuOn = function(speed, easing, callback) {
		return this.animate({opacity: 1}, speed, easing, callback);
	};
$(document).ready(function(){
	$('#navigation a')
		.mouseover(function() {
			if($(this).attr('class').split(' ').slice(-1) == 'current') 
				$(this).toggleMenuOff("high");
			else
				$(this).toggleMenuOn("high");
		})
		.mouseout(function() {
if($(this).attr('class').split(' ').slice(-1) == 'current') 
				$(this).toggleMenuOn("high");
			else
				$(this).toggleMenuOff("high");
		})
});
