calling a custom coded jquery function

calling a custom coded jquery function

Hello all,
   How do I call a custom function, but NOT call it attached to an element?

My code:

  1.             $.fn.callAjax = function(url, type, data, successCase)
  2.             {
  3.                 $.ajax({
  4.                     url: url,
  5.                     type: type,
  6.                     dataType: "text",
  7.                     data: data,
  8.                     success: function(data) {
  9.                         switch(successCase)
  10.                         {
  11.                             case "submit":
  12.                                 if (data == "")
  13.                                 {
  14.                                     alert ('The data has been entered successfully!');
  15.                                     $("#addlivestock")[0].reset();
  16.                                 }
  17.                                 else
  18.                                 {
  19.                                     var json = $.parseJSON(data);
  20.                                     $("#addlivestock").data("validator").invalidate(json);
  21.                                 }
  22.                                 break;
  23.                             default:
  24.                         }
  25.                     }
  26.                 });
  27. var validate_form = $("#addlivestock").validator({inputEvent: "change"}).submit(function(e)
  28. {
  29.      //call callAjax function here
  30. )};

-Thank You,
     Rich