function processSlideshow(elem, imageList, imageDuration, fadeSpeed, current) 
{
	var listSize = imageList.length;
    if (!current || current >= listSize) current = 0;
    if (!imageDuration) imageDuration = 2000;
    if (!fadeSpeed) fadeSpeed = 1000;
    if (current == (listSize - 1)) { 
		$(elem).css('background', 'transparent url(' + imageList[0] + ') no-repeat');
	} else {
        $(elem).css('background', 'transparent url(' + imageList[current + 1] + ') no-repeat');
    }
	/*$(elem).animate({ opacity : '1' }, fadeSpeed)
		.delay(imageDuration)
		.animate({ opacity : '0.01' }, fadeSpeed, function() {
			processSlideshow(elem, imageList, imageDuration, fadeSpeed, current + 1);
		});*/
	$(elem).fadeIn(fadeSpeed)
		.delay(imageDuration)
		.fadeOut(fadeSpeed, function() {
			processSlideshow(elem, imageList, imageDuration, fadeSpeed, current + 1);
		});
}





	
	
