var options = {
  target: "#box_inquirer",
  beforeSubmit: showInqRequest, // функция, вызываемая перед передачей
  success: showInqResponse, // функция, вызываемая при получении ответа
  timeout: 3000 // тайм-аут
};

function showInqRequest(formData, jqForm, options) {
  var queryString = $.param(formData);
  $("#box_inquirer").html($("#loader").html());
  return true;
}

// вызов после получения ответа
function showInqResponse(responseText, statusText)  {
  $(".inq_result").fadeIn("slow",function(){
    animateResults();
  });
}

function animateResults(){
  $(".bar-container div").each(function(){
      var percentage = $(this).attr("width");
      $(this).css({width: "0%"}).animate({
        width: percentage}, 'slow');
  });
}


