var position, counter, zIndex, interval;

function init()
{
	clearInterval(interval);
	position 	= 1;
	counter 	= 0;
	zIndex 		= 104;
	
	$(identifier).children().each(function()
	{
		$(this).css('position', 'absolute');
		if( counter != 0)
		{
			$(this).css('opacity','0');
		}
		$(this).show();
		counter++;
	});
	
	slide();	
	interval = setInterval( "slide()", pausetime );
}

function slide()
{
	var klasse = '';

	for(i = 0; i < counter; i++)
	{
		$(identifier).children().eq(i).attr('class', '');
	}

	$(identifier).children().eq(position-1).css("z-index", (zIndex++));
	$(identifier).children().eq(position-1).addClass('oben');
	
	
	$(identifier).children('.oben').fadeTo(slidetime, 1);
	
	for(i = 1; i <= counter; i++)
	{
		if( (i) != position)
		{
			$(identifier).children().eq(i-1).fadeTo(slidetime, 0);
		}
	}
	if( position < counter)
	{
		position++;
	}
	else
	{
		position = 1;
	}
}
