jQuery.fn.listaDestaques = function (options) {
	
	var opts = jQuery.extend({
		timer: 6000,
		fadeSpeed: "normal",
		autoPlay: true,
		classAt: "ativo",
		classOver: "hover"
	}, options);
	
	this.each(function(){
		
		//Configs iniciais
		var Interval;
		var Father		= jQuery(this);
		var selItem		= 1;
		var nItens 		= jQuery(".banner", Father).size();
		
		jQuery('.banner', Father).hide();
		//jQuery('.banner:first', Father).show();
		
		jQuery('.banner', Father).css('position', 'absolute');
		
		//----------------
		
		//Funcoes		
		function showDst (n){
			if (opts.autoPlay) { stopDst(); }
			
			jQuery(".banner", Father).fadeOut(opts.fadeSpeed);
			jQuery(".banner:eq("+(n-1)+")", Father).fadeIn(opts.fadeSpeed);
			
				selItem = n;
				jQuery(".btRpt", Father).removeClass(opts.classAt);
				jQuery(".btRpt:eq("+(n-1)+")", Father).addClass(opts.classAt);
				Cufon.replace('#Destaques .paginas ul li a', {
					color: '#fff'
				});
				Cufon.replace('#Destaques .paginas ul li.ativo a', {
					color: '#f78307'
				});

				if (opts.autoPlay) { playDst(opts.timer); }
		}
		
		function nextDst () {

			if (selItem > nItens-1) {
				n = 1;
			} else {
				n = selItem + 1;
			}
			
			if (nItens > 1) {
			showDst(n);
			}

		}
		
		function playDst (t) {
			Interval = setTimeout(nextDst, t);
		}
		
		function stopDst () {
			clearTimeout(Interval);
		}
		//-------
		
		//Crio os Botoes
		var btModel = jQuery(".btRpt:last", Father);
		for (i=0; i<nItens-1; i++) { btModel.clone().insertAfter(btModel); }
		
		var lblBt = 0;
		jQuery(".btRpt", Father).each(function(){
			lblBt++;
			jQuery(this).addClass('pg'+lblBt).html('<a href="#">'+lblBt+'</a>');
			jQuery('a', this).click(function(){
				n = parseFloat(jQuery(this).text());
				if (selItem != n) {
					showDst(n);
				}
			});
			
			jQuery(this).hover(function(){
				jQuery(this).addClass(opts.classOver);
			},
			function(){
				jQuery(this).removeClass(opts.classOver);
			});
		});
		//--------------
		
		showDst (1);
		if (opts.autoPlay) { playDst(opts.timer); }
		
		
	});
}
