jQuery(document).ready(function($) {
	$('#nav').html('');
	$('#slide').cycle({
	fx:'fade',
	speed:    1500, 
	timeout:  4000,
	pause: true, // true to enable "pause on hover"
	pauseOnPagerHover: true, 
	prev: '#prev',
	next: '#next',
	pager: '#nav',
	pagerAnchorBuilder: pagerFactory 
		});

	function pagerFactory(idx, slide) {
var s = idx > 50 ? ' style="display:none"' : '';
return '<li'+s+'><a href="#">&bull;</a></li>';
};
	
	$('.post a').each(function(index) {
	link=($(this).attr('href'));
	toto=$(this).parents('.post').find('.link').append("<a href='"+link+"'></a>");
	});


$('#navigation .col5').hover(
  function () {
  	$(this).data('color',$(this).css('background-color'));
  	$(this).removeClass("csback");
	$(this).css('background-color',$(this).data('color'));

    $(this).animate({'background-color':'black'},500);
  },
  function () {
  	    $(this).animate({'background-color':$(this).data('color')},500,
  	    function() {
		$(this).addClass("csback");
  		});
	});

$('#content>div.post:last').css('border','0');	

//carto
$('#imgmap li').mouseenter(function(){
	$(this).css("cursor","pointer");
	var bulle=$(this).children();

	bulle.stop();
	bulle.css({
	display:'block',
	cursor:'auto',
	opacity:1
	});
	
	});

$('#imgmap li').mouseleave(function(){

$(this).css("cursor","default");
	var bulle=$(this).children();

	bulle.animate({
	opacity:0	
	},
	500,
	"linear",
	function(){
	bulle.css({'display':'none','opacity':1});

	})
	});

$('ul.gallery li span').css({'visibility':'visible','opacity':0});

$('ul.gallery li').mouseenter(function(){
	$(this).find('span').css('cursor','pointer').animate({
	'opacity':0.8,
	}).find('strong').animate({'top':'5px'});
})


$('ul.gallery li').mouseleave(function(){
	$(this).find('span').css('cursor','auto').animate({
	'opacity':0,
	}).find('strong').animate({'top':'-50px'});
})


$('.intervenants').hide(0);

$('.archivage').mouseenter(function(){
	$(this).find('.intervenants').slideDown(500);
});
$('.archivage').mouseleave(function(){
	$(this).find('.intervenants').slideUp(200);
});

});
