function trim(string) {return string.replace(/(^\s*)|(\s*$)/g,'');}

$(document).ready(function() {
	var auto = true;
    var autostopped = false;
	if ($("#actus_contenu li").length>1) {
		 var sudoSlider = $("#actus_contenu").sudoSlider({
			vertical:true,
			prevNext: false,
			auto:true,
			pause: '4000',
			continuous:true
		}).mouseenter(function() {
		  auto = sudoSlider.getValue('autoAnimation');
		  if (auto)
		  {
			 sudoSlider.stopAuto();
		  }
		  else
		  {
			 autostopped = true;
		  }
	   }).mouseleave(function() {
		  if (!autostopped)
		  {
			 sudoSlider.startAuto();
		  }
	   });
	}
	$("a[rel^='prettyPhoto']").prettyPhoto({
	   social_tools:''
	});
	$("a[rel^='prettyPhoto']").children("img").parent().append("<span class=\"zoom_photo\">Cliquez pour + de photos</span>");
	
	$("#btn_contact_form").click(function() {
		$(this).fadeOut();
		$("#form_contact").fadeIn();
		return false;
	});
	$("#retour_contact").click(function() {
		$("#btn_contact_form").fadeIn();
		$("#form_contact").fadeOut();
		return false;
	})
});



