function textRotate(containing_element, speed) {
    var $active = $(containing_element + ' li.active');
    var $cover = $(containing_element + '_cover');
    
    if ( $active.length == 0 ) $active = $(containing_element + ' li:last');
    
    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $(containing_element + ' li:first');

    // uncomment the 3 lines below to pull the li's in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] ); 
    
    $cover.animate({opacity: 1.0}, 1000, '', function(){    	
        $active.removeClass('active')
        $next.addClass('active'); });           
    $cover.animate({opacity: 0.0}, 1000);       

}

