function lirotator(element_id, interval) {
	$('ul' + element_id +' li').css({opacity: 0.0});
	//Get the first image and display it (gets set to full opacity)
	$('ul' + element_id + ' li:first').css({opacity: 1.0});
	setInterval('rotate("' + element_id + '")',interval);

    $('ul' + element_id).fadeIn(500);
    $('ul' + element_id).fadeIn(500); // tweek for IE
}

function rotate(element_id) {
    var selector = 'ul' + element_id + ' li';

	var current = ($(selector + '.show')?  $(selector + '.show') : $(selector + ':first'));
    if ( current.length == 0 ) current = $(selector + ':first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $(selector + ':first') :current.next()) : $(selector + ':first'));

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show').removeClass('hide')
	.animate({opacity: 1.0}, 2500);

	//Hide the current image
	current.animate({opacity: 0.0}, 2500)
	.removeClass('show').addClass('hide');
};

