$(document).ready(function(){
// CLOSE ALERTE SUR INTERNET EXPLORER
	$('.closealertie').click(function() {
		$('.alertie').slideUp("slow");
	});

// SLIDES
	$("#content section").hide();

	$("#content section:first").show();
	$("header nav li:first").addClass("active");

	$("header nav li a").click(function(){
		$('header nav li').removeClass("active");
		$(this).parent().addClass("active");

		var current = $(this).attr("href");

		$("#content section:visible").fadeOut("fast");

		$("#content").animate({"height":$(current).height()},function(){
			$(current).fadeIn("fast");
		});

		return false;
	});
	
	$(function(){
		// Set starting slide to 1
		var startSlide = 1;

		// Initialize Slides
		$('#slides_web,#slides_dc').slides({
			preload: true,
			preloadImage: 'img/loading.gif',
			generatePagination: true,
			play: 5000,
			pause: 2500,
			hoverPause: true,
		
		// Get the starting slide
			start: startSlide,
		});
	});
	
//CAPTION HOVER THUMBNAILS
	$('.item').hover(function() {
		
		//Display the caption
		$(this).find('div.caption').stop(false,true).fadeIn(200);
	},
	function() {

		//Hide the caption
		$(this).find('div.caption').stop(false,true).fadeOut(200);
	});

	
});
