/*

Auteur : Geoffrey Baronchelli <geoffrey.baronchelli@gmail.com>
Date de création : 19 Avril 2010
Version : 1.0

Index :

	0/ Gestion des diaporama
	
	Annexes/ Fonctions annexes

*/

$(document).ready(function()
{
	// 0/ Gestion des diaporama
	var nombre_li = $('ul#projets > li').length;
	
	for(i=1; i<=nombre_li; i++) {
		if($('li#projet'+i+' ul.images_projets li').length > 1) {
			$('li#projet'+i+' ul.images_projets').before('<p><a href="#" title="Visionnez le projet précédent" class="precedent"><</a></p>');
			$('li#projet'+i+' ul.images_projets').after('<p><a href="#" title="Visionnez le projet suivant" class="suivant">></a></p>');
		}
	}
	
	$('ul.images_projets').each(function() {
		var $this = $(this), $ss = $this.closest('li.projet');
		var prev = $ss.find('a.precedent'), next = $ss.find('a.suivant');
		$this.cycle({
			fx:     'fade', 
			speed:  'slow',
			timeout: 0,
			prev: prev,
			next: next,
		});
	});
	
});

// Annexes/ Fonctions annexes
