﻿
//jQuery(document).bind('ajaxComplete', function (e, xhr, options) {

//  if (xhr.getResponseHeader('Content-Type').indexOf('text/javascript') !== -1) {
//    eval(xhr.responseText);
//  }

//}).ready(function () {

//});

function Post(form) {
  form = jQuery(form);
  $.post(form.attr('action'), form.serialize());
  return false;
}

function Invoke(params, confirmation, callback) {
  if (typeof confirmation === 'string') { if (!confirm(confirmation)) { return; } }
  var url = (params.InvokeUrl ? params.InvokeUrl : window.location.path);
  $.post(url, params, callback);
}

