$(document).ready(function()
{
    lyteboxs();
}); 

function lyteboxs()
{
	/* This is basic - uses default settings */
	$('a[rel*=lytebox]').fancybox();
	
	$('a[rel*=lyteframe]').addClass("iframe");
	$('a[rel*=lyteframe]').fancybox({
		'hideOnContentClick': false
	});
	
	$('a[rel*=lyteframe2]').fancybox({
		'hideOnContentClick': false,
		frameWidth			:	760,
		frameHeight			:	440,
		centerOnScroll		:	false
	});
	
}

function abrirGaleria(id,foto)
{
	window.open(vBase()+"galerias/popup.php?lic=fotos&id="+id+"&foto="+foto,"","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,width=900,height=600"); 
}

function abrirPrograma(id)
{
	window.open(vBase()+"indexprogramas.php?cid="+id,"","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=1,width=700,height=600"); 
}

function abrirVideo(id)
{
	//window.open("galerias/popup.php?lic=fotos&id="+id+"&foto="+foto,"","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,width=900,height=600");
	ajaxHTML2("d_video","index_video.php?id="+id,""); 
}

function scrollAltura(id,alteracao)
{
	var targetOffset = document.getElementById(id).scrollTop;
	targetOffset+=alteracao;
	$("#"+id).animate({scrollTop: targetOffset+'px'}, 1000);
}

function scrollLargura(id,alteracao)
{
	var targetOffset = document.getElementById(id).scrollLeft;
	targetOffset+=alteracao;
	$("#"+id).animate({scrollLeft: targetOffset+'px'}, 1000);
}

function vBase()
{
	v_base="";
	try {
		v_base=document.getElementsByTagName('base')[0].href;
	} catch(e) {  }
	return(v_base);
}
