define([
    "jquery"
], function($) {
    var jquery_plugin = function(pattern) {
        var plugin = function(method) {
            var $this = this;
            if ($this.length === 0)
                return $this;
            if (!method || typeof method === "object") {
                pattern.init.apply(
                    $this,
                    [$this].concat(Array.prototype.slice.call(arguments)));
            } else if (pattern[method]) {
                return pattern[method].apply(
                    $this,
                    [$this].concat(Array.prototype.slice.call(arguments, 1))
                );
            } else {
                $.error("Method " + method +
                        " does not exist on jQuery." + pattern.name);
            }
            return $this;
        };
        return plugin;
    };

    //     Underscore.js 1.3.1
    //     (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
    //     Underscore is freely distributable under the MIT license.
    //     Portions of Underscore are inspired or borrowed from Prototype,
    //     Oliver Steele's Functional, and John Resig's Micro-Templating.
    //     For all details and documentation:
    //     http://documentcloud.github.com/underscore
    //
    // Returns a function, that, as long as it continues to be invoked, will not
    // be triggered. The function will be called after it stops being called for
    // N milliseconds.
    var debounce = function(func, wait) {
        var timeout;
        return function() {
            var context = this, args = arguments;
            var later = function() {
                timeout = null;
                func.apply(context, args);
            };
            clearTimeout(timeout);
            timeout = setTimeout(later, wait);
        };
    };

    var rebaseURL = function(base, url) {
        if (url.indexOf("://")!==-1 || url[0]==="/")
            return url;
        return base.slice(0, base.lastIndexOf("/")+1) + url;
    };

    // Taken from http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
    var escapeRegExp = function(str) {
        return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
    };

    var utils = {
        // pattern pimping - own module?
        jquery_plugin: jquery_plugin,
        debounce: debounce,
        escapeRegExp: escapeRegExp,
        rebaseURL: rebaseURL
    };

    return utils;
});

@@ -1992,24 +1992,537 @@
 rl;%0A    %7D;%0A%0A
+    function findLabel(input) %7B%0A        for (var label=input.parentNode; label && label.nodeType!==11; label=label.parentNode)%0A            if (label.tagName===%22LABEL%22)%0A                return label;%0A%0A        var $label;%0A%0A        if (input.id)%0A            $label = $(%22label%5Bfor=%22+input.id+%22%5D%22);%0A        if ($label.length===0 && input.form)%0A            $label = $(%22#%22 + input.form + %22 label%5Bfor=%22+input.name+%22%5D%22);%0A        if ($label.length)%0A            return $label%5B0%5D;%0A        else%0A            return null;%0A    %7D%0A%0A
     // Taken
@@ -2923,16 +2923,46 @@
 ebaseURL
+,%0A        findLabel: findLabel
 %0A    %7D;%0A

Add utility method to find labels.