function afficherMenuMultimedia() {
	$("#multimediamenu").slideDown();
}

function verifieFormulaireContact() {
	var nom = $("#nom").val().length;
	var mail = $("#mail").val().length;
	
	if(nom == 0)
		$("#nom").addClass("vide");
	if(mail == 0)
		$("#mail").addClass("vide");
		
	if((mail == 0) || (nom == 0))
		return false;
	else
		$("form").submit();
		//alert('Désolé, le formulaire ne fonctionne pas encore ;)');
}

function nextProjet() {
	$(".vert").animate({
        left: "+=400px",
        top: "-=45px"
      }, 1500 );
}

function avance(element) {
	$(element).animate({
        left: "+=15px",
        top: "+=15px"
      }, 1500 );
}
/*
$(document).ready(function(){ 
	$("#go").click( function() {nextProjet(); } );
	$(".conteneur div").click( function() { 
		$(".conteneur div").animate({
        left: "+=15px",
        top: "+=15px"
      }, 500 ); } );
});
*/

function remplirFiche(id) {
	var idproj = id.substring(1,id.length);
	$("#fiche").empty();
	$.post("/js/post/remplirFiche.php",
		   { projet: idproj },
		   function(data){
		     $("#fiche").append(data);
		   }
		 );
}

function gallery() {
	$("#gallery a").overlay({ 
		 
	    // each trigger uses the same overlay with the id "gallery" 
	    target: '#popup', 
	 
	    // optional exposing effect 
	    expose: '#f1f1f1' 
	 
	// let the gallery plugin do its magic! 
	}).gallery({ 
	 
	    // the plugin accepts its own set of configuration options 
	    speed: 800,
	    template: "<strong>${title}</strong> <span>Image ${index} sur ${total}</span>"
	});
}


$(document).ready(function(){
	var codeKonami = 0;


	if ( window.addEventListener ) {
		var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
		window.addEventListener("keydown", function(e){
			kkeys.push( e.keyCode );
			if ( kkeys.toString().indexOf( konami ) >= 0 && codeKonami == 0) {
				codeKonami++;
				$("#masqueCodeKonami").fadeIn("slow",function(){
					$("link[rel=stylesheet]").attr({href : "./design/konami.css"});
				   $("#masqueCodeKonami").fadeOut("slow");
				 });
			}
		}, true);
	}
});

