
   
   // function Login(){


        
$('#loginform').on('submit', function(e){
      e.preventDefault();

      var pass = $("#password").val();
      

      



      if(pass == "") {
         $("#password").closest('.form-group').addClass('has-error');
         noty({
         width: 200,
         text: 'Please Enter the Password',
         type: 'error',
         dismissQueue: true,
         timeout: 3000,
         layout: 'top',
         });
      }else {
         $("#password").closest('.form-group').removeClass('has-error');
         $("#password").closest('.form-group').addClass('has-success');
      }


      if(pass ) {
   
            $.ajax({
                  url : 'models/crul_outh.php',
                  type : 'post',
                  data : {password:pass},
                  dataType : 'json',
                  success : function(response) {

                        if(response.is_success == true) {

                              noty({
                                    width: 200,
                                    text: response.data,
                                    type: 'success',
                                    dismissQueue: true,
                                    timeout: 3000,
                                    layout: 'top',
                              });

                              window.location='starter.php';
                        } else {

                              noty({
                                    width: 200,
                                    text: response.data,
                                    type: 'error',
                                    dismissQueue: true,
                                    timeout: 3000,
                                    layout: 'top',
                              });
                        }
                  }

            }); // submit ajax




      }





});


