
$(document).ready(function(){
        
        var hauteur_div = 875;
        var nbr_div = 4;
        var bande = "#bande";
        var current_div = 0;
        var duration = 800;
        
        $('#menu .goto').click(function(){
            
            i = 0;
            for(k=0;k<nbr_div;++k)
            {
                if($(this).hasClass('l'+k))
                {
                    i=k;
                    break;
                }
            }
            //alert("AA"+i);
            diff = current_div-i;
            if(diff<0) { diff=-diff; }
            
            $(bande).stop().animate({ top: "-"+(i*hauteur_div)+"px" }, diff*duration );
            
            current_div = i;
        });//click sur lien
        
        /**
 * @author Christopher Wallace
 */



  // The magic sliding panels
	$('.entry-content a span.slide-title').css({
		opacity : '0.0'
	}).parent('a').append('<span class="cover-up"></span>');
	$('.entry-content a').mouseover(function(e){
      $(this).find('img.thumbnail').stop().animate({
	  	bottom : '35px'
	  }, 100).parent('a').find('span.slide-title').stop().fadeTo("slow",1.0);
	});
	$('.entry-content a').mouseout(function(e){
      $(this).find('img.thumbnail').stop().animate({
	  	bottom : '10px'
	  }, 100).parent('a').find('span.slide-title').stop().fadeTo("slow",0.0);
	});
  
  // Comment Author URL hover effect
  $('.comment-author a.url').mouseover(function(e){
  	var url = jQuery(this).attr('href');
	$(this).parent('span').append('<span class="hover-url">'+url+'</span>');
  })
  $('.comment-author a.url').mouseout(function(e){
	$(this).parent('span').find('.hover-url').remove();
  })
  
        $('.entry-content a').click(function(e){
                $('#head-list-slide').stop().animate({
                        top : "-"+($(this).attr('nbr') * 230)+"-25px"
                }, 500);
                
	});
        
        
        
});