jQuery.extend({

  scope: function(target, method) {
    return function() {
      return method.apply(target, arguments);
    };
  },

  truncate: function(string, length, truncation) {
    length = length || 30;
    truncation = typeof truncation == "undefined" ? "..." : truncation;
    return string.length > length ? string.slice(0, length - truncation.length) + truncation : string;
  }

});