
	var idTimeoutBannerImprensa;
	var actualBanner = 1;
	var anteriBanner = 0;
	var delay = 3500;
	
	function switchBannerImprensa() {
		
		if(anteriBanner!=0){
			$("#bannerImp"+bannerImprensa[anteriBanner]).hide();
		}
		$("#bannerImp"+bannerImprensa[actualBanner]).fadeIn("slow");
		/* Lógica para atribuir anterior e próximo frame */
		if(actualBanner==bannerImprensaEnd){
			anteriBanner = bannerImprensaEnd;
			actualBanner = bannerImprensaIni;
		} else { 
			anteriBanner = actualBanner;
			actualBanner = actualBanner+1; 
		}
		idTimeoutBannerImprensa = setTimeout("switchBannerImprensa()",delay);

	}
	
	var idTimeoutBannerEmpPar;
	var actualBannerEmpPar = 1;
	var anteriBannerEmpPar = 0;
	var delayEmpPar = 3500;
	
	function switchBannerEmpPar() {
		
		if(anteriBannerEmpPar!=0){
			$("#bannerEmpParc"+bannerEmpParc[anteriBannerEmpPar]).hide();
		}
		$("#bannerEmpParc"+bannerEmpParc[actualBannerEmpPar]).fadeIn("slow");
		/* Lógica para atribuir anterior e próximo frame */
		if(actualBannerEmpPar==bannerEmpParEnd){
			anteriBannerEmpPar = bannerEmpParEnd;
			actualBannerEmpPar = bannerEmpParIni;
		} else { 
			anteriBannerEmpPar = actualBannerEmpPar;
			actualBannerEmpPar = actualBannerEmpPar+1; 
		}
		idTimeoutBannerEmpPar = setTimeout("switchBannerEmpPar()",delayEmpPar);
			
	}

	// Credits: Robert Penners easing equations (http://www.robertpenner.com/easing/).
	jQuery.easing['BounceEaseOut'] = function(p, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	};
	
	jQuery(document).ready(function() {
	    jQuery('#mycarousel').jcarousel({
	        easing: 'BounceEaseOut',
	        animation: 1000
	    });
		$('#mycarousel img').click(function(){
			var newImg = $(this).attr("src");
			$("#imgEmpAtual").attr("src",newImg);
			//alert(newImg);
	    });
		/* PopUp Home */
		/*var popup = baseurl+"flash/impulso_pop_up.swf";
		window.open(popup,"","status=no,toolbar=no,location=no,scrollbars=no,menubar=no,width=700,height=600",false);*/
	});
    
