text:  jQuery(document).ready(function() {
  
  
  
  // contact form
  
     $('form#contactForm button.btn btn-primary mb-2').click(function() {
  
        $('#image-loader').fadeIn();
  
        var contactName = $('#contactForm #contactName').val();
        var contactPhone = $('#contactForm #contactPhone').val();
        var contactEmail = $('#contactForm #contactEmail').val();
        var contactSubject = $('#contactForm #contactSubject').val();
        var contactMessage = $('#contactForm #contactMessage').val();
  
        var data = 'contactName=' + contactName + '&contactEmail=' + contactEmail +
                 '&contactSubject=' + contactSubject + '&contactMessage=' + contactMessage;
  
        $.ajax({
  
  	      type: "POST",
  	      url: "sendEmail.php",
  	      data: data,
  	      success: function(msg) {
  
              // Message was sent
              if (msg == 'OK') {
                 $('#image-loader').fadeOut();
                 $('#message-warning').hide();
                 $('#contactForm').fadeOut();
                 $('#message-success').fadeIn();   
              }
              // There was an error
              else {
                 $('#image-loader').fadeOut();
                 $('#message-warning').html(msg);
  	            $('#message-warning').fadeIn();
              }
  
  	      }
  
        });
  
        return false;
  
     });
  
  
  });
  
  
  
  
  
  
  
  
  