$(document).ready(function(){

  function animat(){
    current_img = $('#illustration .image:visible');
    next_img = $('#illustration .image:visible').next('.image');

    if(current_img.is(':last-child')){
      next_img=$('#illustration .image:first-child');
    }

    $('#illustration .image').fadeOut(1000);
    next_img.fadeIn(1000);
    //console.log(next_img.parent());
    $('#slideCaption').html(next_img.find('span').html());
  }

  var intervalID = setInterval(animat, 5000);

    current_img = $('#illustration .image:visible');
    next_img = $('#illustration .image:visible').next('.image');

    if(current_img.is(':last-child')){
      next_img=$('#illustration .image:first-child');
    }
    $('#slideCaption').html(next_img.find('span').html());

//  animat();



  $('#carousel .box').jCarouselLite({
    visible: Math.min($('#carousel li').length, 5),
        btnNext: ".next",
        btnPrev: ".prev"
   });

});
