function showSelectBoxes(){
	var selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "visible";
	}
}
function hideSelectBoxes(){
	var selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "hidden";
	}
}

// Menu déroulants - navigation
sfHover = function() {
	if(document.getElementById("nav-main")!= null) {
	var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
	var sfEls = document.getElementById("nav-main").getElementsByTagName("LI");
	
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			// if (IE6) hideSelectBoxes();
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			//showSelectBoxes();
		}
	}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


$(document).ready(function () {
		var texte ="";				 
	$('#invitation-voyage a').mouseover( function () {
		texte = $(this).attr("title");
		$(this).attr("title", "");
		$('#invitation-voyage a~span').css("visibility", "visible");
		$('#invitation-voyage a~span').text(texte);
		}).mouseout(function(){
      	$('#invitation-voyage a~span').text('');
		$('#invitation-voyage a~span').css("visibility", "hidden");
		$(this).attr("title", texte);
    	});
	
	 $(".form-sejour-open").click(function () {
		$(".form-sejour-open").next('div').hide();
		
		bouton = $(this);
		
		var titre =bouton.next('div').find('input').eq(0).val();
		
		
		$(".form-sejour").empty();
		$(".form-sejour-open").show();
		$(this).hide();
		
		$.ajax({
		 type: "POST",
		 url: "../../../templates/1/ajax/form-sejour.php",
		 data: ({titre : titre}),
		 success: function(retour){
			bouton.next('div').children('form').append(retour);
		  }
		});
		
		$(this).next('div').slideDown("slow");
		 return false; 
    	}); 
	 $(".form-sejour-close").click(function () {
		$(this).parent('div').slideUp("slow", function () {
		bouton.show();
		$(".form-sejour").empty();
		});
		 return false; 
    	});
});
 
 





