$(document).ready(function(){


/* Ancien Datepicker
$('#startdate').datepicker({dateFormat: 'dd/mm/yy'}); 
$('#enddate').datepicker({dateFormat: 'dd/mm/yy'}); 
*/

/* Date picker 3.4
--------------------------------- */

$('#startdate').datepicker({minDate: '-0d'}); 
$('#enddate').datepicker({beforeShow: customRange}); 
$('#datedebut1').datepicker({minDate: '-0d'}); 
$('#datefin1').datepicker({beforeShow: customRange2}); 
$('#datedebut2').datepicker({minDate: '-0d'}); 
$('#datefin2').datepicker({beforeShow: customRange3});
$('#datedebut3').datepicker({minDate: '-0d'}); 
$('#datefin3').datepicker({beforeShow: customRange4});
$('#datedebut4').datepicker({minDate: '-0d'}); 
$('#datefin4').datepicker({beforeShow: customRange5});
$('#datedebut5').datepicker({minDate: '-0d'}); 
$('#datefin5').datepicker({beforeShow: customRange6});
$('#datedebut6').datepicker({minDate: '-0d'}); 
$('#datefin6').datepicker({beforeShow: customRange7});
$('#datedebut7').datepicker({minDate: '-0d'}); 
$('#datefin7').datepicker({beforeShow: customRange8});
$('#datedebut8').datepicker({minDate: '-0d'}); 
$('#datefin8').datepicker({beforeShow: customRange9});
$('#datedebut9').datepicker({minDate: '-0d'}); 
$('#datefin9').datepicker({beforeShow: customRange10});
$('#datedebut10').datepicker({minDate: '-0d'}); 
$('#datefin10').datepicker({beforeShow: customRange11});
// Customize two date pickers to work as a date range 
function customRange(input) {
var df = $('#startdate').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'enddate' ? df : null),
maxDate: (input.id == 'startdate' ? $('#enddate').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- */

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})
  ;
function customRange2(input) {
var df = $('#datedebut1').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'datefin1' ? df : null),
maxDate: (input.id == 'datedebut1' ? $('#datefin1').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- 

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})*/
  ;
// date 2
function customRange3(input) {
var df = $('#datedebut2').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'datefin2' ? df : null),
maxDate: (input.id == 'datedebut2' ? $('#datefin2').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- 

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})*/
  ;
// date 3
function customRange4(input) {
var df = $('#datedebut3').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'datefin3' ? df : null),
maxDate: (input.id == 'datedebut3' ? $('#datefin3').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- 

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})*/
  ;
// date 4
function customRange5(input) {
var df = $('#datedebut4').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'datefin4' ? df : null),
maxDate: (input.id == 'datedebut4' ? $('#datefin4').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- 

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})*/
  ;
// date 5
function customRange6(input) {
var df = $('#datedebut5').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'datefin5' ? df : null),
maxDate: (input.id == 'datedebut5' ? $('#datefin5').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- 

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})*/
  ;  
  // date 6
function customRange7(input) {
var df = $('#datedebut6').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'datefin6' ? df : null),
maxDate: (input.id == 'datedebut6' ? $('#datefin6').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- 

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})*/
  ;
  // date 7
function customRange8(input) {
var df = $('#datedebut7').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'datefin7' ? df : null),
maxDate: (input.id == 'datedebut7' ? $('#datefin7').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- 

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})*/
  ;
  // date 8
function customRange9(input) {
var df = $('#datedebut8').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'datefin8' ? df : null),
maxDate: (input.id == 'datedebut8' ? $('#datefin8').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- 

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})*/
  ;
  // date 9
function customRange10(input) {
var df = $('#datedebut9').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'datefin9' ? df : null),
maxDate: (input.id == 'datedebut9' ? $('#datefin9').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- 

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})*/
  ;
  // date 10
function customRange11(input) {
var df = $('#datedebut10').datepicker('getDate');
if (df) {
df.setDate(df.getDate() + 1);
}
return {minDate: (input.id == 'datefin10' ? df : null),
maxDate: (input.id == 'datedebut10' ? $('#datefin10').datepicker('getDate') : null)}; }


/* wslide
--------------------------------- 

  $(".actus_ch1").wslide({
                width: 472,
                height: 113,
                horiz: true,
				duration : 2000
})
  */
  ;
  
  
/* --------------------------------- */
$("#startdate").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#enddate").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#startdate").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#enddate").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datedebut1").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datefin1").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datedebut1").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datefin1").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});
//date2
$("#datedebut2").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datefin2").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datedebut2").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datefin2").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});
//date3
$("#datedebut3").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datefin3").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datedebut3").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datefin3").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});
//date4
$("#datedebut4").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datefin4").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datedebut4").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datefin4").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});
//date5
$("#datedebut5").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datefin5").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datedebut5").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datefin5").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});
//date6
$("#datedebut6").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datefin6").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datedebut6").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datefin6").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});
//date7
$("#datedebut7").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datefin7").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datedebut7").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datefin7").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});
//date8
$("#datedebut8").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datefin8").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datedebut8").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datefin8").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});
//date9
$("#datedebut9").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datefin9").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datedebut9").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datefin9").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});
//date10
$("#datedebut10").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datefin10").mouseover (
	function() {
	$(this).css("border","1px solid #f2eac1");
	$(this).css("cursor","pointer");
});

$("#datedebut10").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

$("#datefin10").mouseout (
	function() {
	$(this).css("border","1px solid #ccc");
});

/*menu
--------------------------------------------- */

$("ul#navmenu").superfish({
animation : {opacity:"show",height:"show"},
delay		: 800
 });

});


/*lightbox
--------------------------------------------- */
$(function() {
	$('a[@rel*=lightbox]').lightBox();
});



