$(document).ready(function(){
	$("ul#menuPrinc li a").hover(
	function() {
		$("div#header div").addClass($(this).attr("id"));
	}, 
	function() {
		$("div#header div").removeClass($(this).attr("id"));
	});
	$("ul#menuPrinc li a").focus(
		function() {
			$("div#header div").addClass($(this).attr("id"));
		}
	);
	$("ul#menuPrinc li a").blur(
		function() {
			$("div#header div").removeClass($(this).attr("id"));
		}
	);
	if(navigator.userAgent.match(/Firefox\/4/g)) {
		$("li.projets").addClass("projetsFF4");
		$("li.evenements").addClass("evenementsFF4");
		$("li.partenaires").addClass("partenairesFF4");
		$("li.galeries").addClass("galeriesFF4");
		$("li.publications").addClass("publicationsFF4");
	}
});

$(document).ready(function(){
	$("form fieldset input:first").focus()
});

$(function(){
	$('img.captify').each(function() {
		if($(this).attr("alt")!="") {
			$(this).captify({
				// speed of the mouseover effect
				speedOver: 'slow',
				// speed of the mouseout effect
				speedOut: 'normal',
				// how long to delay the hiding of the caption after mouseout (ms)
				hideDelay: 1000,	
				// 'fade', 'slide', 'always-on'
				animation: 'slide',		
				// text/html to be placed at the beginning of every caption
				prefix: '',		
				// opacity of the caption on mouse over
				opacity: '0.6',					
				// the name of the CSS class to apply to the caption box
				className: 'caption-bottom',	
				// position of the caption (top or bottom)
				position: 'bottom',
				// caption span % of the image
				spanWidth: '100%'
			});
		}
	});
});

	function Lien() {
		i = document.choix.lechoix.selectedIndex;
		if (i == 0) return;
		url = document.choix.lechoix.options[i].value;
		parent.location.href = url;
	}
