function swapTabs(idTab,total){
	for(i=1;i<=total;i++){
		document.getElementById('block'+i).className='closed';
		if((document.getElementById('tab'+i).className=='selected first') ||(document.getElementById('tab'+i).className=='first')){
		document.getElementById('tab'+i).className='first';
			}else{
		document.getElementById('tab'+i).className=' ';
		}
	}
	document.getElementById('block'+idTab).className='revistasThumbs';
	if(document.getElementById('tab'+idTab).className=='first'){
		document.getElementById('tab'+idTab).className='selected first';
	}else{
		document.getElementById('tab'+idTab).className='selected';
	}

}
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('.carouselGal').jcarousel({
        auto: 0,
		scroll: 12,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});

function loadvideo_museu(select,flv){
	i=1;
	while(document.getElementById('list_video_'+i)){
		if(select==i){
			document.getElementById('list_video_'+i).className="selected"
		}else{
			document.getElementById('list_video_'+i).className=""
		}
		i++;
	}
	var so = new SWFObject("/swf/videoGrande.swf", "playback", "603", "311", "9", "#336699");
	so.addParam("wmode", "transparent");
	so.addVariable("nomeVideo",flv)
	so.write("playback");
	return false;
}


function loadvideo_news(select,flv){
	i=1;
	while(document.getElementById('list_video_'+i)){
		if(select==i){
			document.getElementById('list_video_'+i).className="selected"
		}else{
			document.getElementById('list_video_'+i).className=""
		}
		i++;
	}
	var so = new SWFObject("/swf/videoPequeno.swf", "playback", "231", "205", "9", "#336699");
	so.addParam("wmode", "transparent");
	so.addVariable("nomeVideo",flv)
	so.write("playback");
	return false;
}

