text: $(document).ready(()=>{
      
      $("#content").show();
      $("#loading").hide();
      $("#register-box").hide();
      //$("#login-box").hide();
  }) 
  
  function register(){
      $("#register").click(function(){
          $("#register-box").show('slow')
          $("#login-box").hide('slow')  
      })
  }
  
  function login(){
      $("#login").click(function(){
          $("#register-box").hide('slow')
          $("#login-box").show('slow')  
      })
  }
  
  //Função esconder e aparecer senha
  function lShowPass(){
      let pass = document.getElementById('lpassword');
      let icon1 = document.getElementById('l-lock1');
      let icon2 = document.getElementById('l-lock2');
      icon2.style = 'display: none'
  
      if(pass.type === 'password'){
          pass.type = 'text'
          icon1.style = 'display: none'
          icon2.style = 'display: block'
      }else{
          pass.type = 'password'
          icon1.style = 'display: block'
          icon2.style = 'display: none'
      }
  }
  
  function rShowPass(){
      let rpass = document.getElementById('rpassword');
      let iconr1 = document.getElementById('r-lock1');
      let iconr2 = document.getElementById('r-lock2');
      iconr2.style = 'display: none'
  
      if(rpass.type === 'password'){
          rpass.type = 'text'
          iconr1.style = 'display: none'
          iconr2.style = 'display: block'
      }else{
          rpass.type = 'password'
          iconr1.style = 'display: block'
          iconr2.style = 'display: none'
      }
  }
  
  function rcShowPass(){
      let rcpass = document.getElementById('rcpassword');
      let iconrc1 = document.getElementById('rc-lock1');
      let iconrc2 = document.getElementById('rc-lock2');
      iconrc2.style = 'display: none'
  
      if(rcpass.type === 'password'){
          rcpass.type = 'text'
          iconrc1.style = 'display: none'
          iconrc2.style = 'display: block'
      }else{
          rcpass.type = 'password'
          iconrc1.style = 'display: block'
          iconrc2.style = 'display: none'
      }
  }
  
  // $(function(){
  //     $('#username').keyup(function(){
  //         let pesquisa = $(this).val()
  //         console.log(pesquisa)
  //         if(pesquisa != ''){
  //             let dados = {
  //                 username: pesquisa
  //             }
  //             $.get('./controller/controller.php?action=search_users', dados, function(retorna){
  //                 $('#aparecer').html(retorna)
  //             })
  //         }else{
  //             $('#aparecer').html('')
  //         }
  
  //         //console.log(retorna)
  //     })
  // })
  
  
  
  window.setTimeout(function() {
      $("#alert").fadeTo(500, 0).slideUp(500, function(){
          //$(this).remove();
          //window.location.href="http://localhost/sistema/app-chat/app-chat-public/index.php";
          //window.location.reload();
      });
  }, 4000);
  
  window.setTimeout(function() {
      $("#alert2").fadeTo(500, 0).slideUp(500, function(){
          $(this).remove();
          //window.location.href="http://localhost/sistema/app-chat/app-chat-public/index.php";
          window.location.reload();
      });
  }, 2000);
  
  
  
  
  
  
  
  
  
  
  