setInterval( "auto_change_picture()", 6000 );

function auto_change_picture(){
  elem = $('ul.index li:visible a.active');
  if(elem.html() == "4"){
    change_picture(1);
  }else{
    change_picture(parseInt(elem.html()) + 1);
  }
}

function change_picture(nbr){
$('ul.index li:visible a').removeClass('active');
  
$('.images li:visible').fadeOut('slow', function(){
  $('.images li').eq(nbr-1).fadeIn('slow');
})
 
$('#link_'+nbr).addClass('active');
}