diff --git a/js/jquery.treetable.js b/js/jquery.treetable.js
index 1234567..abcdefg 100644
--- a/js/jquery.treetable.js
+++ b/js/jquery.treetable.js
@@ -127,7 +127,7 @@
     };

     Node.prototype.removeChild = function(child) {
-      var i = $.inArray(child, this.children);
+      var i = this.children.indexOf(child);
       return this.children.splice(i, 1)
     };

@@ -315,7 +315,7 @@
       // 3: +node+ should not be inserted in a location in a branch if this would
       //    result in +node+ being an ancestor of itself.
       var nodeParent = node.parentNode();
-      if (node !== destination && destination.id !== node.parentId && $.inArray(node, destination.ancestors()) === -1) {
+      if (node !== destination && destination.id !== node.parentId && destination.ancestors().indexOf(node) === -1) {
         node.setParent(destination);
         this._moveRows(node, destination);

@@ -350,7 +350,7 @@

       // Clean up Tree object (so Node objects are GC-ed)
       delete this.tree[node.id];
-      this.nodes.splice($.inArray(node, this.nodes), 1);
+      this.nodes.splice(this.nodes.indexOf(node), 1);

       return this;
     }
@@ -582,7 +582,7 @@
       columnOrFunction = columnOrFunction || settings.column;
       sortFun = columnOrFunction;

-      if ($.isNumeric(columnOrFunction)) {
+      if (typeof columnOrFunction === 'number' && !isNaN(columnOrFunction)) {
         sortFun = function(a, b) {
           var extractValue, valA, valB;

@@ -590,7 +590,7 @@
             var val = node.row.find("td:eq(" + columnOrFunction + ")").text();
             // Ignore trailing/leading whitespace and use uppercase values for
             // case insensitive ordering
-            return $.trim(val).toUpperCase();
+            return val.trim().toUpperCase();
           }

           valA = extractValue(a);
@@ -618,7 +618,7 @@
     } else if (typeof method === 'object' || !method) {
       return methods.init.apply(this, arguments);
     } else {
-      return $.error("Method " + method + " does not exist on jQuery.treetable");
+      throw new Error("Method " + method + " does not exist on jQuery.treetable");
     }
   };
