$(function() {
	$("ul.thumb li").hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-110px', 
			marginLeft: '-110px', 
			top: '50%', 
			left: '50%', 
			width: '174px', 
			height: '174px',
			padding: '20px' 
		}, 200);
	
	} , function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '100px', 
			height: '100px', 
			padding: '5px'
		}, 400);
	 $('a').click(function(){
	   $(document.body).fadeOut();
	   setTimeout("gotopage('"+this.href+"')",5000);
	   return false;
	});
	function gotopage(href){
	 location.href=href;
	}


});
	
	
$( ".formStd" ).datepicker({
	showOn: "button",
	buttonImage: "http://jqueryui.com/demos/datepicker/images/calendar.gif",
	buttonImageOnly: true
	//$.datepicker.regional[ "fr" ]
});
$.datepicker.setDefaults( $.datepicker.regional[ "fr" ] );

	

$('#picsp a').lightBox();
$('#picsa a').lightBox();
//jQuery('ul.sf-menu').superfish();

	

	
$("#slidermax1").jCarouselLite({
	btnNext: ".mouseWheelButtons #nextbt1",
	btnPrev: ".mouseWheelButtons",
	visible: 3.5,
	vertical: true,
	circular: true,
	mouseWheel : true
});
$("#slidermax2").jCarouselLite({
	btnNext: ".mouseWheelButtons #nextbt2",
	btnPrev: ".mouseWheelButtons",
	visible: 3.5,
	vertical: true,
	circular: true,
	mouseWheel : true
});
$("#slidermax3").jCarouselLite({
	btnNext: ".mouseWheelButtons #nextbt3",
	btnPrev: ".mouseWheelButtons",
	visible: 3.5,
	vertical: true,
	circular: true,
	mouseWheel : true
});
$("#slidermax4").jCarouselLite({
	btnNext: ".mouseWheelButtons #nextbt4",
	btnPrev: ".mouseWheelButtons",
	visible: 3.5,
	vertical: true,
	circular: true,
	mouseWheel : true
});
$("#slidermax5").jCarouselLite({
	btnNext: ".mouseWheelButtons #nextbt5",
	btnPrev: ".mouseWheelButtons",
	visible: 3.5,
	vertical: true,
	circular: true,
	mouseWheel : true
});
});


$(document).ready(function(){
$('img.captify').captify({
	speedOver: 'fast',
	speedOut: 'normal',
	hideDelay: 100,	
	animation: 'slide',		
	prefix: '',		
	opacity: '0.7',					
	className: 'caption-bottom',	
	position: 'bottom',
	spanWidth: '100%'
});
			
// Init mouse hover menu top
function hover_menu_top(__div) { var n = jQuery.queue( $(__div)[0], "fx" ); if(n.length<1) { $(__div).fadeIn(100).animate({top:"-=10px"},150).animate({top:"+=10px"},300); } }
$( "#head_menu1" ).hover(function() { hover_menu_top("#overlight1") });
$( "#head_menu2" ).hover(function() { hover_menu_top("#overlight2") });
$( "#head_menu3" ).hover(function() { hover_menu_top("#overlight3") });
$( "#head_menu4" ).hover(function() { hover_menu_top("#overlight4") });
$( "#head_menu5" ).hover(function() { hover_menu_top("#overlight4") });



$('.captify').each(function() {
	$(this).stop().animate({ opacity: 1 }, 400);
	$(this).hover(function() { $(this).stop().animate({ opacity: 0.5 }, 200); },
	function() { $(this).animate({ opacity: 1 }, 400); });
});
$('.highlight').each(function() {
	$(this).stop().animate({ opacity: 0 }, 400);
	$(this).hover(function() { $(this).stop().animate({ opacity: 1}, 200); },
	function() { $(this).stop().animate({ opacity: 0 }, 400); });
});

		
});
