$(document).ready(function(){
	$('.slides').ready(
		function(){
			setTimeout(slide,1000);					
		}			
	);
});

function slide() {
	$('#loopedSlider').loopedSlider({
		autoStart: 5000,
		restart: 2500
	});
	
	$('.slideClick').css('cursor', 'pointer');
	$('.slideClick').click(function(){
		var target = $(this).attr('target');
		if (target == 'self'){
			window.location.href = $(this).attr('id');
		}else{
			window.open($(this).attr('id'),'janela');
		}
	});
}
function bsv_Desativar(){
	$('.ativo1').removeClass('ativo1');
	$('.ativo2').removeClass('ativo2');
	$('.ativo3').removeClass('ativo3');
	$('.imagem-volunt a').addClass('hide');
}
$(document).ready(function(){
	// Botao 1
	$('.box01').click(function(){
		if($(this) != $('.ativo1')){
			bsv_Desativar();
			$(this).addClass('ativo1');
			$('.imagem-volunt .img1').removeClass('hide');
		}
		return false;
	});
	
	// Botao 2
	$('.box02').click(function(){
		if($(this) != $('.ativo2')){
			bsv_Desativar();
			$(this).addClass('ativo2');
			$('.imagem-volunt .img2').removeClass('hide');
		}
		return false;
	});
	
	// Botao 3
	$('.box03').click(function(){
		if($(this) != $('.ativo3')){
			bsv_Desativar();
			$(this).addClass('ativo3');
			$('.imagem-volunt .img3').removeClass('hide');
		}
		return false;
	});	
	
});


