$(document).ready(function()
{
	// texte défilant
	$("ul#texte_defilant").liScroll({travelocity: 0.05}); 
	
	// diaporama en dessus du menu
	$('#diaporama').cycle(
	{
		fx:    'fade', // toss
		timeout: 3000
	});
	
	// feature list
	$.featureList($("#tabs li a"),$("#output li"),
	{
		start_item : 0
	});
	
	// menu
	$("#menu").superfish();
});


function newsletter()
{
	var xhr;

	try
	{
		xhr = new ActiveXObject('Msxml2.XMLHTTP');
	}
	catch (e)
	{
		try
		{
			xhr = new ActiveXObject('Microsoft.XMLHTTP');
		}
		catch (e2)
		{
			try
			{
				xhr = new XMLHttpRequest();
			}
			catch (e3)
			{
				xhr = false;
			}
		}
	}

	xhr.onreadystatechange = function ()
	{
		if (xhr.readyState == 4 && xhr.status == 200)
		{
			alert(xhr.responseText);
		}
	}
	;
	
	var data = "email=" + document.getElementById('email_newsletter').value;
	xhr.open("POST", "/newsletter.php", true);
	xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xhr.send(data);
}


