function slidePaginaInicial(){
	if(document.getElementById('qntFotosDestaque').value.length>0){
		var qntFotos = document.getElementById('qntFotosDestaque').value;
		if(!isNaN(qntFotos)){
			qntFotos = parseInt(qntFotos);
			
			window.addEvent('domready', function() {
				var slideFotos = new Fx.Slide('imgs', {mode: 'horizontal'});
				function inicia(){
					selecionaImagem('1');
					abre();
					classe.adiciona('bt_dest01','fp');
					document.getElementById('fotoAtual').value = '1';
				}
				function abre(){slideFotos.slideIn();};
				function fecha(){slideFotos.slideOut();};
				fecha();
				slideFotos.addEvent('complete', function(){classe.remove('imgs','vh');});
				window.setTimeout(inicia,1000);
				
				function selecionaImagem(imgAt){
					for(var posicoes=1;posicoes<qntFotos;posicoes++){classe.adiciona('img_dest0'+posicoes,'dn');};
					classe.remove('img_dest0'+document.getElementById('fotoAtual').value,'dn');
				};
				function mudaSlide(){
					var imagemAtual_ = document.getElementById('fotoAtual').value;
					selecionaImagem(imagemAtual_);
					classe.adiciona('bt_dest0'+imagemAtual_,'fp');
					abre();
				};
				function btsImgs(posicao){
					if(!isNaN(posicao)){
						posicao = parseInt(posicao);
						var fotoAtual = document.getElementById('fotoAtual').value;
						if(posicao!=fotoAtual){
							document.getElementById('fotoAtual').value = posicao;
							for(var posicoes=1;posicoes<=qntFotos;posicoes++){classe.remove('bt_dest0'+posicoes,'fp');};
							classe.adiciona('bt_dest0'+document.getElementById('fotoAtual').value,'fp');
							slideFotos.slideOut();
							window.setTimeout(mudaSlide,1000);
						};
					};
				};
				for(var xFotos=1;xFotos<=qntFotos;xFotos++){
					if(document.getElementById('bt_dest0'+xFotos)){
						document.getElementById('bt_dest0'+xFotos).onclick = function(){
							btsImgs(document.getElementById(this.id).getAttribute('valor'));
						};
					};
				};
			});
		};
	};
};