(function () {
  $.misc = {
    uuid: function() {
      return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
        var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
        return v.toString(16);
      });
    }
  }
})();

$.extend(Object.prototype, {

  visit: function (obj, func) {
    for (var prop in obj) {
      func.apply(this, [prop, obj[prop]]);
      if ($.type(obj[prop]) === "object") {
        visit(obj[prop], func);
      }
      else if ($.type(obj[prop]) === "array") {
        var array = obj[prop];
        $.each(array, function (i, item) {
          visit(item, func);
        })
      }
    }
  }
});
(function () {
  $.misc = {
    uuid: function() {
      return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
        var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
        return v.toString(16);
      });
    }
  }
})();

$.extend(Object.prototype, {

  visit: function (func) {
    for (var prop in this) {
      func.apply(this, [prop, this[prop]]);
      if ($.type(this[prop]) === "thisect") {
        visit(this[prop], func);
      }
      else if ($.type(this[prop]) === "array") {
        var array = this[prop];
        $.each(array, function (i, item) {
          visit(item, func);
        })
      }
    }
  }
});
Fix undeinfed function in obj visit
Fix undeinfed function in obj visit
