/*FUNÇÃO SLIDE DESTAQUES*/
$(document).ready(function() {
	//* DESTAQUE */
		var legenda = $("#legenda");
		legenda.css("opacity", 0.7);
		var legendaTexto = $("#textoLegenda");
		legendaTexto.html("<h1><a href='" + $(".dt1").attr("href") + "' target='"+$(".dt1").attr("target")+"'>" + $(".dt1").attr("title") + "</a></h1><p><a href='" + $(".dt1").attr("href") + "' target='"+$(".dt1").attr("target")+"'>" + $(".dt1").attr("rel") + "</a></p>");
		
		$("#legenda .fundo").css("opacity", 0.6);
		
		$("#imagens-slide").cycle({
			fx: "scrollHorz",
			speed: 600,
			timeout: 4000,
			next: ".dtProximo",
			prev: ".dtAnterior",
			pause: 1,
			before: antes,
			after: depois,
			pager: "#pager"
		});
		
		function antes() {
			legenda.slideUp(300);
			legendaTexto.empty();
		}
		
		function depois() {
			legendaTexto.html("<h1><a href='" + this.href + "' target='"+this.target+"'>" + $(this).attr("title") + "</a></h1><p><a href='" + this.href + "' target='"+this.target+"'>" + $(this).attr("rel") + "</a></p>");
			legenda.slideDown(300);
		}	
});
