
var boltbdbt = { src: 'http://www.30giga.com.br/wp-content/themes/30giga/swf/BoltBdBT.swf' };
sIFR.activate(boltbdbt);
sIFR.replace(boltbdbt, {
	selector: '.bloco .titulo,.widget_titulo',
	css: '.sIFR-root { color:#666; text-transform:uppercase; }',
	wmode:'transparent',
	ratios:[8, 0.72, 11, 0.8, 12, 0.88, 17, 0.93, 24, 0.98, 29, 1.02, 35, 1.05, 43, 1.07, 49, 1.08, 54, 1.09, 59, 1.1, 71, 1.11, 74, 1.12, 75, 1.11, 90, 1.12, 91, 1.13, 93, 1.12, 118, 1.13, 119, 1.14, 1.13]
});
sIFR.replace(boltbdbt, {
	selector: '.cabecalho h2,#rodape h3',
	css: '.sIFR-root { background-color:#000000; color:#f6921e; text-transform:uppercase; }',
	wmode:'transparent',
	fitExactly:true,
	ratios:[8, 0.43, 11, 0.35, 12, 0.39, 16, 0.44, 19, 0.46, 20, 0.49, 27, 0.5, 32, 0.52, 40, 0.54, 50, 0.55, 57, 0.56, 58, 0.57, 62, 0.56, 75, 0.57, 76, 0.58, 81, 0.57, 112, 0.58, 113, 0.59, 118, 0.58, 121, 0.59, 0.58]
});

$(document).ready(function(){
	try {
		$('#corpo > div.destaques').flash({
			src: 'http://www.30giga.com.br/wp-content/themes/30giga/swf/capas.swf',
			width: 470,
			height: 250,
			wmode: 'transparent',
			version: '7,0,0,0',
			update: false,
			flashvars: {
				area: $('#corpo > div.destaques').attr('id').substr(5, 3)
			}
		});
	} catch(e){}
	try {
		$('#cabecalho h1 a,#menu > ul > li > a').tooltip({
			track: true,
			delay: 0,
			showURL: false,
			fade: 250,
			extraClass: 'tooltip-menu'
		});
	} catch(e){}
	try {
		$('.cinema li').tooltip({
			track: true,
			delay: 0,
			showURL: false,
			fade: 250,
			extraClass: 'tooltip-cinema',
			bodyHandler: function(){
				return '<h3>' + $('h3', this).text() + '</h3><div>' + $('p', this).html() + '</div>';
			}
		});
	} catch(e){}
	try {
		$('.cinema li div').hide();
	} catch(e){}
	try {
		$('.multiwidget_destaques li').hover(function(){
			$('.multiwidget_destaques li').removeClass('sel');
			$(this).addClass('sel');
		}, function(){
		});
	} catch(e){}


    try {
        $('a[rel=externo]').click(function(){
           $(this).attr('target','_blank');
        });
    } catch(e){}
	try {
		$('.gallery a,a[class=thickbox][href^=http],a[class=lightbox]').lightBox({
			fixedNavigation:true,
			overlayOpacity: 0.6,
			imageLoading: 'http://30giga.com.br/wp-content/themes/30giga/img/lightbox/lightbox-ico-loading.gif',
			imageBtnClose: 'http://30giga.com.br/wp-content/themes/30giga/img/lightbox/lightbox-btn-close.gif',
			imageBtnPrev: 'http://30giga.com.br/wp-content/themes/30giga/img/lightbox/lightbox-btn-prev.gif',
			imageBtnNext: 'http://30giga.com.br/wp-content/themes/30giga/img/lightbox/lightbox-btn-next.gif',
			imageBlank: 'http://30giga.com.br/wp-content/themes/30giga/img/lightbox/lightbox-blank.gif',
			containerResizeSpeed: 350,
			txtImage: 'Imagem',
			txtOf: 'de'
		});
	} catch(e){}
	
	try{
		var janela = 4;
		var inicio = 1;
		var num_li = $('#corpo .especial > ul > li').length;
		if ( num_li > 4 ){
			$('#corpo .especial').addClass("cinema-incompleto");
			$('#corpo .especial > ul').after('<p><a href="#" class="recuar" title="Recuar">« Recuar</a><span> | </span><a href="#" class="avancar" title="Avançar">Avançar »</a></p>');
			$('#corpo .especial > ul > li').hide();
			$('#corpo .especial > ul > li:lt(4)').show();
			$("#corpo .especial .recuar").click(function(){
				$('#corpo .especial > ul > li').hide();
				if( inicio > 1 )
					inicio --;
				for (i = inicio; i < inicio + janela; i++) {
					$('#corpo .especial > ul > .li-' + i).show();
				}
			});
			$("#corpo .especial .avancar").click(function(){
				$('#corpo .especial > ul > li').hide();
				if ( inicio + janela <= num_li)
					inicio++;
				for (i = inicio; i < inicio + janela; i++) {
					$('#corpo .especial > ul > .li-' + i).show();
				}
			});
		}
	} catch(e){}

});
