$(document).ready(function (){

	SelectFond("");

	
	$("#feed-rss select").change(
		function(){
			document.location.href = $(this).attr('value');
		}
	);

	
});


function setHover(){

}


var timer;
function SelectFond(action){
	var fond="";
	if ($.cookie('fond')!="0" && $.cookie('fond')!=null){
		fond="-"+$.cookie('fond');
	}
	var url="url('../images/fond-page"+fond+".jpg')";
	$("#conteneur").css("background-image",url);
	
	if (action=="change"){
		$("div.ecran").hide();
		timer=setTimeout(affiche,4000);
	}

}

function affiche(){
	$("div.ecran").show();
	clearTimeout(timer);
}

function ChoixFond(fond){
	$.cookie('fond', fond,{ expires: 7 });
	SelectFond("change");
}