$(document).ready(function() {

	$("[placeholder]").textPlaceholder();

	$(".carousel").jCarouselLite({ btnNext: ".next", btnPrev: ".prev", visible: 1, speed: 800 , auto:6000, controlElem:".control"});

	$("table.triable").tablesorter({sortList: [[0,0]]});

	// Lightbox
	$(function() {
		var lightbox1 = $(".singleLightbox").ariaLightbox({
			altText: function() {
				// $(this) is the triggered element (in this case the link element)
				return $(this).find("img").attr("alt");
			},
			descText: function() {
				return $(this).attr("rel");
			},
			useDimmer: false,
			closeText:'Fermer',
			pos: "auto",
			em: false
		});
		var lightbox2 = $("#gallery").ariaLightbox({
			imageArray: "a.seriesLightbox",
			altText: function() {
				// $(this) is the triggered element (in this case the link element)
				return $(this).find("img").attr("alt");
			},
			descText: function() {
				return $(this).attr("rel");
			},
			useDimmer: true,
			closeText:'Fermer',
			pictureText:'Image',
			ofText:'de',
			prevText:'image précédente',
			nextText:'image suivante',
			pos: "auto",
			em: false
		});
	});

	// Initialisation date de départ du calendrier - délibérations à reporter ds templates si calendrier spécifique selon client..
	$('#date1').datePicker();
	$('#date1').dpSetStartDate('01/01/2000');
	$('#date2').datePicker();
	$('#date2').dpSetStartDate('01/01/2000');

});
