$(document).ready(function(){

	// Charger l'agenda 
	$("#agenda").load("spip.php?page=agenda_perso");
	
	// gallerie 
	// le hover sur les vignettes 
	$('#documents_portfolio .vignette').css({opacity:0.7});
	$('#documents_portfolio .vignette').hover(function(){
		$(this).css({opacity:1});
		},
		function(){
		$(this).css({opacity:0.7});
		}
		);
	// le click sur les vignetes
	$('#documents_portfolio a').click(function(){
		var url = $(this).attr('href');
		
		$('#document_actif img').attr('src',url);
			
	});		

	//$('#defil_box marquee').marquee();
	$('div#defil_box marquee').marquee('pointer').mouseover(function () {
		  $(this).trigger('stop');
		}).mouseout(function () {
		  $(this).trigger('start');
		}).mousemove(function (event) {
		  if ($(this).data('drag') == true) {
		    this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
		  }
		}).mousedown(function (event) {
		  $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
		}).mouseup(function () {
		  $(this).data('drag', false);
		});



});


function chg(arg){
		var url ="spip.php?page=agenda_perso&date="+arg;
		$("#agenda").load(url);
	}