// JavaScript Document

  // we will add our javascript code here           
   var $j = jQuery.noConflict();

$j(document).ready(function(){
$j("#ajax-contact-form").submit(function(){

var str = $j(this).serialize();

   $j.ajax({
   type: "POST",
   url: "contact.php",
   data: str,
   success: function(msg){
    
$j("#note").ajaxComplete(function(event, request, settings){

if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
$j("#fields").hide();
}
else
{
result = msg;
}

$j(this).html(result);

});

}

 });

return false;

});

});

