PageSourceSearch

https://mylearning.asce.org/resource/scripts/all-min.js?v=abca54b4

js asce.org collected 2026-10-01 08:48:43 UTC 104,501 bytes, 2,039 lines download raw bytes

1function autoAdjustIframeHeight(iframe) {
2    var iframeWin;
3    iframe && (iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow).document.body && setTimeout(function() {
4        iframe.height = Math.max(iframeWin.document.documentElement.scrollHeight, iframeWin.document.body.scrollHeight) + 5;
5    }, 300);
6}
7
8!function($) {
9    $.lazy = function(options) {
10        "string" == typeof options.name && (options.name = [ options.name ]), $.each(options.name, function(i) {
11            var src = options.src, name = options.name[i], cache = options.cache || !0, i = options.isFunction || !0, isMethod = options.isMethod || !0, object = {};
12            function loadCSS(src, callback, self, name, arg) {
13                $.lazy.archive[src].status = "loading";
14                var p, node = document.createElement("link");
15                node.type = "text/css", node.rel = "stylesheet", node.href = src, 
16                node.media = "screen", $.lazy.getInsertBefore ? (p = document.getElementById($.lazy.getInsertBefore())).parentNode.insertBefore(node, p) : document.getElementsByTagName("head")[0].appendChild(node), 
17                $.lazy.archive[src].status = "loaded", callback && callback(self, name, arg);
18            }
19            function loadJS(src, callback, self, name, arg) {
20                $.lazy.archive[src].status = "loading", $.ajax({
21                    type: "GET",
22                    url: src,
23                    cache: cache,
24                    dataType: "script",
25                    success: function() {
26                        $.lazy.archive[src].status = "loaded", callback && callback(self, name, arg);
27                    }
28                });
29            }
30            function loadPlugin(self, name, arg) {
31                loadJS(src, function() {
32                    "object" == typeof self ? 0 < arg.length ? $(self)[name].apply(self, arg) : $(self)[name]() : $[name].apply(null, arg), 
33                    $.each($.lazy.archive[src].que, function(i) {
34                        i = $.lazy.archive[src].que[i];
35                        object[i.name].apply(i.self, i.arguments);
36                    }), $.lazy.archive[src].que = [];
37                }, self, name, arg);
38            }
39            $.lazy.archive[src] = {
40                status: "unloaded",
41                que: []
42            }, object[name] = function() {
43                var css, js, total, self = this, arg = arguments;
44                function loadDependencies(array, callback) {
45                    var src, length = array.length;
46                    for (array = array.reverse(); length-- && total--; ) src = array[length], 
47                    "undefined" == typeof $.lazy.archive[src] && ($.lazy.archive[src] = {
48                        status: "unloaded",
49                        que: []
50                    }), "unloaded" === $.lazy.archive[src].status ? total ? callback(src) : callback(src, function() {
51                        loadPlugin(self, name, arg);
52                    }) : total || loadPlugin(self, name, arg);
53                }
54                return "loaded" === $.lazy.archive[src].status ? $.each(this, function() {
55                    $(this)[name].apply(self, arg);
56                }) : "loading" === $.lazy.archive[src].status ? $.lazy.archive[src].que.push({
57                    name: name,
58                    self: self,
59                    arguments: arg
60                }) : ($.lazy.archive[src].status = "loading", options.dependencies ? (css = options.dependencies.css || [], 
61                js = options.dependencies.js || [], total = css.length + js.length, 
62                loadDependencies(css, loadCSS), loadDependencies(js, loadJS)) : loadPlugin(self, name, arg)), 
63                this;
64            }, isMethod && jQuery.fn.extend(object), i && jQuery.extend(object);
65        });
66    }, $.lazy.archive = {};
67}(jQuery), !function($) {
68    function log() {
69        var msg = "[jquery.form] " + Array.prototype.join.call(arguments, "");
70        window.console && window.console.log ? window.console.log(msg) : window.opera && window.opera.postError && window.opera.postError(msg);
71    }
72    $.fn.ajaxSubmit = function(options) {
73        if (this.length) {
74            var method, $form = this, action = ("function" == typeof options && (options = {
75                success: options
76            }), method = this.attr("method"), action = (action = (action = "string" == typeof (action = this.attr("action")) ? $.trim(action) : "") || window.location.href || "") && (action.match(/^([^#]+)/) || [])[1], 
77            options = $.extend(!0, {
78                url: action,
79                success: $.ajaxSettings.success,
80                type: method || "GET",
81                iframeSrc: /^https/i.test(window.location.href || "") ? "javascript:false" : "about:blank"
82            }, options), {});
83            if (this.trigger("form-pre-serialize", [ this, options, action ]), action.veto) log("ajaxSubmit: submit vetoed via form-pre-serialize trigger"); else if (options.beforeSerialize && !1 === options.beforeSerialize(this, options)) log("ajaxSubmit: submit aborted via beforeSerialize callback"); else {
84                var n, v, callbacks, oldSuccess, mp, a = this.formToArray(options.semantic);
85                if (options.data) for (n in options.extraData = options.data, options.data) if (options.data[n] instanceof Array) for (var k in options.data[n]) a.push({
86                    name: n,
87                    value: options.data[n][k]
88                }); else v = options.data[n], v = $.isFunction(v) ? v() : v, a.push({
89                    name: n,
90                    value: v
91                });
92                options.beforeSubmit && !1 === options.beforeSubmit(a, this, options) ? log("ajaxSubmit: submit aborted via beforeSubmit callback") : (this.trigger("form-submit-validate", [ a, this, options, action ]), 
93                action.veto ? log("ajaxSubmit: submit vetoed via form-submit-validate trigger") : (action = $.param(a), 
94                "GET" == options.type.toUpperCase() ? (options.url += (0 <= options.url.indexOf("?") ? "&" : "?") + action, 
95                options.data = null) : options.data = action, callbacks = [], options.resetForm && callbacks.push(function() {
96                    $form.resetForm();
97                }), options.clearForm && callbacks.push(function() {
98                    $form.clearForm();
99                }), !options.dataType && options.target ? (oldSuccess = options.success || function() {}, 
100                callbacks.push(function(data) {
101                    var fn = options.replaceTarget ? "replaceWith" : "html";
102                    $(options.target)[fn](data).each(oldSuccess, arguments);
103                })) : options.success && callbacks.push(options.success), options.success = function(data, status, xhr) {
104                    for (var context = options.context || options, i = 0, max = callbacks.length; i < max; i++) callbacks[i].apply(context, [ data, status, xhr || $form, $form ]);
105                }, action = 0 < $("input:file", this).length, mp = "multipart/form-data", 
106                mp = $form.attr("enctype") == mp || $form.attr("encoding") == mp, 
107                !1 !== options.iframe && (action || options.iframe || mp) ? options.closeKeepAlive ? $.get(options.closeKeepAlive, function() {
108                    fileUpload(a);
109                }) : fileUpload(a) : ($.browser.msie && "get" == method && "string" == typeof (action = $form[0].getAttribute("method")) && (options.type = action), 
110                $.ajax(options)), this.trigger("form-submit-notify", [ this, options ])));
111            }
112        } else log("ajaxSubmit: skipping submit process - no element selected");
113        return this;
114        function fileUpload(a) {
115            var i, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle, CLIENT_TIMEOUT_ABORT, SERVER_ABORT, data, doc, domCheckCount, callbackProcessed, toXml, parseJSON, httpData, s, form = $form[0], useProp = !!$.fn.prop;
116            if (a) for (i = 0; i < a.length; i++) $(form[a[i].name])[useProp ? "prop" : "attr"]("disabled", !1);
117            function getDoc(frame) {
118                return frame.contentWindow ? frame.contentWindow.document : frame.contentDocument || frame.document;
119            }
120            function doSubmit() {
121                var t = $form.attr("target"), a = $form.attr("action");
122                function checkState() {
123                    try {
124                        var state = getDoc(io).readyState;
125                        log("state = " + state), "uninitialized" == state.toLowerCase() && setTimeout(checkState, 50);
126                    } catch (e) {
127                        log("Server abort: ", e, " (", e.name, ")"), cb(SERVER_ABORT), 
128                        timeoutHandle && clearTimeout(timeoutHandle), timeoutHandle = undefined;
129                    }
130                }
131                form.setAttribute("target", id), method || form.setAttribute("method", "POST"), 
132                a != s.url && form.setAttribute("action", s.url), s.skipEncodingOverride || method && !/post/i.test(method) || $form.attr({
133                    encoding: "multipart/form-data",
134                    enctype: "multipart/form-data"
135                }), s.timeout && (timeoutHandle = setTimeout(function() {
136                    timedOut = !0, cb(CLIENT_TIMEOUT_ABORT);
137                }, s.timeout));
138                var extraInputs = [];
139                try {
140                    if (s.extraData) for (var n in s.extraData) extraInputs.push($('<input type="hidden" name="' + n + '" />').attr("value", s.extraData[n]).appendTo(form)[0]);
141                    s.iframeTarget || ($io.appendTo("body"), io.attachEvent ? io.attachEvent("onload", cb) : io.addEventListener("load", cb, !1)), 
142                    setTimeout(checkState, 15), form.submit();
143                } finally {
144                    form.setAttribute("action", a), t ? form.setAttribute("target", t) : $form.removeAttr("target"), 
145                    $(extraInputs).remove();
146                }
147            }
148            function cb(e) {
149                if (!xhr.aborted && !callbackProcessed) {
150                    try {
151                        doc = getDoc(io);
152                    } catch (ex) {
153                        log("cannot access response document: ", ex), e = SERVER_ABORT;
154                    }
155                    if (e === CLIENT_TIMEOUT_ABORT && xhr) xhr.abort("timeout"); else if (e == SERVER_ABORT && xhr) xhr.abort("server abort"); else if (doc && doc.location.href != s.iframeSrc || timedOut) {
156                        io.detachEvent ? io.detachEvent("onload", cb) : io.removeEventListener("load", cb, !1);
157                        var errMsg, status = "success";
158                        try {
159                            if (timedOut) throw "timeout";
160                            var isXml = "xml" == s.dataType || doc.XMLDocument || $.isXMLDoc(doc);
161                            if (log("isXml=" + isXml), !isXml && window.opera && (null == doc.body || "" == doc.body.innerHTML) && --domCheckCount) return log("requeing onLoad callback, DOM not available"), 
162                            void setTimeout(cb, 250);
163                            var ta, pre, b, docRoot = doc.body || doc.documentElement, dt = (xhr.responseText = docRoot ? docRoot.innerHTML : null, 
164                            xhr.responseXML = doc.XMLDocument || doc, isXml && (s.dataType = "xml"), 
165                            xhr.getResponseHeader = function(header) {
166                                return {
167                                    "content-type": s.dataType
168                                }[header];
169                            }, docRoot && (xhr.status = Number(docRoot.getAttribute("status")) || xhr.status, 
170                            xhr.statusText = docRoot.getAttribute("statusText") || xhr.statusText), 
171                            s.dataType || ""), scr = /(json|script|text)/.test(dt.toLowerCase());
172                            scr || s.textarea ? (ta = doc.getElementsByTagName("textarea")[0]) ? (xhr.responseText = ta.value, 
173                            xhr.status = Number(ta.getAttribute("status")) || xhr.status, 
174                            xhr.statusText = ta.getAttribute("statusText") || xhr.statusText) : scr && (pre = doc.getElementsByTagName("pre")[0], 
175                            b = doc.getElementsByTagName("body")[0], pre ? xhr.responseText = pre.textContent || pre.innerHTML : b && (xhr.responseText = b.innerHTML)) : "xml" != s.dataType || xhr.responseXML || null == xhr.responseText || (xhr.responseXML = toXml(xhr.responseText));
176                            try {
177                                data = httpData(xhr, s.dataType, s);
178                            } catch (e) {
179                                status = "parsererror", xhr.error = errMsg = e || status;
180                            }
181                        } catch (e) {
182                            log("error caught: ", e), status = "error", xhr.error = errMsg = e || status;
183                        }
184                        xhr.aborted && (log("upload aborted"), status = null), "success" === (status = xhr.status ? 200 <= xhr.status && xhr.status < 300 || 304 === xhr.status ? "success" : "error" : status) ? (s.success && s.success.call(s.context, data, "success", xhr), 
185                        g && $.event.trigger("ajaxSuccess", [ xhr, s ])) : status && (errMsg == undefined && (errMsg = xhr.statusText), 
186                        s.error && s.error.call(s.context, xhr, status, errMsg), 
187                        g) && $.event.trigger("ajaxError", [ xhr, s, errMsg ]), 
188                        g && $.event.trigger("ajaxComplete", [ xhr, s ]), g && !--$.active && $.event.trigger("ajaxStop"), 
189                        s.complete && s.complete.call(s.context, xhr, status), callbackProcessed = !0, 
190                        s.timeout && clearTimeout(timeoutHandle), setTimeout(function() {
191                            s.iframeTarget || $io.remove(), xhr.responseXML = null;
192                        }, 100);
193                    }
194                }
195            }
196            $(":input[name=submit],:input[id=submit]", form).length ? alert('Error: Form elements must not have name or id of "submit".') : ((s = $.extend(!0, {}, $.ajaxSettings, options)).context = s.context || s, 
197            id = "jqFormIO" + new Date().getTime(), s.iframeTarget ? null == (n = ($io = $(s.iframeTarget)).attr("name")) ? $io.attr("name", id) : id = n : ($io = $('<iframe name="' + id + '" src="' + s.iframeSrc + '" />')).css({
198                position: "absolute",
199                top: "-1000px",
200                left: "-1000px"
201            }), io = $io[0], xhr = {
202                aborted: 0,
203                responseText: null,
204                responseXML: null,
205                status: 0,
206                statusText: "n/a",
207                getAllResponseHeaders: function() {},
208                getResponseHeader: function() {},
209                setRequestHeader: function() {},
210                abort: function(status) {
211                    var e = "timeout" === status ? "timeout" : "aborted";
212                    log("aborting upload... " + e), this.aborted = 1, $io.attr("src", s.iframeSrc), 
213                    xhr.error = e, s.error && s.error.call(s.context, xhr, e, status), 
214                    g && $.event.trigger("ajaxError", [ xhr, s, e ]), s.complete && s.complete.call(s.context, xhr, e);
215                }
216            }, (g = s.global) && !$.active++ && $.event.trigger("ajaxStart"), g && $.event.trigger("ajaxSend", [ xhr, s ]), 
217            s.beforeSend && !1 === s.beforeSend.call(s.context, xhr, s) ? s.global && $.active-- : xhr.aborted || ((sub = form.clk) && (n = sub.name) && !sub.disabled && (s.extraData = s.extraData || {}, 
218            s.extraData[n] = sub.value, "image" == sub.type) && (s.extraData[n + ".x"] = form.clk_x, 
219            s.extraData[n + ".y"] = form.clk_y), CLIENT_TIMEOUT_ABORT = 1, SERVER_ABORT = 2, 
220            s.forceSync ? doSubmit() : setTimeout(doSubmit, 10), domCheckCount = 50, 
221            toXml = $.parseXML || function(s, doc) {
222                return window.ActiveXObject ? ((doc = new ActiveXObject("Microsoft.XMLDOM"))["async"] = "false", 
223                doc.loadXML(s)) : doc = new DOMParser().parseFromString(s, "text/xml"), 
224                doc && doc.documentElement && "parsererror" != doc.documentElement.nodeName ? doc : null;
225            }, parseJSON = $.parseJSON || function(s) {
226                return window.eval("(" + s + ")");
227            }, httpData = function(xhr, type, s) {
228                var ct = xhr.getResponseHeader("content-type") || "", xml = "xml" === type || !type && 0 <= ct.indexOf("xml"), xhr = xml ? xhr.responseXML : xhr.responseText;
229                return xml && "parsererror" === xhr.documentElement.nodeName && $.error && $.error("parsererror"), 
230                "string" == typeof (xhr = s && s.dataFilter ? s.dataFilter(xhr, type) : xhr) && ("json" === type || !type && 0 <= ct.indexOf("json") ? xhr = parseJSON(xhr) : ("script" === type || !type && 0 <= ct.indexOf("javascript")) && $.globalEval(xhr)), 
231                xhr;
232            }));
233        }
234    }, $.fn.ajaxForm = function(options) {
235        var o;
236        return 0 === this.length ? (o = {
237            s: this.selector,
238            c: this.context
239        }, !$.isReady && o.s ? (log("DOM not ready, queuing ajaxForm"), $(function() {
240            $(o.s, o.c).ajaxForm(options);
241        })) : log("terminating; zero elements found by selector" + ($.isReady ? "" : " (DOM not ready)")), 
242        this) : this.ajaxFormUnbind().bind("submit.form-plugin", function(e) {
243            e.isDefaultPrevented() || (e.preventDefault(), $(this).ajaxSubmit(options));
244        }).bind("click.form-plugin", function(e) {
245            var target = e.target, $el = $(target);
246            if (!$el.is(":submit,input:image")) {
247                var t = $el.closest(":submit");
248                if (0 == t.length) return;
249                target = t[0];
250            }
251            var form = this;
252            "image" == (form.clk = target).type && (e.offsetX != undefined ? (form.clk_x = e.offsetX, 
253            form.clk_y = e.offsetY) : "function" == typeof $.fn.offset ? (t = $el.offset(), 
254            form.clk_x = e.pageX - t.left, form.clk_y = e.pageY - t.top) : (form.clk_x = e.pageX - target.offsetLeft, 
255            form.clk_y = e.pageY - target.offsetTop)), setTimeout(function() {
256                form.clk = form.clk_x = form.clk_y = null;
257            }, 100);
258        });
259    }, $.fn.ajaxFormUnbind = function() {
260        return this.unbind("submit.form-plugin click.form-plugin");
261    }, $.fn.formToArray = function(semantic) {
262        var a = [];
263        if (0 !== this.length) {
264            var form = this[0], els = semantic ? form.getElementsByTagName("*") : form.elements;
265            if (els) {
266                for (var j, v, el, jmax, $input, input, n, i = 0, max = els.length; i < max; i++) if (n = (el = els[i]).name) if (semantic && form.clk && "image" == el.type) el.disabled || form.clk != el || (a.push({
267                    name: n,
268                    value: $(el).val()
269                }), a.push({
270                    name: n + ".x",
271                    value: form.clk_x
272                }, {
273                    name: n + ".y",
274                    value: form.clk_y
275                })); else if ((v = $.fieldValue(el, !0)) && v.constructor == Array) for (j = 0, 
276                jmax = v.length; j < jmax; j++) a.push({
277                    name: n,
278                    value: v[j]
279                }); else null != v && a.push({
280                    name: n,
281                    value: v
282                });
283                !semantic && form.clk && (n = (input = ($input = $(form.clk))[0]).name) && !input.disabled && "image" == input.type && (a.push({
284                    name: n,
285                    value: $input.val()
286                }), a.push({
287                    name: n + ".x",
288                    value: form.clk_x
289                }, {
290                    name: n + ".y",
291                    value: form.clk_y
292                }));
293            }
294        }
295        return a;
296    }
296, $.fn.formSerialize = function(semantic) {
297        return $.param(this.formToArray(semantic));
298    }, $.fn.fieldSerialize = function(successful) {
299        var a = [];
300        return this.each(function() {
301            var n = this.name;
302            if (n) {
303                var v = $.fieldValue(this, successful);
304                if (v && v.constructor == Array) for (var i = 0, max = v.length; i < max; i++) a.push({
305                    name: n,
306                    value: v[i]
307                }); else null != v && a.push({
308                    name: this.name,
309                    value: v
310                });
311            }
312        }), $.param(a);
313    }, $.fn.fieldValue = function(successful) {
314        for (var val = [], i = 0, max = this.length; i < max; i++) {
315            var el = this[i], el = $.fieldValue(el, successful);
316            null == el || el.constructor == Array && !el.length || (el.constructor == Array ? $.merge(val, el) : val.push(el));
317        }
318        return val;
319    }, $.fieldValue = function(el, successful) {
320        var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
321        if ((successful = successful === undefined ? !0 : successful) && (!n || el.disabled || "reset" == t || "button" == t || ("checkbox" == t || "radio" == t) && !el.checked || ("submit" == t || "image" == t) && el.form && el.form.clk != el || "select" == tag && -1 == el.selectedIndex)) return null;
322        if ("select" != tag) return $(el).val();
323        successful = el.selectedIndex;
324        if (successful < 0) return null;
325        for (var a = [], ops = el.options, one = "select-one" == t, max = one ? successful + 1 : ops.length, i = one ? successful : 0; i < max; i++) {
326            var op = ops[i];
327            if (op.selected) {
328                var v = (v = op.value) || (op.attributes && op.attributes.value && !op.attributes.value.specified ? op.text : op.value);
329                if (one) return v;
330                a.push(v);
331            }
332        }
333        return a;
334    }, $.fn.clearForm = function() {
335        return this.each(function() {
336            $("input,select,textarea", this).clearFields();
337        });
338    }, $.fn.clearFields = $.fn.clearInputs = function() {
339        var re = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;
340        return this.each(function() {
341            var t = this.type, tag = this.tagName.toLowerCase();
342            re.test(t) || "textarea" == tag ? this.value = "" : "checkbox" == t || "radio" == t ? this.checked = !1 : "select" == tag && (this.selectedIndex = -1);
343        });
344    }, $.fn.resetForm = function() {
345        return this.each(function() {
346            "function" != typeof this.reset && ("object" != typeof this.reset || this.reset.nodeType) || this.reset();
347        });
348    }, $.fn.enable = function(b) {
349        return b === undefined && (b = !0), this.each(function() {
350            this.disabled = !b;
351        });
352    }, $.fn.selected = function(select) {
353        return select === undefined && (select = !0), this.each(function() {
354            var t = this.type;
355            "checkbox" == t || "radio" == t ? this.checked = select : "option" == this.tagName.toLowerCase() && (t = $(this).parent("select"), 
356            select && t[0] && "select-one" == t[0].type && t.find("option").selected(!1), 
357            this.selected = select);
358        });
359    };
360}(jQuery), !function() {
361    var object = "undefined" != typeof exports ? exports : "undefined" != typeof self ? self : $.global, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
362    function InvalidCharacterError(message) {
363        this.message = message;
364    }
365    (InvalidCharacterError.prototype = new Error()).name = "InvalidCharacterError", 
366    object.btoa || (object.btoa = function(input) {
367        for (var block, charCode, str = String(input), idx = 0, map = chars, output = ""; str.charAt(0 | idx) || (map = "=", 
368        idx % 1); output += map.charAt(63 & block >> 8 - idx % 1 * 8)) {
369            if (255 < (charCode = str.charCodeAt(idx += .75))) throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");
370            block = block << 8 | charCode;
371        }
372        return output;
373    }), object.atob || (object.atob = function(input) {
374        var str = String(input).replace(/[=]+$/, "");
375        if (str.length % 4 == 1) throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded.");
376        for (var bs, buffer, bc = 0, idx = 0, output = ""; buffer = str.charAt(idx++); ~buffer && (bs = bc % 4 ? 64 * bs + buffer : buffer, 
377        bc++ % 4) && (output += String.fromCharCode(255 & bs >> (-2 * bc & 6)))) buffer = chars.indexOf(buffer);
378        return output;
379    });
380}(), !function($) {
381    String.prototype.format || (String.prototype.format = function() {
382        for (var s, param = 1 === arguments.length && "object" == typeof arguments[0] ? arguments[0] : arguments, i = 0, result = []; -1 !== (s = this.indexOf("{", i)); ) if (result.push(this.slice(i, s)), 
383        "{" === this[s + 1]) i = s + 2, result.push("{"); else {
384            if (-1 === (i = this.indexOf("}", s + 1))) throw "incorrect format: {0}".format(this);
385            result.push(param[this.slice(s + 1, i)]), i++;
386        }
387        return result.push(this.slice(i)), result.join("");
388    }, String.format = function(str) {
389        return String.prototype.format.apply(str, Array.prototype.slice.call(arguments, 1));
390    }), String.prototype.truncate || (String.prototype.truncate = function(len, elipsis) {
391        if (this.length <= len) return "" + this;
392        var i, str = (str = (str = this.replace(/<br\s*\/?>/gi, " ")).replace(/<.*?>/g, "")).replace(/\s+/, " ");
393        if (!(str.length <= len) && str.length > len + (elipsis ? 3 : 0)) {
394            for (i = len; i < str.length && " " != str.charAt(i); ) i++;
395            if (i == str.length - 1) return str;
396            str = str.substring(0, i) + (elipsis ? "..." : "");
397        }
398        return str;
399    }, String.format = function(str) {
400        return String.prototype.format.apply(str, Array.prototype.slice.call(arguments, 1));
401    }), $.fn.goTo = function() {
402        return $("html, body").animate({
403            scrollTop: $(this).offset().top + "px"
404        }, "fast"), this;
405    }, window.DI || (window.DI = {}), DI.onDomReady = function(cb) {
406        $(function($) {
407            cb($);
408        });
409    }, DI.util || (DI.util = {}), DI.util.relativePath = function(p, v, s) {
410        var ext;
411        return "development" == __mode || "undefined" != s || ".js" != (ext = -1 == (s = p.lastIndexOf(".")) ? "" : p.substring(s)) && ".css" != ext || (p = p.substring(0, s) + ".min" + ext), 
412        void 0 !== v && (p = (p += -1 == p.indexOf("?") ? "?v" : "&v=") + escape(v)), 
413        __res + p;
414    }, DI.util.DocumentClickHandler = function() {
415        this.init();
416    }, DI.util.DocumentClickHandler.prototype = {
417        init: function() {
418            var controls = [];
419            $(document).click(function(e) {
420                var tmp;
421                0 != controls.length && (tmp = [], $.each(controls, function(idx) {
422                    var opts;
423                    tmp.push(this), this.is(":visible") && !this.data("__focus") && ((opts = this.data("__opts") || {}).before && opts.before(), 
424                    opts.click ? opts.click() : this.hide(), opts.after && opts.after(), 
425                    "undefined" != typeof opts.unregister && !opts.unregister || tmp.pop());
426                }), controls = tmp);
427            }), this.register = function($c, o) {
428                o && $c.data("__opts", o), controls.push($c), $c.hover(function() {
429                    $(this).data("__focus", !0);
430                }, function() {
431                    $(this).data("__focus", !1);
432                });
433            }, this.unregister = function($c) {
434                var tmp = [];
435                $.each(controls, function(idx) {
436                    this != $c && tmp.push(this);
437                }), controls = tmp;
438            };
439        }
440    };
441    var docClickHandler = new DI.util.DocumentClickHandler();
442    DI.registerOnDocumentClick = docClickHandler.register, DI.unregisterOnDocumentClick = docClickHandler.unregister, 
443    DI.delay = function(ms, cb) {
444        setTimeout(cb, ms);
445    }, DI.delayUntil = function(cond, cb, freq, n) {
446        var i, ncb;
447        cond() ? cb() : (n = n || 10, freq = freq || 10, i = 0, ncb = function() {
448            cond() ? cb() : i < n && (i++, DI.delay(freq, ncb));
449        }, DI.delay(freq, ncb));
450    }, DI.contextPath = function(secure, href) {
451        var href = href || document.location.href, j = href.indexOf("://"), p = href.substring(0, j), i = j + 3;
452        return i = href.indexOf("/", i) + 1, i = href.indexOf("/", i), void 0 !== secure && (secure && 4 == j ? p = "https" : secure || 5 != j || (p = "http")), 
453        p + (href = href.substring(j, i));
454    }, DI.keepalive = function() {
455        var url = DI.contextPath() + "/keepalive?json";
456        $.getJSON(url, {
457            ts: new Date().getTime()
458        }, function(data) {
459            data.max && DI.delay(1e3 * (data.max - 30), DI.keepalive);
460        });
461    }, DI.cookie = function(name) {
462        var c, start;
463        return !document.cookie || !document.cookie.length || -1 == (start = (c = document.cookie).indexOf(name + "=")) ? null : (start += name.length + 1, 
464        -1 == (name = c.indexOf(";", start)) && (name = c.length), unescape(c.substring(start, name)));
465    }, DI.util.handleWicketResponse = function(xml) {
466        xml && $(xml).find("component").each(function() {
467            var $c = $(this), id = $c.attr("id"), $c = $.trim($c.text().replace(/\]\^/g, "]"));
468            $("#" + id).replaceWith($c);
469        }).end().find("evaluate").each(function() {
470            eval($(this).text().replace(/\]\^/g, "]"));
471        });
472    }, DI.util.ajaxForms = function(id, selector) {
473        var selector = $(selector || "form", "#" + id), o = {
474            beforeSend: function(xhr) {
475                xhr.setRequestHeader("DI-Ajax", "true");
476            }
477        };
478        selector.each(function(idx) {
479            var $s = $("input:submit", this);
480            $s && DI.util.ajaxForm($(this).attr("id"), $s.attr("id"), o);
481        });
482    }, DI.util.ajaxForm = function(formId, submitId, options) {
483        var formId = $("#" + formId), $sbtn = $("#" + submitId), submitId = $sbtn.attr("rel"), o = {
484            dataType: "xml",
485            beforeSend: function(xhr) {
486                xhr.setRequestHeader("Wicket-Ajax", "true");
487            },
488            complete: function(xhr, status) {
489                $sbtn.removeProp("disabled"), "success" != status && "parsererror" != status || (status = xhr.getResponseHeader("Ajax-Location") || xhr.getResponseHeader("Location")) && (window.location = status);
490            },
491            beforeSubmit: function(formData, jqForm, options) {
492                var result = !0;
493                return jqForm.data("onsubmit") && (jqForm[0].onsubmit = jqForm.data("onsubmit"), 
494                result = jqForm[0].onsubmit(), jqForm[0].onsubmit = null), result && $sbtn.prop("disabled", !0), 
495                result;
496            },
497            success: function(data) {
498                DI.util.handleWicketResponse(data);
499            },
500            error: function(xhr, status, thrown) {}
501        };
502        submitId && ($sbtn.removeAttr("rel").removeAttr("onclick"), formId.attr("action", submitId)), 
503        $sbtn.removeProp("disabled"), $.extend(!0, o, options || {}), formId.ajaxForm(o).each(function() {
504            $(this).data("onsubmit", this.onsubmit), this.onsubmit = null;
505        }).submit(function() {});
506    }, DI.util.setFieldValue = function(id, value) {
507        $("#" + id).val(value);
508    }, DI.util.fadeOut = function(id, options) {
509        var o = {
510            delay: 30,
511            speed: "slow"
512        };
513        $.extend(!0, o, options || {}), DI.delay(1e3 * o.delay, function() {
514            var $e = $("#" + id);
515            ($e = o.selector ? $(o.selector, $e) : $e).fadeOut(o.speed);
516        });
517    }, DI.util.setUrlHash = function(hash) {
518        var ihistory;
519        $.browser.msie && "6.0" == $.browser.version || ($.browser.safari && ($.history._dontCheck = !0, 
520        $.history.add(hash)), hash = "#" + hash, $.browser.msie && (0 == $("#jQuery_history").length && $.history.init(pageLoad), 
521        null != (ihistory = (ihistory = $("#jQuery_history")[0]).contentDocument || ihistory.contentWindow.document)) && (hash != location.hash && (ihistory.open(), 
522        ihistory.close()), ihistory.location.hash = hash), location.hash = hash, 
523        curhash = location.hash);
524    }, DI.util.print = function(id, options) {
525        var $f, o = {
526            title: document.title
527        }, $e = $("#" + id), id = $e.get(0).tagName.toLowerCase();
528        $.extend(!0, o, options || {});
529        try {
530            "iframe" != id && "frame" != id ? (($f = $("#ifrm-print")).length || ($("body").append($("<iframe />").attr({
531                id: "ifrm-print",
532                src: "#",
533                style: "width:0;height:0"
534            })), $f = $("#ifrm-print")), DI.delay(1, function() {
535                var f, $links = $("<div />"), $cnt = $("<div />"), $footer = $("<div />");
536                $links.append($("link[rel=stylesheet]").clone()), $cnt.append($e.clone()), 
537                $footer.append($("div.copyright", "#footer").clone()), (f = (f = (f = $f.get(0)).contentWindow || f.contentDocument).document ? f.document : f).open(), 
538                f.write('<html><head><title>{0}</title>{2}<head><body onload="this.focus();this.print()">{1}<br /><br /><br /><div id="footer">{3}</div></body></html>'.format(o.title, $cnt.html(), $links.html(), $footer.html())), 
539                f.close();
540            })) : ($e.focus(), $e.print());
541        } catch (e) {
542            window.print();
543        }
544    }, DI.util.trackPage = function(url) {
545        var url2, path;
546        (window._gaq || window.ga) && (path = url.toLowerCase(), url2 = url, -1 < (path = 0 === path.indexOf("http://") ? 7 : 0 === path.indexOf("https://") ? 8 : -1) && (url2 = -1 < (path = url.indexOf("/", path)) ? url.substring(path) : "/"), 
547        window._gaq && _gaq.push([ "_trackPageview", url2 ]), window.ga) && ga("send", "pageview", url2);
548    }, DI.util.trackEvent = function(category, action, label, value) {
549        var data;
550        window._gaq && (data = [ "_trackEvent", category, action ], label && data.push(label), 
551        void 0 !== value && (label || data.push(""), data.push(value)), _gaq.push(data)), 
552        window.ga && (data = {
553            hitType: "event",
554            eventCategory: category,
555            eventAction: action
556        }, label && (data.eventLabel = label), void 0 !== value && (data.eventValue = value), 
557        ga("send", data));
558    }, DI.util.disableForm = function(e) {
559        DI.util.toggleForm(e, !0);
560    }, DI.util.enableForm = function(e) {
561        DI.util.toggleForm(e, !1);
562    }, DI.util.toggleForm = function(e, enabled) {
563        e = $(e).find(":input");
564        e.prop("disabled", enabled), e.prop("readonly", enabled);
565    }, DI.util.inFrame = function() {
566        try {
567            return window.self !== window.top;
568        } catch (e) {
569            return !0;
570        }
571    }, DI.util.scrollTop = function() {
572        $("html, body").animate({
573            scrollTop: 0
574        }, "fast");
575    }, DI.util.copyToClipboard = function(str, callback) {
576        if (str = str || "", window.navigator.clipboard) window.navigator.clipboard.writeText(str).then(callback); else {
577            var el = document.createElement("textarea");
578            el.style.position = "fixed", el.style.top = "0", el.style.left = "0", 
579            el.value = str || "", document.body.appendChild(el), el.focus(), el.select(), 
580            el.setSelectionRange(0, str.length + 1);
581            try {
582                document.execCommand("copy");
583            } catch (ignored) {}
584            document.body.removeChild(el), callback();
585        }
586    };
587}(jQuery), !function($) {
588    var rpath = DI.util.relativePath, ver = {
589        cluetip: "1.2",
590        colorpicker: "052309",
591        rating: "3.13",
592        boxy: ".1.7",
593        autocomplete: "1.1",
594        nicEdit: ".9.r23",
595        layout: "1.2.0",
596        countdown: "1.5.8",
597        tooltip: "1.1.2",
598        media: ".92",
599        cycle: "2.99",
600        validate: "1.13.1",
601        Jcrop: "0.9.9",
602        jclock: "2.2.0",
603        jflow: "1.2",
604        forumWidget: "1.1",
605        timePicker: "0.3",
606        icalendar: "1.1",
607        jwplayer: "6.10.4906",
608        jwplayer7: "7.9.1",
609        jwplayer8: "8.0.0",
610        jwplayer_cloud: "jwplayer_cloud",
611        chosen: "0.9.5",
612        select2: "4.0.5",
613        lightBox: "0.5",
614        highlight: "0.1.1",
615        multiselect: "1.14pre",
616        phototagger: "2010_02_05",
617        tooltipster: "3.2.4",
618        iosSlider: "1.3",
619        tinyNav: "1.2",
620        royalSlider: "9.5.4",
621        hoverIntent: "1.8",
622        responsiveTabs: "1.4",
623        gridalicious: "3.01",
624        popover: "3.3.6",
625        modal: "3.3.6",
626        bootbox: "4.4.0",
627        owlCarousel: "2.0",
628        codemirror: "5.21",
629        timeoutDialog: "1.0.1",
630        gridder: "1.4.2",
631        toastr: "2.1.3",
632        dropdown: "3.3.7",
633        catalogTags: "1.0",
634        browseMultiLevelTags: "1.0",
635        ajaxProductSearch: "1.0"
636    };
637    function setupForAbsoluteURL(opt, url) {
638        if (opt.captions) {
639            console.log("captions found!");
640            for (var playlist = [ {
641                image: "",
642                sources: [ {
643                    file: url
644                } ]
645            } ], tracks = [], captions = JSON.parse(opt.captions), lang = Object.keys(captions), i = 0; i < lang.length; i++) tracks.push({
646                kind: "captions",
647                file: captions[lang[i]],
648                label: lang[i]
649            });
650            Object.assign(playlist[0], {
651                tracks: tracks
652            }), opt.playlist = playlist;
653        } else opt.file = url;
654    }
655    $.lazy.getInsertBefore = function() {
656        return "custom_css";
657    }, $.lazy({
658        src: rpath("ui/bootstrap/modal.js", ver.modal),
659        name: "modal",
660        cache: !0,
661        dependencies: {
662            css: [ rpath("ui/bootstrap/modal.css", ver.modal) ]
663        }
664    }), $.lazy({
665        src: rpath("ui/bootstrap/dropdown.js", ver.dropdown),
666        name: "dropdown",
667        cache: !0,
668        dependencies: {
669            css: [ rpath("ui/bootstrap/dropdown.css", ver.dropdown) ]
670        }
671    }), $.lazy({
672        src: rpath("ui/bootbox/jquery.bootbox.js", ver.bootbox),
673        name: "bootbox",
674        cache: !0,
675        dependencies: {
676            js: [ rpath("ui/bootstrap/modal.js", ver.modal), rpath("ui/bootbox/bootbox.js", ver.bootbox) ],
677            css: [ rpath("ui/bootstrap/modal.css", ver.modal) ]
678        }
679    }), $.lazy({
680        src: rpath("ui/bootstrap/popover.js", ver.popover),
681        name: "popover",
682        cache: !0,
683        dependencies: {
684            js: [ rpath("ui/bootstrap/tooltip.js") ],
685            css: [ rpath("ui/bootstrap/tooltip-popover.css", ver.popover) ]
686        }
687    }), $.lazy({
688        src: rpath("ui/cluetip/jquery.cluetip.js", ver.cluetip),
689        name: "cluetip",
690        cache: !0,
691        dependencies: {
692            js: [ rpath("ui/common/jquery.hoverIntent.js"), rpath("ui/common/jquery.bg
692iframe.js", ver.bgiframe) ],
693            css: [ rpath("ui/cluetip/jquery.cluetip.css", ver.cluetip) ]
694        }
695    }), $.lazy({
696        src: rpath("ui/colorpicker/js/colorpicker.js", ver.colorpicker),
697        name: "ColorPicker",
698        cache: !0,
699        dependencies: {
700            css: [ rpath("ui/colorpicker/css/colorpicker.css", ver.colorpicker) ]
701        }
702    }), $.lazy({
703        src: rpath("ui/star-rating/jquery.rating.js", ver.rating),
704        name: "rating",
705        cache: !0,
706        dependencies: {
707            js: [ rpath("ui/common/jquery.MetaData.js") ],
708            css: [ rpath("ui/star-rating/jquery.rating.css", ver.rating) ]
709        }
710    }), $.lazy({
711        src: rpath("ui/boxy/javascripts/jquery.boxy.js", ver.boxy),
712        name: "boxy",
713        cache: !0,
714        dependencies: {
715            css: [ rpath("ui/boxy/stylesheets/boxy.css", ver.boxy) ]
716        }
717    }), $.lazy({
718        src: rpath("ui/autocomplete/jquery.autocomplete.js", ver.autocomplete),
719        name: "autocomplete",
720        cache: !0,
721        dependencies: {
722            js: [ rpath("ui/common/jquery.ajaxQueue.js"), rpath("ui/common/jquery.bgiframe.js", ver.bgiframe) ],
723            css: [ rpath("ui/autocomplete/jquery.autocomplete.css", ver.autocomplete) ]
724        }
725    }), $.lazy({
726        src: rpath("ui/timepicker/jquery-timepicker.js", ver.timePicker),
727        name: "timePicker",
728        cache: !0,
729        dependencies: {
730            css: [ rpath("ui/timepicker/timePicker.css", ver.timePicker) ]
731        }
732    }), $.lazy({
733        src: rpath("ui/nicEdit/jquery.nicEdit.js", ver.nicEdit),
734        name: "wysiwyg",
735        cache: !0,
736        dependencies: {
737            js: [ rpath("ui/nicEdit/nicEdit.js", ver.nicEdit) ]
738        }
739    }), $.lazy({
740        src: rpath("ui/layout/jquery.layout.js", ver.layout),
741        name: "layout",
742        cache: !0
743    }), $.lazy({
744        src: rpath("ui/countdown/jquery.countdown.js", ver.countdown),
745        name: "countdown",
746        cache: !0
747    }), $.lazy({
748        src: rpath("ui/tooltip/jquery.tooltip.js", ver.tooltip),
749        name: "tooltip",
750        cache: !0
751    }), $.lazy({
752        src: rpath("ui/tooltipster/jquery.tooltipster.js", ver.tooltipster),
753        name: "tooltipster",
754        cache: !0
755    }), $.lazy({
756        src: rpath("ui/iosslider/iosslider.js", ver.iosSlider),
757        name: "iosSlider",
758        cache: !0
759    }), $.lazy({
760        src: rpath("ui/tinynav/tinynav.js", ver.tinyNav),
761        name: "tinyNav",
762        cache: !0
763    }), $.lazy({
764        src: rpath("ui/media/jquery.media.js", ver.media),
765        name: "media",
766        cache: !0
767    }), $.lazy({
768        src: rpath("ui/media/jquery.jwplayer.js", ver.jwplayer),
769        name: "jwplayer",
770        cache: !0,
771        dependencies: {
772            js: [ rpath("ui/media/6.1/jwplayer.js", ver.jwplayer) ]
773        }
774    }), $.lazy({
775        src: rpath("ui/media/jquery.jwplayer7.js", ver.jwplayer7),
776        name: "jwplayer7",
777        cache: !0,
778        dependencies: {
779            js: [ rpath("ui/media/7.9/jwplayer.js", ver.jwplayer7) ]
780        }
781    }), $.lazy({
782        src: rpath("ui/media/jquery.jwplayer8.js", ver.jwplayer7),
783        name: "jwplayer8",
784        cache: !0,
785        dependencies: {
786            js: [ rpath("ui/media/8.0/jwplayer.js", ver.jwplayer7) ]
787        }
788    }), $.lazy({
789        src: rpath("ui/media/jquery.jwplayer_cloud.js", ver.jwplayer_cloud),
790        name: "jwplayer_cloud",
791        cache: !0,
792        dependencies: {
793            js: [ "https://cdn.jwplayer.com/libraries/SB3QTmc8.js" ]
794        }
795    }), $.lazy({
796        src: rpath("ui/cycle/jquery.cycle.all.js", ver.cycle),
797        name: "cycle",
798        cache: !0
799    }), $.lazy({
800        src: rpath("ui/common/jquery.bgiframe.js", ver.bgiframe),
801        name: "bgiframe",
802        cache: !0
803    }), $.lazy({
804        src: rpath("ui/validation/jquery.validate.js", ver.validate),
805        name: "validate",
806        cache: !0
807    }), $.lazy({
808        src: rpath("ui/jclock/jquery.jclock.js", ver.jclock),
809        name: "jclock",
810        cache: !0
811    }), $.lazy({
812        src: rpath("ui/slider/jflow.plus.js", ver.jflow),
813        name: "jFlow",
814        cache: !0,
815        dependencies: {
816            css: [ rpath("ui/slider/styles/style.css", ver.jflow) ]
817        }
818    }), $.lazy({
819        src: rpath("ui/jcrop/jquery.Jcrop.js", ver.Jcrop),
820        name: "Jcrop",
821        cache: !0,
822        dependencies: {
823            js: [ rpath("ui/common/jquery.color.js", ver.Jcrop) ],
824            css: [ rpath("ui/jcrop/css/jquery.Jcrop.css", ver.Jcrop) ]
825        }
826    }), $.lazy({
827        src: rpath("ui/widgets/forum.widgets.js", ver.forumWidget),
828        name: "forumWidget",
829        cache: !0
830    }), $.lazy({
831        src: rpath("ui/ical/jquery.icalendar.js", ver.icalendar),
832        name: "icalendar",
833        cache: !0,
834        dependencies: {
835            css: [ rpath("ui/ical/jquery.icalendar.css", ver.icalendar) ]
836        }
837    }), $.lazy({
838        src: rpath("ui/chosen/chosen.jquery.js", ver.chosen),
839        name: "chosen",
840        cache: !0,
841        dependencies: {
842            css: [ rpath("ui/chosen/chosen.css", ver.chosen) ]
843        }
844    }), $.lazy({
845        src: rpath("ui/select2/select2.js", ver.select2),
846        name: "select2",
847        cache: !0,
848        dependencies: {
849            css: [ rpath("ui/select2/select2.css", ver.select2) ]
850        }
851    }), $.lazy({
852        src: rpath("ui/lightbox/js/jquery.lightbox.js", ver.lightBox),
853        name: "lightBox",
854        cache: !0,
855        dependencies: {
856            css: [ rpath("ui/lightbox/css/jquery.lightbox.css", ver.lightBox) ]
857        }
858    }), $.lazy({
859        src: rpath("ui/highlight/highlightRegex.js", ver.highlight),
860        name: "highlightRegex",
861        cache: !0
862    }), $.lazy({
863        src: rpath("ui/multiselect/jquery.multiselect.js", ver.multiselect),
864        name: "multiselect",
865        cache: !0,
866        dependencies: {
867            css: [ rpath("ui/multiselect/jquery.multiselect.css", ver.multiselect) ]
868        }
869    }), $.lazy({
870        src: rpath("ui/multiselect/jquery.multiselect.filter.js", ver.multiselect),
871        name: "multiselectfilter",
872        cache: !0,
873        dependencies: {
874            css: [ rpath("ui/multiselect/jquery.multiselect.filter.css", ver.multiselect) ]
875        }
876    }), $.lazy({
877        src: rpath("ui/phototagger/phototagger.jquery.js", ver.phototagger),
878        name: "photoTagger",
879        cache: !0
880    }), $.lazy({
881        src: rpath("ui/royalslider/jquery.royalslider.js", ver.royal
881Slider),
882        name: "royalSlider",
883        cache: !0,
884        dependencies: {
885            css: [ rpath("ui/royalslider/royalslider.css", ver.royalSlider) ]
886        }
887    }), $.lazy({
888        src: rpath("ui/owlCarousel/owl.carousel.js", ver.owlCarousel),
889        name: "owlCarousel",
890        cache: !0,
891        dependencies: {
892            css: [ rpath("ui/owlCarousel/assets/owl.carousel.css", ver.owlCarousel) ]
893        }
894    }), $.lazy({
895        src: rpath("ui/common/jquery.hoverIntent.js", ver.hoverIntent),
896        name: "hoverIntent",
897        cache: !0
898    }), $.lazy({
899        src: rpath("ui/responsiveTabs/jquery.responsiveTabs.js", ver.responsiveTabs),
900        name: "responsiveTabs",
901        cache: !0
902    }), $.lazy({
903        src: rpath("ui/gridalicious/jquery.grid-a-licious.js", ver.gridalicious),
904        name: "gridalicious",
905        cache: !0
906    }), $.lazy({
907        src: rpath("ui/truncate/trunk8.js", ver.trunk8),
908        name: "trunk8",
909        cache: !0
910    }), $.lazy({
911        src: rpath("ui/codemirror/codemirror.jquery.js", ver.codemirror),
912        name: "codemirror",
913        cache: !0,
914        dependencies: {
915            css: [ rpath("ui/codemirror/codemirror-custom.css", ver.codemirror) ],
916            js: [ rpath("ui/codemirror/codemirror-custom.js", ver.codemirror) ]
917        }
918    }), $.lazy({
919        src: rpath("ui/timeoutdialog/js/timeout-dialog.js", ver.timeoutDialog),
920        name: "timeoutDialog",
921        cache: !0,
922        dependencies: {
923            css: [ rpath("ui/timeoutdialog/css/timeout-dialog.css", ver.timeoutDialog) ]
924        }
925    }), $.lazy({
926        src: rpath("ui/gridder/jquery.gridder.js", ver.gridder),
927        name: "gridderExpander",
928        cache: !0,
929        dependencies: {
930            css: [ rpath("ui/gridder/jquery.gridder.css", ver.gridder) ]
931        }
932    }), $.lazy({
933        src: rpath("ui/toastr/jquery.toastr.js", ver.toastr),
934        name: "toastr",
935        cache: !0,
936        dependencies: {
937            js: [ rpath("ui/toastr/toastr.js", ver.toastr) ],
938            css: [ rpath("ui/toastr/toastr.css", ver.gridder) ]
939        }
940    }), $.lazy({
941        src: rpath("ui/widgets/catalog.tags.widget.js", ver.catalogTags),
942        name: "TagResultListWidget",
943        cache: !0,
944        dependencies: {
945            js: [ rpath("ui/owlCarousel/owl.carousel.js", ver.owlCarousel) ],
946            css: [ rpath("ui/owlCarousel/assets/owl.carousel.css", ver.owlCarousel) ]
947        }
948    }), $.lazy({
949        src: rpath("ui/widgets/browse.multilevel.tags.widget.js", ver.browseMultiLevelTags),
950        name: "BrowseMultiLevelTagsWidget",
951        cache: !0
952    }), $.lazy({
953        src: rpath("ui/widgets/ajax.product.search.js", ver.ajaxProductSearch),
954        name: "ajaxProductSearch",
955        cache: !0
956    }), DI.ui = {
957        tabs: function(id, options) {
958            var o = {};
959            $.extend(!0, o, options || {}), $("#" + id).tabs(o);
960        },
961        tabView: function(id, options) {
962            var o = {};
963            $.extend(!0, o, options || {}), $("ul.tabnav:first", "#" + id).addClass(o.iid + "-nav");
964        },
965        accordionView: function(id, options) {
966            var o = {}, ui_icon = ($.extend(!0, o, options || {}), "ui-icon-triangle-1-");
967            $("a.accordion-title", "#{0} .accordion-header".format(id, o.selected)).before('<span class="ui-icon {0}"></span>'.format(ui_icon + "e")), 
968            $("a.accordion-title", "#{0} li:eq({1})".format(id, o.selected)).attr("href", "javascript:void(0);").removeAttr("onclick").addClass("selected").click(function() {
969                o.collapsible && ($(this).toggleClass("selected").next("div").toggle(), 
970                $(this).hasClass("selected") ? $(this).prev("span").removeClass(ui_icon + "e").addClass(ui_icon + "s") : $(this).prev("span").removeClass(ui_icon + "s").addClass(ui_icon + "e"));
971            }).prev("span").removeClass(ui_icon + "e").addClass(ui_icon + "s").end().next("div").toggle();
972        },
973        accordion: function(id, options) {
974            var o = {};
975            $.extend(!0, o, options || {}), $("#" + id).accordion(o);
976        },
977        portlet: function(portletId, options) {
978            var pId;
979            !options.showborders || $(pId = "#" + portletId).hasClass("portlet-cont") || $(".portlet-toolbar:first a.icon", pId).each(function() {
980                var $cfg, $self = $(this);
981                $self.data("_click", $self.prop("onclick")).removeAttr("onclick"), 
982                $self.attr("href", "javascript:void(0);"), $self.hasClass("minimize") && $self.click(function() {
983                    $(".portlet-wrap", pId).slideToggle(), $(this).toggleClass("minimize").toggleClass("maximize");
984                }), $self.hasClass("information") && DI.ui.cluetip($self), $self.hasClass("refresh") && $self.click(function() {
985                    $(".portlet-wrap:visible", pId).length && $self.data("_click").apply(this);
986                }), $self.hasClass("configure") && options.cfgpanel && ($self.data("_success", function() {
987                    $("#{0}".format(options.cfgpanel), pId).slideDown();
988                }), $self.click(function() {
989                    var $cfg;
990                    $("#{0}:visible".format(options.cfgpanel), pId).length ? $("#{0}".format(options.cfgpanel)).slideUp() : 0 < ($cfg = $("#{0}".format(options.cfgpanel), pId)).html().length ? $cfg.slideDown() : $self.data("_click").apply(this);
991                }), ($cfg = $("#{0}:hidden".format(options.cfgpanel), pId)).length) && 0 < $cfg.html().length && $cfg.show(), 
992                $self.hasClass("close") && $self.click(function() {
993                    $(pId).hide();
994                });
995            });
996        },
997        portletContainer: function(id, options) {
998            var url = options.url, o = {
999                items: ".portlet",
1000                connectWith: ".column",
1001                containment: "#" + id,
1002                handle: ".portlet-edit-toolbar",
1003                opacity: .5,
1004                delay: 300,
1005                placeholder: "ui-state-highlight",
1006                stop: function(event, ui) {
1007                    var d = "";
1008                    $(".column", "#" + id).each(function() {
1009                        var i, n, data = [], arr = $(this).sortable("toArray");
1010                        for (arr.length && ($(".portlet", this).removeClass("first last"), 
1011                        $("#" + arr[0]).addClass("first"), $("#" + arr[arr.length - 1]).addClass("last")), 
1012                        i = 0, n = arr.length; i < n; i++) data.push('"' + $("#" + arr[i]).attr("data-instance") + '"');
1013                        d.length && (d += ","), d += "[" + data + "]";
1014                    }), d = "{sort:[" + d + "]}", $.post(url, {
1015                        data: d
1016                    }, function(data) {}, "json");
1017                }
1018            }, cid = "#" + id;
1019            delete options.url, $.extend(!0, o, options || {}), $(".column", cid).sortable(o);
1020        },
1021        codeMirror: function(id, options) {
1022            var editor = $("#" + id).codemirror(options);
1023            $(".editor-loader").css("background-image", "none"), editor.on("blur", function() {
1024                editor.save();
1025            });
1026        },
1027        bootbox: function(options) {
1028            $.extend(!0, {}, options || {});
1029        },
1030        modal: function(id, options) {
1031            var o = {};
1032            $.extend(!0, o, options || {}), $("#" + id).modal(o);
1033        },
1034        dropdown: function(id, options) {
1035            var o = {};
1036            $.extend(!0, o, options || {}), $("#" + id).dropdown(o);
1037        },
1038        popover: function(id, options) {
1039            var o = {};
1040            $.extend(!0, o, options || {}), $("#" + id).popover(o);
1041        },
1042        cluetip: function(e, options) {
1043            var o = {
1044                arrows: !0,
1045                cluetipClass: "jtip",
1046                closePosition: "title",
1047                ajaxCache: !0,
1048                ajaxProcess: function(data) {
1049                    var txt = $(data).find("component").text().replace(/\]\^/g, "]"), data = $(data).find("evaluate");
1050                    return data.length && (txt += '<script type="text/javascript">', 
1051                    data.each(function() {
1052                        txt += $(this).text() + ";";
1053                    }), txt += "<\/script>"), txt;
1054                },
1055                onActivate: function(e) {
1056                    return o.mouseOutClose && DI.registerOnDocumentClick($("#cluetip")), 
1057                    !0;
1058                },
1059                ajaxSettings: {
1060                    dataType: "xml"
1061                }
1062            };
1063            $.extend(!0, o, options || {}), "string" == typeof e && (e = $("#" + e), 
1064            o.selector) && (e = e.find(o.selector)), "click" == o.activation && e.prop("onclick", null), 
1065            e.cluetip(o);
1066        },
1067        colorPicker: function(id, options) {
1068            var selectorId = id + "-selector", o = {
1069                onSubmit: function(hsb, hex, rgb, el) {
1070                    $("#" + id).val("#" + hex), $(el).ColorPickerHide();
1071                },
1072                onShow: function(colpkr) {
1073                    return $(colpkr).fadeIn(500), !1;
1074                },
1075                onHide: function(colpkr) {
1076                    return $(colpkr).fadeOut(500), !1;
1077                },
1078                onChange: function(hsb, hex, rgb) {
1079                    $("#{0} div".format(selectorId)).css("background-color", "#" + hex), 
1080                    $("#" + id).val("#" + hex);
1081                }
1082            }, $self = $("#" + selectorId);
1083            $.extend(!0, o, options || {}), $self.ColorPicker(o);
1084        },
1085        timeoutDialog: function(options) {
1086            var o = {
1087                countdown: 120,
1088                keep_alive_url: DI.contextPath() + "/keepalive",
1089                logout_redirect_url: DI.contextPath() + "/signoff",
1090                restart_on_yes: !0
1091            };
1092            $.extend(!0, o, options || {}), $.timeoutDialog(o);
1093        },
1094        toggle: function(id, options) {
1095            var o = {
1096                arrow: !1
1097            };
1098            $.extend(!0, o, options || {}), DI.ui.toggleLink(id, o);
1099        },
1100        toggleLink: function(id, options) {
1101            var o = {
1102                slide: !1,
1103                arrow: !0,
1104                cache: !0,
1105                onOpen: null,
1106                onClose: null
1107            }, iid = "#" + id;
1108            $.extend(!0, o, options || {}), DI.delayUntil(function() {
1109                return $(iid).is(":visible");
1110            }, function() {
1111                $(iid).each(function() {
1112                    var handler, href, $self = $(this), ui_icon = "ui-icon-triangle-1-";
1113                    $self.attr("onclick") ? $self.data("_click", $self.prop("onclick")).removeAttr("onclick") : (href = $self.attr("href"), 
1114                    $self.data("_click", function() {
1115                        $("#" + o.container).load(href, function(txt, status) {
1116                            "success" == status && $self.data("_success")();
1117                        });
1118                    })), $self.attr("href", "javascript:void(0);"), o.arrow && $self.prepend('<span class="ui-icon {0}" />'.format(ui_icon + ($self.hasClass("open") ? "s" : "e"))), 
1119                    $self.data("_success", function() {
1120                        handler();
1121                    }), handler = function() {
1122                        var $c = $("#" + o.container);
1123                        !$c.is(":visible") ? o.onOpen && o.onOpen.apply($self) : o.onClose && o.onClose.apply($self), 
1124                        o.slide ? $c.slideToggle() : $c.toggle(), $self.toggleClass("open"), 
1125                        o.arrow && ($self.hasClass("open") ? $self.children("span").first().removeClass(ui_icon + "e").addClass(ui_icon + "s") : $self.children("span").first().removeClass(ui_icon + "s").addClass(ui_icon + "e"));
1126                    }, $self.bind("click", function() {
1127                        var $c = $("#" + o.container);
1128                        if (o.cache && ($self.unbind("click"), $self.click(handler)), 
1129                        $c.parent().data("activator") == $self.attr("id") || o.cache && $.trim($c.html()).length) handler(); else if ($self.data("_click")) return $self.data("_click").apply(this), 
1130                        $c.parent().data("activator", $self.attr("id")), !1;
1131                        return !0;
1132                    }), $self.hasClass("open") && !$.trim($("#" + o.container).html()).length && ($self.removeClass("open"), 
1133                    $self.click());
1134                });
1135            });
1136        },
1137        toggleRadio: function(id, options) {
1138            var o = {}, id = "#" + id;
1139            $.extend(!0, o, options || {}
1139), o.container && !o.showContainer && $("#" + o.container).hide(), 
1140            $(id).click(function(event) {
1141                var t = event.target;
1142                if (t.type && "radio" == t.type) if (t.checked) {
1143                    for (var siblings = document.getElementsByName(t.name), i = 0; i < siblings.length; i++) $(siblings[i]) !== t && $("#" + siblings[i].getAttribute("container")).hide();
1144                    $("#" + o.container).show();
1145                } else $("#" + o.container).hide();
1146            });
1147        },
1148        starRating: function(id, options) {
1149            var o = {
1150                selector: ".star"
1151            }, id = "#" + id;
1152            $.extend(!0, o, options || {}), options = $(o.container ? o.container + " " + id : id), 
1153            $("input" + o.selector, options).rating(o);
1154        },
1155        dialog: function(id, options) {
1156            var $d = $("#" + id), o = {
1157                modal: !0,
1158                fixed: !1
1159            };
1160            options.close ? (id = window["__dialog_" + id]) && id.isVisible() && (id.hide(), 
1161            $d.removeData("dialog")) : ($.extend(!0, o, options || {}), o.afterShow = function() {
1162                var v;
1163                this.getPosition()[1] < 0 && this.moveToY(15), o.dialogTop && (v = Boxy._viewport(), 
1164                this.moveToX(.05 * v.width), this.moveToY(1.02 * v.top), this.boxy.css({
1165                    width: .9 * v.width,
1166                    height: "auto"
1167                }), this.getContent().css({
1168                    width: .9 * v.width,
1169                    height: "auto"
1170                }));
1171            }, $d.boxy(o));
1172        },
1173        colorbox: function(id, options) {
1174            var id = $("#" + id), o = {
1175                inline: !0
1176            };
1177            options.close && $.colorbox.close(), o.html = $(".bd", id), $.extend(!0, o, options || {}), 
1178            $.colorbox(o);
1179        },
1180        textboxHint: function(id, options) {
1181            var o = {
1182                selector: "input:text[title]",
1183                blurClass: "blur"
1184            }, id = $("#" + id);
1185            $.extend(!0, o, options || {}), id.is(":text") ? id.attr("title") || (id = null) : id = id.find(o.selector), 
1186            id && (id.addClass(o.blurClass), id.each(function() {
1187                var $t = $(this);
1188                0 == $.trim($t.val()).length && $t.val($t.attr("title")), $t.val() == $t.attr("title") ? $t.addClass(o.blurClass) : $t.removeClass(o.blurClass), 
1189                $t.focus(function() {
1190                    $.trim($t.val()) == $t.attr("title") && ($t.val(""), $t.removeClass(o.blurClass));
1191                }).blur(function() {
1192                    var val = $.trim($t.val());
1193                    0 != val.length && val != $t.attr("title") || ($t.val($t.attr("title")), 
1194                    $t.addClass(o.blurClass));
1195                }), $(this.form).submit(function() {
1196                    $.trim($t.val()) == $t.attr("title") && $t.val("");
1197                });
1198            }));
1199        },
1200        menu: function(id, options) {
1201            $.extend(!0, {}, options || {}), (id = (options = (options = $("li a.selected", "#" + id)).length ? options : $("li:first-child a[class*=mi]:first", "#" + id).addClass("selected")).closest("ul").prev("a[class=category]").addClass("open").end()).is(":hidden") && id.show(), 
1202            $("li a[class*=category]").click(function() {
1203                $(this).toggleClass("open").nextAll("ul").eq(0).slideToggle();
1204            }), $("li a[class*=mi]").click(function() {
1205                $("li a.selected").removeClass("selected"), $(this).addClass("selected");
1206            });
1207        },
1208        autoComplete: function(id, options) {
1209            var o = {
1210                autoFill: !0,
1211                multipleSeparator: ";; ",
1212                parse: function(data) {
1213                    for (var parsed = [], rows = data.split("\n"), i = 0; i < rows.length; i++) {
1214                        var idx, d, row = $.trim(rows[i]);
1215                        row && (d = [], 0 < (idx = row.lastIndexOf("|")) ? (d[0] = row.substring(0, idx), 
1216                        d[1] = row.substring(idx + 1)) : d[0] = row, parsed[parsed.length] = {
1217                            data: d,
1218                            value: d[0],
1219                            result: options.formatResult && options.formatResult(row, d[0]) || d[0]
1220                        });
1221                    }
1222                    return parsed;
1223                }
1224            };
1225            $.extend(!0, o, options || {}), DI.delayUntil(function() {
1226                return $("#" + id).is(":visible");
1227            }, function() {
1228                var f, $c = $("#" + id);
1229                $c.attr("onchange") && options.hiddenId && (f = $c.attr("onchange").replace(id, options.hiddenId), 
1230                $("#" + options.hiddenId).attr("onchange", f), $c.removeAttr("onchange")), 
1231                $c.autocomplete(options.url, o).bind("result", function(event, data, formatted) {
1232                    options.hiddenId && data && $("#" + options.hiddenId).val(data[1]).trigger("change");
1233                }).blur(function() {
1234                    0 == this.value.length && options.hiddenId && $("#" + options.hiddenId).val("");
1235                });
1236            });
1237        },
1238        sAutoComplete: function(id, options, path) {
1239            var o = {
1240                placeholder: options.placeholder,
1241                minimumInputLength: options.minimumInputLength || 1,
1242                dropdownAutoWidth: !0,
1243                width: "auto",
1244                ajax: {
1245                    url: options.url,
1246                    dataType: "json",
1247                    quietMillis: 250,
1248                    data: function(params) {
1249                        return {
1250                            q: params.term
1251                        };
1252                    },
1253                    processResults: function(data, params) {
1254                        return {
1255                            results: data.results
1256                        };
1257                    },
1258                    cache: !0
1259                }
1260            };
1261            $("#" + id).replaceWith('<select id="' + id + '" name="' + path + '" class="ProductDetailsQuantityTextBox"></select>'), 
1262            $("#" + id).select2(o), $("#" + id).on("select2:select", function(e) {
1263                $("#" + options.hiddenId).val(e.params.data.text);
1264            });
1265        },
1266        sdAutoComplete: function(id, options, path) {
1267            options = {
1268                placeholder: options.placeholder,
1269                allowClear: !0,
1270                minimumInputLength: 3,
1271                dropdownAutoWidth: !0,
1272                width: "auto",
1273                ajax: {
1274                    url: options.url,
1275                    dataType: "json",
1276                    delay: 250,
1277                    data: function(params) {
1278                        return {
1279                            q: params.term
1280                        };
1281                    },
1282                    processResults: function(data) {
1283                        return {
1284                            results: data.results
1285                        };
1286                    },
1287                    cache: !0
1288                }
1289            };
1290            $("#" + id).select2(options);
1291        },
1292        datePicker: function(id, options) {
1293            var o = {
1294                showOn: "both",
1295                buttonImage: rpath("images/calendar.gif"),
1296                buttonImageOnly: !0
1297            }, iid = "#" + id;
1298            $.extend(!0, o, options || {}), DI.delayUntil(function() {
1299                return $(iid).is(":visible");
1300            }, function() {
1301                $(iid).datepicker(o);
1302            });
1303        },
1304        timePicker: function(id, options) {
1305            var o = {
1306                show24Hours: !1,
1307                startTime: "05:00"
1308            }, iid = "#" + id;
1309            $.extend(!0, o, options || {}), DI.delayUntil(function() {
1310                return $(iid).is(":visible");
1311            }, function() {
1312                $(iid).timePicker(o);
1313            });
1314        },
1315        richTextEditor: function(id, options) {
1316            var o = {
1317                buttonList: [ "save", "bold", "italic", "underline", "left", "center", "right", "justify", "ol", "ul", "fontSize", "fontFamily", "fontFormat", "indent", "outdent", "image", "link", "unlink", "forecolor", "bgcolor", "xhtml" ],
1318                iconsPath: rpath("ui/nicEdit/nicEditorIcons.gif")
1319            }, iid = "#" + id;
1320            $.extend(!0, o, options || {}), options.basic && (o.buttonList = [ "bold", "italic", "ol", "ul", "image", "link", "unlink", "forecolor", "bgcolor", "xhtml" ]), 
1321            "off" === options.xhtml && o.buttonList.pop(), DI.delayUntil(function() {
1322                return $(iid).is(":visible");
1323            }, function() {
1324                var $e = $(iid), w = $e.width();
1325                $e.css("width", w = 0 == w ? "500" : w), $(iid).wrap('<div class="richtext-wrapper" style="width:{0}px">'.format(w)).wysiwyg(o);
1326            });
1327        },
1328        layout: function(id, options) {
1329            var o = {
1330                applyDefaultStyles: !1
1331            }, id = id ? "#" + id : "body";
1332            $.extend(!0, o, options || {}), $(id).layout(o);
1333        },
1334        countdown: function(id, options) {
1335            var o = {
1336                compact: !0,
1337                format: "HMS"
1338            };
1339            $.extend(!0, o, options || {}), $("#" + id).countdown(o);
1340        },
1341        tooltip: function(id, options) {
1342            var o = {}, id = $("#" + id);
1343            $.extend(!0, o, options || {}), (id = o.selector ? id.find(o.selector) : id).tooltip(o);
1344        },
1345        tinyNav: function(id, options) {
1346            var o = {}, id = $("#" + id);
1347            $.extend(!0, o, options || {}), (id = o.selector ? id.find(o.selector) : id).tinyNav(o);
1348        },
1349        tooltipster: function(id, options) {
1350            var o = {}, $e = $("#" + id);
1351            $.extend(!0, o, options || {}), iid = "#" + id, DI.delayUntil(function() {
1352                return $(iid).is(":visible");
1353            }, function() {
1354                o.selector && ($e = $e.find(o.selector)), 0 < $(o.tipclass).length ? $e.each(function() {
1355                    var tipContent = $(this).find(o.tipclass);
1356                    0 == $(tipContent).length && (tipContent = $("#" + id).find(o.tipclass)), 
1357                    o.content = tipContent, $(this).tooltipster(o);
1358                }) : $e.tooltipster(o);
1359            });
1360        },
1361        iosSlider: function(id, options) {
1362            var o = {
1363                snapToChildren: !0,
1364                desktopClickDrag: !0,
1365                keyboardControls: !0,
1366                onSliderLoaded: function(args) {
1367                    $(options.selector + " > i").remove(), args.data.sliderMax < args.data.stageWidth && ($(args.sliderContainerObject).next(".next").remove(), 
1368                    $(args.sliderContainerObject).next(".prev").remove());
1369                },
1370                onSlideComplete: function(args) {
1371                    $(".next, .prev").removeClass("unselectable"), 1 == args.currentSlideNumber ? $(".prev").addClass("unselectable") : args.currentSliderOffset == args.data.sliderMax && $(".next").addClass("unselectable");
1372                },
1373                navNextSelector: $("#" + id + " .next"),
1374                navPrevSelector: $("#" + id + " .prev")
1375            }, $e = $("#" + id);
1376            $.extend(!0, o, options || {}), iid = "#" + id, DI.delayUntil(function() {
1377                return $(iid).is(":visible");
1378            }, function() {
1379                ($e = o.selector ? $e.find(o.selector) : $e).iosSlider(o);
1380            });
1381        },
1382        media: function(id, options) {
1383            var player = DI.util.relativePath("players/player.swf"), player = {
1384                mp3Player: player,
1385                flvPlayer: player
1386            }, id = $("#" + id);
1387            $.extend(!0, player, options || {}), (id = player.selector ? id.find(player.selector) : id).media(player);
1388        },
1389        jwplayer: function(id, options, cb) {
1390            var url, opt, o = {
1391                skin: "roundster",
1392                flashplayer: DI.util.relativePath("ui/media/6.1/jwplayer.flash.swf"),
1393                html5player: DI.util.relativePath("ui/media/6.1/jwplayer.html5.js"),
1394                primary: "flash",
1395                host: {
1396                    rtmp: "s1andum3zh5lxa.cloudfront.net",
1397                    http: "d1ym45tk6eujhe.cloudfront.net",
1398                    protocol: "rtmp"
1399                }
1400            }, id = $("#" + id);
1401            $.extend(!0, o, options || {}), (id = o.selector ? id.find(o.selector) : id).length && id.each(function() {
1402                var ele = $(this);
1403                if (url = $(this).attr("href"), opt = {}, $.extend(!0, opt, o), 
1404                opt.playlistUrl) $.getJSON(opt.playlistUrl, function(json) {
1405                    console.log("JSON Data: " + JSON.stringify(json)), opt.playlist = json, 
1406                    $(ele).hide().jwplayer(opt, cb);
1407                }); else {
1408                    if (-1 == url.indexOf("http")) {
1409                        var ext = url.substr(url.lastIndexOf(".") + 1);
1410                        if ("m3u8" == (ext = "mov" != ext && "m4v" != ext && "f4v" != ext ? ext : "mp4") || 0 < url.indexOf(";")) {
1411                            for (var urls = url.split(";"), vurl = "", vurlext = "", m3u8url = "", i = 0; i < urls.length; i++) {
1412                                var ext1 = urls[i].substr(urls[i].lastIndexOf(".") + 1);
1413                                "m3u8" == ext1 ? m3u8url = urls[i] : (vurl = urls[i], 
1414                                vurlext = ext1);
1415                            }
1416                            "mov" != vurlext && "m4v" != vurlext && "f4v" != vurlext || (vurlext = "mp4"), 
1417                            console.log("m3u8 url =" + m3u8url), console.log(" url =" + vurl);
1418                            var playlist = [ {
1419                                image: "",
1420                                sources: [ {
1421                                    file: "http://" + opt.host.http + "/" + m3u8url
1422                                }, {
1423                                    file: opt.host.protocol + "://" + opt.host.rtmp + "/cfx/st/" + vurlext + ":" + vurl
1424                                }, {
1425                                    file: "http://" + opt.host.http + "/" + vurl
1426                                } ]
1427                            } ];
1428                            if (opt.captions !== undefined) {
1429                                console.log("captions found!");
1430                                for (var tracks = [], captions = JSON.parse(opt.captions), lang = Object.keys(captions), i = 0; i < lang.length; i++) tracks.push({
1431                                    kind: "captions",
1432                                    file: captions[lang[i]],
1433                                    label: lang[i]
1434                                });
1435                                Object.assign(playlist[0], {
1436                                    tracks: tracks
1437                                });
1438                            }
1439                        } else playlist = [ {
1440                            image: "",
1441                            sources: [ {
1442                                file: opt.host.protocol + "://" + opt.host.rtmp + "/cfx/st/" + ext + ":" + url
1443                            }, {
1444                                file: "http://" + opt.host.http + "/" + url
1445                            } ]
1446                        } ];
1447                        opt.playlist = playlist;
1448                    } else setupForAbsoluteURL(opt, url);
1449                    console.log(opt), $(this).hide().jwplayer(opt, cb);
1450                }
1451            });
1452        },
1453        jwplayer7: function(id, options, cb) {
1454            var url, opt, o = {
1455                skin: "ymui",
1456                flashplayer: DI.util.relativePath("ui/media/7.9/jwplayer.flash.swf"),
1457                html5player: DI.util.relativePath("ui/media/7.9/provider.html5.js"),
1458                primary: "flash",
1459                host: {
1460                    rtmp: "s1andum3zh5lxa.cloudfront.net",
1461                    http: "d1ym45tk6eujhe.cloudfront.net",
1462                    protocol: "rtmp"
1463                }
1464            }, id = $("#" + id);
1465            $.extend(!0, o, options || {}), (id = o.selector ? id.find(o.selector) : id).length && id.each(function() {
1466                var ele = $(this);
1467                if (url = $(this).attr("href"), opt = {}, $.extend(!0, opt, o), 
1468                opt.playlistUrl) $.getJSON(opt.playlistUrl, function(json) {
1469                    console.log("JSON Data: " + JSON.stringify(json)), opt.playlist = json, 
1470                    $(ele).hide().jwplayer7(opt, cb);
1471                }); else {
1472                    if (-1 == url.indexOf("http")) {
1473                        var ext = url.substr(url.lastIndexOf(".") + 1), ext = [ {
1474                            image: "",
1475                            sources: [ {
1476                                file: opt.host.protocol + "://" + opt.host.rtmp + "/cfx/st/" + (ext = "mov" != ext && "m4v" != ext && "f4v" != ext ? ext : "mp4") + ":" + url
1477                            }, {
1478                                file: "http://" + opt.host.http + "/" + url
1479                            } ]
1480                        } ];
1481                        if (opt.captions !== undefined) {
1482                            console.log("captions found!");
1483                            for (var tracks = [], captions = JSON.parse(opt.captions), lang = Object.keys(captions), i = 0; i < lang.length; i++) tracks.push({
1484                                kind: "captions",
1485                                file: captions[lang[i]],
1486                                label: lang[i]
1487                            });
1488                            Object.assign(ext[0], {
1489                                tracks: tracks
1490                            });
1491                        }
1492                        opt.playlist = ext;
1493                    } else setupForAbsoluteURL(opt, url);
1494                    $(this).hide().jwplayer7(opt, cb);
1495                }
1496            });
1497        },
1498        jwplayer8: function(id, options, cb) {
1499            var url, opt, o = {
1500                skin: "ymui",
1501                flashplayer: DI.util.relativePath("ui/media/8.0/jwplayer.flash.swf"),
1502                html5player: DI.util.relativePath("ui/media/8.0/provider.html5.js"),
1503                primary: "html5",
1504                host: {
1505                    rtmp: "s1andum3zh5lxa.cloudfront.net",
1506                    http: "d1ym45tk6eujhe.cloudfront.net",
1507                    protocol: "rtmp"
1508                }
1509            }, id = $("#" + id);
1510            $.extend(!0, o, options || {}), (id = o.selector ? id.find(o.selector) : id).length && id.each(function() {
1511                var ele = $(this);
1512                if (url = $(this).attr("href"), opt = {}, $.extend(!0, opt, o), 
1513                opt.playlistUrl) $.getJSON(opt.playlistUrl, function(json) {
1514                    console.log("JSON Data: " + JSON.stringify(json)), opt.playlist = json, 
1515                    $(ele).hide().jwplayer8(opt, cb);
1516                }); else {
1517                    if (-1 == url.indexOf("http")) {
1518                        var ext = url.substr(url.lastIndexOf(".") + 1), ext = [ {
1519                            image: "",
1520                            sources: [ {
1521                                file: opt.host.protocol + "://" + opt.host.rtmp + "/cfx/st/" + (ext = "mov" != ext && "m4v" != ext && "f4v" != ext ? ext : "mp4") + ":" + url
1522                            }, {
1523                                file: "https://" + opt.host.http + "/" + url
1524                            } ]
1525                        } ];
1526                        if (opt.captions !== undefined) {
1527                            for (var tracks = [], captions = JSON.parse(opt.captions), lang = Object.keys(captions), i = 0; i < lang.length; i++) tracks.push({
1528                                kind: "captions",
1529                                file: captions[lang[i]],
1530                                label: lang[i]
1531                            });
1532                            Object.assign(ext[0], {
1533                                tracks: tracks
1534                            });
1535                        }
1536                        opt.playlist = ext;
1537                    } else setupForAbsoluteURL(opt, url);
1538                    options.playbackRateControls && (opt.playbackRateControls = [ .25, .5, .75, 1, 1.25, 1.5, 2 ]), 
1539                    $(this).hide().jwplayer8(opt, cb);
1540                }
1541            });
1542        },
1543        jwplayer_cloud: function(id, options, cb) {
1544            var url, opt, o = {
1545                skin: "ymui",
1546                flashplayer: DI.util.relativePath("ui/media/8.0/jwplayer.flash.swf"),
1547                html5player: DI.util.relativePath("ui/media/8.0/provider.html5.js"),
1548                primary: "html5",
1549                host: {
1550                    rtmp: "s1andum3zh5lxa.cloudfront.net",
1551                    http: "d1ym45tk6eujhe.cloudfront.net",
1552                    protocol: "rtmp"
1553                }
1554            }, id = $("#" + id);
1555            $.extend(!0, o, options || {}), (id = o.selector ? id.find(o.selector) : id).length && id.each(function() {
1556                var ele = $(this);
1557                if (url = $(this).attr("href"), opt = {}, $.extend(!0, opt, o), 
1558                opt.playlistUrl) $.getJSON(opt.playlistUrl, function(json) {
1559                    console.log("JSON Data: " + JSON.stringify(json)), opt.playlist = json, 
1560                    $(ele).hide().jwplayer_cloud(opt, cb);
1561                }); else {
1562                    if (-1 == url.indexOf("http")) {
1563                        var ext = url.substr(url.lastIndexOf(".") + 1), ext = [ {
1564                            image: "",
1565                            sources: [ {
1566                                file: opt.host.protocol + "://" + opt.host.rtmp + "/cfx/st/" + (ext = "mov" != ext && "m4v" != ext && "f4v" != ext ? ext : "mp4") + ":" + url
1567                            }, {
1568                                file: "https://" + opt.host.http + "/" + url
1569                            } ]
1570                        } ];
1571                        if (opt.captions !== undefined) {
1572                            console.log("captions found!");
1573                            for (var tracks = [], captions = JSON.parse(opt.captions), lang = Object.keys(captions), i = 0; i < lang.length; i++) tracks.push({
1574                                kind: "captions",
1575                                file: captions[lang[i]],
1576                                label: lang[i]
1577                            });
1578                            Object.assign(ext[0], {
1579                                tracks: tracks
1580                            });
1581                        }
1582                        opt.playlist = ext;
1583                    } else setupForAbsoluteURL(opt, url);
1584                    options.playbackRateControls && (opt.playbackRateControls = [ .25, .5, .75, 1, 1.25, 1.5, 2 ]), 
1585                    $(this).hide().jwplayer_cloud(opt, cb);
1586                }
1587            });
1588        },
1589        cycle: function(id, options) {
1590            var o = {
1591                before: function() {
1592                    $("#cluetip").hide();
1593                },
1594                after: function() {
1595                    bindTip($("a.cycle-link", this));
1596                }
1597            }, bindTip = function($e) {
1598                var rel = $e.attr("rel"), bound = $e.data("bound");
1599                rel && !bound && ($e.data("title", $e.attr("title")), DI.ui.cluetip($e, {
1600                    sticky: !0,
1601                    mouseOutClose: !0,
1602                    width: 450,
1603                    ajaxSettings: {
1604                        dataType: "html"
1605                    },
1606                    ajaxProcess: function(data) {
1607                        return data;
1608                    }
1609                }), $e.data("bound", "1"));
1610            }, id = $("#" + id), sz = id.children().length;
1611            0 != sz && (1 == sz ? bindTip($("a.cycle-link", id)) : ($.extend(!0, o, options || {}), 
1612            id.cycle(o)));
1613        },
1614        feed: function(id, options) {
1615            var o = {
1616                count: 5,
1617                template: '<div class="feed">{0}</div>',
1618                itemTemplate: '<div class="item"><a class="link" href="{0}" target="_feedwin">{1}</a>{2}{3}</div>',
1619                pubDateTemplate: '<em class="date">{0}</em>',
1620                descTemplate: '<p class="description">{0}</p>'
1621            }, $cnt = $("#" + id);
1622            $.extend(!0, o, options || {}), o.url && ($cnt.append(o.template.format('<div class="wait"><div class="img"></div></div>')), 
1623            $.get(o.url, function(xml) {
1624                var html, t1, t2, posts = [];
1625                $("item,entry", xml).each(function(i) {
1626                    var post, $item;
1627                    0 < o.count && i > o.count - 1 || (post = {}, $item = $(this), 
1628                    post.link = $item.find("link").text(), post.title = $item.find("title").text(), 
1629                    post.link || (post.link = $item.find("link").attr("href")), 
1630                    o.desc && (post.desc = ("entry" === this.nodeName ? $item.find("summary,content") : $item.find("description")).text()), 
1631                    o.pubDate && (post.pubDate = ("entry" === this.nodeName ? $item.find("published,issued") : $item.find("pubDate")).text()), 
1632                    posts[i] = post);
1633                }), $cnt.empty(), html = "", $.each(posts, function(i, p) {
1634                    if (t1 = "", p.pubDate && o.pubDateTemplate) {
1635                        var dt = p.pubDate;
1636                        try {
1637                            dt = Date.parse(p.pubDate), dt = isNaN(dt) ? p.pubDate : new Date(dt).toLocaleString();
1638                        } catch (e) {}
1639                        t1 = o.pubDateTemplate.format(dt);
1640                    }
1641                    t2 = "", p.desc && o.descTemplate && (t2 = o.descTemplate.format(o.descLen ? p.desc.truncate(o.descLen, !0) : p.desc)), 
1642                    html += o.itemTemplate.format(p.link, p.title, t1, t2);
1643                }), $cnt.append(o.template.format(html));
1644            }, "xml"));
1645        },
1646        dragdrop: function(id, options) {
1647            var o = {}, iid = "#" + id, o = ($.extend(!0, o, options || {}), id = $("#" + o.marker), 
1648            o.readonly || (id.attr("coordinationX", o.coordinationX), id.attr("coordinationY", o.coordinationY), 
1649            id.draggable({
1650                containment: $(iid),
1651                stop: function(event, ui) {
1652                    var parentPosition = $(iid).position();
1653                    $("#" + $(this).attr("coordinationX")).val(parseInt(ui.position.left - parentPosition.left)), 
1654                    $("#" + $(this).attr("coordinationY")).val(parseInt(ui.position.top - parentPosition.top));
1655                }
1656            })), $(iid).position()), o = (id.css("left", o.left + options.left), 
1657            o.top + options.top);
1658            id.css("top", o);
1659        },
1660        shortList: function(id, options) {
1661            var $children, $self, id = $("#" + id), o = {
1662                size: 5,
1663                selector: "ul",
1664                childSelector: "li",
1665                moreText: "More",
1666                fewerText: "Fewer"
1667            };
1668            $.extend(!0, o, options || {}), (id = o.selector ? id.find(o.selector) : id).each(function() {
1669                ($children = $("{0}:gt({1})".format(o.childSelector, o.size - 1), this)).length && ($children.wrapAll('<ul class="more-opts" style="display:none" />'), 
1670                $children = $('<a href="#" class="more" />').append('<span class="ui-icon ui-icon-triangle-1-s"></span><span>' + o.moreText + "</span>").click(function() {
1671                    return ($self = $(this)).prev("ul").find("ul.more-opts").slideToggle("slow"), 
1672                    $self.toggleClass("more fewer"), $self.find("span:eq(0)").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-n"), 
1673                    $self.find("span:eq(1)").html(o[$self.attr("class") + "Text"]), 
1674                    !1;
1675                }), $(this).after($children));
1676            });
1677        },
1678        redirect: function(id, options) {
1679            window.setInterval(function() {
1680                jQuery.extend({
1681                    url: ""
1682                }, options);
1683                var timeCounter = $("#" + id).html(), timeCounter = parseInt(timeCounter) - 1;
1684                0 <= timeCounter && $("#" + id).html(timeCounter), 0 == timeCounter && 0 < options.url.length && (window.location = options.url);
1685            }, 1e3);
1686        },
1687        highlight: function(id, options) {
1688            var o = {
1689                words: [],
1690                caseSensitive: !1,
1691                className: "highlight",
1692                tagType: "span"
1693            };
1694            $.extend(!0, o, options || {}), o.words && 0 != o.words.length && (options = new RegExp(o.words.join("|"), o.caseSensitive ? "" : "i"), 
1695            (o.selector ? $(o.selector, "#" + id) : $("#" + id)).highlightRegex(options, o));
1696        },
1697        sortable: function(id, options) {
1698            var o = {}, iid = "#" + id;
1699            $.extend(!0, o, options || {}), $(iid).sortable({
1700                stop: function(event, ui) {
1701                    $("#" + o.sortOrder).val($(iid).sortable("toArray"));
1702                }
1703            }), $(iid).disableSelection();
1704        },
1705        clock: function(id, options) {
1706            var o = {
1707                format: '<span class="clock"><span class="d">%A, %d %B</span> <span class="t">%I:%M:%S %P</span></span>',
1708                timeNotation: "12h",
1709                am_pm: !0
1710            }, id = "#" + id;
1711            $.extend(!0, o, options || {}), $(id).jclock(o);
1712        },
1713        slider: function(id, options) {
1714            var o = {
1715                slides: "#{0} .slides".format(id),
1716                controller: ".controller",
1717                selectedWrapper: "selected",
1718                prev: "#{0} .prev".format(id),
1719                next: "#{0} .next".format(id)
1720            };
1721            $.extend(!0, o, options || {}), $("#" + id).jFlow(o);
1722        },
1723        fwidget: function(id, url, options) {
1724            $("#" + id).forumWidget(url, options);
1725        },
1726        icalendar: function(id, options) {
1727            var o = {
1728                icons: rpath("ui/ical/icalendar.png"),
1729                sites: [ "outlook", "icalendar", "google" ]
1730            }, id = "#" + id;
1731            $.extend(!0, o, options || {}), $(id).icalendar(o);
1732        },
1733        crop: function(id, options) {
1734            var boundx, boundy, o = {
1735                onChange: updatePreview,
1736                onSelect: updatePreview
1737            };
1738            function updatePreview(c) {
1739                var rx, ry;
1740                options.preview && 0 < parseInt(c.w) && ($("#" + options.sw).val(c.w), 
1741                $("#" + options.sh).val(c.h), $("#" + options.sx).val(c.x), $("#" + options.sy).val(c.y), 
1742                rx = o.previewWidth / c.w, ry = o.previewHeight / c.h, $("#" + options.preview).css({
1743                    width: Math.round(rx * boundx) + "px",
1744                    height: Math.round(ry * boundy) + "px",
1745                    marginLeft: "-" + Math.round(rx * c.x) + "px",
1746                    marginTop: "-" + Math.round(ry * c.y) + "px"
1747                }));
1748            }
1749            $.extend(!0, o, options || {}), $("#" + id).Jcrop(o, function() {
1750                var bounds = this.getBounds();
1751                boundx = bounds[0], boundy = bounds[1], 0;
1752            });
1753        },
1754        validate: function(id, options) {
1755            var o = {};
1756            $.extend(!0, o, options || {}), $("#" + id).validate(o);
1757        },
1758        characterCounter: function(id, options) {
1759            var o = {
1760                enforceLength: !0
1761            }, options = ($.extend(!0, o, options || {}), ($element = $("#" + id)).attr("maxlength")), newlabel = null;
1762            function displayCharCounts(e) {
1763                $el = $(e), $limitLabel = $("#" + $el.attr("limiterid"));
1764                var e = $el.attr("maxlength"), value = $el.val().replace("\r\n", "\n"), currentLength = value.length;
1765                null == e || e <= 0 || (0 <= (currentLength = e - currentLength) ? ($limitLabel.css("color", "green"), 
1766                $limitLabel.html(currentLength + " character"), 1 != currentLength && $limitLabel.html($limitLabel.html() + "s"), 
1767                $limitLabel.html($limitLabel.html() + " remaining")) : o.enforceLength ? ($el.val(value.substring(0, e)), 
1768                $limitLabel.css("color", "green"), $limitLabel.html("0 characters remaining")) : (currentLength = Math.abs(currentLength), 
1769                $limitLabel.css("color", "red"), $limitLabel.html("Over by " + currentLength + " character"), 
1770                1 != currentLength && $limitLabel.html($limitLabel.html() + "s"), 
1771                $limitLabel.html($limitLabel.html() + "!")));
1772            }
1773            null != options && 0 < options && ((newlabel = (options = $element.attr("limiterid")) && (options = $("#" + options)).length ? options[0] : newlabel) || ((newlabel = document.createElement("label")).id = "limitlbl_" + id, 
1774            newlabel.style.color = "red", newlabel.style.display = "block", newlabel.innerHTML = "Updating...", 
1775            $(newlabel).insertBefore($element), $element.attr("limiterid", newlabel.id)), 
1776            $element.keyup(function() {
1777                displayCharCounts(this);
1778            }), displayCharCounts($element));
1779        },
1780        chosen: function(id, options) {
1781            var o = {
1782                allow_single_deselect: !0
1783            };
1784            $.extend(!0, o, options || {}), $("#" + id).chosen(o);
1785        },
1786        Select2: function(id, options) {
1787            var o = {
1788                placeholder: "Select an option",
1789                minimumResultsForSearch: 10,
1790                tokenSeparators: [ "," ],
1791                dropdownAutoWidth: !0,
1792                width: "auto"
1793            };
1794            $("#" + id).parents(".modal-dialog").length && (o.dropdownParent = $(".modal-dialog")), 
1795            $.extend(!0, o, options || {}), options.url && (o.ajax = {
1796                url: options.url,
1797                dataType: "json",
1798                quietMillis: 250,
1799                data: function(params) {
1800                    return {
1801                        q: params.term
1802                    };
1803                },
1804                processResults: function(data, params) {
1805                    return {
1806                        results: data.results
1807                    };
1808                },
1809                cache: !0
1810            }), DI.delayUntil(function() {
1811                return $("#" + id).is(":visible");
1812            }, function() {
1813                $("#" + id).select2(o);
1814            });
1815        },
1816        Select2Destroy: function() {
1817            $("#" + id).select2("destroy");
1818        },
1819        Select2Span: function(id) {
1820            $(".select2-span").find("span").remove(), $("#" + id).select2({
1821                placeholder: "Select an option",
1822                minimumResultsForSearch: 10,
1823                tokenSeparators: [ ",", " " ],
1824                dropdownAutoWidth: !0,
1825                width: "auto"
1826            });
1827        },
1828        lightBox: function(id, options) {
1829            var o = {
1830                imageLoading: rpath("ui/lightbox/images/lightbox-ico-loading.gif"),
1831                imageBtnPrev: rpath("ui/lightbox/images/lightbox-ico-prev.gif"),
1832                imageBtnNext: rpath("ui/lightbox/images/lightbox-ico-next.gif"),
1833                imageBtnClose: rpath("ui/lightbox/images/lightbox-btn-close.gif"),
1834                imageBlank: rpath("ui/lightbox/images/lightbox-blank.gif")
1835            };
1836            $.extend(!0, o, options || {}), $("#" + id).lightBox(o);
1837        },
1838        multiSelect: function(id, options, filterOptions) {
1839            var o = {}, id = $("#" + id);
1840            $.extend(!0, o, options || {}), (id = o.selector ? id.find(o.selector) : id).multiselect(o), 
1841            filterOptions && id.multiselectfilter(filterOptions);
1842        },
1843        photoTagger: function(id, options) {
1844            var o = {
1845                isTagCreationEnabled: !0,
1846                onSave: function() {
1847                    wicketAjaxGet(options.refreshURL);
1848                },
1849                onDelete: function() {
1850                    wicketAjaxGet(options.refreshURL);
1851                },
1852                isTagDeletionEnabled: !0
1853            }, id = $("#" + id);
1854            $.extend(!0, o, options || {}), id.photoTagger(o);
1855        },
1856        progressbar: function(id, options) {
1857            var o = {}, id = "#" + id;
1858            $.extend(!0, o, options || {}), $(id).progressbar(o), o.template && (options = o.template.format(o.value, o.max, o.percent), 
1859            $(id).after(options));
1860        },
1861        royalSlider: function(id, options) {
1862            var o = {}, id = "#" + id;
1863            $.extend(!0, o, options || {}), $(id).royalSlider(o);
1864        },
1865        owlCarousel: function(id, options) {
1866            var id = "#" + id, o = {
1867                loop: !0,
1868                items: 1,
1869                nav: !0,
1870                margin: 10,
1871                navText: [ "<i class='fa-chevron-left fa'></i>", "<i class='fa-chevron-right fa'></i>" ],
1872                dots: !0,
1873                responsive: {
1874                    0: {
1875                        items: 1
1876                    },
1877                    500: {
1878                        items: 1
1879                    },
1880                    768: {
1881                        items: 1
1882                    }
1883                }
1884            };
1885            $.extend(!0, o, options || {}), $(id).owlCarousel(o);
1886        },
1887        hoverIntent: function(id, options) {
1888            var o = {};
1889            $.extend(!0, o, options || {}), $(id).hoverIntent(o);
1890        },
1891        responsiveTabs: function(id, options) {
1892            var o = {};
1893            $.extend(!0, o, options || {}), $(id).responsiveTabs(o);
1894        },
1895        gridalicious: function(id, options) {
1896            var o = {}, iid = id;
1897            $.extend(!0, o, options || {}), DI.delayUntil(function() {
1898                return $(iid).is(":visible");
1899            }, function() {
1900                $(iid).gridalicious(o);
1901            });
1902        },
1903        trunk8: function(id, options) {
1904            var o = {}, iid = id;
1905            $.extend(!0, o, options || {}), DI.delayUntil(function() {
1906                return $(iid).is(":visible");
1907            }, function() {
1908                $(iid).trunk8(o);
1909            });
1910        },
1911        commentList: function(id, options) {
1912            var $p = $("#" + id), $f = $(".formc", $p), id = {};
1913            $.extend(!0, id, options || {}), id.posted ? ($f.hide(), nicEditors.findEditor($f.find("textarea").attr("id")).setContent(""), 
1914            options = $("div.pwsc", $p).find("li.post"), $f.parent().next("ul").prepend(options)) : $p.on("click", "a.reply", function() {
1915                var i, $pc = $(this).closest(".post-content"), $pcp = $pc.parent(), id = $pcp.attr("id");
1916                $p.data("fl") === id ? $f.toggle() : ($p.data("fl", id), $f.hide(), 
1917                i = id.indexOf("-"), $f.find("input[name='parentId']").attr("value", id.substring(i + 1)), 
1918                (i = $pcp.attr("depth")) && $f.find("input[name='parentDepth']").attr("value", i), 
1919                (id = $f.find("textarea")).prop("rich") ? (id.parent().css("width", "").children().each(function() {
1920                    $(this).css("width", "");
1921                }), nicEditors.findEditor(id.attr("id")).setContent("")) : (id.prop("rich", !0), 
1922                DI.ui.richTextEditor(id.attr("id"), {
1923                    basic: !0,
1924                    xhtml: "off"
1925                })), $pc.append($f), $f.show());
1926            });
1927        },
1928        blocksSort: function(id, hid, options) {
1929            DI.delayUntil(function() {
1930                return $("#" + id).is(":visible");
1931            }, function() {
1932                var $e = jQuery("#" + id), $c = $("> div", $e), o = {
1933                    axis: "y",
1934                    items: "> div",
1935                    update: function() {
1936                        $("#" + hid).val($e.sortable("toArray")).change();
1937                    }
1938                };
1939                $c.length < 2 || ($c.disableSelection(), $.extend(!0, o, options || {}), 
1940                $e.sortable(o), $e.disableSelection());
1941            });
1942        },
1943        gridder: function(selector, options) {
1944            var o = {};
1945            $.extend(!0, o, options || {}), $(selector).gridderExpander(o);
1946        },
1947        toastr: function(type, message, title, options) {
1948            var o = {
1949                positionClass: "toast-top-center"
1950            };
1951            $.extend(!0, o, options || {}), $("body").toastr(type, o, message, title);
1952        },
1953        cookiePrompt: function(options) {
1954            var setCookie, $cont, $msgWrap, $message, $infoLink, $acceptWrap, $accept;
1955            DI.util.inFrame() || (setCookie = function() {
1956                $.ajax({
1957                    url: options.url,
1958                    data: {
1959                        guid: JSON.stringify({
1960                            accepted: !0,
1961                            type: options.type,
1962                            uid: options.uid
1963                        })
1964                    },
1965                    type: "get",
1966                    success: function(result) {
1967                        result && $cont.hide();
1968                    }
1969                });
1970            }
1970, options.set ? setCookie() : ($cont = $("<div/>").addClass("cookie-prompt"), 
1971            $msgWrap = $("<div/>"), $message = $("<span/>").text(options.labels.message), 
1972            $infoLink = $("<a/>").addClass("info").attr("href", options.infoUrl).attr("target", "_blank").text(options.labels.infoLink), 
1973            $acceptWrap = $("<div/>"), ($accept = $("<a/>").addClass("accept").text(options.labels.accept)).click(function() {
1974                setCookie();
1975            }), $msgWrap.append($message), $msgWrap.append($infoLink), $cont.append($msgWrap), 
1976            $acceptWrap.append($accept), $cont.append($acceptWrap), $("body").append($cont)));
1977        },
1978        policyPrompt: function(options) {
1979            var $cont, $message;
1980            DI.util.inFrame() || ($cont = $("<div/>").addClass("policy-prompt"), 
1981            $message = $("<span/>").text(options.labels.message), options = $("<a/>").addClass("info").attr("href", options.infoUrl).attr("target", "_blank").text(options.labels.infoLink), 
1982            $cont.append($message), $cont.append(options), $("body").find(".policy-prompt").length && $(".policy-prompt").remove(), 
1983            $("body").append($cont));
1984        },
1985        TagResultListWidget: function(selector, options) {
1986            $(selector).TagResultListWidget(options);
1987        },
1988        BrowseMultiLevelTagsWidget: function(selector, options, sTagsets, sTags, navTagsets) {
1989            $(selector).BrowseMultiLevelTagsWidget(options, sTagsets, sTags, navTagsets);
1990        },
1991        ajaxProductSearch: function(selector, options) {
1992            $(selector).ajaxProductSearch(options);
1993        },
1994        sliderField: function(id, options) {
1995            var iid = "#" + id + "-selector";
1996            DI.delayUntil(function() {
1997                return $(iid).is(":visible");
1998            }, function() {
1999                var $slider = $(iid), o = {
2000                    change: function() {
2001                        $("#" + id).val($slider.slider("value"));
2002                    },
2003                    min: options.min,
2004                    max: options.max,
2005                    step: options.step && 0 < options.step && options.step || 1,
2006                    value: options.value
2007                };
2008                if ($slider.slider(o), options.showLabels) {
2009                    $slider.css({
2010                        marginBottom: "35px"
2011                    });
2012                    for (var i = o.min, range = o.max - o.min; i <= o.max; ) $slider.append($("<label>" + i + "</label>").css({
2013                        position: "absolute",
2014                        width: "20px",
2015                        marginTop: "20px",
2016                        marginLeft: "-10px",
2017                        textAlign: "center",
2018                        left: (i - o.min) / range * 100 + "%"
2019                    }).addClass("ui-slider-label")), i += options.labelStep;
2020                }
2021            });
2022        },
2023        scrollTo: function(selector, options) {
2024            selector = $(selector), options = $.extend(!0, {}, options);
2025            selector.length && $("html, body").animate({
2026                scrollTop: selector.first().offset().top - (options.offset || 0)
2027            });
2028        },
2029        homeLink: function(id, homeUrl, options) {
2030            id = $("#" + id);
2031            $.extend(!0, {}, options);
2032            id.length && id.click(function() {
2033                null == window.opener ? window.location.replace(homeUrl) : window.menubar.visible ? (window.location.replace(homeUrl), 
2034                window.opener.location.replace(homeUrl)) : (window.opener.location.replace(homeUrl), 
2035                window.closeCourse());
2036            });
2037        }
2038    };
2039}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.