/**
 * Slider Routine
 */
function slide()
{
	$('#pages-accueil .slider .sheets li.item' + sliderItem).fadeOut('slow', function()
	{
		if (sliderItem == sliderItems)
		{
			sliderItem = 1;
		}
		else
		{
			sliderItem = sliderItem + 1;
		}

		$('#pages-accueil .slider .sheets li.item' + sliderItem).fadeIn();


		setTimeout('slide()', 4500);
	});
}

/**
 * Notice system
 */

function noticeSetType(type)
{
	$('#notice').removeClass('loader');
	$('#notice').removeClass('information');
	$('#notice').removeClass('exclamation');
	$('#notice').removeClass('error');
	$('#notice').removeClass('confirmation');
	$('#notice').addClass(type);
}


function notice(type, message)
{
	noticeSetType(type);
	if (type == 'information')
	{
		$('#notice .picture img').attr('src', '/img/icons/information.png');
	}
	else if (type == 'loader')
	{
		$('#notice .picture img').attr('src', '/img/elements/loader.gif');
	}
	else if (type == 'exclamation')
	{
		$('#notice .picture img').attr('src', '/img/icons/exclamation.png');
	}
	else
	{
		$('#notice .picture img').attr('src', '/img/icons/exclamation-red.png');
	}

	$('#notice .message strong').html(message);
	$('#notice').fadeIn();
}


function noticeHide()
{
	$('#notice').fadeOut();
}

