jQuery(document).ready(function($) {
       jQuery("#contact_me").submit(function() {
    var str = jQuery(this).serialize();
    jQuery.ajax({
        type: "POST",
        url: "wp-admin/admin-ajax.php",
        data: 'action=contact_form&'+str,
        success: function(msg) {
        jQuery("#node").ajaxComplete(function(event, request, settings){
                if(msg == 'sent') {
                    jQuery(".contact #node").hide();
            jQuery(".contact #success").fadeIn("slow");
                }
                else {
                    result = msg;
                    jQuery(".contact #node").html(result);
            jQuery(".contact #node").fadeIn("slow");
        }
        });
        }
    });
    return false;
    });
});
