	maximo = 4;
	tempo = 6000;
	currentTempo = tempo;
	var x = 0;
	function next(){
		if(x == maximo){
			x = 0;
		}else{
			x++;
		}
		$(".hr1").hide();
		$('#mostrar'+x).fadeIn(300);
	}
	function preview(){
		if(x == 0){
			x = maximo;
		}else{
			x--;
		}
		$(".hr1").hide();
		$('#mostrar'+x).fadeIn(300);
	}
	$(document).ready(function(){
		
		$(".hr1").hide();
		$('#mostrar'+x).fadeIn(300);
		
		$("#btn").click(function(){
			next();
		});
		$("#btn2").click(function(){
			preview();
		});
		
		$("#stop").click(function(){
			if(tempo == currentTempo){
				$('#stop').html('<img src="images/controls/play.gif" width="16" height="16" border="none"/>');
				tempo = 999999;
				clearInterval(correndo);
				correndo = setInterval('next()',tempo);
			}else{
				$('#stop').html('<img src="images/controls/pause.gif" width="16" height="16" border="none"/>');
				next();
				tempo = currentTempo;
				clearInterval(correndo);
				correndo = setInterval('next()',tempo);
			}
		});
		correndo = setInterval('next()',tempo);
		
		$(".btnm").click(function(){
			$(".hr1").hide();
			//alert( this.id );
			$('#mostrar'+this.id).fadeIn(300);
		});
		
		
	});