$(function(){
	animaComoParticipar();
	var total = 5, atual = 1;
	$('#imagens img').not(':first').hide();
	$('#anterior').hide();
	
	$('#anterior').click(function(e){
		e.preventDefault();
		$('#imagens img:visible').fadeOut('normal', function(){
			if ( atual >= 1 ) {
				$(this).prev().fadeIn();
				$('#proximo').not(':visible').show();
				if ( atual == 1 )
					$('#anterior').hide();				
			}
		});
		--atual;
	});
	
	$('#proximo').click(function(e){
		e.preventDefault();
		$('#imagens img:visible').fadeOut('normal', function(){
			if ( atual <= total ) {
				$(this).next().fadeIn();
				$('#anterior').not(':visible').show();
				if ( atual == total )
					$('#proximo').hide();
			}
		});
		++atual;
	});
});

function animaComoParticipar(){
	$('ol.etapasComoParticipar li').hide()
		.css({backgroundPosition:'-75px 30px'})
		.first().fadeIn('slow', function(){
			$(this).animate({backgroundPosition:'150px 30px'});								 
			$(this).delay(100000).next().fadeIn('slow', function(){
				$(this).animate({backgroundPosition:'105px 30px'});	
				$(this).delay(100000).next().fadeIn('slow');
			});
		});
}

function carregado(){$('body').addClass('imagemBgFlash');}




























