var noop = function () {};

var zjquery = (function () {

var elems = {};
var exports = {};

function new_elem(selector) {
    var value;
    var shown = false;
    var self = {
        val: function () {
            if (arguments.length === 0) {
                return value || '';
            }
            value = arguments[0];
        },
        css: noop,
        data: noop,
        empty: noop,
        height: noop,
        removeAttr: noop,
        removeData: noop,
        trigger: noop,
        show: function () {
            shown = true;
        },
        hide: function () {
            shown = false;
        },
        addClass: function (class_name) {
            assert.equal(class_name, 'active');
            shown = true;
        },
        removeClass: function (class_name) {
            if (class_name === 'status_classes') {
                return self;
            }
            assert.equal(class_name, 'active');
            shown = false;
        },
        debug: function () {
            return {
                value: value,
                shown: shown,
                selector: selector,
            };
        },
        visible: function () {
            return shown;
        },
    };
    return self;
}

exports.zjquery = function (arg) {
    if (typeof arg === "function") {
        // If somebody is passing us a function, we emulate
        // jQuery's behavior of running this function after
        // page load time.  But there are no pages to load,
        // so we just call it right away.
        arg();
        return;
    }

    var selector = arg;
    if (elems[selector] === undefined) {
        var elem = new_elem(selector);
        elems[selector] = elem;
    }
    return elems[selector];
};

exports.zjquery.trim = function (s) { return s; };

exports.zjquery.state = function () {
    // useful for debugging
    var res =  _.map(elems, function (v) {
        return v.debug();
    });

    res = _.map(res, function (v) {
        return [v.selector, v.value, v.shown];
    });

    res.sort();

    return res;
};

exports.zjquery.Event = noop;

return exports;
}());
module.exports = zjquery;

@@ -1242,16 +1242,243 @@
 elf;%0A%7D%0A%0A
+function jquery_array(elem) %7B%0A    var result = %5Belem%5D;%0A%0A    for (var attr in elem) %7B%0A        if (Object.prototype.hasOwnProperty.call(elem, attr)) %7B%0A            result%5Battr%5D = elem%5Battr%5D;%0A        %7D%0A    %7D%0A%0A    return result;%0A%7D%0A%0A
 exports.
@@ -1954,16 +1954,29 @@
  return 
+jquery_array(
 elems%5Bse
@@ -1982,16 +1982,17 @@
 elector%5D
+)
 ;%0A%7D;%0A%0Aex

Add array-like functionality to elements.