function banner()
{
 var ran = Math.random()
 var num =  10;
  if (num*ran <  1)
 {
  document.write("<object width=\"555\" height=\"262\"><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"images/swf_home/home01.swf\"><embed src=\"images/swf_home/home01.swf\" width=\"555\" height=\"262\" wmode=\"transparent\"></embed></object>");
  return;
 }
 if (num*ran <  2)
 {
  document.write("<object width=\"555\" height=\"262\"><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"images/swf_home/home02.swf\"><embed src=\"images/swf_home/home02.swf\" width=\"555\" height=\"262\" wmode=\"transparent\"></embed></object>");
  return;
 }

 if (num*ran <  3)
 {
  document.write("<object width=\"555\" height=\"262\"><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"images/swf_home/home03.swf\"><embed src=\"images/swf_home/home03.swf\" width=\"555\" height=\"262\" wmode=\"transparent\"></embed></object>");
  return;
 }

 if (num*ran <  4)
 {
  document.write("<object width=\"555\" height=\"262\"><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"images/swf_home/home04.swf\"><embed src=\"images/swf_home/home04.swf\" width=\"555\" height=\"262\" wmode=\"transparent\"></embed></object>");
  return;
 }
 if (num*ran <  5)
 {
  document.write("<object width=\"555\" height=\"262\"><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"images/swf_home/home05.swf\"><embed src=\"images/swf_home/home05.swf\" width=\"555\" height=\"262\" wmode=\"transparent\"></embed></object>");
  return;
 }

 if (num*ran <  6)
 {
  document.write("<object width=\"555\" height=\"262\"><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"images/swf_home/home06.swf\"><embed src=\"images/swf_home/home06.swf\" width=\"555\" height=\"262\" wmode=\"transparent\"></embed></object>");
  return;
 }

 if (num*ran <  7)
 {
  document.write("<object width=\"555\" height=\"262\"><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"images/swf_home/home07.swf\"><embed src=\"images/swf_home/home07.swf\" width=\"555\" height=\"262\" wmode=\"transparent\"></embed></object>");
  return;
 }
 if (num*ran <  8)
 {
  document.write("<object width=\"555\" height=\"262\"><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"images/swf_home/home08.swf\"><embed src=\"images/swf_home/home08.swf\" width=\"555\" height=\"262\" wmode=\"transparent\"></embed></object>");
  return;
 }

 if (num*ran <  9)
 {
  document.write("<object width=\"555\" height=\"262\"><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"images/swf_home/home09.swf\"><embed src=\"images/swf_home/home09.swf\" width=\"555\" height=\"262\" wmode=\"transparent\"></embed></object>");
  return;
 }

 if (num*ran <  10)
 {
  document.write("<object width=\"555\" height=\"262\"><param name=\"wmode\" value=\"transparent\"><param name=\"movie\" value=\"images/swf_home/home10.swf\"><embed src=\"images/swf_home/home10.swf\" width=\"555\" height=\"262\" wmode=\"transparent\"></embed></object>");
  return;
 }

}

$j = jQuery;

function checkMail(mail){
    var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
    if(typeof(mail) == "string"){
        if(er.test(mail)){ return true; }
    }else if(typeof(mail) == "object"){
        if(er.test(mail.value)){
                    return true;
                }
    }else{
        return false;
        }
}

	$j(function(){
		$j('.accordion a.down, .accordion span').click(function(){
			
			obj = $j(this).parent().find('ul');
			
			$j(this).parent().parent().find('li ul').each(function(){
				obj_current = $j(this);
				if($j(obj_current).css('display') == 'block' && obj_current != obj)
				{
					
					if($j(obj_current).parent().find('.plus,.minus').attr('class') == 'minus') $j(obj_current).parent().find('.plus,.minus').attr('class','plus');
					else $j(obj_current).parent().find('.plus,.minus').attr('class','minus');
					
					$j(obj_current).slideToggle("fast");
					
				}
			});
			
			if($j(obj).css('display') == 'none')
			{
				
				$j(obj).slideToggle("fast",function(){
					$j(this).css({opacity:"toggle"});
				});
				
				if($j(this).parent().find('.plus,.minus').attr('class') == 'plus') $j(this).parent().find('.plus,.minus').attr('class', 'minus');
				else $j(this).parent().find('.plus,.minus').attr('class', 'plus');
				//$j(obj).slideToggle("slow");
				
			}
			
			return false;
		});
		
		//$j('.lightbox_a').lightBox();
		
		$j('#frm_contato').submit(function(){
			if($j('#nome').val() == '')
			{
				alert("Campo Obrigatório!!!");
				$j('#nome').focus();
				return false;
			}
			
			if($j('#email').val() == '')
			{
				alert("Campo Obrigatório!!!");
				$j('#email').focus();
				return false;
			}
			
			if(!checkMail($j('#email').val()))
			{
				alert("Email Inválido!!!");
				$j('#email').focus();
				return false;
			}
			
			if($j('#mensagem').val() == '')
			{
				alert("Campo Obrigatório!!!");
				$j('#mensagem').focus();
				return false;
			}
			
		});
		
		if($j.browser.msie && /6.0/.test(navigator.userAgent)) altura = 630;
		else altura = 330;
		
		$j('.conteudo').css('height', ($j(window).height() - 90) + 'px');
		$j('.conteudo_rolagem').css('height', ($j('.conteudo').height() - altura) + "px");
		
		//if($j.browser.msie && /6.0/.test(navigator.userAgent)) $j('.conteudo_rolagem').css('height', ($j(this).height() - 10) + "px");
		
		$j(window).resize(function(){
			altura = 330;
			$j('.conteudo').css('height', ($j(window).height() - 90) + "px");
			$j('.conteudo_rolagem').css('height', ($j('.conteudo').height() - altura) + "px");
		});
		
		
	});