jQuery(document).ready(function(){
	$('a[href*=#]').click(function() {
        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 1000);
            return false;
            }
        }
    });
	
	$(".boxPress a").hover(
		function () {
			$(this).find("span:last").slideDown("fast");
		}, 
		function () {
			$(this).find("span:last").slideUp("fast");
		}
	);
	
	$("a[rel^='galeria']").fancybox();
	$(".iframe").fancybox(); 
	
	$('.highlights').cycle({ 
		fx : 'fade', 
		speed : 2000,
		timeout : 2000
    });
	
	if ($.browser.msie)  {
		$('.center .boxVideos ul li').corner();
	} else {
		$('.center .boxVideos ul li a').corner();
	}
	
	
	$('.center .boxPhotos ul li ul li .iframe').corner();

	$(".notice").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
	$(document).pngFix();
	
});

//configuração do stepcarousel
stepcarousel.setup({
	galleryid: 'galleryc', //id of carousel DIV
	beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
	panelclass: 'panel', //class of panel DIVs each holding content
	panelbehavior: {speed:500, wraparound:true, persist:false},
	defaultbuttons: {enable: false, moveby: 1, leftnav: ['arrowl.gif', -10, 100], rightnav: ['arrowr.gif', -10, 100]},
	statusvars: ['reportA', 'reportB', 'reportC'],
	contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
})	

stepcarousel.setup({
	galleryid: 'galleryb', //id of carousel DIV
	beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
	panelclass: 'panel', //class of panel DIVs each holding content
	panelbehavior: {speed:500, wraparound:true, persist:false},
	defaultbuttons: {enable: false, moveby: 1, leftnav: ['arrowl.gif', -10, 100], rightnav: ['arrowr.gif', -10, 100]},
	statusvars: ['reportA', 'reportB', 'reportC'],
	contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
})	


function mostraCidades(estado) {
	$('.current').hide();
	$('.current').removeClass('current');
	$('.places'+estado).addClass('current');
	$('.current').fadeIn("slow");
	$('.current').focus();	
}

function carregando() {
	$('#loading').fadeOut();
}

//“”‘’…_ &àáãéêíóõôúçÀÁÃÉÊÍÓÕÔÚÇ
var benguiate = { src: 'javascript/benguiate.swf' };

sIFR.activate(benguiate);

sIFR.replace(benguiate, {
    selector: '#top ul li a',
    wmode: 'transparent',
    fixFocus: true,
    css: [
        '.sIFR-root {color: #FFFFFF;font-size: 24px;}'
    ]
});

sIFR.replace(benguiate, {
    selector: '.content .nav li a',
    wmode: 'transparent',
    fixFocus: true,
    css: [
        '.sIFR-root {color: #FFFFFF;font-size: 20px;}'
    ]
});

sIFR.replace(benguiate, {
    selector: '.containerBox h1',
    wmode: 'transparent',
    fixFocus: true,
    css: [
        '.sIFR-root {color: #FFFFFF;font-size: 25px;}'
    ]
});

sIFR.replace(benguiate, {
    selector: '.navCenter h1',
    wmode: 'transparent',
    fixFocus: true,
    css: [
        '.sIFR-root {color: #FFFFFF;font-size: 25px;}'
    ]
});