var rotateTestimonial = function(e) {
  var $active = $('#testimonials div.active');
  var $next = $active.next().length > 0 ? $active.next() : $('#testimonials div:first');
  
  $active.removeClass("active");
  $active.fadeOut(1000);
  $next.fadeIn(1000);  
  $next.addClass("active");
}

$(document).ready(function() {  
  $('#testimonials div:first').show(1000).addClass("active");  
  if( $('#testimonials div').size() > 1) {
    setInterval(rotateTestimonial, 6500);
  }
});
