function portfolioRotator() {
    var $active = $('#images_slider DIV.active');
    if ( $active.length == 0 ) $active = $('#images_slider DIV:last');
    var $next =  $active.next().length ? $active.next()
        : $('#images_slider DIV:first');
    $active.addClass('last-active');
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "portfolioRotator()", 5000 );
});


function bannerRotator() {
    var $active = $('#banner IMG.active');
    if ( $active.length == 0 ) $active = $('#banner IMG:last');
    var $next =  $active.next().length ? $active.next()
        : $('#banner IMG:first');
    $active.addClass('last-active');
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
	bannerRotator();
    setInterval( "bannerRotator()", 5000 );
});


 
function newsRotator() {
	var current = ($('#news div.show')?  $('#news div.show') : $('#news div:first'));
	var next = ((current.next().length) ? (current.next()) : $('#news div:first'));	
	current.animate({top: '-35px'}, 500).removeClass('show');
	next.animate({top: '35px'}, 1).animate({top: '0px'},500 ).addClass('show');
}	

$(function() {
	newsRotator();
	setInterval('newsRotator()',5000);
});

