yepnope([{

	// jQuery ********************************************************************

  load: 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js',
  complete: function () {
    
		// Navigation **************************************************************

		// Clonage des éléments
		$("#nav-wrapper ul > li > a > span").each(function(){
			$(this).clone().insertAfter(this).addClass('on') ;
		});
		
		// Animation
		$("#nav-wrapper > nav li").hover(
		
			function() {
				$("a", this).stop().animate({
					marginTop: '-100px',
					height: '200px'
					}, 200);
				$("span", this).not('.on').stop().animate({
					opacity: "0"
					}, 100);
			},
			
			function() {
				$("a", this).stop().animate({
					marginTop: '0px',
					height: '100px'
					}, 200);
				$("span", this).not('.on').stop().animate({
					opacity: "1"
					}, 100);
			}
				
		);
		
		// Formulaire de contact ***************************************************
		
		$('#formsujet').change(function() {
			if ($("#formsujet option:selected").text() == "Demande de réservation") {
				$("#formfieldsetreservation").slideDown();
			} else {
				$("#formfieldsetreservation").slideUp();
			}
		});

  }
}, {

	// NivoSlider ****************************************************************

	load: 'epsigon/js/nivoSlider/2.5/jquery.nivo.slider.pack.js',
	complete: function () {
		
		// SliderBanner
		$('#sliderbanner ul').nivoSlider({
				effect:'random', // Specify sets like: 'fold,fade,sliceDown'
				slices:6, // For slice animations
				boxCols: 8, // For box animations
				boxRows: 4, // For box animations
				animSpeed:500, // Slide transition speed
				pauseTime:5000, // How long each slide will show
				startSlide:0, // Set starting Slide (0 index)
				directionNav:true, // Next & Prev navigation
				directionNavHide:true, // Only show on hover
				controlNav:false, // 1,2,3... navigation
				controlNavThumbs:false, // Use thumbnails for Control Nav
				controlNavThumbsFromRel:false, // Use image rel for thumbs
				controlNavThumbsSearch: '.jpg', // Replace this with...
				controlNavThumbsReplace: '_thumb.jpg', // ...this in thumb Image src
				keyboardNav:true, // Use left & right arrows
				pauseOnHover:true, // Stop animation while hovering
				manualAdvance:false, // Force manual transitions
				captionOpacity:0.8, // Universal caption opacity
				prevText: '«', // Prev directionNav text
				nextText: '»', // Next directionNav text
				beforeChange: function(){}, // Triggers before a slide transition
				afterChange: function(){}, // Triggers after a slide transition
				slideshowEnd: function(){}, // Triggers after all slides have been shown
				lastSlide: function(){}, // Triggers when last slide is shown
				afterLoad: function(){} // Triggers when slider has loaded
		});
		
	}
}, {

	// Gmap 3 ********************************************************************

	load: 'epsigon/js/gmap/3.0.0/jquery.gmap-v3.min.js',
	complete: function () {

		// Carte Situation
		$("#map").gMap({
			markers: [
				{ address : "38, avenue de la Côte d'Argent 40200 Mimizan Plage",
					html : "Hôtel Atlantique"
				}
			],
			latitude : 44.21051,
			longitude : -1.295,
			zoom : 14,
			streetViewControl : false,
			scrollwheel: false
		});
		
	}
}, {

	// Colorbox ******************************************************************

	load: 'epsigon/js/colorbox/1.3.16/jquery.colorbox-min.js',
	complete: function () {
		
		// Lightbox
		$("a[rel='lightbox']").colorbox({
			current : "Image {current} de {total}",
			maxHeight : "90%"
		});
		
	}
}]);
