$(function() {
  
  $.ajaxSetup({
    type: 'POST',
    dataType: 'json'
  });
  
  $(document.body).ajaxError(function(req, status, error) {
    $(this).html(status.responseText);
  });
  
  
});
