$(document).ready(function(){

var first = 0;
var speed = 300;
var pause = 6000;

function removeFirst(){
first = $('ul#js-news li:first').html();
$('ul#js-news li:first')
.animate({opacity: 0}, speed)
.fadeOut('slow', function() {$(this).remove();});
addLast(first);
}
function addLast(first){
last = '<li>'+first+'</li>';
$('ul#js-news').append(last)
$('ul#js-news li:last')
.animate({opacity: 1}, speed)
.fadeIn('slow')
}

interval = setInterval(removeFirst, pause);

if ($('#brand_image').length >0 ) {
   $('#brand_image').cycle({ 
      fx:     'fade', 
      speed:   speed, 
      timeout: pause, 
      random: 0,
      pause:   1 
   });
}

});
