
$(document).ready(function()
{

	// Gestion des menus déroulants
	$('div.jquery-submenu').hide();
	$('ul.jquery-menu li').mouseover(function()
	{
		$('div.jquery-submenu' , $(this)).show();
	});
	$('ul.jquery-menu li').mouseout(function()
	{
		$('div.jquery-submenu' , $(this)).hide();
	});

	// Gestion de la recherche
	$('form#recherche input[type=text]').focus(function()
	{
		if ($(this).val() == 'Rechercher')
			$(this).val('');
	});
	$('form#recherche input[type=text]').blur(function()
	{
		if ($(this).val() == '')
			$(this).val('Rechercher');
	});
	$('form#recherche').submit(function()
	{
		if ($('input[type=text]' , $(this)).val() == 'Rechercher' || $('input[type=text]' , $(this)).val() == '')
		{
			alert('Vous devez renseigner des termes à rechercher.')
			$('input[type=text]' , $(this)).focus();
			return false;
		}
		return true;
	});

	// Gestion des sliders des actus (état initial du footer)
	var footerHeight;
	var tmpHeight = 0;
	$('div.slider').each(function()
	{
		if ($(this).height() > tmpHeight)
			footerHeight = $(this).height() - $('div#actus').height() + 10;
	});
	if (footerHeight > $('div#footer').height())
		$('div#footer').css('height' , footerHeight);
	// Gestions des sliders des actus (hover)
	$('div.jquery-slider').mouseenter(function()
	{
		$(this).stop().animate({'marginTop': '-' + ($(this).height() - 92) + 'px'} , 200);
	});
	$('div.jquery-slider').mouseleave(function()
	{
		$(this).stop().animate({'marginTop': '7px'} , 200);
	});




	 // initialise plugins
		jQuery('#slideshow').cycle({
		   fx   : 'fade',
		   speed : 2500,
		   timeout: 1000,
		   pause  : 1
		  });


});

// Logo SWFObject
var attributes = {};
var params     = { wmode:'transparent' };
swfobject.embedSWF("../swf/label.swf", "label", "174px", "215px", "9", "transparent", logoParameters, params, attributes);
