yepnope([{
  load: 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js',
	complete: function () {

  }
}, {

	// Activebar2 ****************************************************************

	load: 'epsigon/js/activebar/2.0.1/activebar2.js',
	complete: function () {
	
		// IE 6
		if ( $.browser.msie && $.browser.version == "6.0") {
			$('<div></div>').html('Votre navigateur ne peut pas afficher correctement ce site. Vous êtes invité à mettre à niveau votre navigateur <a href="http://windows.microsoft.com/fr-FR/internet-explorer/products/ie/home">Microsoft Internet Explorer</a>.')
				.activebar({
						'url': 'http://windows.microsoft.com/fr-FR/internet-explorer/products/ie/home',
						'icon' : 'epsigon/js/activebar/2.0.1/activebar-information.png',
						'button' : 'epsigon/js/activebar/2.0.1/activebar-closebtn.png',
						'highlight': '#FFCA8E'
				});
		}
	
		// IE 7
		if ( $.browser.msie && $.browser.version == "7.0") {
			$('<div></div>').html('Votre navigateur n\'est pas à jour. Vous êtes invité à mettre à niveau votre navigateur <a href="http://windows.microsoft.com/fr-FR/internet-explorer/products/ie/home">Microsoft Internet Explorer</a>.')
				.activebar({
						'url': 'http://windows.microsoft.com/fr-FR/internet-explorer/products/ie/home',
						'icon' : 'epsigon/js/activebar/2.0.1/activebar-information.png',
						'button' : 'epsigon/js/activebar/2.0.1/activebar-closebtn.png',
						'highlight': '#FFCA8E'
				});
		}
	}

}, {

	// NivoSlider ****************************************************************

	load: 'epsigon/js/nivoSlider/2.5.1/jquery.nivo.slider.pack.js',
	complete: function () {
		
		// Diaporama
		$('#diaporama 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:false, // 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:1.0, // 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(){
					$('#diaporama-titre').fadeOut() ;
				} // Triggers when slider has loaded
		});
		
	}
}, {

	// 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%"
		});
		
	}

}, {

	// Textarea Autoresize *******************************************************

	load: 'epsigon/js/autoresize/autoresize.jquery.min.js',
	complete: function () {
		
		// Préparation
		$('.autoresize textarea').css("display","block") ;
		
		// Autoresize
		$('.autoresize textarea').autoResize({
			animateDuration : 1000,
			extraSpace: 40
		}) ;
		
	}
	
}, {

	// Google + 1 ****************************************************************

	load: 'https://apis.google.com/js/plusone.js',
	complete: function () {
		gapi.plusone.render("googleplusone", {"size": "small", "count": "false", "href" : "http://www.epsigon.fr"});
		
		// Suivi Google Analytics
		function plusone_vote( obj ) {
			_gaq.push(['_trackEvent','plusone',obj.state]);
		}
	}
	
}]);
