// JS da Default
$(function() {
	
	$('#s4').cycle({
		fx: 'scrollHorz',
        speed:  'fast',
        timeout: 8000,
        pager:  '#contadorDestaque',
		prev:    '#prev', 
        next:    '#next', 
        after: function (curr, next, opts) {
			try {
				
				$('#contadorDestaque a').each(function(i) {
					
					var _i = i+1;
					var $this = $(this);
					var _cont = $this.attr('id');
					_cont = _cont.replace(/latest_news_imprensa_/, '');
					
					console.log ( ( _i == _cont ) );
					
					if ( _i == _cont ) {
						$this.addClass('activeSlide');
					} else {
						$this.removeClass();
					}
					
				});
				
			} catch(ex) {
				//
			}
			
		}
    });
	
	$('#galeria').cycle({
		fx: 'scrollHorz',
        speed:  '1200',
        timeout: 6000,
        pager:  '.none',
		prev:    '#prevGaleria', 
        next:    '#nextGaleria'
    });
	
	//Publicidade
	$("#parceiro_publicidade").jCarouselLite({
		btnNext: "#nextPublicidade",
		btnPrev: "#prevPublicidade",
		auto: 2000,
		speed: 1000,
		visible: 4,
		scroll: 1,
		vertical: false
	});
	
	//Informacoes
	function exibeFancyBox(pUrl, pTitle)
	{
		pTitle = '';
		$.fancybox({
			//'orig'			: $(this),
			'padding'		: 0,
			'width'			: 800,
			'height'		: 463,
			'href'			: pUrl,
			'title'   		: pTitle,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'type'			: 'iframe'
		});
	}
	
});
