function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

var closetimer;
function fecharAreaAluno()
{
	$("#areaAlunoLogin").slideUp();	
}

var areaaluno_aberta = false;

function abrirAreaAluno(e)
{
	var pos = $(e).offset();
	pos['left'] -= 103;
	pos['top'] += 30; /* Ajuste do menu com o topo*/
	if ($.browser.msie && $.browser.version < 8)
	{
		pos['top'] += 15;
	//	pos['left'] -= 80;
		
	}else if($.browser.msie && $.browser.version >= 8){

		pos['top'] = 32;
	}
	
	 $("#areaAlunoLogin").css({"top": (pos.top) + "px", "left": (pos.left) + "px"});
	 
	 $("#areaAlunoLogin").css("z-index","1000");

	 $("#areaAlunoLogin").slideDown();	
	areaaluno_aberta = true;
}

function closeAreaAluno()
{
	$("#areaAlunoLogin").slideUp();	
	areaaluno_aberta = false;
}


$(document).ready(function() {

	$("#areaAlunoFechar").click(function() {
		   if (areaaluno_aberta)
		   {
				if(closetimer)
				{
						window.clearTimeout(closetimer);
						closetimer = null;
				}	 
				closetimer = window.setTimeout(closeAreaAluno, 0);
		   }
	});

	$("#areaAlunoLogin").mouseover(function() {
				if(closetimer)
				{
					window.clearTimeout(closetimer);
					closetimer = null;
				}								
	});

						   
});

function closeAreaAluno()
{
												$("#areaAlunoLogin").slideUp();	
												areaaluno_aberta = false;
}


function abrirChat(e)
{
	window.open('http://helpdesk.cbbw.com.br/faleconosco.aspx?eE=22','chat','width=1024,height=768,resizeable=yes,scrollbars=yes');
}

// open videos box //
/*
	conteudosArr = {
		0 => {
			'nome' => 'nomevideo',
			'url' => 'urlvideo'
		}
	}
*/

function openUrl2(){
	
return MM_openBrWindow(
		'http://player.cbbw.com.br/silverlight/?publishId=3066&triboId=1&LoginExterno=rgs&SenhaExterno=rgs&perfilExterno=150','Aula','width=1000,height=670');


}

function openUrl1(){
	
 return MM_openBrWindow(
		'http://player.cbbw.com.br/?publishId=3066&triboId=1&LoginExterno=rgs&SenhaExterno=rgs&perfilExterno=150','Aula','width=1000,height=670');

}


