$(document).ready(function(){
	$(".box-flash").css("display","block");
	
	var altura = $(".wrap .container .main").height();
	$(".foto").height(altura);
    $(".box-acesso-restrito div.btn span a").click(function () {
		if ($(this).hasClass('inativo') == true) {
			$(".box-login").animate({"top": "0"}, "normal");
			setTimeout("document.getElementById('ddlTipo').style.display = 'block'", 315);
			$(".box-flash").fadeOut("normal");
			$(this).removeClass("inativo");
			$(this).addClass("ativo");
			return false;
		}
		else if ($(this).hasClass("ativo") == true) {	
			$(".box-login").animate({"top":"-=168px"}, "normal");
			setTimeout("document.getElementById('ddlTipo').style.display = 'none'", 1);
			$(this).removeClass("ativo");
			$(this).addClass("inativo");
			$(".box-flash").fadeIn("normal");
			return false;
		}
    });
    
    
    jQuery(".main a.img").lightBox();
    
});
function toggleSubmit(obj){

//	count=0;
	count = document.getElementById("form" + obj);
	
	while(document.getElementById(count)){
		document.getElementById(count).style.display="none";
	}
	document.getElementById(obj.selectedIndex).style.display="block";

}

var divs = {
	'form0' : 'form0' ,
	'form1' : 'form1' ,
	'form2' : 'form2' ,
	'form3' : 'form3' ,
	'form4' : 'form4' ,
	'form5' : 'form5'
}

function showhide(obj)
{
	var el, v = obj.options[obj.selectedIndex].value;
	for (var opt in divs)
	if (el = document.getElementById(divs[opt]))
	el.style.display = (opt != v) ? 'none' : 'block';
}

function popUp(url,x,y,hasScroll) {
  window.open(url,'popUp','status=yes,resizable=no,width='+x+',height='+y+',scrollbars='+hasScroll);
}


function qualopcao(){
var theContents = document.getElementById('ddlEscolha')[document.getElementById('ddlEscolha').selectedIndex].innerHTML;
document.frmOrcamento.txtEscolha.value = theContents;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function mostraFlashTransparente(arquivo, width, height) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width + '" height="' + height + '">');
	document.write('<param name="movie" value="' + arquivo + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed src="' + arquivo + '" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
	document.write('</object>');
}


function MM_popupMsg(msg) { //v1.0
  alert(msg);
}



function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}