Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function (dx, dB) {
- var el,
- cW,
- dk = typeof dB,
- cG = dx.document,
- eJ = dx.location,
- cx = dx.jQuery,
- cy = dx.$,
- cg = {},
- cc = [],
- de = "1.9.1",
- cd = cc.concat,
- dn = cc.push,
- dl = cc.slice,
- dq = cc.indexOf,
- di = cg.toString,
- cb = cg.hasOwnProperty,
- dg = de.trim,
- dr = function (a, b) {
- return new dr.fn.init(a, b, cW)
- },
- dp = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
- dm = /\S+/g,
- ed = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
- cM = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
- cC = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
- d0 = /^[\],:{}\s]*$/,
- d1 = /(?:^|:|,)(?:\s*\[)+/g,
- dY = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- dV = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
- dd = /^-ms-/,
- en = /-([\da-z])/gi,
- ea = function (b, a) {
- return a.toUpperCase()
- },
- ce = function (a) {
- if (cG.addEventListener || a.type === "load" || cG.readyState === "complete") {
- cJ();
- dr.ready()
- }
- },
- cJ = function () {
- if (cG.addEventListener) {
- cG.removeEventListener("DOMContentLoaded", ce, false);
- dx.removeEventListener("load", ce, false)
- } else {
- cG.detachEvent("onreadystatechange", ce);
- dx.detachEvent("onload", ce)
- }
- };
- dr.fn = dr.prototype = {
- jquery : de,
- constructor : dr,
- init : function (c, b, d) {
- var f,
- a;
- if (!c) {
- return this
- }
- if (typeof c === "string") {
- if (c.charAt(0) === "<" && c.charAt(c.length - 1) === ">" && c.length >= 3) {
- f = [null, c, null]
- } else {
- f = cM.exec(c)
- }
- if (f && (f[1] || !b)) {
- if (f[1]) {
- b = b instanceof dr ? b[0] : b;
- dr.merge(this, dr.parseHTML(f[1], b && b.nodeType ? b.ownerDocument || b : cG, true));
- if (cC.test(f[1]) && dr.isPlainObject(b)) {
- for (f in b) {
- if (dr.isFunction(this[f])) {
- this[f](b[f])
- } else {
- this.attr(f, b[f])
- }
- }
- }
- return this
- } else {
- a = cG.getElementById(f[2]);
- if (a && a.parentNode) {
- if (a.id !== f[2]) {
- return d.find(c)
- }
- this.length = 1;
- this[0] = a
- }
- this.context = cG;
- this.selector = c;
- return this
- }
- } else {
- if (!b || b.jquery) {
- return (b || d).find(c)
- } else {
- return this.constructor(b).find(c)
- }
- }
- } else {
- if (c.nodeType) {
- this.context = this[0] = c;
- this.length = 1;
- return this
- } else {
- if (dr.isFunction(c)) {
- return d.ready(c)
- }
- }
- }
- if (c.selector !== dB) {
- this.selector = c.selector;
- this.context = c.context
- }
- return dr.makeArray(c, this)
- },
- selector : "",
- length : 0,
- size : function () {
- return this.length
- },
- toArray : function () {
- return dl.call(this)
- },
- get : function (a) {
- return a == null ? this.toArray() : (a < 0 ? this[this.length + a] : this[a])
- },
- pushStack : function (b) {
- var a = dr.merge(this.constructor(), b);
- a.prevObject = this;
- a.context = this.context;
- return a
- },
- each : function (a, b) {
- return dr.each(this, a, b)
- },
- ready : function (a) {
- dr.ready.promise().done(a);
- return this
- },
- slice : function () {
- return this.pushStack(dl.apply(this, arguments))
- },
- first : function () {
- return this.eq(0)
- },
- last : function () {
- return this.eq(-1)
- },
- eq : function (b) {
- var c = this.length,
- a = +b + (b < 0 ? c : 0);
- return this.pushStack(a >= 0 && a < c ? [this[a]] : [])
- },
- map : function (a) {
- return this.pushStack(dr.map(this, function (b, c) {
- return a.call(b, c, b)
- }))
- },
- end : function () {
- return this.prevObject || this.constructor(null)
- },
- push : dn,
- sort : [].sort,
- splice : [].splice
- };
- dr.fn.init.prototype = dr.fn;
- dr.extend = dr.fn.extend = function () {
- var b,
- j,
- l,
- d,
- c,
- k,
- a = arguments[0] || {},
- g = 1,
- f = arguments.length,
- h = false;
- if (typeof a === "boolean") {
- h = a;
- a = arguments[1] || {};
- g = 2
- }
- if (typeof a !== "object" && !dr.isFunction(a)) {
- a = {}
- }
- if (f === g) {
- a = this;
- --g
- }
- for (; g < f; g++) {
- if ((c = arguments[g]) != null) {
- for (d in c) {
- b = a[d];
- l = c[d];
- if (a === l) {
- continue
- }
- if (h && l && (dr.isPlainObject(l) || (j = dr.isArray(l)))) {
- if (j) {
- j = false;
- k = b && dr.isArray(b) ? b : []
- } else {
- k = b && dr.isPlainObject(b) ? b : {}
- }
- a[d] = dr.extend(h, k, l)
- } else {
- if (l !== dB) {
- a[d] = l
- }
- }
- }
- }
- }
- return a
- };
- dr.extend({
- noConflict : function (a) {
- if (dx.$ === dr) {
- dx.$ = cy
- }
- if (a && dx.jQuery === dr) {
- dx.jQuery = cx
- }
- return dr
- },
- isReady : false,
- readyWait : 1,
- holdReady : function (a) {
- if (a) {
- dr.readyWait++
- } else {
- dr.ready(true)
- }
- },
- ready : function (a) {
- if (a === true ? --dr.readyWait : dr.isReady) {
- return
- }
- if (!cG.body) {
- return setTimeout(dr.ready)
- }
- dr.isReady = true;
- if (a !== true && --dr.readyWait > 0) {
- return
- }
- el.resolveWith(cG, [dr]);
- if (dr.fn.trigger) {
- dr(cG).trigger("ready").off("ready")
- }
- },
- isFunction : function (a) {
- return dr.type(a) === "function"
- },
- isArray : Array.isArray || function (a) {
- return dr.type(a) === "array"
- },
- isWindow : function (a) {
- return a != null && a == a.window
- },
- isNumeric : function (a) {
- return !isNaN(parseFloat(a)) && isFinite(a)
- },
- type : function (a) {
- if (a == null) {
- return String(a)
- }
- return typeof a === "object" || typeof a === "function" ? cg[di.call(a)] || "object" : typeof a
- },
- isPlainObject : function (b) {
- if (!b || dr.type(b) !== "object" || b.nodeType || dr.isWindow(b)) {
- return false
- }
- try {
- if (b.constructor && !cb.call(b, "constructor") && !cb.call(b.constructor.prototype, "isPrototypeOf")) {
- return false
- }
- } catch (a) {
- return false
- }
- var c;
- for (c in b) {}
- return c === dB || cb.call(b, c)
- },
- isEmptyObject : function (a) {
- var b;
- for (b in a) {
- return false
- }
- return true
- },
- error : function (a) {
- throw new Error(a)
- },
- parseHTML : function (a, c, f) {
- if (!a || typeof a !== "string") {
- return null
- }
- if (typeof c === "boolean") {
- f = c;
- c = false
- }
- c = c || cG;
- var d = cC.exec(a),
- b = !f && [];
- if (d) {
- return [c.createElement(d[1])]
- }
- d = dr.buildFragment([a], c, b);
- if (b) {
- dr(b).remove()
- }
- return dr.merge([], d.childNodes)
- },
- parseJSON : function (a) {
- if (dx.JSON && dx.JSON.parse) {
- return dx.JSON.parse(a)
- }
- if (a === null) {
- return a
- }
- if (typeof a === "string") {
- a = dr.trim(a);
- if (a) {
- if (d0.test(a.replace(dY, "@").replace(dV, "]").replace(d1, ""))) {
- return (new Function("return " + a))()
- }
- }
- }
- dr.error("Invalid JSON: " + a)
- },
- parseXML : function (a) {
- var b,
- c;
- if (!a || typeof a !== "string") {
- return null
- }
- try {
- if (dx.DOMParser) {
- c = new DOMParser();
- b = c.parseFromString(a, "text/xml")
- } else {
- b = new ActiveXObject("Microsoft.XMLDOM");
- b.async = "false";
- b.loadXML(a)
- }
- } catch (d) {
- b = dB
- }
- if (!b || !b.documentElement || b.getElementsByTagName("parsererror").length) {
- dr.error("Invalid XML: " + a)
- }
- return b
- },
- noop : function () {},
- globalEval : function (a) {
- if (a && dr.trim(a)) {
- (dx.execScript || function (b) {
- dx["eval"].call(dx, b)
- })(a)
- }
- },
- camelCase : function (a) {
- return a.replace(dd, "ms-").replace(en, ea)
- },
- nodeName : function (b, a) {
- return b.nodeName && b.nodeName.toLowerCase() === a.toLowerCase()
- },
- each : function (c, a, f) {
- var b,
- h = 0,
- d = c.length,
- g = dy(c);
- if (f) {
- if (g) {
- for (; h < d; h++) {
- b = a.apply(c[h], f);
- if (b === false) {
- break
- }
- }
- } else {
- for (h in c) {
- b = a.apply(c[h], f);
- if (b === false) {
- break
- }
- }
- }
- } else {
- if (g) {
- for (; h < d; h++) {
- b = a.call(c[h], h, c[h]);
- if (b === false) {
- break
- }
- }
- } else {
- for (h in c) {
- b = a.call(c[h], h, c[h]);
- if (b === false) {
- break
- }
- }
- }
- }
- return c
- },
- trim : dg && !dg.call("\uFEFF\xA0") ? function (a) {
- return a == null ? "" : dg.call(a)
- }
- : function (a) {
- return a == null ? "" : (a + "").replace(ed, "")
- },
- makeArray : function (b, a) {
- var c = a || [];
- if (b != null) {
- if (dy(Object(b))) {
- dr.merge(c, typeof b === "string" ? [b] : b)
- } else {
- dn.call(c, b)
- }
- }
- return c
- },
- inArray : function (a, b, d) {
- var c;
- if (b) {
- if (dq) {
- return dq.call(b, a, d)
- }
- c = b.length;
- d = d ? d < 0 ? Math.max(0, c + d) : d : 0;
- for (; d < c; d++) {
- if (d in b && b[d] === a) {
- return d
- }
- }
- }
- return -1
- },
- merge : function (c, b) {
- var d = b.length,
- a = c.length,
- f = 0;
- if (typeof d === "number") {
- for (; f < d; f++) {
- c[a++] = b[f]
- }
- } else {
- while (b[f] !== dB) {
- c[a++] = b[f++]
- }
- }
- c.length = a;
- return c
- },
- grep : function (a, f, g) {
- var b,
- c = [],
- h = 0,
- d = a.length;
- g = !!g;
- for (; h < d; h++) {
- b = !!f(a[h], h);
- if (g !== b) {
- c.push(a[h])
- }
- }
- return c
- },
- map : function (j, a, g) {
- var b,
- h = 0,
- d = j.length,
- f = dy(j),
- c = [];
- if (f) {
- for (; h < d; h++) {
- b = a(j[h], h, g);
- if (b != null) {
- c[c.length] = b
- }
- }
- } else {
- for (h in j) {
- b = a(j[h], h, g);
- if (b != null) {
- c[c.length] = b
- }
- }
- }
- return cd.apply([], c)
- },
- guid : 1,
- proxy : function (f, a) {
- var c,
- d,
- b;
- if (typeof a === "string") {
- b = f[a];
- a = f;
- f = b
- }
- if (!dr.isFunction(f)) {
- return dB
- }
- c = dl.call(arguments, 2);
- d = function () {
- return f.apply(a || this, c.concat(dl.call(arguments)))
- };
- d.guid = f.guid = f.guid || dr.guid++;
- return d
- },
- access : function (k, g, d, a, l, h, b) {
- var f = 0,
- c = k.length,
- j = d == null;
- if (dr.type(d) === "object") {
- l = true;
- for (f in d) {
- dr.access(k, g, f, d[f], true, h, b)
- }
- } else {
- if (a !== dB) {
- l = true;
- if (!dr.isFunction(a)) {
- b = true
- }
- if (j) {
- if (b) {
- g.call(k, a);
- g = null
- } else {
- j = g;
- g = function (o, n, m) {
- return j.call(dr(o), m)
- }
- }
- }
- if (g) {
- for (; f < c; f++) {
- g(k[f], d, b ? a : a.call(k[f], f, g(k[f], d)))
- }
- }
- }
- }
- return l ? k : j ? g.call(k) : c ? g(k[0], d) : h
- },
- now : function () {
- return (new Date()).getTime()
- }
- });
- dr.ready.promise = function (c) {
- if (!el) {
- el = dr.Deferred();
- if (cG.readyState === "complete") {
- setTimeout(dr.ready)
- } else {
- if (cG.addEventListener) {
- cG.addEventListener("DOMContentLoaded", ce, false);
- dx.addEventListener("load", ce, false)
- } else {
- cG.attachEvent("onreadystatechange", ce);
- dx.attachEvent("onload", ce);
- var b = false;
- try {
- b = dx.frameElement == null && cG.documentElement
- } catch (d) {}
- if (b && b.doScroll) {
- (function a() {
- if (!dr.isReady) {
- try {
- b.doScroll("left")
- } catch (f) {
- return setTimeout(a, 50)
- }
- cJ();
- dr.ready()
- }
- })()
- }
- }
- }
- }
- return el.promise(c)
- };
- dr.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (b, a) {
- cg["[object " + a + "]"] = a.toLowerCase()
- });
- function dy(a) {
- var b = a.length,
- c = dr.type(a);
- if (dr.isWindow(a)) {
- return false
- }
- if (a.nodeType === 1 && b) {
- return true
- }
- return c === "array" || c !== "function" && (b === 0 || typeof b === "number" && b > 0 && (b - 1)in a)
- }
- cW = dr(cG);
- var eE = {};
- function c8(a) {
- var b = eE[a] = {};
- dr.each(a.match(dm) || [], function (d, c) {
- b[c] = true
- });
- return b
- }
- dr.Callbacks = function (c) {
- c = typeof c === "string" ? (eE[c] || c8(c)) : dr.extend({}, c);
- var l,
- d,
- m,
- h,
- j,
- g,
- f = [],
- a = !c.once && [],
- k = function (n) {
- d = c.memory && n;
- m = true;
- j = g || 0;
- g = 0;
- h = f.length;
- l = true;
- for (; f && j < h; j++) {
- if (f[j].apply(n[0], n[1]) === false && c.stopOnFalse) {
- d = false;
- break
- }
- }
- l = false;
- if (f) {
- if (a) {
- if (a.length) {
- k(a.shift())
- }
- } else {
- if (d) {
- f = []
- } else {
- b.disable()
- }
- }
- }
- },
- b = {
- add : function () {
- if (f) {
- var n = f.length;
- (function o(p) {
- dr.each(p, function (s, r) {
- var q = dr.type(r);
- if (q === "function") {
- if (!c.unique || !b.has(r)) {
- f.push(r)
- }
- } else {
- if (r && r.length && q !== "string") {
- o(r)
- }
- }
- })
- })(arguments);
- if (l) {
- h = f.length
- } else {
- if (d) {
- g = n;
- k(d)
- }
- }
- }
- return this
- },
- remove : function () {
- if (f) {
- dr.each(arguments, function (p, o) {
- var n;
- while ((n = dr.inArray(o, f, n)) > -1) {
- f.splice(n, 1);
- if (l) {
- if (n <= h) {
- h--
- }
- if (n <= j) {
- j--
- }
- }
- }
- })
- }
- return this
- },
- has : function (n) {
- return n ? dr.inArray(n, f) > -1 : !!(f && f.length)
- },
- empty : function () {
- f = [];
- return this
- },
- disable : function () {
- f = a = d = dB;
- return this
- },
- disabled : function () {
- return !f
- },
- lock : function () {
- a = dB;
- if (!d) {
- b.disable()
- }
- return this
- },
- locked : function () {
- return !a
- },
- fireWith : function (n, o) {
- o = o || [];
- o = [n, o.slice ? o.slice() : o];
- if (f && (!m || a)) {
- if (l) {
- a.push(o)
- } else {
- k(o)
- }
- }
- return this
- },
- fire : function () {
- b.fireWith(this, arguments);
- return this
- },
- fired : function () {
- return !!m
- }
- };
- return b
- };
- dr.extend({
- Deferred : function (a) {
- var c = [["resolve", "done", dr.Callbacks("once memory"), "resolved"], ["reject", "fail", dr.Callbacks("once memory"), "rejected"], ["notify", "progress", dr.Callbacks("memory")]],
- d = "pending",
- f = {
- state : function () {
- return d
- },
- always : function () {
- b.done(arguments).fail(arguments);
- return this
- },
- then : function () {
- var g = arguments;
- return dr.Deferred(function (h) {
- dr.each(c, function (m, l) {
- var k = l[0],
- j = dr.isFunction(g[m]) && g[m];
- b[l[1]](function () {
- var n = j && j.apply(this, arguments);
- if (n && dr.isFunction(n.promise)) {
- n.promise().done(h.resolve).fail(h.reject).progress(h.notify)
- } else {
- h[k + "With"](this === f ? h.promise() : this, j ? [n] : arguments)
- }
- })
- });
- g = null
- }).promise()
- },
- promise : function (g) {
- return g != null ? dr.extend(g, f) : f
- }
- },
- b = {};
- f.pipe = f.then;
- dr.each(c, function (k, g) {
- var j = g[2],
- h = g[3];
- f[g[1]] = j.add;
- if (h) {
- j.add(function () {
- d = h
- }, c[k^1][2].disable, c[2][2].lock)
- }
- b[g[0]] = function () {
- b[g[0] + "With"](this === b ? f : this, arguments);
- return this
- };
- b[g[0] + "With"] = j.fireWith
- });
- f.promise(b);
- if (a) {
- a.call(b, b)
- }
- return b
- },
- when : function (b) {
- var l = 0,
- c = dl.call(arguments),
- j = c.length,
- f = j !== 1 || (b && dr.isFunction(b.promise)) ? j : 0,
- k = f === 1 ? b : dr.Deferred(),
- a = function (n, o, m) {
- return function (p) {
- o[n] = this;
- m[n] = arguments.length > 1 ? dl.call(arguments) : p;
- if (m === g) {
- k.notifyWith(o, m)
- } else {
- if (!(--f)) {
- k.resolveWith(o, m)
- }
- }
- }
- },
- g,
- h,
- d;
- if (j > 1) {
- g = new Array(j);
- h = new Array(j);
- d = new Array(j);
- for (; l < j; l++) {
- if (c[l] && dr.isFunction(c[l].promise)) {
- c[l].promise().done(a(l, d, c)).fail(k.reject).progress(a(l, h, g))
- } else {
- --f
- }
- }
- }
- if (!f) {
- k.resolveWith(d, c)
- }
- return k.promise()
- }
- });
- dr.support = (function () {
- var a,
- m,
- n,
- f,
- b,
- h,
- c,
- j,
- d,
- g,
- l = cG.createElement("div");
- l.setAttribute("className", "t");
- l.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
- m = l.getElementsByTagName("*");
- n = l.getElementsByTagName("a")[0];
- if (!m || !n || !m.length) {
- return {}
- }
- b = cG.createElement("select");
- c = b.appendChild(cG.createElement("option"));
- f = l.getElementsByTagName("input")[0];
- n.style.cssText = "top:1px;float:left;opacity:.5";
- a = {
- getSetAttribute : l.className !== "t",
- leadingWhitespace : l.firstChild.nodeType === 3,
- tbody : !l.getElementsByTagName("tbody").length,
- htmlSerialize : !!l.getElementsByTagName("link").length,
- style : /top/.test(n.getAttribute("style")),
- hrefNormalized : n.getAttribute("href") === "/a",
- opacity : /^0.5/.test(n.style.opacity),
- cssFloat : !!n.style.cssFloat,
- checkOn : !!f.value,
- optSelected : c.selected,
- enctype : !!cG.createElement("form").enctype,
- html5Clone : cG.createElement("nav").cloneNode(true).outerHTML !== "<:nav></:nav>",
- boxModel : cG.compatMode === "CSS1Compat",
- deleteExpando : true,
- noCloneEvent : true,
- inlineBlockNeedsLayout : false,
- shrinkWrapBlocks : false,
- reliableMarginRight : true,
- boxSizingReliable : true,
- pixelPosition : false
- };
- f.checked = true;
- a.noCloneChecked = f.cloneNode(true).checked;
- b.disabled = true;
- a.optDisabled = !c.disabled;
- try {
- delete l.test
- } catch (k) {
- a.deleteExpando = false
- }
- f = cG.createElement("input");
- f.setAttribute("value", "");
- a.input = f.getAttribute("value") === "";
- f.value = "t";
- f.setAttribute("type", "radio");
- a.radioValue = f.value === "t";
- f.setAttribute("checked", "t");
- f.setAttribute("name", "t");
- h = cG.createDocumentFragment();
- h.appendChild(f);
- a.appendChecked = f.checked;
- a.checkClone = h.cloneNode(true).cloneNode(true).lastChild.checked;
- if (l.attachEvent) {
- l.attachEvent("onclick", function () {
- a.noCloneEvent = false
- });
- l.cloneNode(true).click()
- }
- for (g in {
- submit : true,
- change : true,
- focusin : true
- }) {
- l.setAttribute(j = "on" + g, "t");
- a[g + "Bubbles"] = j in dx || l.attributes[j].expando === false
- }
- l.style.backgroundClip = "content-box";
- l.cloneNode(true).style.backgroundClip = "";
- a.clearCloneStyle = l.style.backgroundClip === "content-box";
- dr(function () {
- var r,
- p,
- o,
- q = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
- s = cG.getElementsByTagName("body")[0];
- if (!s) {
- return
- }
- r = cG.createElement("div");
- r.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
- s.appendChild(r).appendChild(l);
- l.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
- o = l.getElementsByTagName("td");
- o[0].style.cssText = "padding:0;margin:0;border:0;display:none";
- d = (o[0].offsetHeight === 0);
- o[0].style.display = "";
- o[1].style.display = "none";
- a.reliableHiddenOffsets = d && (o[0].offsetHeight === 0);
- l.innerHTML = "";
- l.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
- a.boxSizing = (l.offsetWidth === 4);
- a.doesNotIncludeMarginInBodyOffset = (s.offsetTop !== 1);
- if (dx.getComputedStyle) {
- a.pixelPosition = (dx.getComputedStyle(l, null) || {}).top !== "1%";
- a.boxSizingReliable = (dx.getComputedStyle(l, null) || {
- width : "4px"
- }).width === "4px";
- p = l.appendChild(cG.createElement("div"));
- p.style.cssText = l.style.cssText = q;
- p.style.marginRight = p.style.width = "0";
- l.style.width = "1px";
- a.reliableMarginRight = !parseFloat((dx.getComputedStyle(p, null) || {}).marginRight)
- }
- if (typeof l.style.zoom !== dk) {
- l.innerHTML = "";
- l.style.cssText = q + "width:1px;padding:1px;display:inline;zoom:1";
- a.inlineBlockNeedsLayout = (l.offsetWidth === 3);
- l.style.display = "block";
- l.innerHTML = "<div></div>";
- l.firstChild.style.width = "5px";
- a.shrinkWrapBlocks = (l.offsetWidth !== 3);
- if (a.inlineBlockNeedsLayout) {
- s.style.zoom = 1
- }
- }
- s.removeChild(r);
- r = l = o = p = null
- });
- m = b = h = c = n = f = null;
- return a
- })();
- var ey = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
- db = /([A-Z])/g;
- function dD(l, d, m, c) {
- if (!dr.acceptData(l)) {
- return
- }
- var a,
- b,
- g = dr.expando,
- j = typeof d === "string",
- f = l.nodeType,
- k = f ? dr.cache : l,
- h = f ? l[g] : l[g] && g;
- if ((!h || !k[h] || (!c && !k[h].data)) && j && m === dB) {
- return
- }
- if (!h) {
- if (f) {
- l[g] = h = cc.pop() || dr.guid++
- } else {
- h = g
- }
- }
- if (!k[h]) {
- k[h] = {};
- if (!f) {
- k[h].toJSON = dr.noop
- }
- }
- if (typeof d === "object" || typeof d === "function") {
- if (c) {
- k[h] = dr.extend(k[h], d)
- } else {
- k[h].data = dr.extend(k[h].data, d)
- }
- }
- a = k[h];
- if (!c) {
- if (!a.data) {
- a.data = {}
- }
- a = a.data
- }
- if (m !== dB) {
- a[dr.camelCase(d)] = m
- }
- if (j) {
- b = a[d];
- if (b == null) {
- b = a[dr.camelCase(d)]
- }
- } else {
- b = a
- }
- return b
- }
- function dA(k, c, b) {
- if (!dr.acceptData(k)) {
- return
- }
- var h,
- d,
- a,
- f = k.nodeType,
- j = f ? dr.cache : k,
- g = f ? k[dr.expando] : dr.expando;
- if (!j[g]) {
- return
- }
- if (c) {
- a = b ? j[g] : j[g].data;
- if (a) {
- if (!dr.isArray(c)) {
- if (c in a) {
- c = [c]
- } else {
- c = dr.camelCase(c);
- if (c in a) {
- c = [c]
- } else {
- c = c.split(" ")
- }
- }
- } else {
- c = c.concat(dr.map(c, dr.camelCase))
- }
- for (h = 0, d = c.length; h < d; h++) {
- delete a[c[h]]
- }
- if (!(b ? dw : dr.isEmptyObject)(a)) {
- return
- }
- }
- }
- if (!b) {
- delete j[g].data;
- if (!dw(j[g])) {
- return
- }
- }
- if (f) {
- dr.cleanData([k], true)
- } else {
- if (dr.support.deleteExpando || j != j.window) {
- delete j[g]
- } else {
- j[g] = null
- }
- }
- }
- dr.extend({
- cache : {},
- expando : "jQuery" + (de + Math.random()).replace(/\D/g, ""),
- noData : {
- embed : true,
- object : "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- applet : true
- },
- hasData : function (a) {
- a = a.nodeType ? dr.cache[a[dr.expando]] : a[dr.expando];
- return !!a && !dw(a)
- },
- data : function (a, c, b) {
- return dD(a, c, b)
- },
- removeData : function (b, a) {
- return dA(b, a)
- },
- _data : function (a, c, b) {
- return dD(a, c, b, true)
- },
- _removeData : function (b, a) {
- return dA(b, a, true)
- },
- acceptData : function (b) {
- if (b.nodeType && b.nodeType !== 1 && b.nodeType !== 9) {
- return false
- }
- var a = b.nodeName && dr.noData[b.nodeName.toLowerCase()];
- return !a || a !== true && b.getAttribute("classid") === a
- }
- });
- dr.fn.extend({
- data : function (f, b) {
- var d,
- c,
- h = this[0],
- g = 0,
- a = null;
- if (f === dB) {
- if (this.length) {
- a = dr.data(h);
- if (h.nodeType === 1 && !dr._data(h, "parsedAttrs")) {
- d = h.attributes;
- for (; g < d.length; g++) {
- c = d[g].name;
- if (!c.indexOf("data-")) {
- c = dr.camelCase(c.slice(5));
- cN(h, c, a[c])
- }
- }
- dr._data(h, "parsedAttrs", true)
- }
- }
- return a
- }
- if (typeof f === "object") {
- return this.each(function () {
- dr.data(this, f)
- })
- }
- return dr.access(this, function (j) {
- if (j === dB) {
- return h ? cN(h, f, dr.data(h, f)) : null
- }
- this.each(function () {
- dr.data(this, f, j)
- })
- }, null, b, arguments.length > 1, null, true)
- },
- removeData : function (a) {
- return this.each(function () {
- dr.removeData(this, a)
- })
- }
- });
- function cN(d, c, a) {
- if (a === dB && d.nodeType === 1) {
- var b = "data-" + c.replace(db, "-$1").toLowerCase();
- a = d.getAttribute(b);
- if (typeof a === "string") {
- try {
- a = a === "true" ? true : a === "false" ? false : a === "null" ? null : +a + "" === a ? +a : ey.test(a) ? dr.parseJSON(a) : a
- } catch (f) {}
- dr.data(d, c, a)
- } else {
- a = dB
- }
- }
- return a
- }
- function dw(a) {
- var b;
- for (b in a) {
- if (b === "data" && dr.isEmptyObject(a[b])) {
- continue
- }
- if (b !== "toJSON") {
- return false
- }
- }
- return true
- }
- dr.extend({
- queue : function (a, c, b) {
- var d;
- if (a) {
- c = (c || "fx") + "queue";
- d = dr._data(a, c);
- if (b) {
- if (!d || dr.isArray(b)) {
- d = dr._data(a, c, dr.makeArray(b))
- } else {
- d.push(b)
- }
- }
- return d || []
- }
- },
- dequeue : function (f, b) {
- b = b || "fx";
- var d = dr.queue(f, b),
- c = d.length,
- a = d.shift(),
- h = dr._queueHooks(f, b),
- g = function () {
- dr.dequeue(f, b)
- };
- if (a === "inprogress") {
- a = d.shift();
- c--
- }
- h.cur = a;
- if (a) {
- if (b === "fx") {
- d.unshift("inprogress")
- }
- delete h.stop;
- a.call(f, g, h)
- }
- if (!c && h) {
- h.empty.fire()
- }
- },
- _queueHooks : function (b, c) {
- var a = c + "queueHooks";
- return dr._data(b, a) || dr._data(b, a, {
- empty : dr.Callbacks("once memory").add(function () {
- dr._removeData(b, c + "queue");
- dr._removeData(b, a)
- })
- })
- }
- });
- dr.fn.extend({
- queue : function (c, b) {
- var a = 2;
- if (typeof c !== "string") {
- b = c;
- c = "fx";
- a--
- }
- if (arguments.length < a) {
- return dr.queue(this[0], c)
- }
- return b === dB ? this : this.each(function () {
- var d = dr.queue(this, c, b);
- dr._queueHooks(this, c);
- if (c === "fx" && d[0] !== "inprogress") {
- dr.dequeue(this, c)
- }
- })
- },
- dequeue : function (a) {
- return this.each(function () {
- dr.dequeue(this, a)
- })
- },
- delay : function (b, a) {
- b = dr.fx ? dr.fx.speeds[b] || b : b;
- a = a || "fx";
- return this.queue(a, function (d, f) {
- var c = setTimeout(d, b);
- f.stop = function () {
- clearTimeout(c)
- }
- })
- },
- clearQueue : function (a) {
- return this.queue(a || "fx", [])
- },
- promise : function (b, g) {
- var c,
- f = 1,
- a = dr.Deferred(),
- j = this,
- h = this.length,
- d = function () {
- if (!(--f)) {
- a.resolveWith(j, [j])
- }
- };
- if (typeof b !== "string") {
- g = b;
- b = dB
- }
- b = b || "fx";
- while (h--) {
- c = dr._data(j[h], b + "queueHooks");
- if (c && c.empty) {
- f++;
- c.empty.add(d)
- }
- }
- d();
- return a.promise(g)
- }
- });
- var eH,
- ci,
- ev = /[\t\r\n]/g,
- cI = /\r/g,
- eh = /^(?:input|select|textarea|button|object)$/i,
- er = /^(?:a|area)$/i,
- ez = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
- d3 = /^(?:checked|selected)$/i,
- dT = dr.support.getSetAttribute,
- dR = dr.support.input;
- dr.fn.extend({
- attr : function (b, a) {
- return dr.access(this, dr.attr, b, a, arguments.length > 1)
- },
- removeAttr : function (a) {
- return this.each(function () {
- dr.removeAttr(this, a)
- })
- },
- prop : function (b, a) {
- return dr.access(this, dr.prop, b, a, arguments.length > 1)
- },
- removeProp : function (a) {
- a = dr.propFix[a] || a;
- return this.each(function () {
- try {
- this[a] = dB;
- delete this[a]
- } catch (b) {}
- })
- },
- addClass : function (a) {
- var j,
- g,
- h,
- k,
- d,
- f = 0,
- c = this.length,
- b = typeof a === "string" && a;
- if (dr.isFunction(a)) {
- return this.each(function (l) {
- dr(this).addClass(a.call(this, l, this.className))
- })
- }
- if (b) {
- j = (a || "").match(dm) || [];
- for (; f < c; f++) {
- g = this[f];
- h = g.nodeType === 1 && (g.className ? (" " + g.className + " ").replace(ev, " ") : " ");
- if (h) {
- d = 0;
- while ((k = j[d++])) {
- if (h.indexOf(" " + k + " ") < 0) {
- h += k + " "
- }
- }
- g.className = dr.trim(h)
- }
- }
- }
- return this
- },
- removeClass : function (a) {
- var j,
- g,
- h,
- k,
- d,
- f = 0,
- c = this.length,
- b = arguments.length === 0 || typeof a === "string" && a;
- if (dr.isFunction(a)) {
- return this.each(function (l) {
- dr(this).removeClass(a.call(this, l, this.className))
- })
- }
- if (b) {
- j = (a || "").match(dm) || [];
- for (; f < c; f++) {
- g = this[f];
- h = g.nodeType === 1 && (g.className ? (" " + g.className + " ").replace(ev, " ") : "");
- if (h) {
- d = 0;
- while ((k = j[d++])) {
- while (h.indexOf(" " + k + " ") >= 0) {
- h = h.replace(" " + k + " ", " ")
- }
- }
- g.className = a ? dr.trim(h) : ""
- }
- }
- }
- return this
- },
- toggleClass : function (c, a) {
- var d = typeof c,
- b = typeof a === "boolean";
- if (dr.isFunction(c)) {
- return this.each(function (f) {
- dr(this).toggleClass(c.call(this, f, this.className, a), a)
- })
- }
- return this.each(function () {
- if (d === "string") {
- var k,
- h = 0,
- g = dr(this),
- f = a,
- j = c.match(dm) || [];
- while ((k = j[h++])) {
- f = b ? f : !g.hasClass(k);
- g[f ? "addClass" : "removeClass"](k)
- }
- } else {
- if (d === dk || d === "boolean") {
- if (this.className) {
- dr._data(this, "__className__", this.className)
- }
- this.className = this.className || c === false ? "" : dr._data(this, "__className__") || ""
- }
- }
- })
- },
- hasClass : function (c) {
- var b = " " + c + " ",
- a = 0,
- d = this.length;
- for (; a < d; a++) {
- if (this[a].nodeType === 1 && (" " + this[a].className + " ").replace(ev, " ").indexOf(b) >= 0) {
- return true
- }
- }
- return false
- },
- val : function (c) {
- var d,
- a,
- f,
- b = this[0];
- if (!arguments.length) {
- if (b) {
- a = dr.valHooks[b.type] || dr.valHooks[b.nodeName.toLowerCase()];
- if (a && "get" in a && (d = a.get(b, "value")) !== dB) {
- return d
- }
- d = b.value;
- return typeof d === "string" ? d.replace(cI, "") : d == null ? "" : d
- }
- return
- }
- f = dr.isFunction(c);
- return this.each(function (j) {
- var g,
- h = dr(this);
- if (this.nodeType !== 1) {
- return
- }
- if (f) {
- g = c.call(this, j, h.val())
- } else {
- g = c
- }
- if (g == null) {
- g = ""
- } else {
- if (typeof g === "number") {
- g += ""
- } else {
- if (dr.isArray(g)) {
- g = dr.map(g, function (k) {
- return k == null ? "" : k + ""
- })
- }
- }
- }
- a = dr.valHooks[this.type] || dr.valHooks[this.nodeName.toLowerCase()];
- if (!a || !("set" in a) || a.set(this, g, "value") === dB) {
- this.value = g
- }
- })
- }
- });
- dr.extend({
- valHooks : {
- option : {
- get : function (b) {
- var a = b.attributes.value;
- return !a || a.specified ? b.value : b.text
- }
- },
- select : {
- get : function (j) {
- var b,
- d,
- c = j.options,
- h = j.selectedIndex,
- f = j.type === "select-one" || h < 0,
- a = f ? null : [],
- g = f ? h + 1 : c.length,
- k = h < 0 ? g : f ? h : 0;
- for (; k < g; k++) {
- d = c[k];
- if ((d.selected || k === h) && (dr.support.optDisabled ? !d.disabled : d.getAttribute("disabled") === null) && (!d.parentNode.disabled || !dr.nodeName(d.parentNode, "optgroup"))) {
- b = dr(d).val();
- if (f) {
- return b
- }
- a.push(b)
- }
- }
- return a
- },
- set : function (b, a) {
- var c = dr.makeArray(a);
- dr(b).find("option").each(function () {
- this.selected = dr.inArray(dr(this).val(), c) >= 0
- });
- if (!c.length) {
- b.selectedIndex = -1
- }
- return c
- }
- }
- },
- attr : function (f, h, b) {
- var a,
- g,
- c,
- d = f.nodeType;
- if (!f || d === 3 || d === 8 || d === 2) {
- return
- }
- if (typeof f.getAttribute === dk) {
- return dr.prop(f, h, b)
- }
- g = d !== 1 || !dr.isXMLDoc(f);
- if (g) {
- h = h.toLowerCase();
- a = dr.attrHooks[h] || (ez.test(h) ? ci : eH)
- }
- if (b !== dB) {
- if (b === null) {
- dr.removeAttr(f, h)
- } else {
- if (a && g && "set" in a && (c = a.set(f, b, h)) !== dB) {
- return c
- } else {
- f.setAttribute(h, b + "");
- return b
- }
- }
- } else {
- if (a && g && "get" in a && (c = a.get(f, h)) !== null) {
- return c
- } else {
- if (typeof f.getAttribute !== dk) {
- c = f.getAttribute(h)
- }
- return c == null ? dB : c
- }
- }
- },
- removeAttr : function (a, b) {
- var f,
- d,
- g = 0,
- c = b && b.match(dm);
- if (c && a.nodeType === 1) {
- while ((f = c[g++])) {
- d = dr.propFix[f] || f;
- if (ez.test(f)) {
- if (!dT && d3.test(f)) {
- a[dr.camelCase("default-" + f)] = a[d] = false
- } else {
- a[d] = false
- }
- } else {
- dr.attr(a, f, "")
- }
- a.removeAttribute(dT ? f : d)
- }
- }
- },
- attrHooks : {
- type : {
- set : function (b, c) {
- if (!dr.support.radioValue && c === "radio" && dr.nodeName(b, "input")) {
- var a = b.value;
- b.setAttribute("type", c);
- if (a) {
- b.value = a
- }
- return c
- }
- }
- }
- },
- propFix : {
- tabindex : "tabIndex",
- readonly : "readOnly",
- "for" : "htmlFor",
- "class" : "className",
- maxlength : "maxLength",
- cellspacing : "cellSpacing",
- cellpadding : "cellPadding",
- rowspan : "rowSpan",
- colspan : "colSpan",
- usemap : "useMap",
- frameborder : "frameBorder",
- contenteditable : "contentEditable"
- },
- prop : function (f, h, b) {
- var c,
- a,
- g,
- d = f.nodeType;
- if (!f || d === 3 || d === 8 || d === 2) {
- return
- }
- g = d !== 1 || !dr.isXMLDoc(f);
- if (g) {
- h = dr.propFix[h] || h;
- a = dr.propHooks[h]
- }
- if (b !== dB) {
- if (a && "set" in a && (c = a.set(f, b, h)) !== dB) {
- return c
- } else {
- return (f[h] = b)
- }
- } else {
- if (a && "get" in a && (c = a.get(f, h)) !== null) {
- return c
- } else {
- return f[h]
- }
- }
- },
- propHooks : {
- tabIndex : {
- get : function (a) {
- var b = a.getAttributeNode("tabindex");
- return b && b.specified ? parseInt(b.value, 10) : eh.test(a.nodeName) || er.test(a.nodeName) && a.href ? 0 : dB
- }
- }
- }
- });
- ci = {
- get : function (f, d) {
- var c = dr.prop(f, d),
- b = typeof c === "boolean" && f.getAttribute(d),
- a = typeof c === "boolean" ? dR && dT ? b != null : d3.test(d) ? f[dr.camelCase("default-" + d)] : !!b : f.getAttributeNode(d);
- return a && a.value !== false ? d.toLowerCase() : dB
- },
- set : function (b, c, a) {
- if (c === false) {
- dr.removeAttr(b, a)
- } else {
- if (dR && dT || !d3.test(a)) {
- b.setAttribute(!dT && dr.propFix[a] || a, a)
- } else {
- b[dr.camelCase("default-" + a)] = b[a] = true
- }
- }
- return a
- }
- };
- if (!dR || !dT) {
- dr.attrHooks.value = {
- get : function (b, a) {
- var c = b.getAttributeNode(a);
- return dr.nodeName(b, "input") ? b.defaultValue : c && c.specified ? c.value : dB
- },
- set : function (b, c, a) {
- if (dr.nodeName(b, "input")) {
- b.defaultValue = c
- } else {
- return eH && eH.set(b, c, a)
- }
- }
- }
- }
- if (!dT) {
- eH = dr.valHooks.button = {
- get : function (b, a) {
- var c = b.getAttributeNode(a);
- return c && (a === "id" || a === "name" || a === "coords" ? c.value !== "" : c.specified) ? c.value : dB
- },
- set : function (b, c, a) {
- var d = b.getAttributeNode(a);
- if (!d) {
- b.setAttributeNode((d = b.ownerDocument.createAttribute(a)))
- }
- d.value = c += "";
- return a === "value" || c === b.getAttribute(a) ? c : dB
- }
- };
- dr.attrHooks.contenteditable = {
- get : eH.get,
- set : function (b, c, a) {
- eH.set(b, c === "" ? false : c, a)
- }
- };
- dr.each(["width", "height"], function (b, a) {
- dr.attrHooks[a] = dr.extend(dr.attrHooks[a], {
- set : function (d, c) {
- if (c === "") {
- d.setAttribute(a, "auto");
- return c
- }
- }
- })
- })
- }
- if (!dr.support.hrefNormalized) {
- dr.each(["href", "src", "width", "height"], function (b, a) {
- dr.attrHooks[a] = dr.extend(dr.attrHooks[a], {
- get : function (d) {
- var c = d.getAttribute(a, 2);
- return c == null ? dB : c
- }
- })
- });
- dr.each(["href", "src"], function (b, a) {
- dr.propHooks[a] = {
- get : function (c) {
- return c.getAttribute(a, 4)
- }
- }
- })
- }
- if (!dr.support.style) {
- dr.attrHooks.style = {
- get : function (a) {
- return a.style.cssText || dB
- },
- set : function (b, a) {
- return (b.style.cssText = a + "")
- }
- }
- }
- if (!dr.support.optSelected) {
- dr.propHooks.selected = dr.extend(dr.propHooks.selected, {
- get : function (b) {
- var a = b.parentNode;
- if (a) {
- a.selectedIndex;
- if (a.parentNode) {
- a.parentNode.selectedIndex
- }
- }
- return null
- }
- })
- }
- if (!dr.support.enctype) {
- dr.propFix.enctype = "encoding"
- }
- if (!dr.support.checkOn) {
- dr.each(["radio", "checkbox"], function () {
- dr.valHooks[this] = {
- get : function (a) {
- return a.getAttribute("value") === null ? "on" : a.value
- }
- }
- })
- }
- dr.each(["radio", "checkbox"], function () {
- dr.valHooks[this] = dr.extend(dr.valHooks[this], {
- set : function (b, a) {
- if (dr.isArray(a)) {
- return (b.checked = dr.inArray(dr(b).val(), a) >= 0)
- }
- }
- })
- });
- var ca = /^(?:input|select|textarea)$/i,
- e = /^key/,
- df = /^(?:mouse|contextmenu)|click/,
- eg = /^(?:focusinfocus|focusoutblur)$/,
- d9 = /^([^.]*)(?:\.(.+)|)$/;
- function ei() {
- return true
- }
- function ej() {
- return false
- }
- dr.event = {
- global : {},
- add : function (q, r, j, p, d) {
- var a,
- m,
- b,
- k,
- c,
- n,
- l,
- h,
- s,
- g,
- f,
- o = dr._data(q);
- if (!o) {
- return
- }
- if (j.handler) {
- k = j;
- j = k.handler;
- d = k.selector
- }
- if (!j.guid) {
- j.guid = dr.guid++
- }
- if (!(m = o.events)) {
- m = o.events = {}
- }
- if (!(n = o.handle)) {
- n = o.handle = function (t) {
- return typeof dr !== dk && (!t || dr.event.triggered !== t.type) ? dr.event.dispatch.apply(n.elem, arguments) : dB
- };
- n.elem = q
- }
- r = (r || "").match(dm) || [""];
- b = r.length;
- while (b--) {
- a = d9.exec(r[b]) || [];
- s = f = a[1];
- g = (a[2] || "").split(".").sort();
- c = dr.event.special[s] || {};
- s = (d ? c.delegateType : c.bindType) || s;
- c = dr.event.special[s] || {};
- l = dr.extend({
- type : s,
- origType : f,
- data : p,
- handler : j,
- guid : j.guid,
- selector : d,
- needsContext : d && dr.expr.match.needsContext.test(d),
- namespace : g.join(".")
- }, k);
- if (!(h = m[s])) {
- h = m[s] = [];
- h.delegateCount = 0;
- if (!c.setup || c.setup.call(q, p, g, n) === false) {
- if (q.addEventListener) {
- q.addEventListener(s, n, false)
- } else {
- if (q.attachEvent) {
- q.attachEvent("on" + s, n)
- }
- }
- }
- }
- if (c.add) {
- c.add.call(q, l);
- if (!l.handler.guid) {
- l.handler.guid = j.guid
- }
- }
- if (d) {
- h.splice(h.delegateCount++, 0, l)
- } else {
- h.push(l)
- }
- dr.event.global[s] = true
- }
- q = null
- },
- remove : function (p, r, m, d, j) {
- var k,
- n,
- a,
- g,
- b,
- o,
- c,
- l,
- s,
- h,
- f,
- q = dr.hasData(p) && dr._data(p);
- if (!q || !(o = q.events)) {
- return
- }
- r = (r || "").match(dm) || [""];
- b = r.length;
- while (b--) {
- a = d9.exec(r[b]) || [];
- s = f = a[1];
- h = (a[2] || "").split(".").sort();
- if (!s) {
- for (s in o) {
- dr.event.remove(p, s + r[b], m, d, true)
- }
- continue
- }
- c = dr.event.special[s] || {};
- s = (d ? c.delegateType : c.bindType) || s;
- l = o[s] || [];
- a = a[2] && new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)");
- g = k = l.length;
- while (k--) {
- n = l[k];
- if ((j || f === n.origType) && (!m || m.guid === n.guid) && (!a || a.test(n.namespace)) && (!d || d === n.selector || d === "**" && n.selector)) {
- l.splice(k, 1);
- if (n.selector) {
- l.delegateCount--
- }
- if (c.remove) {
- c.remove.call(p, n)
- }
- }
- }
- if (g && !l.length) {
- if (!c.teardown || c.teardown.call(p, h, q.handle) === false) {
- dr.removeEvent(p, s, q.handle)
- }
- delete o[s]
- }
- }
- if (dr.isEmptyObject(o)) {
- delete q.handle;
- dr._removeData(p, "events")
- }
- },
- trigger : function (k, n, l, d) {
- var h,
- c,
- o,
- p,
- b,
- a,
- g,
- j = [l || cG],
- q = cb.call(k, "type") ? k.type : k,
- f = cb.call(k, "namespace") ? k.namespace.split(".") : [];
- o = a = l = l || cG;
- if (l.nodeType === 3 || l.nodeType === 8) {
- return
- }
- if (eg.test(q + dr.event.triggered)) {
- return
- }
- if (q.indexOf(".") >= 0) {
- f = q.split(".");
- q = f.shift();
- f.sort()
- }
- c = q.indexOf(":") < 0 && "on" + q;
- k = k[dr.expando] ? k : new dr.Event(q, typeof k === "object" && k);
- k.isTrigger = true;
- k.namespace = f.join(".");
- k.namespace_re = k.namespace ? new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
- k.result = dB;
- if (!k.target) {
- k.target = l
- }
- n = n == null ? [k] : dr.makeArray(n, [k]);
- b = dr.event.special[q] || {};
- if (!d && b.trigger && b.trigger.apply(l, n) === false) {
- return
- }
- if (!d && !b.noBubble && !dr.isWindow(l)) {
- p = b.delegateType || q;
- if (!eg.test(p + q)) {
- o = o.parentNode
- }
- for (; o; o = o.parentNode) {
- j.push(o);
- a = o
- }
- if (a === (l.ownerDocument || cG)) {
- j.push(a.defaultView || a.parentWindow || dx)
- }
- }
- g = 0;
- while ((o = j[g++]) && !k.isPropagationStopped()) {
- k.type = g > 1 ? p : b.bindType || q;
- h = (dr._data(o, "events") || {})[k.type] && dr._data(o, "handle");
- if (h) {
- h.apply(o, n)
- }
- h = c && o[c];
- if (h && dr.acceptData(o) && h.apply && h.apply(o, n) === false) {
- k.preventDefault()
- }
- }
- k.type = q;
- if (!d && !k.isDefaultPrevented()) {
- if ((!b._default || b._default.apply(l.ownerDocument, n) === false) && !(q === "click" && dr.nodeName(l, "a")) && dr.acceptData(l)) {
- if (c && l[q] && !dr.isWindow(l)) {
- a = l[c];
- if (a) {
- l[c] = null
- }
- dr.event.triggered = q;
- try {
- l[q]()
- } catch (m) {}
- dr.event.triggered = dB;
- if (a) {
- l[c] = a
- }
- }
- }
- }
- return k.result
- },
- dispatch : function (l) {
- l = dr.event.fix(l);
- var f,
- b,
- j,
- c,
- d,
- h = [],
- k = dl.call(arguments),
- g = (dr._data(this, "events") || {})[l.type] || [],
- a = dr.event.special[l.type] || {};
- k[0] = l;
- l.delegateTarget = this;
- if (a.preDispatch && a.preDispatch.call(this, l) === false) {
- return
- }
- h = dr.event.handlers.call(this, l, g);
- f = 0;
- while ((c = h[f++]) && !l.isPropagationStopped()) {
- l.currentTarget = c.elem;
- d = 0;
- while ((j = c.handlers[d++]) && !l.isImmediatePropagationStopped()) {
- if (!l.namespace_re || l.namespace_re.test(j.namespace)) {
- l.handleObj = j;
- l.data = j.data;
- b = ((dr.event.special[j.origType] || {}).handle || j.handler).apply(c.elem, k);
- if (b !== dB) {
- if ((l.result = b) === false) {
- l.preventDefault();
- l.stopPropagation()
- }
- }
- }
- }
- }
- if (a.postDispatch) {
- a.postDispatch.call(this, l)
- }
- return l.result
- },
- handlers : function (j, d) {
- var a,
- g,
- b,
- c,
- f = [],
- k = d.delegateCount,
- h = j.target;
- if (k && h.nodeType && (!j.button || j.type !== "click")) {
- for (; h != this; h = h.parentNode || this) {
- if (h.nodeType === 1 && (h.disabled !== true || j.type !== "click")) {
- b = [];
- for (c = 0; c < k; c++) {
- g = d[c];
- a = g.selector + " ";
- if (b[a] === dB) {
- b[a] = g.needsContext ? dr(a, this).index(h) >= 0 : dr.find(a, this, null, [h]).length
- }
- if (b[a]) {
- b.push(g)
- }
- }
- if (b.length) {
- f.push({
- elem : h,
- handlers : b
- })
- }
- }
- }
- }
- if (k < d.length) {
- f.push({
- elem : this,
- handlers : d.slice(k)
- })
- }
- return f
- },
- fix : function (a) {
- if (a[dr.expando]) {
- return a
- }
- var g,
- c,
- f,
- b = a.type,
- d = a,
- h = this.fixHooks[b];
- if (!h) {
- this.fixHooks[b] = h = df.test(b) ? this.mouseHooks : e.test(b) ? this.keyHooks : {}
- }
- f = h.props ? this.props.concat(h.props) : this.props;
- a = new dr.Event(d);
- g = f.length;
- while (g--) {
- c = f[g];
- a[c] = d[c]
- }
- if (!a.target) {
- a.target = d.srcElement || cG
- }
- if (a.target.nodeType === 3) {
- a.target = a.target.parentNode
- }
- a.metaKey = !!a.metaKey;
- return h.filter ? h.filter(a, d) : a
- },
- props : "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
- fixHooks : {},
- keyHooks : {
- props : "char charCode key keyCode".split(" "),
- filter : function (b, a) {
- if (b.which == null) {
- b.which = a.charCode != null ? a.charCode : a.keyCode
- }
- return b
- }
- },
- mouseHooks : {
- props : "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter : function (g, b) {
- var f,
- d,
- h,
- a = b.button,
- c = b.fromElement;
- if (g.pageX == null && b.clientX != null) {
- d = g.target.ownerDocument || cG;
- h = d.documentElement;
- f = d.body;
- g.pageX = b.clientX + (h && h.scrollLeft || f && f.scrollLeft || 0) - (h && h.clientLeft || f && f.clientLeft || 0);
- g.pageY = b.clientY + (h && h.scrollTop || f && f.scrollTop || 0) - (h && h.clientTop || f && f.clientTop || 0)
- }
- if (!g.relatedTarget && c) {
- g.relatedTarget = c === g.target ? b.toElement : c
- }
- if (!g.which && a !== dB) {
- g.which = (a & 1 ? 1 : (a & 2 ? 3 : (a & 4 ? 2 : 0)))
- }
- return g
- }
- },
- special : {
- load : {
- noBubble : true
- },
- click : {
- trigger : function () {
- if (dr.nodeName(this, "input") && this.type === "checkbox" && this.click) {
- this.click();
- return false
- }
- }
- },
- focus : {
- trigger : function () {
- if (this !== cG.activeElement && this.focus) {
- try {
- this.focus();
- return false
- } catch (a) {}
- }
- },
- delegateType : "focusin"
- },
- blur : {
- trigger : function () {
- if (this === cG.activeElement && this.blur) {
- this.blur();
- return false
- }
- },
- delegateType : "focusout"
- },
- beforeunload : {
- postDispatch : function (a) {
- if (a.result !== dB) {
- a.originalEvent.returnValue = a.result
- }
- }
- }
- },
- simulate : function (b, d, c, a) {
- var f = dr.extend(new dr.Event(), c, {
- type : b,
- isSimulated : true,
- originalEvent : {}
- });
- if (a) {
- dr.event.trigger(f, null, d)
- } else {
- dr.event.dispatch.call(d, f)
- }
- if (f.isDefaultPrevented()) {
- c.preventDefault()
- }
- }
- };
- dr.removeEvent = cG.removeEventListener ? function (b, c, a) {
- if (b.removeEventListener) {
- b.removeEventListener(c, a, false)
- }
- }
- : function (b, c, a) {
- var d = "on" + c;
- if (b.detachEvent) {
- if (typeof b[d] === dk) {
- b[d] = null
- }
- b.detachEvent(d, a)
- }
- };
- dr.Event = function (a, b) {
- if (!(this instanceof dr.Event)) {
- return new dr.Event(a, b)
- }
- if (a && a.type) {
- this.originalEvent = a;
- this.type = a.type;
- this.isDefaultPrevented = (a.defaultPrevented || a.returnValue === false || a.getPreventDefault && a.getPreventDefault()) ? ei : ej
- } else {
- this.type = a
- }
- if (b) {
- dr.extend(this, b)
- }
- this.timeStamp = a && a.timeStamp || dr.now();
- this[dr.expando] = true
- };
- dr.Event.prototype = {
- isDefaultPrevented : ej,
- isPropagationStopped : ej,
- isImmediatePropagationStopped : ej,
- preventDefault : function () {
- var a = this.originalEvent;
- this.isDefaultPrevented = ei;
- if (!a) {
- return
- }
- if (a.preventDefault) {
- a.preventDefault()
- } else {
- a.returnValue = false
- }
- },
- stopPropagation : function () {
- var a = this.originalEvent;
- this.isPropagationStopped = ei;
- if (!a) {
- return
- }
- if (a.stopPropagation) {
- a.stopPropagation()
- }
- a.cancelBubble = true
- },
- stopImmediatePropagation : function () {
- this.isImmediatePropagationStopped = ei;
- this.stopPropagation()
- }
- };
- dr.each({
- mouseenter : "mouseover",
- mouseleave : "mouseout"
- }, function (a, b) {
- dr.event.special[a] = {
- delegateType : b,
- bindType : b,
- handle : function (h) {
- var d,
- c = this,
- f = h.relatedTarget,
- g = h.handleObj;
- if (!f || (f !== c && !dr.contains(c, f))) {
- h.type = g.origType;
- d = g.handler.apply(this, arguments);
- h.type = b
- }
- return d
- }
- }
- });
- if (!dr.support.submitBubbles) {
- dr.event.special.submit = {
- setup : function () {
- if (dr.nodeName(this, "form")) {
- return false
- }
- dr.event.add(this, "click._submit keypress._submit", function (a) {
- var c = a.target,
- b = dr.nodeName(c, "input") || dr.nodeName(c, "button") ? c.form : dB;
- if (b && !dr._data(b, "submitBubbles")) {
- dr.event.add(b, "submit._submit", function (d) {
- d._submit_bubble = true
- });
- dr._data(b, "submitBubbles", true)
- }
- })
- },
- postDispatch : function (a) {
- if (a._submit_bubble) {
- delete a._submit_bubble;
- if (this.parentNode && !a.isTrigger) {
- dr.event.simulate("submit", this.parentNode, a, true)
- }
- }
- },
- teardown : function () {
- if (dr.nodeName(this, "form")) {
- return false
- }
- dr.event.remove(this, "._submit")
- }
- }
- }
- if (!dr.support.changeBubbles) {
- dr.event.special.change = {
- setup : function () {
- if (ca.test(this.nodeName)) {
- if (this.type === "checkbox" || this.type === "radio") {
- dr.event.add(this, "propertychange._change", function (a) {
- if (a.originalEvent.propertyName === "checked") {
- this._just_changed = true
- }
- });
- dr.event.add(this, "click._change", function (a) {
- if (this._just_changed && !a.isTrigger) {
- this._just_changed = false
- }
- dr.event.simulate("change", this, a, true)
- })
- }
- return false
- }
- dr.event.add(this, "beforeactivate._change", function (a) {
- var b = a.target;
- if (ca.test(b.nodeName) && !dr._data(b, "changeBubbles")) {
- dr.event.add(b, "change._change", function (c) {
- if (this.parentNode && !c.isSimulated && !c.isTrigger) {
- dr.event.simulate("change", this.parentNode, c, true)
- }
- });
- dr._data(b, "changeBubbles", true)
- }
- })
- },
- handle : function (a) {
- var b = a.target;
- if (this !== b || a.isSimulated || a.isTrigger || (b.type !== "radio" && b.type !== "checkbox")) {
- return a.handleObj.handler.apply(this, arguments)
- }
- },
- teardown : function () {
- dr.event.remove(this, "._change");
- return !ca.test(this.nodeName)
- }
- }
- }
- if (!dr.support.focusinBubbles) {
- dr.each({
- focus : "focusin",
- blur : "focusout"
- }, function (c, a) {
- var b = 0,
- d = function (f) {
- dr.event.simulate(a, f.target, dr.event.fix(f), true)
- };
- dr.event.special[a] = {
- setup : function () {
- if (b++ === 0) {
- cG.addEventListener(c, d, true)
- }
- },
- teardown : function () {
- if (--b === 0) {
- cG.removeEventListener(c, d, true)
- }
- }
- }
- })
- }
- dr.fn.extend({
- on : function (b, f, d, a, h) {
- var c,
- g;
- if (typeof b === "object") {
- if (typeof f !== "string") {
- d = d || f;
- f = dB
- }
- for (c in b) {
- this.on(c, f, d, b[c], h)
- }
- return this
- }
- if (d == null && a == null) {
- a = f;
- d = f = dB
- } else {
- if (a == null) {
- if (typeof f === "string") {
- a = d;
- d = dB
- } else {
- a = d;
- d = f;
- f = dB
- }
- }
- }
- if (a === false) {
- a = ej
- } else {
- if (!a) {
- return this
- }
- }
- if (h === 1) {
- g = a;
- a = function (j) {
- dr().off(j);
- return g.apply(this, arguments)
- };
- a.guid = g.guid || (g.guid = dr.guid++)
- }
- return this.each(function () {
- dr.event.add(this, b, a, d, f)
- })
- },
- one : function (c, d, b, a) {
- return this.on(c, d, b, a, 1)
- },
- off : function (c, f, b) {
- var a,
- d;
- if (c && c.preventDefault && c.handleObj) {
- a = c.handleObj;
- dr(c.delegateTarget).off(a.namespace ? a.origType + "." + a.namespace : a.origType, a.selector, a.handler);
- return this
- }
- if (typeof c === "object") {
- for (d in c) {
- this.off(d, f, c[d])
- }
- return this
- }
- if (f === false || typeof f === "function") {
- b = f;
- f = dB
- }
- if (b === false) {
- b = ej
- }
- return this.each(function () {
- dr.event.remove(this, c, b, f)
- })
- },
- bind : function (c, b, a) {
- return this.on(c, null, b, a)
- },
- unbind : function (a, b) {
- return this.off(a, null, b)
- },
- delegate : function (d, c, b, a) {
- return this.on(c, d, b, a)
- },
- undelegate : function (a, c, b) {
- return arguments.length === 1 ? this.off(a, "**") : this.off(c, a || "**", b)
- },
- trigger : function (a, b) {
- return this.each(function () {
- dr.event.trigger(a, b, this)
- })
- },
- triggerHandler : function (c, b) {
- var a = this[0];
- if (a) {
- return dr.event.trigger(c, b, a, true)
- }
- }
- });
- (function (a, c) {
- var p,
- aw,
- t,
- r,
- l,
- J,
- q,
- ac,
- aq,
- z,
- A,
- y,
- V,
- W,
- ah,
- G,
- k,
- u = "sizzle" + - (new Date()),
- aa = a.document,
- h = {},
- B = 0,
- x = 0,
- K = E(),
- g = E(),
- I = E(),
- j = typeof c,
- af = 1 << 31,
- az = [],
- ab = az.pop,
- Y = az.push,
- al = az.slice,
- n = az.indexOf || function (aD) {
- var aC = 0,
- aB = this.length;
- for (; aC < aB; aC++) {
- if (this[aC] === aD) {
- return aC
- }
- }
- return -1
- },
- b = "[\\x20\\t\\r\\n\\f]",
- av = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
- o = av.replace("w", "w#"),
- ad = "([*^$|!~]?=)",
- ax = "\\[" + b + "*(" + av + ")" + b + "*(?:" + ad + b + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + o + ")|)|)" + b + "*\\]",
- Z = ":(" + av + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + ax.replace(3, 8) + ")*)|.*)\\)|)",
- au = new RegExp("^" + b + "+|((?:^|[^\\\\])(?:\\\\.)*)" + b + "+$", "g"),
- T = new RegExp("^" + b + "*," + b + "*"),
- U = new RegExp("^" + b + "*([\\x20\\t\\r\\n\\f>+~])" + b + "*"),
- N = new RegExp(Z),
- Q = new RegExp("^" + o + "$"),
- ag = {
- ID : new RegExp("^#(" + av + ")"),
- CLASS : new RegExp("^\\.(" + av + ")"),
- NAME : new RegExp("^\\[name=['\"]?(" + av + ")['\"]?\\]"),
- TAG : new RegExp("^(" + av.replace("w", "w*") + ")"),
- ATTR : new RegExp("^" + ax),
- PSEUDO : new RegExp("^" + Z),
- CHILD : new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + b + "*(even|odd|(([+-]|)(\\d*)n|)" + b + "*(?:([+-]|)" + b + "*(\\d+)|))" + b + "*\\)|)", "i"),
- needsContext : new RegExp("^" + b + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + b + "*((?:-\\d)?\\d*)" + b + "*\\)|)(?=[^-]|$)", "i")
- },
- L = /[\x20\t\r\n\f]*[+~]/,
- O = /^[^{]+\{\s*\[native code/,
- M = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
- P = /^(?:input|select|textarea|button)$/i,
- R = /^h\d$/i,
- S = /'|\\/g,
- X = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
- at = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
- s = function (aD, aC) {
- var aB = "0x" + aC - 65536;
- return aB !== aB ? aC : aB < 0 ? String.fromCharCode(aB + 65536) : String.fromCharCode(aB >> 10 | 55296, aB & 1023 | 56320)
- };
- try {
- al.call(aa.documentElement.childNodes, 0)[0].nodeType
- } catch (w) {
- al = function (aC) {
- var aD,
- aB = [];
- while ((aD = this[aC++])) {
- aB.push(aD)
- }
- return aB
- }
- }
- function m(aB) {
- return O.test(aB + "")
- }
- function E() {
- var aC,
- aB = [];
- return (aC = function (aE, aD) {
- if (aB.push(aE += " ") > t.cacheLength) {
- delete aC[aB.shift()]
- }
- return (aC[aE] = aD)
- })
- }
- function ak(aB) {
- aB[u] = true;
- return aB
- }
- function ay(aB) {
- var aD = z.createElement("div");
- try {
- return aB(aD)
- } catch (aC) {
- return false
- }
- finally {
- aD = null
- }
- }
- function am(aP, aN, aC, aB) {
- var aJ,
- aO,
- aK,
- aF,
- aL,
- aM,
- aE,
- aG,
- aI,
- aH;
- if ((aN ? aN.ownerDocument || aN : aa) !== z) {
- aq(aN)
- }
- aN = aN || z;
- aC = aC || [];
- if (!aP || typeof aP !== "string") {
- return aC
- }
- if ((aF = aN.nodeType) !== 1 && aF !== 9) {
- return []
- }
- if (!y && !aB) {
- if ((aJ = M.exec(aP))) {
- if ((aK = aJ[1])) {
- if (aF === 9) {
- aO = aN.getElementById(aK);
- if (aO && aO.parentNode) {
- if (aO.id === aK) {
- aC.push(aO);
- return aC
- }
- } else {
- return aC
- }
- } else {
- if (aN.ownerDocument && (aO = aN.ownerDocument.getElementById(aK)) && G(aN, aO) && aO.id === aK) {
- aC.push(aO);
- return aC
- }
- }
- } else {
- if (aJ[2]) {
- Y.apply(aC, al.call(aN.getElementsByTagName(aP), 0));
- return aC
- } else {
- if ((aK = aJ[3]) && h.getByClassName && aN.getElementsByClassName) {
- Y.apply(aC, al.call(aN.getElementsByClassName(aK), 0));
- return aC
- }
- }
- }
- }
- if (h.qsa && !V.test(aP)) {
- aE = true;
- aG = u;
- aI = aN;
- aH = aF === 9 && aP;
- if (aF === 1 && aN.nodeName.toLowerCase() !== "object") {
- aM = f(aP);
- if ((aE = aN.getAttribute("id"))) {
- aG = aE.replace(S, "\\$&")
- } else {
- aN.setAttribute("id", aG)
- }
- aG = "[id='" + aG + "'] ";
- aL = aM.length;
- while (aL--) {
- aM[aL] = aG + d(aM[aL])
- }
- aI = L.test(aP) && aN.parentNode || aN;
- aH = aM.join(",")
- }
- if (aH) {
- try {
- Y.apply(aC, al.call(aI.querySelectorAll(aH), 0));
- return aC
- } catch (aD) {}
- finally {
- if (!aE) {
- aN.removeAttribute("id")
- }
- }
- }
- }
- }
- return ar(aP.replace(au, "$1"), aN, aC, aB)
- }
- l = am.isXML = function (aB) {
- var aC = aB && (aB.ownerDocument || aB).documentElement;
- return aC ? aC.nodeName !== "HTML" : false
- };
- aq = am.setDocument = function (aB) {
- var aC = aB ? aB.ownerDocument || aB : aa;
- if (aC === z || aC.nodeType !== 9 || !aC.documentElement) {
- return z
- }
- z = aC;
- A = aC.documentElement;
- y = l(aC);
- h.tagNameNoComments = ay(function (aD) {
- aD.appendChild(aC.createComment(""));
- return !aD.getElementsByTagName("*").length
- });
- h.attributes = ay(function (aE) {
- aE.innerHTML = "<select></select>";
- var aD = typeof aE.lastChild.getAttribute("multiple");
- return aD !== "boolean" && aD !== "string"
- });
- h.getByClassName = ay(function (aD) {
- aD.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
- if (!aD.getElementsByClassName || !aD.getElementsByClassName("e").length) {
- return false
- }
- aD.lastChild.className = "e";
- return aD.getElementsByClassName("e").length === 2
- });
- h.getByName = ay(function (aE) {
- aE.id = u + 0;
- aE.innerHTML = "<a name='" + u + "'></a><div name='" + u + "'></div>";
- A.insertBefore(aE, A.firstChild);
- var aD = aC.getElementsByName && aC.getElementsByName(u).length === 2 + aC.getElementsByName(u + 0).length;
- h.getIdNotName = !aC.getElementById(u);
- A.removeChild(aE);
- return aD
- });
- t.attrHandle = ay(function (aD) {
- aD.innerHTML = "<a href='#'></a>";
- return aD.firstChild && typeof aD.firstChild.getAttribute !== j && aD.firstChild.getAttribute("href") === "#"
- }) ? {}
- : {
- href : function (aD) {
- return aD.getAttribute("href", 2)
- },
- type : function (aD) {
- return aD.getAttribute("type")
- }
- };
- if (h.getIdNotName) {
- t.find.ID = function (aE, aF) {
- if (typeof aF.getElementById !== j && !y) {
- var aD = aF.getElementById(aE);
- return aD && aD.parentNode ? [aD] : []
- }
- };
- t.filter.ID = function (aD) {
- var aE = aD.replace(at, s);
- return function (aF) {
- return aF.getAttribute("id") === aE
- }
- }
- } else {
- t.find.ID = function (aE, aF) {
- if (typeof aF.getElementById !== j && !y) {
- var aD = aF.getElementById(aE);
- return aD ? aD.id === aE || typeof aD.getAttributeNode !== j && aD.getAttributeNode("id").value === aE ? [aD] : c : []
- }
- };
- t.filter.ID = function (aD) {
- var aE = aD.replace(at, s);
- return function (aG) {
- var aF = typeof aG.getAttributeNode !== j && aG.getAttributeNode("id");
- return aF && aF.value === aE
- }
- }
- }
- t.find.TAG = h.tagNameNoComments ? function (aD, aE) {
- if (typeof aE.getElementsByTagName !== j) {
- return aE.getElementsByTagName(aD)
- }
- }
- : function (aI, aG) {
- var aF,
- aH = [],
- aE = 0,
- aD = aG.getElementsByTagName(aI);
- if (aI === "*") {
- while ((aF = aD[aE++])) {
- if (aF.nodeType === 1) {
- aH.push(aF)
- }
- }
- return aH
- }
- return aD
- };
- t.find.NAME = h.getByName && function (aD, aE) {
- if (typeof aE.getElementsByName !== j) {
- return aE.getElementsByName(name)
- }
- };
- t.find.CLASS = h.getByClassName && function (aE, aD) {
- if (typeof aD.getElementsByClassName !== j && !y) {
- return aD.getElementsByClassName(aE)
- }
- };
- W = [];
- V = [":focus"];
- if ((h.qsa = m(aC.querySelectorAll))) {
- ay(function (aD) {
- aD.innerHTML = "<select><option selected=''></option></select>";
- if (!aD.querySelectorAll("[selected]").length) {
- V.push("\\[" + b + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)")
- }
- if (!aD.querySelectorAll(":checked").length) {
- V.push(":checked")
- }
- });
- ay(function (aD) {
- aD.innerHTML = "<input type='hidden' i=''/>";
- if (aD.querySelectorAll("[i^='']").length) {
- V.push("[*^$]=" + b + "*(?:\"\"|'')")
- }
- if (!aD.querySelectorAll(":enabled").length) {
- V.push(":enabled", ":disabled")
- }
- aD.querySelectorAll("*,:x");
- V.push(",.*:")
- })
- }
- if ((h.matchesSelector = m((ah = A.matchesSelector || A.mozMatchesSelector || A.webkitMatchesSelector || A.oMatchesSelector || A.msMatchesSelector)))) {
- ay(function (aD) {
- h.disconnectedMatch = ah.call(aD, "div");
- ah.call(aD, "[s!='']:x");
- W.push("!=", Z)
- })
- }
- V = new RegExp(V.join("|"));
- W = new RegExp(W.join("|"));
- G = m(A.contains) || A.compareDocumentPosition ? function (aG, aE) {
- var aF = aG.nodeType === 9 ? aG.documentElement : aG,
- aD = aE && aE.parentNode;
- return aG === aD || !!(aD && aD.nodeType === 1 && (aF.contains ? aF.contains(aD) : aG.compareDocumentPosition && aG.compareDocumentPosition(aD) & 16))
- }
- : function (aE, aD) {
- if (aD) {
- while ((aD = aD.parentNode)) {
- if (aD === aE) {
- return true
- }
- }
- }
- return false
- };
- k = A.compareDocumentPosition ? function (aF, aE) {
- var aD;
- if (aF === aE) {
- q = true;
- return 0
- }
- if ((aD = aE.compareDocumentPosition && aF.compareDocumentPosition && aF.compareDocumentPosition(aE))) {
- if (aD & 1 || aF.parentNode && aF.parentNode.nodeType === 11) {
- if (aF === aC || G(aa, aF)) {
- return -1
- }
- if (aE === aC || G(aa, aE)) {
- return 1
- }
- return 0
- }
- return aD & 4 ? -1 : 1
- }
- return aF.compareDocumentPosition ? -1 : 1
- }
- : function (aG, aD) {
- var aI,
- aH = 0,
- aE = aG.parentNode,
- aJ = aD.parentNode,
- aF = [aG],
- aK = [aD];
- if (aG === aD) {
- q = true;
- return 0
- } else {
- if (!aE || !aJ) {
- return aG === aC ? -1 : aD === aC ? 1 : aE ? -1 : aJ ? 1 : 0
- } else {
- if (aE === aJ) {
- return an(aG, aD)
- }
- }
- }
- aI = aG;
- while ((aI = aI.parentNode)) {
- aF.unshift(aI)
- }
- aI = aD;
- while ((aI = aI.parentNode)) {
- aK.unshift(aI)
- }
- while (aF[aH] === aK[aH]) {
- aH++
- }
- return aH ? an(aF[aH], aK[aH]) : aF[aH] === aa ? -1 : aK[aH] === aa ? 1 : 0
- };
- q = false;
- [0, 0].sort(k);
- h.detectDuplicates = q;
- return z
- };
- am.matches = function (aB, aC) {
- return am(aB, null, null, aC)
- };
- am.matchesSelector = function (aD, aC) {
- if ((aD.ownerDocument || aD) !== z) {
- aq(aD)
- }
- aC = aC.replace(X, "='$1']");
- if (h.matchesSelector && !y && (!W || !W.test(aC)) && !V.test(aC)) {
- try {
- var aB = ah.call(aD, aC);
- if (aB || h.disconnectedMatch || aD.document && aD.document.nodeType !== 11) {
- return aB
- }
- } catch (aE) {}
- }
- return am(aC, z, null, [aD]).length > 0
- };
- am.contains = function (aC, aB) {
- if ((aC.ownerDocument || aC) !== z) {
- aq(aC)
- }
- return G(aC, aB)
- };
- am.attr = function (aD, aC) {
- var aB;
- if ((aD.ownerDocument || aD) !== z) {
- aq(aD)
- }
- if (!y) {
- aC = aC.toLowerCase()
- }
- if ((aB = t.attrHandle[aC])) {
- return aB(aD)
- }
- if (y || h.attributes) {
- return aD.getAttribute(aC)
- }
- return ((aB = aD.getAttributeNode(aC)) || aD.getAttribute(aC)) && aD[aC] === true ? aC : aB && aB.specified ? aB.value : null
- };
- am.error = function (aB) {
- throw new Error("Syntax error, unrecognized expression: " + aB)
- };
- am.uniqueSort = function (aB) {
- var aE,
- aF = [],
- aD = 1,
- aC = 0;
- q = !h.detectDuplicates;
- aB.sort(k);
- if (q) {
- for (; (aE = aB[aD]); aD++) {
- if (aE === aB[aD - 1]) {
- aC = aF.push(aD)
- }
- }
- while (aC--) {
- aB.splice(aF[aC], 1)
- }
- }
- return aB
- };
- function an(aE, aD) {
- var aC = aD && aE,
- aB = aC && (~aD.sourceIndex || af) - (~aE.sourceIndex || af);
- if (aB) {
- return aB
- }
- if (aC) {
- while ((aC = aC.nextSibling)) {
- if (aC === aD) {
- return -1
- }
- }
- }
- return aE ? 1 : -1
- }
- function D(aB) {
- return function (aD) {
- var aC = aD.nodeName.toLowerCase();
- return aC === "input" && aD.type === aB
- }
- }
- function F(aB) {
- return function (aD) {
- var aC = aD.nodeName.toLowerCase();
- return (aC === "input" || aC === "button") && aD.type === aB
- }
- }
- function C(aB) {
- return ak(function (aC) {
- aC = +aC;
- return ak(function (aH, aE) {
- var aF,
- aD = aB([], aH.length, aC),
- aG = aD.length;
- while (aG--) {
- if (aH[(aF = aD[aG])]) {
- aH[aF] = !(aE[aF] = aH[aF])
- }
- }
- })
- })
- }
- r = am.getText = function (aF) {
- var aD,
- aB = "",
- aE = 0,
- aC = aF.nodeType;
- if (!aC) {
- for (; (aD = aF[aE]); aE++) {
- aB += r(aD)
- }
- } else {
- if (aC === 1 || aC === 9 || aC === 11) {
- if (typeof aF.textContent === "string") {
- return aF.textContent
- } else {
- for (aF = aF.firstChild; aF; aF = aF.nextSibling) {
- aB += r(aF)
- }
- }
- } else {
- if (aC === 3 || aC === 4) {
- return aF.nodeValue
- }
- }
- }
- return aB
- };
- t = am.selectors = {
- cacheLength : 50,
- createPseudo : ak,
- match : ag,
- find : {},
- relative : {
- ">" : {
- dir : "parentNode",
- first : true
- },
- " " : {
- dir : "parentNode"
- },
- "+" : {
- dir : "previousSibling",
- first : true
- },
- "~" : {
- dir : "previousSibling"
- }
- },
- preFilter : {
- ATTR : function (aB) {
- aB[1] = aB[1].replace(at, s);
- aB[3] = (aB[4] || aB[5] || "").replace(at, s);
- if (aB[2] === "~=") {
- aB[3] = " " + aB[3] + " "
- }
- return aB.slice(0, 4)
- },
- CHILD : function (aB) {
- aB[1] = aB[1].toLowerCase();
- if (aB[1].slice(0, 3) === "nth") {
- if (!aB[3]) {
- am.error(aB[0])
- }
- aB[4] = + (aB[4] ? aB[5] + (aB[6] || 1) : 2 * (aB[3] === "even" || aB[3] === "odd"));
- aB[5] = + ((aB[7] + aB[8]) || aB[3] === "odd")
- } else {
- if (aB[3]) {
- am.error(aB[0])
- }
- }
- return aB
- },
- PSEUDO : function (aC) {
- var aD,
- aB = !aC[5] && aC[2];
- if (ag.CHILD.test(aC[0])) {
- return null
- }
- if (aC[4]) {
- aC[2] = aC[4]
- } else {
- if (aB && N.test(aB) && (aD = f(aB, true)) && (aD = aB.indexOf(")", aB.length - aD) - aB.length)) {
- aC[0] = aC[0].slice(0, aD);
- aC[2] = aB.slice(0, aD)
- }
- }
- return aC.slice(0, 3)
- }
- },
- filter : {
- TAG : function (aB) {
- if (aB === "*") {
- return function () {
- return true
- }
- }
- aB = aB.replace(at, s).toLowerCase();
- return function (aC) {
- return aC.nodeName && aC.nodeName.toLowerCase() === aB
- }
- },
- CLASS : function (aC) {
- var aB = K[aC + " "];
- return aB || (aB = new RegExp("(^|" + b + ")" + aC + "(" + b + "|$)")) && K(aC, function (aD) {
- return aB.test(aD.className || (typeof aD.getAttribute !== j && aD.getAttribute("class")) || "")
- })
- },
- ATTR : function (aC, aB, aD) {
- return function (aF) {
- var aE = am.attr(aF, aC);
- if (aE == null) {
- return aB === "!="
- }
- if (!aB) {
- return true
- }
- aE += "";
- return aB === "=" ? aE === aD : aB === "!=" ? aE !== aD : aB === "^=" ? aD && aE.indexOf(aD) === 0 : aB === "*=" ? aD && aE.indexOf(aD) > -1 : aB === "$=" ? aD && aE.slice(-aD.length) === aD : aB === "~=" ? (" " + aE + " ").indexOf(aD) > -1 : aB === "|=" ? aE === aD || aE.slice(0, aD.length + 1) === aD + "-" : false
- }
- },
- CHILD : function (aI, aH, aG, aF, aD) {
- var aB = aI.slice(0, 3) !== "nth",
- aE = aI.slice(-4) !== "last",
- aC = aH === "of-type";
- return aF === 1 && aD === 0 ? function (aJ) {
- return !!aJ.parentNode
- }
- : function (aK, aN, aO) {
- var aP,
- aT,
- aV,
- aM,
- aU,
- aR,
- aL = aB !== aE ? "nextSibling" : "previousSibling",
- aS = aK.parentNode,
- aJ = aC && aK.nodeName.toLowerCase(),
- aQ = !aO && !aC;
- if (aS) {
- if (aB) {
- while (aL) {
- aV = aK;
- while ((aV = aV[aL])) {
- if (aC ? aV.nodeName.toLowerCase() === aJ : aV.nodeType === 1) {
- return false
- }
- }
- aR = aL = aI === "only" && !aR && "nextSibling"
- }
- return true
- }
- aR = [aE ? aS.firstChild : aS.lastChild];
- if (aE && aQ) {
- aT = aS[u] || (aS[u] = {});
- aP = aT[aI] || [];
- aU = aP[0] === B && aP[1];
- aM = aP[0] === B && aP[2];
- aV = aU && aS.childNodes[aU];
- while ((aV = ++aU && aV && aV[aL] || (aM = aU = 0) || aR.pop())) {
- if (aV.nodeType === 1 && ++aM && aV === aK) {
- aT[aI] = [B, aU, aM];
- break
- }
- }
- } else {
- if (aQ && (aP = (aK[u] || (aK[u] = {}))[aI]) && aP[0] === B) {
- aM = aP[1]
- } else {
- while ((aV = ++aU && aV && aV[aL] || (aM = aU = 0) || aR.pop())) {
- if ((aC ? aV.nodeName.toLowerCase() === aJ : aV.nodeType === 1) && ++aM) {
- if (aQ) {
- (aV[u] || (aV[u] = {}))[aI] = [B, aM]
- }
- if (aV === aK) {
- break
- }
- }
- }
- }
- }
- aM -= aD;
- return aM === aF || (aM % aF === 0 && aM / aF >= 0)
- }
- }
- },
- PSEUDO : function (aB, aD) {
- var aE,
- aC = t.pseudos[aB] || t.setFilters[aB.toLowerCase()] || am.error("unsupported pseudo: " + aB);
- if (aC[u]) {
- return aC(aD)
- }
- if (aC.length > 1) {
- aE = [aB, aB, "", aD];
- return t.setFilters.hasOwnProperty(aB.toLowerCase()) ? ak(function (aH, aI) {
- var aF,
- aJ = aC(aH, aD),
- aG = aJ.length;
- while (aG--) {
- aF = n.call(aH, aJ[aG]);
- aH[aF] = !(aI[aF] = aJ[aG])
- }
- }) : function (aF) {
- return aC(aF, 0, aE)
- }
- }
- return aC
- }
- },
- pseudos : {
- not : ak(function (aB) {
- var aE = [],
- aC = [],
- aD = J(aB.replace(au, "$1"));
- return aD[u] ? ak(function (aJ, aK, aG, aH) {
- var aF,
- aI = aD(aJ, null, aH, []),
- aL = aJ.length;
- while (aL--) {
- if ((aF = aI[aL])) {
- aJ[aL] = !(aK[aL] = aF)
- }
- }
- }) : function (aF, aG, aH) {
- aE[0] = aF;
- aD(aE, null, aH, aC);
- return !aC.pop()
- }
- }),
- has : ak(function (aB) {
- return function (aC) {
- return am(aB, aC).length > 0
- }
- }),
- contains : ak(function (aB) {
- return function (aC) {
- return (aC.textContent || aC.innerText || r(aC)).indexOf(aB) > -1
- }
- }),
- lang : ak(function (aB) {
- if (!Q.test(aB || "")) {
- am.error("unsupported lang: " + aB)
- }
- aB = aB.replace(at, s).toLowerCase();
- return function (aD) {
- var aC;
- do {
- if ((aC = y ? aD.getAttribute("xml:lang") || aD.getAttribute("lang") : aD.lang)) {
- aC = aC.toLowerCase();
- return aC === aB || aC.indexOf(aB + "-") === 0
- }
- } while ((aD = aD.parentNode) && aD.nodeType === 1);
- return false
- }
- }),
- target : function (aC) {
- var aB = a.location && a.location.hash;
- return aB && aB.slice(1) === aC.id
- },
- root : function (aB) {
- return aB === A
- },
- focus : function (aB) {
- return aB === z.activeElement && (!z.hasFocus || z.hasFocus()) && !!(aB.type || aB.href || ~aB.tabIndex)
- },
- enabled : function (aB) {
- return aB.disabled === false
- },
- disabled : function (aB) {
- return aB.disabled === true
- },
- checked : function (aC) {
- var aB = aC.nodeName.toLowerCase();
- return (aB === "input" && !!aC.checked) || (aB === "option" && !!aC.selected)
- },
- selected : function (aB) {
- if (aB.parentNode) {
- aB.parentNode.selectedIndex
- }
- return aB.selected === true
- },
- empty : function (aB) {
- for (aB = aB.firstChild; aB; aB = aB.nextSibling) {
- if (aB.nodeName > "@" || aB.nodeType === 3 || aB.nodeType === 4) {
- return false
- }
- }
- return true
- },
- parent : function (aB) {
- return !t.pseudos.empty(aB)
- },
- header : function (aB) {
- return R.test(aB.nodeName)
- },
- input : function (aB) {
- return P.test(aB.nodeName)
- },
- button : function (aC) {
- var aB = aC.nodeName.toLowerCase();
- return aB === "input" && aC.type === "button" || aB === "button"
- },
- text : function (aB) {
- var aC;
- return aB.nodeName.toLowerCase() === "input" && aB.type === "text" && ((aC = aB.getAttribute("type")) == null || aC.toLowerCase() === aB.type)
- },
- first : C(function () {
- return [0]
- }),
- last : C(function (aB, aC) {
- return [aC - 1]
- }),
- eq : C(function (aB, aC, aD) {
- return [aD < 0 ? aD + aC : aD]
- }),
- even : C(function (aB, aC) {
- var aD = 0;
- for (; aD < aC; aD += 2) {
- aB.push(aD)
- }
- return aB
- }),
- odd : C(function (aB, aC) {
- var aD = 1;
- for (; aD < aC; aD += 2) {
- aB.push(aD)
- }
- return aB
- }),
- lt : C(function (aB, aC, aE) {
- var aD = aE < 0 ? aE + aC : aE;
- for (; --aD >= 0; ) {
- aB.push(aD)
- }
- return aB
- }),
- gt : C(function (aB, aC, aE) {
- var aD = aE < 0 ? aE + aC : aE;
- for (; ++aD < aC; ) {
- aB.push(aD)
- }
- return aB
- })
- }
- };
- for (p in {
- radio : true,
- checkbox : true,
- file : true,
- password : true,
- image : true
- }) {
- t.pseudos[p] = D(p)
- }
- for (p in {
- submit : true,
- reset : true
- }) {
- t.pseudos[p] = F(p)
- }
- function f(aE, aG) {
- var aH,
- aI,
- aC,
- aB,
- aD,
- aK,
- aF,
- aJ = g[aE + " "];
- if (aJ) {
- return aG ? 0 : aJ.slice(0)
- }
- aD = aE;
- aK = [];
- aF = t.preFilter;
- while (aD) {
- if (!aH || (aI = T.exec(aD))) {
- if (aI) {
- aD = aD.slice(aI[0].length) || aD
- }
- aK.push(aC = [])
- }
- aH = false;
- if ((aI = U.exec(aD))) {
- aH = aI.shift();
- aC.push({
- value : aH,
- type : aI[0].replace(au, " ")
- });
- aD = aD.slice(aH.length)
- }
- for (aB in t.filter) {
- if ((aI = ag[aB].exec(aD)) && (!aF[aB] || (aI = aF[aB](aI)))) {
- aH = aI.shift();
- aC.push({
- value : aH,
- type : aB,
- matches : aI
- });
- aD = aD.slice(aH.length)
- }
- }
- if (!aH) {
- break
- }
- }
- return aG ? aD.length : aD ? am.error(aE) : g(aE, aK).slice(0)
- }
- function d(aB) {
- var aE = 0,
- aD = aB.length,
- aC = "";
- for (; aE < aD; aE++) {
- aC += aB[aE].value
- }
- return aC
- }
- function aA(aB, aE, aG) {
- var aD = aE.dir,
- aF = aG && aD === "parentNode",
- aC = x++;
- return aE.first ? function (aI, aJ, aH) {
- while ((aI = aI[aD])) {
- if (aI.nodeType === 1 || aF) {
- return aB(aI, aJ, aH)
- }
- }
- }
- : function (aJ, aM, aH) {
- var aL,
- aN,
- aI,
- aK = B + " " + aC;
- if (aH) {
- while ((aJ = aJ[aD])) {
- if (aJ.nodeType === 1 || aF) {
- if (aB(aJ, aM, aH)) {
- return true
- }
- }
- }
- } else {
- while ((aJ = aJ[aD])) {
- if (aJ.nodeType === 1 || aF) {
- aI = aJ[u] || (aJ[u] = {});
- if ((aN = aI[aD]) && aN[0] === aK) {
- if ((aL = aN[1]) === true || aL === aw) {
- return aL === true
- }
- } else {
- aN = aI[aD] = [aK];
- aN[1] = aB(aJ, aM, aH) || aw;
- if (aN[1] === true) {
- return true
- }
- }
- }
- }
- }
- }
- }
- function v(aB) {
- return aB.length > 1 ? function (aE, aF, aC) {
- var aD = aB.length;
- while (aD--) {
- if (!aB[aD](aE, aF, aC)) {
- return false
- }
- }
- return true
- }
- : aB[0]
- }
- function H(aC, aF, aI, aJ, aB) {
- var aK,
- aD = [],
- aH = 0,
- aG = aC.length,
- aE = aF != null;
- for (; aH < aG; aH++) {
- if ((aK = aC[aH])) {
- if (!aI || aI(aK, aJ, aB)) {
- aD.push(aK);
- if (aE) {
- aF.push(aH)
- }
- }
- }
- }
- return aD
- }
- function ao(aC, aB, aG, aF, aE, aD) {
- if (aF && !aF[u]) {
- aF = ao(aF)
- }
- if (aE && !aE[u]) {
- aE = ao(aE, aD)
- }
- return ak(function (aR, aS, aO, aP) {
- var aQ,
- aL,
- aN,
- aT = [],
- aI = [],
- aH = aS.length,
- aM = aR || ae(aB || "*", aO.nodeType ? [aO] : aO, []),
- aK = aC && (aR || !aB) ? H(aM, aT, aC, aO, aP) : aM,
- aJ = aG ? aE || (aR ? aC : aH || aF) ? [] : aS : aK;
- if (aG) {
- aG(aK, aJ, aO, aP)
- }
- if (aF) {
- aQ = H(aJ, aI);
- aF(aQ, [], aO, aP);
- aL = aQ.length;
- while (aL--) {
- if ((aN = aQ[aL])) {
- aJ[aI[aL]] = !(aK[aI[aL]] = aN)
- }
- }
- }
- if (aR) {
- if (aE || aC) {
- if (aE) {
- aQ = [];
- aL = aJ.length;
- while (aL--) {
- if ((aN = aJ[aL])) {
- aQ.push((aK[aL] = aN))
- }
- }
- aE(null, (aJ = []), aQ, aP)
- }
- aL = aJ.length;
- while (aL--) {
- if ((aN = aJ[aL]) && (aQ = aE ? n.call(aR, aN) : aT[aL]) > -1) {
- aR[aQ] = !(aS[aQ] = aN)
- }
- }
- }
- } else {
- aJ = H(aJ === aS ? aJ.splice(aH, aJ.length) : aJ);
- if (aE) {
- aE(null, aS, aJ, aP)
- } else {
- Y.apply(aS, aJ)
- }
- }
- })
- }
- function ai(aB) {
- var aK,
- aD,
- aI,
- aG = aB.length,
- aH = t.relative[aB[0].type],
- aJ = aH || t.relative[" "],
- aL = aH ? 1 : 0,
- aE = aA(function (aM) {
- return aM === aK
- }, aJ, true),
- aF = aA(function (aM) {
- return n.call(aK, aM) > -1
- }, aJ, true),
- aC = [function (aN, aO, aM) {
- return (!aH && (aM || aO !== ac)) || ((aK = aO).nodeType ? aE(aN, aO, aM) : aF(aN, aO, aM))
- }
- ];
- for (; aL < aG; aL++) {
- if ((aD = t.relative[aB[aL].type])) {
- aC = [aA(v(aC), aD)]
- } else {
- aD = t.filter[aB[aL].type].apply(null, aB[aL].matches);
- if (aD[u]) {
- aI = ++aL;
- for (; aI < aG; aI++) {
- if (t.relative[aB[aI].type]) {
- break
- }
- }
- return ao(aL > 1 && v(aC), aL > 1 && d(aB.slice(0, aL - 1)).replace(au, "$1"), aD, aL < aI && ai(aB.slice(aL, aI)), aI < aG && ai((aB = aB.slice(aI))), aI < aG && d(aB))
- }
- aC.push(aD)
- }
- }
- return v(aC)
- }
- function aj(aE, aC) {
- var aD = 0,
- aF = aC.length > 0,
- aG = aE.length > 0,
- aB = function (aS, aR, aL, aT, aJ) {
- var aM,
- aH,
- aV,
- aQ = [],
- aW = 0,
- aI = "0",
- aO = aS && [],
- aU = aJ != null,
- aP = ac,
- aK = aS || aG && t.find.TAG("*", aJ && aR.parentNode || aR),
- aN = (B += aP == null ? 1 : Math.random() || 0.1);
- if (aU) {
- ac = aR !== z && aR;
- aw = aD
- }
- for (; (aM = aK[aI]) != null; aI++) {
- if (aG && aM) {
- aH = 0;
- while ((aV = aE[aH++])) {
- if (aV(aM, aR, aL)) {
- aT.push(aM);
- break
- }
- }
- if (aU) {
- B = aN;
- aw = ++aD
- }
- }
- if (aF) {
- if ((aM = !aV && aM)) {
- aW--
- }
- if (aS) {
- aO.push(aM)
- }
- }
- }
- aW += aI;
- if (aF && aI !== aW) {
- aH = 0;
- while ((aV = aC[aH++])) {
- aV(aO, aQ, aR, aL)
- }
- if (aS) {
- if (aW > 0) {
- while (aI--) {
- if (!(aO[aI] || aQ[aI])) {
- aQ[aI] = ab.call(aT)
- }
- }
- }
- aQ = H(aQ)
- }
- Y.apply(aT, aQ);
- if (aU && !aS && aQ.length > 0 && (aW + aC.length) > 1) {
- am.uniqueSort(aT)
- }
- }
- if (aU) {
- B = aN;
- ac = aP
- }
- return aO
- };
- return aF ? ak(aB) : aB
- }
- J = am.compile = function (aC, aE) {
- var aD,
- aB = [],
- aF = [],
- aG = I[aC + " "];
- if (!aG) {
- if (!aE) {
- aE = f(aC)
- }
- aD = aE.length;
- while (aD--) {
- aG = ai(aE[aD]);
- if (aG[u]) {
- aB.push(aG)
- } else {
- aF.push(aG)
- }
- }
- aG = I(aC, aj(aF, aB))
- }
- return aG
- };
- function ae(aB, aF, aC) {
- var aE = 0,
- aD = aF.length;
- for (; aE < aD; aE++) {
- am(aB, aF[aE], aC)
- }
- return aC
- }
- function ar(aE, aK, aG, aF) {
- var aI,
- aC,
- aD,
- aB,
- aJ,
- aH = f(aE);
- if (!aF) {
- if (aH.length === 1) {
- aC = aH[0] = aH[0].slice(0);
- if (aC.length > 2 && (aD = aC[0]).type === "ID" && aK.nodeType === 9 && !y && t.relative[aC[1].type]) {
- aK = t.find.ID(aD.matches[0].replace(at, s), aK)[0];
- if (!aK) {
- return aG
- }
- aE = aE.slice(aC.shift().value.length)
- }
- aI = ag.needsContext.test(aE) ? 0 : aC.length;
- while (aI--) {
- aD = aC[aI];
- if (t.relative[(aB = aD.type)]) {
- break
- }
- if ((aJ = t.find[aB])) {
- if ((aF = aJ(aD.matches[0].replace(at, s), L.test(aC[0].type) && aK.parentNode || aK))) {
- aC.splice(aI, 1);
- aE = aF.length && d(aC);
- if (!aE) {
- Y.apply(aG, al.call(aF, 0));
- return aG
- }
- break
- }
- }
- }
- }
- }
- J(aE, aH)(aF, aK, y, aG, L.test(aE));
- return aG
- }
- t.pseudos.nth = t.pseudos.eq;
- function ap() {}
- t.filters = ap.prototype = t.pseudos;
- t.setFilters = new ap();
- aq();
- am.attr = dr.attr;
- dr.find = am;
- dr.expr = am.selectors;
- dr.expr[":"] = dr.expr.pseudos;
- dr.unique = am.uniqueSort;
- dr.text = am.getText;
- dr.isXMLDoc = am.isXML;
- dr.contains = am.contains
- })(dx);
- var d7 = /Until$/,
- cS = /^(?:parents|prev(?:Until|All))/,
- ds = /^.[^:#\[\.,]*$/,
- c9 = dr.expr.match.needsContext,
- dK = {
- children : true,
- contents : true,
- next : true,
- prev : true
- };
- dr.fn.extend({
- find : function (d) {
- var c,
- f,
- b,
- a = this.length;
- if (typeof d !== "string") {
- b = this;
- return this.pushStack(dr(d).filter(function () {
- for (c = 0; c < a; c++) {
- if (dr.contains(b[c], this)) {
- return true
- }
- }
- }))
- }
- f = [];
- for (c = 0; c < a; c++) {
- dr.find(d, this[c], f)
- }
- f = this.pushStack(a > 1 ? dr.unique(f) : f);
- f.selector = (this.selector ? this.selector + " " : "") + d;
- return f
- },
- has : function (d) {
- var b,
- c = dr(d, this),
- a = c.length;
- return this.filter(function () {
- for (b = 0; b < a; b++) {
- if (dr.contains(this, c[b])) {
- return true
- }
- }
- })
- },
- not : function (a) {
- return this.pushStack(du(this, a, false))
- },
- filter : function (a) {
- return this.pushStack(du(this, a, true))
- },
- is : function (a) {
- return !!a && (typeof a === "string" ? c9.test(a) ? dr(a, this.context).index(this[0]) >= 0 : dr.filter(a, this).length > 0 : this.filter(a).length > 0)
- },
- closest : function (b, f) {
- var a,
- h = 0,
- g = this.length,
- c = [],
- d = c9.test(b) || typeof b !== "string" ? dr(b, f || this.context) : 0;
- for (; h < g; h++) {
- a = this[h];
- while (a && a.ownerDocument && a !== f && a.nodeType !== 11) {
- if (d ? d.index(a) > -1 : dr.find.matchesSelector(a, b)) {
- c.push(a);
- break
- }
- a = a.parentNode
- }
- }
- return this.pushStack(c.length > 1 ? dr.unique(c) : c)
- },
- index : function (a) {
- if (!a) {
- return (this[0] && this[0].parentNode) ? this.first().prevAll().length : -1
- }
- if (typeof a === "string") {
- return dr.inArray(this[0], dr(a))
- }
- return dr.inArray(a.jquery ? a[0] : a, this)
- },
- add : function (d, a) {
- var c = typeof d === "string" ? dr(d, a) : dr.makeArray(d && d.nodeType ? [d] : d),
- b = dr.merge(this.get(), c);
- return this.pushStack(dr.unique(b))
- },
- addBack : function (a) {
- return this.add(a == null ? this.prevObject : this.prevObject.filter(a))
- }
- });
- dr.fn.andSelf = dr.fn.addBack;
- function dJ(b, a) {
- do {
- b = b[a]
- } while (b && b.nodeType !== 1);
- return b
- }
- dr.each({
- parent : function (b) {
- var a = b.parentNode;
- return a && a.nodeType !== 11 ? a : null
- },
- parents : function (a) {
- return dr.dir(a, "parentNode")
- },
- parentsUntil : function (b, a, c) {
- return dr.dir(b, "parentNode", c)
- },
- next : function (a) {
- return dJ(a, "nextSibling")
- },
- prev : function (a) {
- return dJ(a, "previousSibling")
- },
- nextAll : function (a) {
- return dr.dir(a, "nextSibling")
- },
- prevAll : function (a) {
- return dr.dir(a, "previousSibling")
- },
- nextUntil : function (b, a, c) {
- return dr.dir(b, "nextSibling", c)
- },
- prevUntil : function (b, a, c) {
- return dr.dir(b, "previousSibling", c)
- },
- siblings : function (a) {
- return dr.sibling((a.parentNode || {}).firstChild, a)
- },
- children : function (a) {
- return dr.sibling(a.firstChild)
- },
- contents : function (a) {
- return dr.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : dr.merge([], a.childNodes)
- }
- }, function (a, b) {
- dr.fn[a] = function (c, d) {
- var f = dr.map(this, b, c);
- if (!d7.test(a)) {
- d = c
- }
- if (d && typeof d === "string") {
- f = dr.filter(d, f)
- }
- f = this.length > 1 && !dK[a] ? dr.unique(f) : f;
- if (this.length > 1 && cS.test(a)) {
- f = f.reverse()
- }
- return this.pushStack(f)
- }
- });
- dr.extend({
- filter : function (a, b, c) {
- if (c) {
- a = ":not(" + a + ")"
- }
- return b.length === 1 ? dr.find.matchesSelector(b[0], a) ? [b[0]] : [] : dr.find.matches(a, b)
- },
- dir : function (f, a, c) {
- var d = [],
- b = f[a];
- while (b && b.nodeType !== 9 && (c === dB || b.nodeType !== 1 || !dr(b).is(c))) {
- if (b.nodeType === 1) {
- d.push(b)
- }
- b = b[a]
- }
- return d
- },
- sibling : function (a, b) {
- var c = [];
- for (; a; a = a.nextSibling) {
- if (a.nodeType === 1 && a !== b) {
- c.push(a)
- }
- }
- return c
- }
- });
- function du(b, c, d) {
- c = c || 0;
- if (dr.isFunction(c)) {
- return dr.grep(b, function (h, g) {
- var f = !!c.call(h, g, h);
- return f === d
- })
- } else {
- if (c.nodeType) {
- return dr.grep(b, function (f) {
- return (f === c) === d
- })
- } else {
- if (typeof c === "string") {
- var a = dr.grep(b, function (f) {
- return f.nodeType === 1
- });
- if (ds.test(c)) {
- return dr.filter(c, a, !d)
- } else {
- c = dr.filter(c, a)
- }
- }
- }
- }
- return dr.grep(b, function (f) {
- return (dr.inArray(f, c) >= 0) === d
- })
- }
- function c6(b) {
- var a = eG.split("|"),
- c = b.createDocumentFragment();
- if (c.createElement) {
- while (a.length) {
- c.createElement(a.pop())
- }
- }
- return c
- }
- var eG = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- b4 = / jQuery\d+="(?:null|\d+)"/g,
- c2 = new RegExp("<(?:" + eG + ")[\\s/>]", "i"),
- eK = /^\s+/,
- dU = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- cz = /<([\w:]+)/,
- ef = /<tbody/i,
- b5 = /<|&#?\w+;/,
- c5 = /<(?:script|style|link)/i,
- eI = /^(?:checkbox|radio)$/i,
- ew = /checked\s*(?:[^=]|=\s*.checked.)/i,
- cE = /^$|\/(?:java|ecma)script/i,
- cD = /^true\/(.*)/,
- et = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
- dt = {
- option : [1, "<select multiple='multiple'>", "</select>"],
- legend : [1, "<fieldset>", "</fieldset>"],
- area : [1, "<map>", "</map>"],
- param : [1, "<object>", "</object>"],
- thead : [1, "<table>", "</table>"],
- tr : [2, "<table><tbody>", "</tbody></table>"],
- col : [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
- td : [3, "<table><tbody><tr>", "</tr></tbody></table>"],
- _default : dr.support.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
- },
- dS = c6(cG),
- d2 = dS.appendChild(cG.createElement("div"));
- dt.optgroup = dt.option;
- dt.tbody = dt.tfoot = dt.colgroup = dt.caption = dt.thead;
- dt.th = dt.td;
- dr.fn.extend({
- text : function (a) {
- return dr.access(this, function (b) {
- return b === dB ? dr.text(this) : this.empty().append((this[0] && this[0].ownerDocument || cG).createTextNode(b))
- }, null, a, arguments.length)
- },
- wrapAll : function (b) {
- if (dr.isFunction(b)) {
- return this.each(function (c) {
- dr(this).wrapAll(b.call(this, c))
- })
- }
- if (this[0]) {
- var a = dr(b, this[0].ownerDocument).eq(0).clone(true);
- if (this[0].parentNode) {
- a.insertBefore(this[0])
- }
- a.map(function () {
- var c = this;
- while (c.firstChild && c.firstChild.nodeType === 1) {
- c = c.firstChild
- }
- return c
- }).append(this)
- }
- return this
- },
- wrapInner : function (a) {
- if (dr.isFunction(a)) {
- return this.each(function (b) {
- dr(this).wrapInner(a.call(this, b))
- })
- }
- return this.each(function () {
- var c = dr(this),
- b = c.contents();
- if (b.length) {
- b.wrapAll(a)
- } else {
- c.append(a)
- }
- })
- },
- wrap : function (b) {
- var a = dr.isFunction(b);
- return this.each(function (c) {
- dr(this).wrapAll(a ? b.call(this, c) : b)
- })
- },
- unwrap : function () {
- return this.parent().each(function () {
- if (!dr.nodeName(this, "body")) {
- dr(this).replaceWith(this.childNodes)
- }
- }).end()
- },
- append : function () {
- return this.domManip(arguments, true, function (a) {
- if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
- this.appendChild(a)
- }
- })
- },
- prepend : function () {
- return this.domManip(arguments, true, function (a) {
- if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
- this.insertBefore(a, this.firstChild)
- }
- })
- },
- before : function () {
- return this.domManip(arguments, false, function (a) {
- if (this.parentNode) {
- this.parentNode.insertBefore(a, this)
- }
- })
- },
- after : function () {
- return this.domManip(arguments, false, function (a) {
- if (this.parentNode) {
- this.parentNode.insertBefore(a, this.nextSibling)
- }
- })
- },
- remove : function (c, d) {
- var b,
- a = 0;
- for (; (b = this[a]) != null; a++) {
- if (!c || dr.filter(c, [b]).length > 0) {
- if (!d && b.nodeType === 1) {
- dr.cleanData(dW(b))
- }
- if (b.parentNode) {
- if (d && dr.contains(b.ownerDocument, b)) {
- dP(dW(b, "script"))
- }
- b.parentNode.removeChild(b)
- }
- }
- }
- return this
- },
- empty : function () {
- var b,
- a = 0;
- for (; (b = this[a]) != null; a++) {
- if (b.nodeType === 1) {
- dr.cleanData(dW(b, false))
- }
- while (b.firstChild) {
- b.removeChild(b.firstChild)
- }
- if (b.options && dr.nodeName(b, "select")) {
- b.options.length = 0
- }
- }
- return this
- },
- clone : function (b, a) {
- b = b == null ? false : b;
- a = a == null ? b : a;
- return this.map(function () {
- return dr.clone(this, b, a)
- })
- },
- html : function (a) {
- return dr.access(this, function (c) {
- var g = this[0] || {},
- f = 0,
- d = this.length;
- if (c === dB) {
- return g.nodeType === 1 ? g.innerHTML.replace(b4, "") : dB
- }
- if (typeof c === "string" && !c5.test(c) && (dr.support.htmlSerialize || !c2.test(c)) && (dr.support.leadingWhitespace || !eK.test(c)) && !dt[(cz.exec(c) || ["", ""])[1].toLowerCase()]) {
- c = c.replace(dU, "<$1></$2>");
- try {
- for (; f < d; f++) {
- g = this[f] || {};
- if (g.nodeType === 1) {
- dr.cleanData(dW(g, false));
- g.innerHTML = c
- }
- }
- g = 0
- } catch (b) {}
- }
- if (g) {
- this.empty().append(c)
- }
- }, null, a, arguments.length)
- },
- replaceWith : function (a) {
- var b = dr.isFunction(a);
- if (!b && typeof a !== "string") {
- a = dr(a).not(this).detach()
- }
- return this.domManip([a], true, function (f) {
- var d = this.nextSibling,
- c = this.parentNode;
- if (c) {
- dr(this).remove();
- c.insertBefore(f, d)
- }
- })
- },
- detach : function (a) {
- return this.remove(a, true)
- },
- domManip : function (p, b, q) {
- p = cd.apply([], p);
- var n,
- f,
- l,
- d,
- o,
- m,
- k = 0,
- g = this.length,
- c = this,
- j = g - 1,
- a = p[0],
- h = dr.isFunction(a);
- if (h || !(g <= 1 || typeof a !== "string" || dr.support.checkClone || !ew.test(a))) {
- return this.each(function (s) {
- var r = c.eq(s);
- if (h) {
- p[0] = a.call(this, s, b ? r.html() : dB)
- }
- r.domManip(p, b, q)
- })
- }
- if (g) {
- m = dr.buildFragment(p, this[0].ownerDocument, false, this);
- n = m.firstChild;
- if (m.childNodes.length === 1) {
- m = n
- }
- if (n) {
- b = b && dr.nodeName(n, "tr");
- d = dr.map(dW(m, "script"), cH);
- l = d.length;
- for (; k < g; k++) {
- f = m;
- if (k !== j) {
- f = dr.clone(f, true, true);
- if (l) {
- dr.merge(d, dW(f, "script"))
- }
- }
- q.call(b && dr.nodeName(this[k], "table") ? d8(this[k], "tbody") : this[k], f, k)
- }
- if (l) {
- o = d[d.length - 1].ownerDocument;
- dr.map(d, ek);
- for (k = 0; k < l; k++) {
- f = d[k];
- if (cE.test(f.type || "") && !dr._data(f, "globalEval") && dr.contains(o, f)) {
- if (f.src) {
- dr.ajax({
- url : f.src,
- type : "GET",
- dataType : "script",
- async : false,
- global : false,
- "throws" : true
- })
- } else {
- dr.globalEval((f.text || f.textContent || f.innerHTML || "").replace(et, ""))
- }
- }
- }
- }
- m = n = null
- }
- }
- return this
- }
- });
- function d8(b, a) {
- return b.getElementsByTagName(a)[0] || b.appendChild(b.ownerDocument.createElement(a))
- }
- function cH(a) {
- var b = a.getAttributeNode("type");
- a.type = (b && b.specified) + "/" + a.type;
- return a
- }
- function ek(b) {
- var a = cD.exec(b.type);
- if (a) {
- b.type = a[1]
- } else {
- b.removeAttribute("type")
- }
- return b
- }
- function dP(a, c) {
- var b,
- d = 0;
- for (; (b = a[d]) != null; d++) {
- dr._data(b, "globalEval", !c || dr._data(c[d], "globalEval"))
- }
- }
- function cf(c, a) {
- if (a.nodeType !== 1 || !dr.hasData(c)) {
- return
- }
- var b,
- h,
- g,
- d = dr._data(c),
- f = dr._data(a, d),
- j = d.events;
- if (j) {
- delete f.handle;
- f.events = {};
- for (b in j) {
- for (h = 0, g = j[b].length; h < g; h++) {
- dr.event.add(a, b, j[b][h])
- }
- }
- }
- if (f.data) {
- f.data = dr.extend({}, f.data)
- }
- }
- function d5(b, f) {
- var c,
- d,
- a;
- if (f.nodeType !== 1) {
- return
- }
- c = f.nodeName.toLowerCase();
- if (!dr.support.noCloneEvent && f[dr.expando]) {
- a = dr._data(f);
- for (d in a.events) {
- dr.removeEvent(f, d, a.handle)
- }
- f.removeAttribute(dr.expando)
- }
- if (c === "script" && f.text !== b.text) {
- cH(f).text = b.text;
- ek(f)
- } else {
- if (c === "object") {
- if (f.parentNode) {
- f.outerHTML = b.outerHTML
- }
- if (dr.support.html5Clone && (b.innerHTML && !dr.trim(f.innerHTML))) {
- f.innerHTML = b.innerHTML
- }
- } else {
- if (c === "input" && eI.test(b.type)) {
- f.defaultChecked = f.checked = b.checked;
- if (f.value !== b.value) {
- f.value = b.value
- }
- } else {
- if (c === "option") {
- f.defaultSelected = f.selected = b.defaultSelected
- } else {
- if (c === "input" || c === "textarea") {
- f.defaultValue = b.defaultValue
- }
- }
- }
- }
- }
- }
- dr.each({
- appendTo : "append",
- prependTo : "prepend",
- insertBefore : "before",
- insertAfter : "after",
- replaceAll : "replaceWith"
- }, function (b, a) {
- dr.fn[b] = function (c) {
- var j,
- h = 0,
- d = [],
- g = dr(c),
- f = g.length - 1;
- for (; h <= f; h++) {
- j = h === f ? this : this.clone(true);
- dr(g[h])[a](j);
- dn.apply(d, j.get())
- }
- return this.pushStack(d)
- }
- });
- function dW(d, b) {
- var g,
- a,
- c = 0,
- f = typeof d.getElementsByTagName !== dk ? d.getElementsByTagName(b || "*") : typeof d.querySelectorAll !== dk ? d.querySelectorAll(b || "*") : dB;
- if (!f) {
- for (f = [], g = d.childNodes || d; (a = g[c]) != null; c++) {
- if (!b || dr.nodeName(a, b)) {
- f.push(a)
- } else {
- dr.merge(f, dW(a, b))
- }
- }
- }
- return b === dB || b && dr.nodeName(d, b) ? dr.merge([d], f) : f
- }
- function d4(a) {
- if (eI.test(a.type)) {
- a.defaultChecked = a.checked
- }
- }
- dr.extend({
- clone : function (f, k, h) {
- var g,
- b,
- j,
- d,
- a,
- c = dr.contains(f.ownerDocument, f);
- if (dr.support.html5Clone || dr.isXMLDoc(f) || !c2.test("<" + f.nodeName + ">")) {
- j = f.cloneNode(true)
- } else {
- d2.innerHTML = f.outerHTML;
- d2.removeChild(j = d2.firstChild)
- }
- if ((!dr.support.noCloneEvent || !dr.support.noCloneChecked) && (f.nodeType === 1 || f.nodeType === 11) && !dr.isXMLDoc(f)) {
- g = dW(j);
- a = dW(f);
- for (d = 0; (b = a[d]) != null; ++d) {
- if (g[d]) {
- d5(b, g[d])
- }
- }
- }
- if (k) {
- if (h) {
- a = a || dW(f);
- g = g || dW(j);
- for (d = 0; (b = a[d]) != null; d++) {
- cf(b, g[d])
- }
- } else {
- cf(f, j)
- }
- }
- g = dW(j, "script");
- if (g.length > 0) {
- dP(g, !c && dW(f, "script"))
- }
- g = a = b = null;
- return j
- },
- buildFragment : function (n, q, g, f) {
- var l,
- o,
- p,
- b,
- d,
- c,
- a,
- k = n.length,
- h = c6(q),
- j = [],
- m = 0;
- for (; m < k; m++) {
- o = n[m];
- if (o || o === 0) {
- if (dr.type(o) === "object") {
- dr.merge(j, o.nodeType ? [o] : o)
- } else {
- if (!b5.test(o)) {
- j.push(q.createTextNode(o))
- } else {
- b = b || h.appendChild(q.createElement("div"));
- d = (cz.exec(o) || ["", ""])[1].toLowerCase();
- a = dt[d] || dt._default;
- b.innerHTML = a[1] + o.replace(dU, "<$1></$2>") + a[2];
- l = a[0];
- while (l--) {
- b = b.lastChild
- }
- if (!dr.support.leadingWhitespace && eK.test(o)) {
- j.push(q.createTextNode(eK.exec(o)[0]))
- }
- if (!dr.support.tbody) {
- o = d === "table" && !ef.test(o) ? b.firstChild : a[1] === "<table>" && !ef.test(o) ? b : 0;
- l = o && o.childNodes.length;
- while (l--) {
- if (dr.nodeName((c = o.childNodes[l]), "tbody") && !c.childNodes.length) {
- o.removeChild(c)
- }
- }
- }
- dr.merge(j, b.childNodes);
- b.textContent = "";
- while (b.firstChild) {
- b.removeChild(b.firstChild)
- }
- b = h.lastChild
- }
- }
- }
- }
- if (b) {
- h.removeChild(b)
- }
- if (!dr.support.appendChecked) {
- dr.grep(dW(j, "input"), d4)
- }
- m = 0;
- while ((o = j[m++])) {
- if (f && dr.inArray(o, f) !== -1) {
- continue
- }
- p = dr.contains(o.ownerDocument, o);
- b = dW(h.appendChild(o), "script");
- if (p) {
- dP(b)
- }
- if (g) {
- l = 0;
- while ((o = b[l++])) {
- if (cE.test(o.type || "")) {
- g.push(o)
- }
- }
- }
- }
- b = null;
- return h
- },
- cleanData : function (g, l) {
- var h,
- a,
- d,
- k,
- f = 0,
- c = dr.expando,
- m = dr.cache,
- j = dr.support.deleteExpando,
- b = dr.event.special;
- for (; (h = g[f]) != null; f++) {
- if (l || dr.acceptData(h)) {
- d = h[c];
- k = d && m[d];
- if (k) {
- if (k.events) {
- for (a in k.events) {
- if (b[a]) {
- dr.event.remove(h, a)
- } else {
- dr.removeEvent(h, a, k.handle)
- }
- }
- }
- if (m[d]) {
- delete m[d];
- if (j) {
- delete h[c]
- } else {
- if (typeof h.removeAttribute !== dk) {
- h.removeAttribute(c)
- } else {
- h[c] = null
- }
- }
- cc.push(d)
- }
- }
- }
- }
- }
- });
- var dI,
- dQ,
- cP,
- eA = /alpha\([^)]*\)/i,
- cU = /opacity\s*=\s*([^)]*)/,
- cQ = /^(top|right|bottom|left)$/,
- em = /^(none|table(?!-c[ea]).+)/,
- dh = /^margin/,
- cY = new RegExp("^(" + dp + ")(.*)$", "i"),
- c0 = new RegExp("^(" + dp + ")(?!px)[a-z%]+$", "i"),
- cK = new RegExp("^([+-])=(" + dp + ")", "i"),
- eb = {
- BODY : "block"
- },
- cR = {
- position : "absolute",
- visibility : "hidden",
- display : "block"
- },
- cV = {
- letterSpacing : 0,
- fontWeight : 400
- },
- cX = ["Top", "Right", "Bottom", "Left"],
- cT = ["Webkit", "O", "Moz", "ms"];
- function dz(c, f) {
- if (f in c) {
- return f
- }
- var b = f.charAt(0).toUpperCase() + f.slice(1),
- d = f,
- a = cT.length;
- while (a--) {
- f = cT[a] + b;
- if (f in c) {
- return f
- }
- }
- return d
- }
- function dv(a, b) {
- a = b || a;
- return dr.css(a, "display") === "none" || !dr.contains(a.ownerDocument, a)
- }
- function dM(j, c) {
- var g,
- a,
- h,
- b = [],
- f = 0,
- d = j.length;
- for (; f < d; f++) {
- a = j[f];
- if (!a.style) {
- continue
- }
- b[f] = dr._data(a, "olddisplay");
- g = a.style.display;
- if (c) {
- if (!b[f] && g === "none") {
- a.style.display = ""
- }
- if (a.style.display === "" && dv(a)) {
- b[f] = dr._data(a, "olddisplay", cZ(a.nodeName))
- }
- } else {
- if (!b[f]) {
- h = dv(a);
- if (g && g !== "none" || !h) {
- dr._data(a, "olddisplay", h ? g : dr.css(a, "display"))
- }
- }
- }
- }
- for (f = 0; f < d; f++) {
- a = j[f];
- if (!a.style) {
- continue
- }
- if (!c || a.style.display === "none" || a.style.display === "") {
- a.style.display = c ? b[f] || "" : "none"
- }
- }
- return j
- }
- dr.fn.extend({
- css : function (b, a) {
- return dr.access(this, function (k, f, c) {
- var h,
- d,
- g = {},
- j = 0;
- if (dr.isArray(f)) {
- d = dQ(k);
- h = f.length;
- for (; j < h; j++) {
- g[f[j]] = dr.css(k, f[j], false, d)
- }
- return g
- }
- return c !== dB ? dr.style(k, f, c) : dr.css(k, f)
- }, b, a, arguments.length > 1)
- },
- show : function () {
- return dM(this, true)
- },
- hide : function () {
- return dM(this)
- },
- toggle : function (a) {
- var b = typeof a === "boolean";
- return this.each(function () {
- if (b ? a : dv(this)) {
- dr(this).show()
- } else {
- dr(this).hide()
- }
- })
- }
- });
- dr.extend({
- cssHooks : {
- opacity : {
- get : function (a, b) {
- if (b) {
- var c = cP(a, "opacity");
- return c === "" ? "1" : c
- }
- }
- }
- },
- cssNumber : {
- columnCount : true,
- fillOpacity : true,
- fontWeight : true,
- lineHeight : true,
- opacity : true,
- orphans : true,
- widows : true,
- zIndex : true,
- zoom : true
- },
- cssProps : {
- "float" : dr.support.cssFloat ? "cssFloat" : "styleFloat"
- },
- style : function (k, g, a, j) {
- if (!k || k.nodeType === 3 || k.nodeType === 8 || !k.style) {
- return
- }
- var d,
- b,
- h,
- f = dr.camelCase(g),
- c = k.style;
- g = dr.cssProps[f] || (dr.cssProps[f] = dz(c, f));
- h = dr.cssHooks[g] || dr.cssHooks[f];
- if (a !== dB) {
- b = typeof a;
- if (b === "string" && (d = cK.exec(a))) {
- a = (d[1] + 1) * d[2] + parseFloat(dr.css(k, g));
- b = "number"
- }
- if (a == null || b === "number" && isNaN(a)) {
- return
- }
- if (b === "number" && !dr.cssNumber[f]) {
- a += "px"
- }
- if (!dr.support.clearCloneStyle && a === "" && g.indexOf("background") === 0) {
- c[g] = "inherit"
- }
- if (!h || !("set" in h) || (a = h.set(k, a, j)) !== dB) {
- try {
- c[g] = a
- } catch (l) {}
- }
- } else {
- if (h && "get" in h && (d = h.get(k, false, j)) !== dB) {
- return d
- }
- return c[g]
- }
- },
- css : function (g, h, a, c) {
- var f,
- b,
- j,
- d = dr.camelCase(h);
- h = dr.cssProps[d] || (dr.cssProps[d] = dz(g.style, d));
- j = dr.cssHooks[h] || dr.cssHooks[d];
- if (j && "get" in j) {
- b = j.get(g, true, a)
- }
- if (b === dB) {
- b = cP(g, h, c)
- }
- if (b === "normal" && h in cV) {
- b = cV[h]
- }
- if (a === "" || a) {
- f = parseFloat(b);
- return a === true || dr.isNumeric(f) ? f || 0 : b
- }
- return b
- },
- swap : function (h, c, a, f) {
- var b,
- g,
- d = {};
- for (g in c) {
- d[g] = h.style[g];
- h.style[g] = c[g]
- }
- b = a.apply(h, f || []);
- for (g in c) {
- h.style[g] = d[g]
- }
- return b
- }
- });
- if (dx.getComputedStyle) {
- dQ = function (a) {
- return dx.getComputedStyle(a, null)
- };
- cP = function (h, d, j) {
- var a,
- f,
- g,
- k = j || dQ(h),
- c = k ? k.getPropertyValue(d) || k[d] : dB,
- b = h.style;
- if (k) {
- if (c === "" && !dr.contains(h.ownerDocument, h)) {
- c = dr.style(h, d)
- }
- if (c0.test(c) && dh.test(d)) {
- a = b.width;
- f = b.minWidth;
- g = b.maxWidth;
- b.minWidth = b.maxWidth = b.width = c;
- c = k.width;
- b.width = a;
- b.minWidth = f;
- b.maxWidth = g
- }
- }
- return c
- }
- } else {
- if (cG.documentElement.currentStyle) {
- dQ = function (a) {
- return a.currentStyle
- };
- cP = function (h, f, j) {
- var g,
- c,
- b,
- k = j || dQ(h),
- d = k ? k[f] : dB,
- a = h.style;
- if (d == null && a && a[f]) {
- d = a[f]
- }
- if (c0.test(d) && !cQ.test(f)) {
- g = a.left;
- c = h.runtimeStyle;
- b = c && c.left;
- if (b) {
- c.left = h.currentStyle.left
- }
- a.left = f === "fontSize" ? "1em" : d;
- d = a.pixelLeft + "px";
- a.left = g;
- if (b) {
- c.left = b
- }
- }
- return d === "" ? "auto" : d
- }
- }
- }
- function dN(b, c, d) {
- var a = cY.exec(c);
- return a ? Math.max(0, a[1] - (d || 0)) + (a[2] || "px") : c
- }
- function cj(f, d, a, g, c) {
- var h = a === (g ? "border" : "content") ? 4 : d === "width" ? 1 : 0,
- b = 0;
- for (; h < 4; h += 2) {
- if (a === "margin") {
- b += dr.css(f, a + cX[h], true, c)
- }
- if (g) {
- if (a === "content") {
- b -= dr.css(f, "padding" + cX[h], true, c)
- }
- if (a !== "margin") {
- b -= dr.css(f, "border" + cX[h] + "Width", true, c)
- }
- } else {
- b += dr.css(f, "padding" + cX[h], true, c);
- if (a !== "padding") {
- b += dr.css(f, "border" + cX[h] + "Width", true, c)
- }
- }
- }
- return b
- }
- function dO(f, g, a) {
- var b = true,
- c = g === "width" ? f.offsetWidth : f.offsetHeight,
- d = dQ(f),
- h = dr.support.boxSizing && dr.css(f, "boxSizing", false, d) === "border-box";
- if (c <= 0 || c == null) {
- c = cP(f, g, d);
- if (c < 0 || c == null) {
- c = f.style[g]
- }
- if (c0.test(c)) {
- return c
- }
- b = h && (dr.support.boxSizingReliable || c === f.style[g]);
- c = parseFloat(c) || 0
- }
- return (c + cj(f, g, a || (h ? "border" : "content"), b, d)) + "px"
- }
- function cZ(c) {
- var a = cG,
- b = eb[c];
- if (!b) {
- b = cv(c, a);
- if (b === "none" || !b) {
- dI = (dI || dr("<iframe frameborder='0' width='0' height='0'/>").css("cssText", "display:block !important")).appendTo(a.documentElement);
- a = (dI[0].contentWindow || dI[0].contentDocument).document;
- a.write("<!doctype html><html><body>");
- a.close();
- b = cv(c, a);
- dI.detach()
- }
- eb[c] = b
- }
- return b
- }
- function cv(c, a) {
- var d = dr(a.createElement(c)).appendTo(a.body),
- b = dr.css(d[0], "display");
- d.remove();
- return b
- }
- dr.each(["height", "width"], function (b, a) {
- dr.cssHooks[a] = {
- get : function (d, f, c) {
- if (f) {
- return d.offsetWidth === 0 && em.test(dr.css(d, "display")) ? dr.swap(d, cR, function () {
- return dO(d, a, c)
- }) : dO(d, a, c)
- }
- },
- set : function (g, c, f) {
- var d = f && dQ(g);
- return dN(g, c, f ? cj(g, a, f, dr.support.boxSizing && dr.css(g, "boxSizing", false, d) === "border-box", d) : 0)
- }
- }
- });
- if (!dr.support.opacity) {
- dr.cssHooks.opacity = {
- get : function (a, b) {
- return cU.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? (0.01 * parseFloat(RegExp.$1)) + "" : b ? "1" : ""
- },
- set : function (a, b) {
- var d = a.style,
- c = a.currentStyle,
- f = dr.isNumeric(b) ? "alpha(opacity=" + b * 100 + ")" : "",
- g = c && c.filter || d.filter || "";
- d.zoom = 1;
- if ((b >= 1 || b === "") && dr.trim(g.replace(eA, "")) === "" && d.removeAttribute) {
- d.removeAttribute("filter");
- if (b === "" || c && !c.filter) {
- return
- }
- }
- d.filter = eA.test(g) ? g.replace(eA, f) : g + " " + f
- }
- }
- }
- dr(function () {
- if (!dr.support.reliableMarginRight) {
- dr.cssHooks.marginRight = {
- get : function (a, b) {
- if (b) {
- return dr.swap(a, {
- display : "inline-block"
- }, cP, [a, "marginRight"])
- }
- }
- }
- }
- if (!dr.support.pixelPosition && dr.fn.position) {
- dr.each(["top", "left"], function (b, a) {
- dr.cssHooks[a] = {
- get : function (c, d) {
- if (d) {
- d = cP(c, a);
- return c0.test(d) ? dr(c).position()[a] + "px" : d
- }
- }
- }
- })
- }
- });
- if (dr.expr && dr.expr.filters) {
- dr.expr.filters.hidden = function (a) {
- return a.offsetWidth <= 0 && a.offsetHeight <= 0 || (!dr.support.reliableHiddenOffsets && ((a.style && a.style.display) || dr.css(a, "display")) === "none")
- };
- dr.expr.filters.visible = function (a) {
- return !dr.expr.filters.hidden(a)
- }
- }
- dr.each({
- margin : "",
- padding : "",
- border : "Width"
- }, function (b, a) {
- dr.cssHooks[b + a] = {
- expand : function (c) {
- var f = 0,
- g = {},
- d = typeof c === "string" ? c.split(" ") : [c];
- for (; f < 4; f++) {
- g[b + cX[f] + a] = d[f] || d[f - 2] || d[0]
- }
- return g
- }
- };
- if (!dh.test(b)) {
- dr.cssHooks[b + a].set = dN
- }
- });
- var eB = /%20/g,
- ex = /\[\]$/,
- ep = /\r?\n/g,
- cA = /^(?:submit|button|image|reset|file)$/i,
- cB = /^(?:input|select|textarea|keygen)/i;
- dr.fn.extend({
- serialize : function () {
- return dr.param(this.serializeArray())
- },
- serializeArray : function () {
- return this.map(function () {
- var a = dr.prop(this, "elements");
- return a ? dr.makeArray(a) : this
- }).filter(function () {
- var a = this.type;
- return this.name && !dr(this).is(":disabled") && cB.test(this.nodeName) && !cA.test(a) && (this.checked || !eI.test(a))
- }).map(function (a, b) {
- var c = dr(this).val();
- return c == null ? null : dr.isArray(c) ? dr.map(c, function (d) {
- return {
- name : b.name,
- value : d.replace(ep, "\r\n")
- }
- }) : {
- name : b.name,
- value : c.replace(ep, "\r\n")
- }
- }).get()
- }
- });
- dr.param = function (c, b) {
- var f,
- d = [],
- a = function (h, g) {
- g = dr.isFunction(g) ? g() : (g == null ? "" : g);
- d[d.length] = encodeURIComponent(h) + "=" + encodeURIComponent(g)
- };
- if (b === dB) {
- b = dr.ajaxSettings && dr.ajaxSettings.traditional
- }
- if (dr.isArray(c) || (c.jquery && !dr.isPlainObject(c))) {
- dr.each(c, function () {
- a(this.name, this.value)
- })
- } else {
- for (f in c) {
- ch(f, c[f], b, a)
- }
- }
- return d.join("&").replace(eB, "+")
- };
- function ch(d, f, c, b) {
- var a;
- if (dr.isArray(f)) {
- dr.each(f, function (h, g) {
- if (c || ex.test(d)) {
- b(d, g)
- } else {
- ch(d + "[" + (typeof g === "object" ? h : "") + "]", g, c, b)
- }
- })
- } else {
- if (!c && dr.type(f) === "object") {
- for (a in f) {
- ch(d + "[" + a + "]", f[a], c, b)
- }
- } else {
- b(d, f)
- }
- }
- }
- dr.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "), function (b, a) {
- dr.fn[a] = function (d, c) {
- return arguments.length > 0 ? this.on(a, null, d, c) : this.trigger(a)
- }
- });
- dr.fn.hover = function (a, b) {
- return this.mouseenter(a).mouseleave(b || a)
- };
- var cn,
- co,
- ct = dr.now(),
- cs = /\?/,
- b7 = /#.*$/,
- ec = /([?&])_=[^&]*/,
- b6 = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
- dj = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- c7 = /^(?:GET|HEAD)$/,
- cO = /^\/\//,
- d6 = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
- cw = dr.fn.load,
- eD = {},
- dF = {},
- cm = "*/".concat("*");
- try {
- co = eJ.href
- } catch (ee) {
- co = cG.createElement("a");
- co.href = "";
- co = co.href
- }
- cn = d6.exec(co.toLowerCase()) || [];
- function cu(a) {
- return function (g, d) {
- if (typeof g !== "string") {
- d = g;
- g = "*"
- }
- var b,
- c = 0,
- f = g.toLowerCase().match(dm) || [];
- if (dr.isFunction(d)) {
- while ((b = f[c++])) {
- if (b[0] === "+") {
- b = b.slice(1) || "*";
- (a[b] = a[b] || []).unshift(d)
- } else {
- (a[b] = a[b] || []).push(d)
- }
- }
- }
- }
- }
- function dG(b, g, f, h) {
- var a = {},
- c = (b === dF);
- function d(k) {
- var j;
- a[k] = true;
- dr.each(b[k] || [], function (n, l) {
- var m = l(g, f, h);
- if (typeof m === "string" && !c && !a[m]) {
- g.dataTypes.unshift(m);
- d(m);
- return false
- } else {
- if (c) {
- return !(j = m)
- }
- }
- });
- return j
- }
- return d(g.dataTypes[0]) || !a["*"] && d("*")
- }
- function cq(c, d) {
- var b,
- f,
- a = dr.ajaxSettings.flatOptions || {};
- for (f in d) {
- if (d[f] !== dB) {
- (a[f] ? c : (b || (b = {})))[f] = d[f]
- }
- }
- if (b) {
- dr.extend(true, c, b)
- }
- return c
- }
- dr.fn.load = function (b, j, g) {
- if (typeof b !== "string" && cw) {
- return cw.apply(this, arguments)
- }
- var f,
- h,
- c,
- d = this,
- a = b.indexOf(" ");
- if (a >= 0) {
- f = b.slice(a, b.length);
- b = b.slice(0, a)
- }
- if (dr.isFunction(j)) {
- g = j;
- j = dB
- } else {
- if (j && typeof j === "object") {
- c = "POST"
- }
- }
- if (d.length > 0) {
- dr.ajax({
- url : b,
- type : c,
- dataType : "html",
- data : j
- }).done(function (k) {
- h = arguments;
- d.html(f ? dr("<div>").append(dr.parseHTML(k)).find(f) : k)
- }).complete(g && function (k, l) {
- d.each(g, h || [k.responseText, l, k])
- })
- }
- return this
- };
- dr.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (b, a) {
- dr.fn[a] = function (c) {
- return this.on(a, c)
- }
- });
- dr.each(["get", "post"], function (b, a) {
- dr[a] = function (c, f, g, d) {
- if (dr.isFunction(f)) {
- d = d || g;
- g = f;
- f = dB
- }
- return dr.ajax({
- url : c,
- type : a,
- dataType : d,
- data : f,
- success : g
- })
- }
- });
- dr.extend({
- active : 0,
- lastModified : {},
- etag : {},
- ajaxSettings : {
- url : co,
- type : "GET",
- isLocal : dj.test(cn[1]),
- global : true,
- processData : true,
- async : true,
- contentType : "application/x-www-form-urlencoded; charset=UTF-8",
- accepts : {
- "*" : cm,
- text : "text/plain",
- html : "text/html",
- xml : "application/xml, text/xml",
- json : "application/json, text/javascript"
- },
- contents : {
- xml : /xml/,
- html : /html/,
- json : /json/
- },
- responseFields : {
- xml : "responseXML",
- text : "responseText"
- },
- converters : {
- "* text" : dx.String,
- "text html" : true,
- "text json" : dr.parseJSON,
- "text xml" : dr.parseXML
- },
- flatOptions : {
- url : true,
- context : true
- }
- },
- ajaxSetup : function (a, b) {
- return b ? cq(cq(a, dr.ajaxSettings), b) : cq(dr.ajaxSettings, a)
- },
- ajaxPrefilter : cu(eD),
- ajaxTransport : cu(dF),
- ajax : function (h, u) {
- if (typeof h === "object") {
- u = h;
- h = dB
- }
- u = u || {};
- var t,
- w,
- g,
- p,
- k,
- y,
- j,
- q,
- o = dr.ajaxSetup({}, u),
- f = o.context || o,
- x = o.context && (f.nodeType || f.jquery) ? dr(f) : dr.event,
- c = dr.Deferred(),
- d = dr.Callbacks("once memory"),
- m = o.statusCode || {},
- s = {},
- r = {},
- n = 0,
- l = "canceled",
- v = {
- readyState : 0,
- getResponseHeader : function (A) {
- var z;
- if (n === 2) {
- if (!q) {
- q = {};
- while ((z = b6.exec(p))) {
- q[z[1].toLowerCase()] = z[2]
- }
- }
- z = q[A.toLowerCase()]
- }
- return z == null ? null : z
- },
- getAllResponseHeaders : function () {
- return n === 2 ? p : null
- },
- setRequestHeader : function (A, z) {
- var B = A.toLowerCase();
- if (!n) {
- A = r[B] = r[B] || A;
- s[A] = z
- }
- return this
- },
- overrideMimeType : function (z) {
- if (!n) {
- o.mimeType = z
- }
- return this
- },
- statusCode : function (z) {
- var A;
- if (z) {
- if (n < 2) {
- for (A in z) {
- m[A] = [m[A], z[A]]
- }
- } else {
- v.always(z[v.status])
- }
- }
- return this
- },
- abort : function (z) {
- var A = z || l;
- if (j) {
- j.abort(A)
- }
- b(0, A);
- return this
- }
- };
- c.promise(v).complete = d.add;
- v.success = v.done;
- v.error = v.fail;
- o.url = ((h || o.url || co) + "").replace(b7, "").replace(cO, cn[1] + "//");
- o.type = u.method || u.type || o.method || o.type;
- o.dataTypes = dr.trim(o.dataType || "*").toLowerCase().match(dm) || [""];
- if (o.crossDomain == null) {
- t = d6.exec(o.url.toLowerCase());
- o.crossDomain = !!(t && (t[1] !== cn[1] || t[2] !== cn[2] || (t[3] || (t[1] === "http:" ? 80 : 443)) != (cn[3] || (cn[1] === "http:" ? 80 : 443))))
- }
- if (o.data && o.processData && typeof o.data !== "string") {
- o.data = dr.param(o.data, o.traditional)
- }
- dG(eD, o, u, v);
- if (n === 2) {
- return v
- }
- y = o.global;
- if (y && dr.active++ === 0) {
- dr.event.trigger("ajaxStart")
- }
- o.type = o.type.toUpperCase();
- o.hasContent = !c7.test(o.type);
- g = o.url;
- if (!o.hasContent) {
- if (o.data) {
- g = (o.url += (cs.test(g) ? "&" : "?") + o.data);
- delete o.data
- }
- if (o.cache === false) {
- o.url = ec.test(g) ? g.replace(ec, "$1_=" + ct++) : g + (cs.test(g) ? "&" : "?") + "_=" + ct++
- }
- }
- if (o.ifModified) {
- if (dr.lastModified[g]) {
- v.setRequestHeader("If-Modified-Since", dr.lastModified[g])
- }
- if (dr.etag[g]) {
- v.setRequestHeader("If-None-Match", dr.etag[g])
- }
- }
- if (o.data && o.hasContent && o.contentType !== false || u.contentType) {
- v.setRequestHeader("Content-Type", o.contentType)
- }
- v.setRequestHeader("Accept", o.dataTypes[0] && o.accepts[o.dataTypes[0]] ? o.accepts[o.dataTypes[0]] + (o.dataTypes[0] !== "*" ? ", " + cm + "; q=0.01" : "") : o.accepts["*"]);
- for (w in o.headers) {
- v.setRequestHeader(w, o.headers[w])
- }
- if (o.beforeSend && (o.beforeSend.call(f, v, o) === false || n === 2)) {
- return v.abort()
- }
- l = "abort";
- for (w in {
- success : 1,
- error : 1,
- complete : 1
- }) {
- v[w](o[w])
- }
- j = dG(dF, o, u, v);
- if (!j) {
- b(-1, "No Transport")
- } else {
- v.readyState = 1;
- if (y) {
- x.trigger("ajaxSend", [v, o])
- }
- if (o.async && o.timeout > 0) {
- k = setTimeout(function () {
- v.abort("timeout")
- }, o.timeout)
- }
- try {
- n = 1;
- j.send(s, b)
- } catch (a) {
- if (n < 2) {
- b(-1, a)
- } else {
- throw a
- }
- }
- }
- function b(B, E, C, I) {
- var G,
- z,
- H,
- D,
- F,
- A = E;
- if (n === 2) {
- return
- }
- n = 2;
- if (k) {
- clearTimeout(k)
- }
- j = dB;
- p = I || "";
- v.readyState = B > 0 ? 4 : 0;
- if (C) {
- D = cp(o, v, C)
- }
- if (B >= 200 && B < 300 || B === 304) {
- if (o.ifModified) {
- F = v.getResponseHeader("Last-Modified");
- if (F) {
- dr.lastModified[g] = F
- }
- F = v.getResponseHeader("etag");
- if (F) {
- dr.etag[g] = F
- }
- }
- if (B === 204) {
- G = true;
- A = "nocontent"
- } else {
- if (B === 304) {
- G = true;
- A = "notmodified"
- } else {
- G = cr(o, D);
- A = G.state;
- z = G.data;
- H = G.error;
- G = !H
- }
- }
- } else {
- H = A;
- if (B || !A) {
- A = "error";
- if (B < 0) {
- B = 0
- }
- }
- }
- v.status = B;
- v.statusText = (E || A) + "";
- if (G) {
- c.resolveWith(f, [z, A, v])
- } else {
- c.rejectWith(f, [v, A, H])
- }
- v.statusCode(m);
- m = dB;
- if (y) {
- x.trigger(G ? "ajaxSuccess" : "ajaxError", [v, o, G ? z : H])
- }
- d.fireWith(f, [v, A]);
- if (y) {
- x.trigger("ajaxComplete", [v, o]);
- if (!(--dr.active)) {
- dr.event.trigger("ajaxStop")
- }
- }
- }
- return v
- },
- getScript : function (a, b) {
- return dr.get(a, dB, b, "script")
- },
- getJSON : function (c, a, b) {
- return dr.get(c, a, b, "json")
- }
- });
- function cp(b, f, c) {
- var g,
- l,
- h,
- a,
- k = b.contents,
- j = b.dataTypes,
- d = b.responseFields;
- for (a in d) {
- if (a in c) {
- f[d[a]] = c[a]
- }
- }
- while (j[0] === "*") {
- j.shift();
- if (l === dB) {
- l = b.mimeType || f.getResponseHeader("Content-Type")
- }
- }
- if (l) {
- for (a in k) {
- if (k[a] && k[a].test(l)) {
- j.unshift(a);
- break
- }
- }
- }
- if (j[0]in c) {
- h = j[0]
- } else {
- for (a in c) {
- if (!j[0] || b.converters[a + " " + j[0]]) {
- h = a;
- break
- }
- if (!g) {
- g = a
- }
- }
- h = h || g
- }
- if (h) {
- if (h !== j[0]) {
- j.unshift(h)
- }
- return c[h]
- }
- }
- function cr(b, c) {
- var l,
- j,
- m,
- a,
- k = {},
- f = 0,
- h = b.dataTypes.slice(),
- d = h[0];
- if (b.dataFilter) {
- c = b.dataFilter(c, b.dataType)
- }
- if (h[1]) {
- for (m in b.converters) {
- k[m.toLowerCase()] = b.converters[m]
- }
- }
- for (; (j = h[++f]); ) {
- if (j !== "*") {
- if (d !== "*" && d !== j) {
- m = k[d + " " + j] || k["* " + j];
- if (!m) {
- for (l in k) {
- a = l.split(" ");
- if (a[1] === j) {
- m = k[d + " " + a[0]] || k["* " + a[0]];
- if (m) {
- if (m === true) {
- m = k[l]
- } else {
- if (k[l] !== true) {
- j = a[0];
- h.splice(f--, 0, j)
- }
- }
- break
- }
- }
- }
- }
- if (m !== true) {
- if (m && b["throws"]) {
- c = m(c)
- } else {
- try {
- c = m(c)
- } catch (g) {
- return {
- state : "parsererror",
- error : m ? g : "No conversion from " + d + " to " + j
- }
- }
- }
- }
- }
- d = j
- }
- }
- return {
- state : "success",
- data : c
- }
- }
- dr.ajaxSetup({
- accepts : {
- script : "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents : {
- script : /(?:java|ecma)script/
- },
- converters : {
- "text script" : function (a) {
- dr.globalEval(a);
- return a
- }
- }
- });
- dr.ajaxPrefilter("script", function (a) {
- if (a.cache === dB) {
- a.cache = false
- }
- if (a.crossDomain) {
- a.type = "GET";
- a.global = false
- }
- });
- dr.ajaxTransport("script", function (a) {
- if (a.crossDomain) {
- var c,
- b = cG.head || dr("head")[0] || cG.documentElement;
- return {
- send : function (f, d) {
- c = cG.createElement("script");
- c.async = true;
- if (a.scriptCharset) {
- c.charset = a.scriptCharset
- }
- c.src = a.url;
- c.onload = c.onreadystatechange = function (h, g) {
- if (g || !c.readyState || /loaded|complete/.test(c.readyState)) {
- c.onload = c.onreadystatechange = null;
- if (c.parentNode) {
- c.parentNode.removeChild(c)
- }
- c = null;
- if (!g) {
- d(200, "success")
- }
- }
- };
- b.insertBefore(c, b.firstChild)
- },
- abort : function () {
- if (c) {
- c.onload(dB, true)
- }
- }
- }
- }
- });
- var eF = [],
- a8 = /(=)\?(?=&|$)|\?\?/;
- dr.ajaxSetup({
- jsonp : "callback",
- jsonpCallback : function () {
- var a = eF.pop() || (dr.expando + "_" + (ct++));
- this[a] = true;
- return a
- }
- });
- dr.ajaxPrefilter("json jsonp", function (b, g, a) {
- var f,
- d,
- c,
- h = b.jsonp !== false && (a8.test(b.url) ? "url" : typeof b.data === "string" && !(b.contentType || "").indexOf("application/x-www-form-urlencoded") && a8.test(b.data) && "data");
- if (h || b.dataTypes[0] === "jsonp") {
- f = b.jsonpCallback = dr.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback;
- if (h) {
- b[h] = b[h].replace(a8, "$1" + f)
- } else {
- if (b.jsonp !== false) {
- b.url += (cs.test(b.url) ? "&" : "?") + b.jsonp + "=" + f
- }
- }
- b.converters["script json"] = function () {
- if (!c) {
- dr.error(f + " was not called")
- }
- return c[0]
- };
- b.dataTypes[0] = "json";
- d = dx[f];
- dx[f] = function () {
- c = arguments
- };
- a.always(function () {
- dx[f] = d;
- if (b[f]) {
- b.jsonpCallback = g.jsonpCallback;
- eF.push(f)
- }
- if (c && dr.isFunction(d)) {
- d(c[0])
- }
- c = d = dB
- });
- return "script"
- }
- });
- var eu,
- eo,
- es = 0,
- eq = dx.ActiveXObject && function () {
- var a;
- for (a in eu) {
- eu[a](dB, true)
- }
- };
- function c4() {
- try {
- return new dx.XMLHttpRequest()
- } catch (a) {}
- }
- function dc() {
- try {
- return new dx.ActiveXObject("Microsoft.XMLHTTP")
- } catch (a) {}
- }
- dr.ajaxSettings.xhr = dx.ActiveXObject ? function () {
- return !this.isLocal && c4() || dc()
- }
- : c4;
- eo = dr.ajaxSettings.xhr();
- dr.support.cors = !!eo && ("withCredentials" in eo);
- eo = dr.support.ajax = !!eo;
- if (eo) {
- dr.ajaxTransport(function (a) {
- if (!a.crossDomain || dr.support.cors) {
- var b;
- return {
- send : function (f, j) {
- var g,
- d,
- c = a.xhr();
- if (a.username) {
- c.open(a.type, a.url, a.async, a.username, a.password)
- } else {
- c.open(a.type, a.url, a.async)
- }
- if (a.xhrFields) {
- for (d in a.xhrFields) {
- c[d] = a.xhrFields[d]
- }
- }
- if (a.mimeType && c.overrideMimeType) {
- c.overrideMimeType(a.mimeType)
- }
- if (!a.crossDomain && !f["X-Requested-With"]) {
- f["X-Requested-With"] = "XMLHttpRequest"
- }
- try {
- for (d in f) {
- c.setRequestHeader(d, f[d])
- }
- } catch (h) {}
- c.send((a.hasContent && a.data) || null);
- b = function (k, p) {
- var m,
- o,
- l,
- n;
- try {
- if (b && (p || c.readyState === 4)) {
- b = dB;
- if (g) {
- c.onreadystatechange = dr.noop;
- if (eq) {
- delete eu[g]
- }
- }
- if (p) {
- if (c.readyState !== 4) {
- c.abort()
- }
- } else {
- n = {};
- m = c.status;
- o = c.getAllResponseHeaders();
- if (typeof c.responseText === "string") {
- n.text = c.responseText
- }
- try {
- l = c.statusText
- } catch (r) {
- l = ""
- }
- if (!m && a.isLocal && !a.crossDomain) {
- m = n.text ? 200 : 404
- } else {
- if (m === 1223) {
- m = 204
- }
- }
- }
- }
- } catch (q) {
- if (!p) {
- j(-1, q)
- }
- }
- if (n) {
- j(m, l, n, o)
- }
- };
- if (!a.async) {
- b()
- } else {
- if (c.readyState === 4) {
- setTimeout(b)
- } else {
- g = ++es;
- if (eq) {
- if (!eu) {
- eu = {};
- dr(dx).unload(eq)
- }
- eu[g] = b
- }
- c.onreadystatechange = b
- }
- }
- },
- abort : function () {
- if (b) {
- b(dB, true)
- }
- }
- }
- }
- })
- }
- var dZ,
- dH,
- b8 = /^(?:toggle|show|hide)$/,
- b9 = new RegExp("^(?:([+-])=|)(" + dp + ")([a-z%]*)$", "i"),
- cF = /queueHooks$/,
- ck = [cL],
- dC = {
- "*" : [function (h, a) {
- var k,
- b,
- c = this.createTween(h, a),
- j = b9.exec(a),
- d = c.cur(),
- f = +d || 0,
- g = 1,
- l = 20;
- if (j) {
- k = +j[2];
- b = j[3] || (dr.cssNumber[h] ? "" : "px");
- if (b !== "px" && f) {
- f = dr.css(c.elem, h, true) || k || 1;
- do {
- g = g || ".5";
- f = f / g;
- dr.style(c.elem, h, f + b)
- } while (g !== (g = c.cur() / d) && g !== 1 && --l)
- }
- c.unit = b;
- c.start = f;
- c.end = j[1] ? f + (j[1] + 1) * k : k
- }
- return c
- }
- ]
- };
- function da() {
- setTimeout(function () {
- dZ = dB
- });
- return (dZ = dr.now())
- }
- function c1(b, a) {
- dr.each(a, function (d, c) {
- var h = (dC[d] || []).concat(dC["*"]),
- g = 0,
- f = h.length;
- for (; g < f; g++) {
- if (h[g].call(b, d, c)) {
- return
- }
- }
- })
- }
- function cl(l, f, g) {
- var c,
- b,
- j = 0,
- h = ck.length,
- m = dr.Deferred().always(function () {
- delete a.elem
- }),
- a = function () {
- if (b) {
- return false
- }
- var s = dZ || da(),
- o = Math.max(0, k.startTime + k.duration - s),
- n = o / k.duration || 0,
- p = 1 - n,
- r = 0,
- q = k.tweens.length;
- for (; r < q; r++) {
- k.tweens[r].run(p)
- }
- m.notifyWith(l, [k, p, o]);
- if (p < 1 && q) {
- return o
- } else {
- m.resolveWith(l, [k]);
- return false
- }
- },
- k = m.promise({
- elem : l,
- props : dr.extend({}, f),
- opts : dr.extend(true, {
- specialEasing : {}
- }, g),
- originalProperties : f,
- originalOptions : g,
- startTime : dZ || da(),
- duration : g.duration,
- tweens : [],
- createTween : function (o, p) {
- var n = dr.Tween(l, k.opts, o, p, k.opts.specialEasing[o] || k.opts.easing);
- k.tweens.push(n);
- return n
- },
- stop : function (p) {
- var o = 0,
- n = p ? k.tweens.length : 0;
- if (b) {
- return this
- }
- b = true;
- for (; o < n; o++) {
- k.tweens[o].run(1)
- }
- if (p) {
- m.resolveWith(l, [k, p])
- } else {
- m.rejectWith(l, [k, p])
- }
- return this
- }
- }),
- d = k.props;
- eC(d, k.opts.specialEasing);
- for (; j < h; j++) {
- c = ck[j].call(k, l, d, k.opts);
- if (c) {
- return c
- }
- }
- c1(k, d);
- if (dr.isFunction(k.opts.start)) {
- k.opts.start.call(l, k)
- }
- dr.fx.timer(dr.extend(a, {
- elem : l,
- anim : k,
- queue : k.opts.queue
- }));
- return k.progress(k.opts.progress).done(k.opts.done, k.opts.complete).fail(k.opts.fail).always(k.opts.always)
- }
- function eC(f, c) {
- var b,
- g,
- h,
- d,
- a;
- for (h in f) {
- g = dr.camelCase(h);
- d = c[g];
- b = f[h];
- if (dr.isArray(b)) {
- d = b[1];
- b = f[h] = b[0]
- }
- if (h !== g) {
- f[g] = b;
- delete f[h]
- }
- a = dr.cssHooks[g];
- if (a && "expand" in a) {
- b = a.expand(b);
- delete f[g];
- for (h in b) {
- if (!(h in f)) {
- f[h] = b[h];
- c[h] = d
- }
- }
- } else {
- c[g] = d
- }
- }
- }
- dr.Animation = dr.extend(cl, {
- tweener : function (c, b) {
- if (dr.isFunction(c)) {
- b = c;
- c = ["*"]
- } else {
- c = c.split(" ")
- }
- var d,
- a = 0,
- f = c.length;
- for (; a < f; a++) {
- d = c[a];
- dC[d] = dC[d] || [];
- dC[d].unshift(b)
- }
- },
- prefilter : function (b, a) {
- if (a) {
- ck.unshift(b)
- } else {
- ck.push(b)
- }
- }
- });
- function cL(p, c, g) {
- var d,
- k,
- j,
- r,
- q,
- a,
- s,
- l,
- h,
- o = this,
- b = p.style,
- f = {},
- n = [],
- m = p.nodeType && dv(p);
- if (!g.queue) {
- l = dr._queueHooks(p, "fx");
- if (l.unqueued == null) {
- l.unqueued = 0;
- h = l.empty.fire;
- l.empty.fire = function () {
- if (!l.unqueued) {
- h()
- }
- }
- }
- l.unqueued++;
- o.always(function () {
- o.always(function () {
- l.unqueued--;
- if (!dr.queue(p, "fx").length) {
- l.empty.fire()
- }
- })
- })
- }
- if (p.nodeType === 1 && ("height" in c || "width" in c)) {
- g.overflow = [b.overflow, b.overflowX, b.overflowY];
- if (dr.css(p, "display") === "inline" && dr.css(p, "float") === "none") {
- if (!dr.support.inlineBlockNeedsLayout || cZ(p.nodeName) === "inline") {
- b.display = "inline-block"
- } else {
- b.zoom = 1
- }
- }
- }
- if (g.overflow) {
- b.overflow = "hidden";
- if (!dr.support.shrinkWrapBlocks) {
- o.always(function () {
- b.overflow = g.overflow[0];
- b.overflowX = g.overflow[1];
- b.overflowY = g.overflow[2]
- })
- }
- }
- for (k in c) {
- r = c[k];
- if (b8.exec(r)) {
- delete c[k];
- a = a || r === "toggle";
- if (r === (m ? "hide" : "show")) {
- continue
- }
- n.push(k)
- }
- }
- j = n.length;
- if (j) {
- q = dr._data(p, "fxshow") || dr._data(p, "fxshow", {});
- if ("hidden" in q) {
- m = q.hidden
- }
- if (a) {
- q.hidden = !m
- }
- if (m) {
- dr(p).show()
- } else {
- o.done(function () {
- dr(p).hide()
- })
- }
- o.done(function () {
- var t;
- dr._removeData(p, "fxshow");
- for (t in f) {
- dr.style(p, t, f[t])
- }
- });
- for (k = 0; k < j; k++) {
- d = n[k];
- s = o.createTween(d, m ? q[d] : 0);
- f[d] = q[d] || dr.style(p, d);
- if (!(d in q)) {
- q[d] = s.start;
- if (m) {
- s.end = s.start;
- s.start = d === "width" || d === "height" ? 1 : 0
- }
- }
- }
- }
- }
- function dE(a, d, c, f, b) {
- return new dE.prototype.init(a, d, c, f, b)
- }
- dr.Tween = dE;
- dE.prototype = {
- constructor : dE,
- init : function (a, f, d, g, c, b) {
- this.elem = a;
- this.prop = d;
- this.easing = c || "swing";
- this.options = f;
- this.start = this.now = this.cur();
- this.end = g;
- this.unit = b || (dr.cssNumber[d] ? "" : "px")
- },
- cur : function () {
- var a = dE.propHooks[this.prop];
- return a && a.get ? a.get(this) : dE.propHooks._default.get(this)
- },
- run : function (c) {
- var b,
- a = dE.propHooks[this.prop];
- if (this.options.duration) {
- this.pos = b = dr.easing[this.easing](c, this.options.duration * c, 0, 1, this.options.duration)
- } else {
- this.pos = b = c
- }
- this.now = (this.end - this.start) * b + this.start;
- if (this.options.step) {
- this.options.step.call(this.elem, this.now, this)
- }
- if (a && a.set) {
- a.set(this)
- } else {
- dE.propHooks._default.set(this)
- }
- return this
- }
- };
- dE.prototype.init.prototype = dE.prototype;
- dE.propHooks = {
- _default : {
- get : function (a) {
- var b;
- if (a.elem[a.prop] != null && (!a.elem.style || a.elem.style[a.prop] == null)) {
- return a.elem[a.prop]
- }
- b = dr.css(a.elem, a.prop, "");
- return !b || b === "auto" ? 0 : b
- },
- set : function (a) {
- if (dr.fx.step[a.prop]) {
- dr.fx.step[a.prop](a)
- } else {
- if (a.elem.style && (a.elem.style[dr.cssProps[a.prop]] != null || dr.cssHooks[a.prop])) {
- dr.style(a.elem, a.prop, a.now + a.unit)
- } else {
- a.elem[a.prop] = a.now
- }
- }
- }
- }
- };
- dE.propHooks.scrollTop = dE.propHooks.scrollLeft = {
- set : function (a) {
- if (a.elem.nodeType && a.elem.parentNode) {
- a.elem[a.prop] = a.now
- }
- }
- };
- dr.each(["toggle", "show", "hide"], function (a, c) {
- var b = dr.fn[c];
- dr.fn[c] = function (d, f, g) {
- return d == null || typeof d === "boolean" ? b.apply(this, arguments) : this.animate(dX(c, true), d, f, g)
- }
- });
- dr.fn.extend({
- fadeTo : function (d, c, a, b) {
- return this.filter(dv).css("opacity", 0).show().end().animate({
- opacity : c
- }, d, a, b)
- },
- animate : function (c, b, h, f) {
- var g = dr.isEmptyObject(c),
- d = dr.speed(b, h, f),
- a = function () {
- var j = cl(this, dr.extend({}, c), d);
- a.finish = function () {
- j.stop(true)
- };
- if (g || dr._data(this, "finish")) {
- j.stop(true)
- }
- };
- a.finish = a;
- return g || d.queue === false ? this.each(a) : this.queue(d.queue, a)
- },
- stop : function (c, b, a) {
- var d = function (g) {
- var f = g.stop;
- delete g.stop;
- f(a)
- };
- if (typeof c !== "string") {
- a = b;
- b = c;
- c = dB
- }
- if (b && c !== false) {
- this.queue(c || "fx", [])
- }
- return this.each(function () {
- var h = true,
- g = c != null && c + "queueHooks",
- f = dr.timers,
- j = dr._data(this);
- if (g) {
- if (j[g] && j[g].stop) {
- d(j[g])
- }
- } else {
- for (g in j) {
- if (j[g] && j[g].stop && cF.test(g)) {
- d(j[g])
- }
- }
- }
- for (g = f.length; g--; ) {
- if (f[g].elem === this && (c == null || f[g].queue === c)) {
- f[g].anim.stop(a);
- h = false;
- f.splice(g, 1)
- }
- }
- if (h || !a) {
- dr.dequeue(this, c)
- }
- })
- },
- finish : function (a) {
- if (a !== false) {
- a = a || "fx"
- }
- return this.each(function () {
- var g,
- b = dr._data(this),
- d = b[a + "queue"],
- h = b[a + "queueHooks"],
- c = dr.timers,
- f = d ? d.length : 0;
- b.finish = true;
- dr.queue(this, a, []);
- if (h && h.cur && h.cur.finish) {
- h.cur.finish.call(this)
- }
- for (g = c.length; g--; ) {
- if (c[g].elem === this && c[g].queue === a) {
- c[g].anim.stop(true);
- c.splice(g, 1)
- }
- }
- for (g = 0; g < f; g++) {
- if (d[g] && d[g].finish) {
- d[g].finish.call(this)
- }
- }
- delete b.finish
- })
- }
- });
- function dX(d, f) {
- var c,
- b = {
- height : d
- },
- a = 0;
- f = f ? 1 : 0;
- for (; a < 4; a += 2 - f) {
- c = cX[a];
- b["margin" + c] = b["padding" + c] = d
- }
- if (f) {
- b.opacity = b.width = d
- }
- return b
- }
- dr.each({
- slideDown : dX("show"),
- slideUp : dX("hide"),
- slideToggle : dX("toggle"),
- fadeIn : {
- opacity : "show"
- },
- fadeOut : {
- opacity : "hide"
- },
- fadeToggle : {
- opacity : "toggle"
- }
- }, function (b, a) {
- dr.fn[b] = function (c, d, f) {
- return this.animate(a, c, d, f)
- }
- });
- dr.speed = function (c, b, a) {
- var d = c && typeof c === "object" ? dr.extend({}, c) : {
- complete : a || !a && b || dr.isFunction(c) && c,
- duration : c,
- easing : a && b || b && !dr.isFunction(b) && b
- };
- d.duration = dr.fx.off ? 0 : typeof d.duration === "number" ? d.duration : d.duration in dr.fx.speeds ? dr.fx.speeds[d.duration] : dr.fx.speeds._default;
- if (d.queue == null || d.queue === true) {
- d.queue = "fx"
- }
- d.old = d.complete;
- d.complete = function () {
- if (dr.isFunction(d.old)) {
- d.old.call(this)
- }
- if (d.queue) {
- dr.dequeue(this, d.queue)
- }
- };
- return d
- };
- dr.easing = {
- linear : function (a) {
- return a
- },
- swing : function (a) {
- return 0.5 - Math.cos(a * Math.PI) / 2
- }
- };
- dr.timers = [];
- dr.fx = dE.prototype.init;
- dr.fx.tick = function () {
- var a,
- c = dr.timers,
- b = 0;
- dZ = dr.now();
- for (; b < c.length; b++) {
- a = c[b];
- if (!a() && c[b] === a) {
- c.splice(b--, 1)
- }
- }
- if (!c.length) {
- dr.fx.stop()
- }
- dZ = dB
- };
- dr.fx.timer = function (a) {
- if (a() && dr.timers.push(a)) {
- dr.fx.start()
- }
- };
- dr.fx.interval = 13;
- dr.fx.start = function () {
- if (!dH) {
- dH = setInterval(dr.fx.tick, dr.fx.interval)
- }
- };
- dr.fx.stop = function () {
- clearInterval(dH);
- dH = null
- };
- dr.fx.speeds = {
- slow : 600,
- fast : 200,
- _default : 400
- };
- dr.fx.step = {};
- if (dr.expr && dr.expr.filters) {
- dr.expr.filters.animated = function (a) {
- return dr.grep(dr.timers, function (b) {
- return a === b.elem
- }).length
- }
- }
- dr.fn.offset = function (d) {
- if (arguments.length) {
- return d === dB ? this : this.each(function (h) {
- dr.offset.setOffset(this, d, h)
- })
- }
- var g,
- b,
- c = {
- top : 0,
- left : 0
- },
- f = this[0],
- a = f && f.ownerDocument;
- if (!a) {
- return
- }
- g = a.documentElement;
- if (!dr.contains(g, f)) {
- return c
- }
- if (typeof f.getBoundingClientRect !== dk) {
- c = f.getBoundingClientRect()
- }
- b = dL(a);
- return {
- top : c.top + (b.pageYOffset || g.scrollTop) - (g.clientTop || 0),
- left : c.left + (b.pageXOffset || g.scrollLeft) - (g.clientLeft || 0)
- }
- };
- dr.offset = {
- setOffset : function (f, c, d) {
- var b = dr.css(f, "position");
- if (b === "static") {
- f.style.position = "relative"
- }
- var l = dr(f),
- j = l.offset(),
- n = dr.css(f, "top"),
- o = dr.css(f, "left"),
- m = (b === "absolute" || b === "fixed") && dr.inArray("auto", [n, o]) > -1,
- a = {},
- h = {},
- g,
- k;
- if (m) {
- h = l.position();
- g = h.top;
- k = h.left
- } else {
- g = parseFloat(n) || 0;
- k = parseFloat(o) || 0
- }
- if (dr.isFunction(c)) {
- c = c.call(f, d, j)
- }
- if (c.top != null) {
- a.top = (c.top - j.top) + g
- }
- if (c.left != null) {
- a.left = (c.left - j.left) + k
- }
- if ("using" in c) {
- c.using.call(f, a)
- } else {
- l.css(a)
- }
- }
- };
- dr.fn.extend({
- position : function () {
- if (!this[0]) {
- return
- }
- var d,
- a,
- c = {
- top : 0,
- left : 0
- },
- b = this[0];
- if (dr.css(b, "position") === "fixed") {
- a = b.getBoundingClientRect()
- } else {
- d = this.offsetParent();
- a = this.offset();
- if (!dr.nodeName(d[0], "html")) {
- c = d.offset()
- }
- c.top += dr.css(d[0], "borderTopWidth", true);
- c.left += dr.css(d[0], "borderLeftWidth", true)
- }
- return {
- top : a.top - c.top - dr.css(b, "marginTop", true),
- left : a.left - c.left - dr.css(b, "marginLeft", true)
- }
- },
- offsetParent : function () {
- return this.map(function () {
- var a = this.offsetParent || cG.documentElement;
- while (a && (!dr.nodeName(a, "html") && dr.css(a, "position") === "static")) {
- a = a.offsetParent
- }
- return a || cG.documentElement
- })
- }
- });
- dr.each({
- scrollLeft : "pageXOffset",
- scrollTop : "pageYOffset"
- }, function (b, a) {
- var c = /Y/.test(a);
- dr.fn[b] = function (d) {
- return dr.access(this, function (j, h, g) {
- var f = dL(j);
- if (g === dB) {
- return f ? (a in f) ? f[a] : f.document.documentElement[h] : j[h]
- }
- if (f) {
- f.scrollTo(!c ? g : dr(f).scrollLeft(), c ? g : dr(f).scrollTop())
- } else {
- j[h] = g
- }
- }, b, d, arguments.length, null)
- }
- });
- function dL(a) {
- return dr.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : false
- }
- dr.each({
- Height : "height",
- Width : "width"
- }, function (b, a) {
- dr.each({
- padding : "inner" + b,
- content : a,
- "" : "outer" + b
- }, function (d, c) {
- dr.fn[c] = function (g, f) {
- var j = arguments.length && (d || typeof g !== "boolean"),
- h = d || (g === true || f === true ? "margin" : "border");
- return dr.access(this, function (n, m, l) {
- var k;
- if (dr.isWindow(n)) {
- return n.document.documentElement["client" + b]
- }
- if (n.nodeType === 9) {
- k = n.documentElement;
- return Math.max(n.body["scroll" + b], k["scroll" + b], n.body["offset" + b], k["offset" + b], k["client" + b])
- }
- return l === dB ? dr.css(n, m, h) : dr.style(n, m, l, h)
- }, a, j ? g : dB, j, null)
- }
- })
- });
- dx.jQuery = dx.$ = dr;
- if (typeof define === "function" && define.amd && define.amd.jQuery) {
- define("jquery", [], function () {
- return dr
- })
- }
- })(window);
- (function (h, l) {
- var k = 0,
- m = /^ui-id-\d+$/;
- h.ui = h.ui || {};
- h.extend(h.ui, {
- version : "1.10.2",
- keyCode : {
- BACKSPACE : 8,
- COMMA : 188,
- DELETE : 46,
- DOWN : 40,
- END : 35,
- ENTER : 13,
- ESCAPE : 27,
- HOME : 36,
- LEFT : 37,
- NUMPAD_ADD : 107,
- NUMPAD_DECIMAL : 110,
- NUMPAD_DIVIDE : 111,
- NUMPAD_ENTER : 108,
- NUMPAD_MULTIPLY : 106,
- NUMPAD_SUBTRACT : 109,
- PAGE_DOWN : 34,
- PAGE_UP : 33,
- PERIOD : 190,
- RIGHT : 39,
- SPACE : 32,
- TAB : 9,
- UP : 38
- }
- });
- h.fn.extend({
- focus : (function (a) {
- return function (c, b) {
- return typeof c === "number" ? this.each(function () {
- var d = this;
- setTimeout(function () {
- h(d).focus();
- if (b) {
- b.call(d)
- }
- }, c)
- }) : a.apply(this, arguments)
- }
- })(h.fn.focus),
- scrollParent : function () {
- var a;
- if ((h.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
- a = this.parents().filter(function () {
- return (/(relative|absolute|fixed)/).test(h.css(this, "position")) && (/(auto|scroll)/).test(h.css(this, "overflow") + h.css(this, "overflow-y") + h.css(this, "overflow-x"))
- }).eq(0)
- } else {
- a = this.parents().filter(function () {
- return (/(auto|scroll)/).test(h.css(this, "overflow") + h.css(this, "overflow-y") + h.css(this, "overflow-x"))
- }).eq(0)
- }
- return (/fixed/).test(this.css("position")) || !a.length ? h(document) : a
- },
- zIndex : function (a) {
- if (a !== l) {
- return this.css("zIndex", a)
- }
- if (this.length) {
- var d = h(this[0]),
- c,
- b;
- while (d.length && d[0] !== document) {
- c = d.css("position");
- if (c === "absolute" || c === "relative" || c === "fixed") {
- b = parseInt(d.css("zIndex"), 10);
- if (!isNaN(b) && b !== 0) {
- return b
- }
- }
- d = d.parent()
- }
- }
- return 0
- },
- uniqueId : function () {
- return this.each(function () {
- if (!this.id) {
- this.id = "ui-id-" + (++k)
- }
- })
- },
- removeUniqueId : function () {
- return this.each(function () {
- if (m.test(this.id)) {
- h(this).removeAttr("id")
- }
- })
- }
- });
- function g(f, d) {
- var c,
- b,
- e,
- a = f.nodeName.toLowerCase();
- if ("area" === a) {
- c = f.parentNode;
- b = c.name;
- if (!f.href || !b || c.nodeName.toLowerCase() !== "map") {
- return false
- }
- e = h("img[usemap=#" + b + "]")[0];
- return !!e && j(e)
- }
- return (/input|select|textarea|button|object/.test(a) ? !f.disabled : "a" === a ? f.href || d : d) && j(f)
- }
- function j(a) {
- return h.expr.filters.visible(a) && !h(a).parents().addBack().filter(function () {
- return h.css(this, "visibility") === "hidden"
- }).length
- }
- h.extend(h.expr[":"], {
- data : h.expr.createPseudo ? h.expr.createPseudo(function (a) {
- return function (b) {
- return !!h.data(b, a)
- }
- }) : function (c, b, a) {
- return !!h.data(c, a[3])
- },
- focusable : function (a) {
- return g(a, !isNaN(h.attr(a, "tabindex")))
- },
- tabbable : function (c) {
- var a = h.attr(c, "tabindex"),
- b = isNaN(a);
- return (b || a >= 0) && g(c, !b)
- }
- });
- if (!h("<a>").outerWidth(1).jquery) {
- h.each(["Width", "Height"], function (f, e) {
- var b = e === "Width" ? ["Left", "Right"] : ["Top", "Bottom"],
- a = e.toLowerCase(),
- d = {
- innerWidth : h.fn.innerWidth,
- innerHeight : h.fn.innerHeight,
- outerWidth : h.fn.outerWidth,
- outerHeight : h.fn.outerHeight
- };
- function c(t, r, u, s) {
- h.each(b, function () {
- r -= parseFloat(h.css(t, "padding" + this)) || 0;
- if (u) {
- r -= parseFloat(h.css(t, "border" + this + "Width")) || 0
- }
- if (s) {
- r -= parseFloat(h.css(t, "margin" + this)) || 0
- }
- });
- return r
- }
- h.fn["inner" + e] = function (o) {
- if (o === l) {
- return d["inner" + e].call(this)
- }
- return this.each(function () {
- h(this).css(a, c(this, o) + "px")
- })
- };
- h.fn["outer" + e] = function (p, q) {
- if (typeof p !== "number") {
- return d["outer" + e].call(this, p)
- }
- return this.each(function () {
- h(this).css(a, c(this, p, true, q) + "px")
- })
- }
- })
- }
- if (!h.fn.addBack) {
- h.fn.addBack = function (a) {
- return this.add(a == null ? this.prevObject : this.prevObject.filter(a))
- }
- }
- if (h("<a>").data("a-b", "a").removeData("a-b").data("a-b")) {
- h.fn.removeData = (function (a) {
- return function (b) {
- if (arguments.length) {
- return a.call(this, h.camelCase(b))
- } else {
- return a.call(this)
- }
- }
- })(h.fn.removeData)
- }
- h.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());
- h.support.selectstart = "onselectstart" in document.createElement("div");
- h.fn.extend({
- disableSelection : function () {
- return this.bind((h.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (a) {
- a.preventDefault()
- })
- },
- enableSelection : function () {
- return this.unbind(".ui-disableSelection")
- }
- });
- h.extend(h.ui, {
- plugin : {
- add : function (d, c, a) {
- var e,
- b = h.ui[d].prototype;
- for (e in a) {
- b.plugins[e] = b.plugins[e] || [];
- b.plugins[e].push([c, a[e]])
- }
- },
- call : function (c, b, e) {
- var d,
- a = c.plugins[b];
- if (!a || !c.element[0].parentNode || c.element[0].parentNode.nodeType === 11) {
- return
- }
- for (d = 0; d < a.length; d++) {
- if (c.options[a[d][0]]) {
- a[d][1].apply(c.element, e)
- }
- }
- }
- },
- hasScroll : function (c, d) {
- if (h(c).css("overflow") === "hidden") {
- return false
- }
- var a = (d && d === "left") ? "scrollLeft" : "scrollTop",
- b = false;
- if (c[a] > 0) {
- return true
- }
- c[a] = 1;
- b = (c[a] > 0);
- c[a] = 0;
- return b
- }
- })
- })(jQuery);
- (function (g, j) {
- var h = 0,
- k = Array.prototype.slice,
- f = g.cleanData;
- g.cleanData = function (b) {
- for (var a = 0, c; (c = b[a]) != null; a++) {
- try {
- g(c).triggerHandler("remove")
- } catch (d) {}
- }
- f(b)
- };
- g.widget = function (d, s, b) {
- var e,
- p,
- q,
- r,
- a = {},
- c = d.split(".")[0];
- d = d.split(".")[1];
- e = c + "-" + d;
- if (!b) {
- b = s;
- s = g.Widget
- }
- g.expr[":"][e.toLowerCase()] = function (l) {
- return !!g.data(l, e)
- };
- g[c] = g[c] || {};
- p = g[c][d];
- q = g[c][d] = function (l, m) {
- if (!this._createWidget) {
- return new q(l, m)
- }
- if (arguments.length) {
- this._createWidget(l, m)
- }
- };
- g.extend(q, p, {
- version : b.version,
- _proto : g.extend({}, b),
- _childConstructors : []
- });
- r = new s();
- r.options = g.widget.extend({}, r.options);
- g.each(b, function (m, l) {
- if (!g.isFunction(l)) {
- a[m] = l;
- return
- }
- a[m] = (function () {
- var o = function () {
- return s.prototype[m].apply(this, arguments)
- },
- n = function (u) {
- return s.prototype[m].apply(this, u)
- };
- return function () {
- var y = this._super,
- x = this._superApply,
- w;
- this._super = o;
- this._superApply = n;
- w = l.apply(this, arguments);
- this._super = y;
- this._superApply = x;
- return w
- }
- })()
- });
- q.prototype = g.widget.extend(r, {
- widgetEventPrefix : p ? r.widgetEventPrefix : d
- }, a, {
- constructor : q,
- namespace : c,
- widgetName : d,
- widgetFullName : e
- });
- if (p) {
- g.each(p._childConstructors, function (l, n) {
- var m = n.prototype;
- g.widget(m.namespace + "." + m.widgetName, q, n._proto)
- });
- delete p._childConstructors
- } else {
- s._childConstructors.push(q)
- }
- g.widget.bridge(d, q)
- };
- g.widget.extend = function (b) {
- var m = k.call(arguments, 1),
- e = 0,
- d = m.length,
- c,
- a;
- for (; e < d; e++) {
- for (c in m[e]) {
- a = m[e][c];
- if (m[e].hasOwnProperty(c) && a !== j) {
- if (g.isPlainObject(a)) {
- b[c] = g.isPlainObject(b[c]) ? g.widget.extend({}, b[c], a) : g.widget.extend({}, a)
- } else {
- b[c] = a
- }
- }
- }
- }
- return b
- };
- g.widget.bridge = function (b, a) {
- var c = a.prototype.widgetFullName || b;
- g.fn[b] = function (e) {
- var n = typeof e === "string",
- o = k.call(arguments, 1),
- d = this;
- e = !n && o.length ? g.widget.extend.apply(null, [e].concat(o)) : e;
- if (n) {
- this.each(function () {
- var l,
- m = g.data(this, c);
- if (!m) {
- return g.error("cannot call methods on " + b + " prior to initialization; attempted to call method '" + e + "'")
- }
- if (!g.isFunction(m[e]) || e.charAt(0) === "_") {
- return g.error("no such method '" + e + "' for " + b + " widget instance")
- }
- l = m[e].apply(m, o);
- if (l !== m && l !== j) {
- d = l && l.jquery ? d.pushStack(l.get()) : l;
- return false
- }
- })
- } else {
- this.each(function () {
- var l = g.data(this, c);
- if (l) {
- l.option(e || {})._init()
- } else {
- g.data(this, c, new a(e, this))
- }
- })
- }
- return d
- }
- };
- g.Widget = function () {};
- g.Widget._childConstructors = [];
- g.Widget.prototype = {
- widgetName : "widget",
- widgetEventPrefix : "",
- defaultElement : "<div>",
- options : {
- disabled : false,
- create : null
- },
- _createWidget : function (a, b) {
- b = g(b || this.defaultElement || this)[0];
- this.element = g(b);
- this.uuid = h++;
- this.eventNamespace = "." + this.widgetName + this.uuid;
- this.options = g.widget.extend({}, this.options, this._getCreateOptions(), a);
- this.bindings = g();
- this.hoverable = g();
- this.focusable = g();
- if (b !== this) {
- g.data(b, this.widgetFullName, this);
- this._on(true, this.element, {
- remove : function (c) {
- if (c.target === b) {
- this.destroy()
- }
- }
- });
- this.document = g(b.style ? b.ownerDocument : b.document || b);
- this.window = g(this.document[0].defaultView || this.document[0].parentWindow)
- }
- this._create();
- this._trigger("create", null, this._getCreateEventData());
- this._init()
- },
- _getCreateOptions : g.noop,
- _getCreateEventData : g.noop,
- _create : g.noop,
- _init : g.noop,
- destroy : function () {
- this._destroy();
- this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(g.camelCase(this.widgetFullName));
- this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled ui-state-disabled");
- this.bindings.unbind(this.eventNamespace);
- this.hoverable.removeClass("ui-state-hover");
- this.focusable.removeClass("ui-state-focus")
- },
- _destroy : g.noop,
- widget : function () {
- return this.element
- },
- option : function (d, a) {
- var c = d,
- b,
- m,
- e;
- if (arguments.length === 0) {
- return g.widget.extend({}, this.options)
- }
- if (typeof d === "string") {
- c = {};
- b = d.split(".");
- d = b.shift();
- if (b.length) {
- m = c[d] = g.widget.extend({}, this.options[d]);
- for (e = 0; e < b.length - 1; e++) {
- m[b[e]] = m[b[e]] || {};
- m = m[b[e]]
- }
- d = b.pop();
- if (a === j) {
- return m[d] === j ? null : m[d]
- }
- m[d] = a
- } else {
- if (a === j) {
- return this.options[d] === j ? null : this.options[d]
- }
- c[d] = a
- }
- }
- this._setOptions(c);
- return this
- },
- _setOptions : function (a) {
- var b;
- for (b in a) {
- this._setOption(b, a[b])
- }
- return this
- },
- _setOption : function (b, a) {
- this.options[b] = a;
- if (b === "disabled") {
- this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!a).attr("aria-disabled", a);
- this.hoverable.removeClass("ui-state-hover");
- this.focusable.removeClass("ui-state-focus")
- }
- return this
- },
- enable : function () {
- return this._setOption("disabled", false)
- },
- disable : function () {
- return this._setOption("disabled", true)
- },
- _on : function (a, d, c) {
- var e,
- b = this;
- if (typeof a !== "boolean") {
- c = d;
- d = a;
- a = false
- }
- if (!c) {
- c = d;
- d = this.element;
- e = this.widget()
- } else {
- d = e = g(d);
- this.bindings = this.bindings.add(d)
- }
- g.each(c, function (s, w) {
- function v() {
- if (!a && (b.options.disabled === true || g(this).hasClass("ui-state-disabled"))) {
- return
- }
- return (typeof w === "string" ? b[w] : w).apply(b, arguments)
- }
- if (typeof w !== "string") {
- v.guid = w.guid = w.guid || v.guid || g.guid++
- }
- var u = s.match(/^(\w+)\s*(.*)$/),
- r = u[1] + b.eventNamespace,
- t = u[2];
- if (t) {
- e.delegate(t, r, v)
- } else {
- d.bind(r, v)
- }
- })
- },
- _off : function (b, a) {
- a = (a || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace;
- b.unbind(a).undelegate(a)
- },
- _delay : function (c, d) {
- function b() {
- return (typeof c === "string" ? a[c] : c).apply(a, arguments)
- }
- var a = this;
- return setTimeout(b, d || 0)
- },
- _hoverable : function (a) {
- this.hoverable = this.hoverable.add(a);
- this._on(a, {
- mouseenter : function (b) {
- g(b.currentTarget).addClass("ui-state-hover")
- },
- mouseleave : function (b) {
- g(b.currentTarget).removeClass("ui-state-hover")
- }
- })
- },
- _focusable : function (a) {
- this.focusable = this.focusable.add(a);
- this._on(a, {
- focusin : function (b) {
- g(b.currentTarget).addClass("ui-state-focus")
- },
- focusout : function (b) {
- g(b.currentTarget).removeClass("ui-state-focus")
- }
- })
- },
- _trigger : function (a, d, e) {
- var b,
- c,
- m = this.options[a];
- e = e || {};
- d = g.Event(d);
- d.type = (a === this.widgetEventPrefix ? a : this.widgetEventPrefix + a).toLowerCase();
- d.target = this.element[0];
- c = d.originalEvent;
- if (c) {
- for (b in c) {
- if (!(b in d)) {
- d[b] = c[b]
- }
- }
- }
- this.element.trigger(d, e);
- return !(g.isFunction(m) && m.apply(this.element[0], [d].concat(e)) === false || d.isDefaultPrevented())
- }
- };
- g.each({
- show : "fadeIn",
- hide : "fadeOut"
- }, function (a, b) {
- g.Widget.prototype["_" + a] = function (e, c, o) {
- if (typeof c === "string") {
- c = {
- effect : c
- }
- }
- var d,
- n = !c ? a : c === true || typeof c === "number" ? b : c.effect || b;
- c = c || {};
- if (typeof c === "number") {
- c = {
- duration : c
- }
- }
- d = !g.isEmptyObject(c);
- c.complete = o;
- if (c.delay) {
- e.delay(c.delay)
- }
- if (d && g.effects && g.effects.effect[n]) {
- e[a](c)
- } else {
- if (n !== a && e[n]) {
- e[n](c.duration, c.easing, o)
- } else {
- e.queue(function (l) {
- g(this)[a]();
- if (o) {
- o.call(e[0])
- }
- l()
- })
- }
- }
- }
- })
- })(jQuery);
- (function (d, c) {
- d.widget("ui.menu", {
- version : "1.10.2",
- defaultElement : "<ul>",
- delay : 300,
- options : {
- icons : {
- submenu : "ui-icon-carat-1-e"
- },
- menus : "ul",
- position : {
- my : "left top",
- at : "right top"
- },
- role : "menu",
- blur : null,
- focus : null,
- select : null
- },
- _create : function () {
- this.activeMenu = this.element;
- this.mouseHandled = false;
- this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length).attr({
- role : this.options.role,
- tabIndex : 0
- }).bind("click" + this.eventNamespace, d.proxy(function (a) {
- if (this.options.disabled) {
- a.preventDefault()
- }
- }, this));
- if (this.options.disabled) {
- this.element.addClass("ui-state-disabled").attr("aria-disabled", "true")
- }
- this._on({
- "mousedown .ui-menu-item > a" : function (a) {
- a.preventDefault()
- },
- "click .ui-state-disabled > a" : function (a) {
- a.preventDefault()
- },
- "click .ui-menu-item:has(a)" : function (b) {
- var a = d(b.target).closest(".ui-menu-item");
- if (!this.mouseHandled && a.not(".ui-state-disabled").length) {
- this.mouseHandled = true;
- this.select(b);
- if (a.has(".ui-menu").length) {
- this.expand(b)
- } else {
- if (!this.element.is(":focus")) {
- this.element.trigger("focus", [true]);
- if (this.active && this.active.parents(".ui-menu").length === 1) {
- clearTimeout(this.timer)
- }
- }
- }
- }
- },
- "mouseenter .ui-menu-item" : function (b) {
- var a = d(b.currentTarget);
- a.siblings().children(".ui-state-active").removeClass("ui-state-active");
- this.focus(b, a)
- },
- mouseleave : "collapseAll",
- "mouseleave .ui-menu" : "collapseAll",
- focus : function (f, a) {
- var b = this.active || this.element.children(".ui-menu-item").eq(0);
- if (!a) {
- this.focus(f, b)
- }
- },
- blur : function (a) {
- this._delay(function () {
- if (!d.contains(this.element[0], this.document[0].activeElement)) {
- this.collapseAll(a)
- }
- })
- },
- keydown : "_keydown"
- });
- this.refresh();
- this._on(this.document, {
- click : function (a) {
- if (!d(a.target).closest(".ui-menu").length) {
- this.collapseAll(a)
- }
- this.mouseHandled = false
- }
- })
- },
- _destroy : function () {
- this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();
- this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function () {
- var a = d(this);
- if (a.data("ui-menu-submenu-carat")) {
- a.remove()
- }
- });
- this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")
- },
- _keydown : function (o) {
- var n,
- m,
- q,
- a,
- b,
- l = true;
- function p(e) {
- return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
- }
- switch (o.keyCode) {
- case d.ui.keyCode.PAGE_UP:
- this.previousPage(o);
- break;
- case d.ui.keyCode.PAGE_DOWN:
- this.nextPage(o);
- break;
- case d.ui.keyCode.HOME:
- this._move("first", "first", o);
- break;
- case d.ui.keyCode.END:
- this._move("last", "last", o);
- break;
- case d.ui.keyCode.UP:
- this.previous(o);
- break;
- case d.ui.keyCode.DOWN:
- this.next(o);
- break;
- case d.ui.keyCode.LEFT:
- this.collapse(o);
- break;
- case d.ui.keyCode.RIGHT:
- if (this.active && !this.active.is(".ui-state-disabled")) {
- this.expand(o)
- }
- break;
- case d.ui.keyCode.ENTER:
- case d.ui.keyCode.SPACE:
- this._activate(o);
- break;
- case d.ui.keyCode.ESCAPE:
- this.collapse(o);
- break;
- default:
- l = false;
- m = this.previousFilter || "";
- q = String.fromCharCode(o.keyCode);
- a = false;
- clearTimeout(this.filterTimer);
- if (q === m) {
- a = true
- } else {
- q = m + q
- }
- b = new RegExp("^" + p(q), "i");
- n = this.activeMenu.children(".ui-menu-item").filter(function () {
- return b.test(d(this).children("a").text())
- });
- n = a && n.index(this.active.next()) !== -1 ? this.active.nextAll(".ui-menu-item") : n;
- if (!n.length) {
- q = String.fromCharCode(o.keyCode);
- b = new RegExp("^" + p(q), "i");
- n = this.activeMenu.children(".ui-menu-item").filter(function () {
- return b.test(d(this).children("a").text())
- })
- }
- if (n.length) {
- this.focus(o, n);
- if (n.length > 1) {
- this.previousFilter = q;
- this.filterTimer = this._delay(function () {
- delete this.previousFilter
- }, 1000)
- } else {
- delete this.previousFilter
- }
- } else {
- delete this.previousFilter
- }
- }
- if (l) {
- o.preventDefault()
- }
- },
- _activate : function (a) {
- if (!this.active.is(".ui-state-disabled")) {
- if (this.active.children("a[aria-haspopup='true']").length) {
- this.expand(a)
- } else {
- this.select(a)
- }
- }
- },
- refresh : function () {
- var b,
- f = this.options.icons.submenu,
- a = this.element.find(this.options.menus);
- a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({
- role : this.options.role,
- "aria-hidden" : "true",
- "aria-expanded" : "false"
- }).each(function () {
- var j = d(this),
- k = j.prev("a"),
- e = d("<span>").addClass("ui-menu-icon ui-icon " + f).data("ui-menu-submenu-carat", true);
- k.attr("aria-haspopup", "true").prepend(e);
- j.attr("aria-labelledby", k.attr("id"))
- });
- b = a.add(this.element);
- b.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "presentation").children("a").uniqueId().addClass("ui-corner-all").attr({
- tabIndex : -1,
- role : this._itemRole()
- });
- b.children(":not(.ui-menu-item)").each(function () {
- var e = d(this);
- if (!/[^\-\u2014\u2013\s]/.test(e.text())) {
- e.addClass("ui-widget-content ui-menu-divider")
- }
- });
- b.children(".ui-state-disabled").attr("aria-disabled", "true");
- if (this.active && !d.contains(this.element[0], this.active[0])) {
- this.blur()
- }
- },
- _itemRole : function () {
- return {
- menu : "menuitem",
- listbox : "option"
- }
- [this.options.role]
- },
- _setOption : function (b, a) {
- if (b === "icons") {
- this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(a.submenu)
- }
- this._super(b, a)
- },
- focus : function (h, b) {
- var a,
- g;
- this.blur(h, h && h.type === "focus");
- this._scrollIntoView(b);
- this.active = b.first();
- g = this.active.children("a").addClass("ui-state-focus");
- if (this.options.role) {
- this.element.attr("aria-activedescendant", g.attr("id"))
- }
- this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");
- if (h && h.type === "keydown") {
- this._close()
- } else {
- this.timer = this._delay(function () {
- this._close()
- }, this.delay)
- }
- a = b.children(".ui-menu");
- if (a.length && (/^mouse/.test(h.type))) {
- this._startOpening(a)
- }
- this.activeMenu = b.parent();
- this._trigger("focus", h, {
- item : b
- })
- },
- _scrollIntoView : function (m) {
- var o,
- b,
- k,
- a,
- n,
- l;
- if (this._hasScroll()) {
- o = parseFloat(d.css(this.activeMenu[0], "borderTopWidth")) || 0;
- b = parseFloat(d.css(this.activeMenu[0], "paddingTop")) || 0;
- k = m.offset().top - this.activeMenu.offset().top - o - b;
- a = this.activeMenu.scrollTop();
- n = this.activeMenu.height();
- l = m.height();
- if (k < 0) {
- this.activeMenu.scrollTop(a + k)
- } else {
- if (k + l > n) {
- this.activeMenu.scrollTop(a + k - n + l)
- }
- }
- }
- },
- blur : function (b, a) {
- if (!a) {
- clearTimeout(this.timer)
- }
- if (!this.active) {
- return
- }
- this.active.children("a").removeClass("ui-state-focus");
- this.active = null;
- this._trigger("blur", b, {
- item : this.active
- })
- },
- _startOpening : function (a) {
- clearTimeout(this.timer);
- if (a.attr("aria-hidden") !== "true") {
- return
- }
- this.timer = this._delay(function () {
- this._close();
- this._open(a)
- }, this.delay)
- },
- _open : function (a) {
- var b = d.extend({
- of : this.active
- }, this.options.position);
- clearTimeout(this.timer);
- this.element.find(".ui-menu").not(a.parents(".ui-menu")).hide().attr("aria-hidden", "true");
- a.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(b)
- },
- collapseAll : function (a, b) {
- clearTimeout(this.timer);
- this.timer = this._delay(function () {
- var f = b ? this.element : d(a && a.target).closest(this.element.find(".ui-menu"));
- if (!f.length) {
- f = this.element
- }
- this._close(f);
- this.blur(a);
- this.activeMenu = f
- }, this.delay)
- },
- _close : function (a) {
- if (!a) {
- a = this.active ? this.active.parent() : this.element
- }
- a.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false").end().find("a.ui-state-active").removeClass("ui-state-active")
- },
- collapse : function (b) {
- var a = this.active && this.active.parent().closest(".ui-menu-item", this.element);
- if (a && a.length) {
- this._close();
- this.focus(b, a)
- }
- },
- expand : function (b) {
- var a = this.active && this.active.children(".ui-menu ").children(".ui-menu-item").first();
- if (a && a.length) {
- this._open(a.parent());
- this._delay(function () {
- this.focus(b, a)
- })
- }
- },
- next : function (a) {
- this._move("next", "first", a)
- },
- previous : function (a) {
- this._move("prev", "last", a)
- },
- isFirstItem : function () {
- return this.active && !this.active.prevAll(".ui-menu-item").length
- },
- isLastItem : function () {
- return this.active && !this.active.nextAll(".ui-menu-item").length
- },
- _move : function (h, b, g) {
- var a;
- if (this.active) {
- if (h === "first" || h === "last") {
- a = this.active[h === "first" ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1)
- } else {
- a = this.active[h + "All"](".ui-menu-item").eq(0)
- }
- }
- if (!a || !a.length || !this.active) {
- a = this.activeMenu.children(".ui-menu-item")[b]()
- }
- this.focus(g, a)
- },
- nextPage : function (g) {
- var a,
- h,
- b;
- if (!this.active) {
- this.next(g);
- return
- }
- if (this.isLastItem()) {
- return
- }
- if (this._hasScroll()) {
- h = this.active.offset().top;
- b = this.element.height();
- this.active.nextAll(".ui-menu-item").each(function () {
- a = d(this);
- return a.offset().top - h - b < 0
- });
- this.focus(g, a)
- } else {
- this.focus(g, this.activeMenu.children(".ui-menu-item")[!this.active ? "first" : "last"]())
- }
- },
- previousPage : function (g) {
- var a,
- h,
- b;
- if (!this.active) {
- this.next(g);
- return
- }
- if (this.isFirstItem()) {
- return
- }
- if (this._hasScroll()) {
- h = this.active.offset().top;
- b = this.element.height();
- this.active.prevAll(".ui-menu-item").each(function () {
- a = d(this);
- return a.offset().top - h + b > 0
- });
- this.focus(g, a)
- } else {
- this.focus(g, this.activeMenu.children(".ui-menu-item").first())
- }
- },
- _hasScroll : function () {
- return this.element.outerHeight() < this.element.prop("scrollHeight")
- },
- select : function (b) {
- this.active = this.active || d(b.target).closest(".ui-menu-item");
- var a = {
- item : this.active
- };
- if (!this.active.has(".ui-menu").length) {
- this.collapseAll(b, true)
- }
- this._trigger("select", b, a)
- }
- })
- }
- (jQuery));
- (function (E, q) {
- E.ui = E.ui || {};
- var B,
- y = Math.max,
- C = Math.abs,
- u = Math.round,
- w = /left|center|right/,
- r = /top|center|bottom/,
- v = /[\+\-]\d+(\.[\d]+)?%?/,
- s = /^\w+/,
- t = /%$/,
- D = E.fn.position;
- function z(b, a, c) {
- return [parseFloat(b[0]) * (t.test(b[0]) ? a / 100 : 1), parseFloat(b[1]) * (t.test(b[1]) ? c / 100 : 1)]
- }
- function x(b, a) {
- return parseInt(E.css(b, a), 10) || 0
- }
- function A(b) {
- var a = b[0];
- if (a.nodeType === 9) {
- return {
- width : b.width(),
- height : b.height(),
- offset : {
- top : 0,
- left : 0
- }
- }
- }
- if (E.isWindow(a)) {
- return {
- width : b.width(),
- height : b.height(),
- offset : {
- top : b.scrollTop(),
- left : b.scrollLeft()
- }
- }
- }
- if (a.preventDefault) {
- return {
- width : 0,
- height : 0,
- offset : {
- top : a.pageY,
- left : a.pageX
- }
- }
- }
- return {
- width : b.outerWidth(),
- height : b.outerHeight(),
- offset : b.offset()
- }
- }
- E.position = {
- scrollbarWidth : function () {
- if (B !== q) {
- return B
- }
- var b,
- a,
- d = E("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),
- c = d.children()[0];
- E("body").append(d);
- b = c.offsetWidth;
- d.css("overflow", "scroll");
- a = c.offsetWidth;
- if (b === a) {
- a = d[0].clientWidth
- }
- d.remove();
- return (B = b - a)
- },
- getScrollInfo : function (a) {
- var c = a.isWindow ? "" : a.element.css("overflow-x"),
- b = a.isWindow ? "" : a.element.css("overflow-y"),
- e = c === "scroll" || (c === "auto" && a.width < a.element[0].scrollWidth),
- d = b === "scroll" || (b === "auto" && a.height < a.element[0].scrollHeight);
- return {
- width : d ? E.position.scrollbarWidth() : 0,
- height : e ? E.position.scrollbarWidth() : 0
- }
- },
- getWithinInfo : function (c) {
- var a = E(c || window),
- b = E.isWindow(a[0]);
- return {
- element : a,
- isWindow : b,
- offset : a.offset() || {
- left : 0,
- top : 0
- },
- scrollLeft : a.scrollLeft(),
- scrollTop : a.scrollTop(),
- width : b ? a.width() : a.outerWidth(),
- height : b ? a.height() : a.outerHeight()
- }
- }
- };
- E.fn.position = function (j) {
- if (!j || !j.of) {
- return D.apply(this, arguments)
- }
- j = E.extend({}, j);
- var b,
- d,
- f,
- e,
- a,
- l,
- g = E(j.of),
- c = E.position.getWithinInfo(j.within),
- h = E.position.getScrollInfo(c),
- m = (j.collision || "flip").split(" "),
- k = {};
- l = A(g);
- if (g[0].preventDefault) {
- j.at = "left top"
- }
- d = l.width;
- f = l.height;
- e = l.offset;
- a = E.extend({}, e);
- E.each(["my", "at"], function () {
- var o = (j[this] || "").split(" "),
- p,
- n;
- if (o.length === 1) {
- o = w.test(o[0]) ? o.concat(["center"]) : r.test(o[0]) ? ["center"].concat(o) : ["center", "center"]
- }
- o[0] = w.test(o[0]) ? o[0] : "center";
- o[1] = r.test(o[1]) ? o[1] : "center";
- p = v.exec(o[0]);
- n = v.exec(o[1]);
- k[this] = [p ? p[0] : 0, n ? n[0] : 0];
- j[this] = [s.exec(o[0])[0], s.exec(o[1])[0]]
- });
- if (m.length === 1) {
- m[1] = m[0]
- }
- if (j.at[0] === "right") {
- a.left += d
- } else {
- if (j.at[0] === "center") {
- a.left += d / 2
- }
- }
- if (j.at[1] === "bottom") {
- a.top += f
- } else {
- if (j.at[1] === "center") {
- a.top += f / 2
- }
- }
- b = z(k.at, d, f);
- a.left += b[0];
- a.top += b[1];
- return this.each(function () {
- var n,
- p,
- T = E(this),
- R = T.outerWidth(),
- S = T.outerHeight(),
- Q = x(this, "marginLeft"),
- P = x(this, "marginTop"),
- U = R + Q + x(this, "marginRight") + h.width,
- o = S + P + x(this, "marginBottom") + h.height,
- N = E.extend({}, a),
- O = z(k.my, T.outerWidth(), T.outerHeight());
- if (j.my[0] === "right") {
- N.left -= R
- } else {
- if (j.my[0] === "center") {
- N.left -= R / 2
- }
- }
- if (j.my[1] === "bottom") {
- N.top -= S
- } else {
- if (j.my[1] === "center") {
- N.top -= S / 2
- }
- }
- N.left += O[0];
- N.top += O[1];
- if (!E.support.offsetFractions) {
- N.left = u(N.left);
- N.top = u(N.top)
- }
- n = {
- marginLeft : Q,
- marginTop : P
- };
- E.each(["left", "top"], function (F, G) {
- if (E.ui.position[m[F]]) {
- E.ui.position[m[F]][G](N, {
- targetWidth : d,
- targetHeight : f,
- elemWidth : R,
- elemHeight : S,
- collisionPosition : n,
- collisionWidth : U,
- collisionHeight : o,
- offset : [b[0] + O[0], b[1] + O[1]],
- my : j.my,
- at : j.at,
- within : c,
- elem : T
- })
- }
- });
- if (j.using) {
- p = function (H) {
- var I = e.left - N.left,
- G = I + d - R,
- F = e.top - N.top,
- K = F + f - S,
- J = {
- target : {
- element : g,
- left : e.left,
- top : e.top,
- width : d,
- height : f
- },
- element : {
- element : T,
- left : N.left,
- top : N.top,
- width : R,
- height : S
- },
- horizontal : G < 0 ? "left" : I > 0 ? "right" : "center",
- vertical : K < 0 ? "top" : F > 0 ? "bottom" : "middle"
- };
- if (d < R && C(I + G) < d) {
- J.horizontal = "center"
- }
- if (f < S && C(F + K) < f) {
- J.vertical = "middle"
- }
- if (y(C(I), C(G)) > y(C(F), C(K))) {
- J.important = "horizontal"
- } else {
- J.important = "vertical"
- }
- j.using.call(this, H, J)
- }
- }
- T.offset(E.extend(N, {
- using : p
- }))
- })
- };
- E.ui.position = {
- fit : {
- left : function (e, a) {
- var d = a.within,
- c = d.isWindow ? d.scrollLeft : d.offset.left,
- h = d.width,
- b = e.left - a.collisionPosition.marginLeft,
- g = c - b,
- f = b + a.collisionWidth - h - c,
- j;
- if (a.collisionWidth > h) {
- if (g > 0 && f <= 0) {
- j = e.left + g + a.collisionWidth - h - c;
- e.left += g - j
- } else {
- if (f > 0 && g <= 0) {
- e.left = c
- } else {
- if (g > f) {
- e.left = c + h - a.collisionWidth
- } else {
- e.left = c
- }
- }
- }
- } else {
- if (g > 0) {
- e.left += g
- } else {
- if (f > 0) {
- e.left -= f
- } else {
- e.left = y(e.left - b, e.left)
- }
- }
- }
- },
- top : function (e, a) {
- var d = a.within,
- c = d.isWindow ? d.scrollTop : d.offset.top,
- h = a.within.height,
- b = e.top - a.collisionPosition.marginTop,
- f = c - b,
- g = b + a.collisionHeight - h - c,
- j;
- if (a.collisionHeight > h) {
- if (f > 0 && g <= 0) {
- j = e.top + f + a.collisionHeight - h - c;
- e.top += f - j
- } else {
- if (g > 0 && f <= 0) {
- e.top = c
- } else {
- if (f > g) {
- e.top = c + h - a.collisionHeight
- } else {
- e.top = c
- }
- }
- }
- } else {
- if (f > 0) {
- e.top += f
- } else {
- if (g > 0) {
- e.top -= g
- } else {
- e.top = y(e.top - b, e.top)
- }
- }
- }
- }
- },
- flip : {
- left : function (e, o) {
- var d = o.within,
- a = d.offset.left + d.scrollLeft,
- h = d.width,
- j = d.isWindow ? d.scrollLeft : d.offset.left,
- b = e.left - o.collisionPosition.marginLeft,
- g = b - j,
- f = b + o.collisionWidth - h - j,
- n = o.my[0] === "left" ? -o.elemWidth : o.my[0] === "right" ? o.elemWidth : 0,
- c = o.at[0] === "left" ? o.targetWidth : o.at[0] === "right" ? -o.targetWidth : 0,
- k = -2 * o.offset[0],
- l,
- m;
- if (g < 0) {
- l = e.left + n + c + k + o.collisionWidth - h - a;
- if (l < 0 || l < C(g)) {
- e.left += n + c + k
- }
- } else {
- if (f > 0) {
- m = e.left - o.collisionPosition.marginLeft + n + c + k - j;
- if (m > 0 || C(m) < f) {
- e.left += n + c + k
- }
- }
- }
- },
- top : function (e, p) {
- var a = p.within,
- o = a.offset.top + a.scrollTop,
- h = a.height,
- j = a.isWindow ? a.scrollTop : a.offset.top,
- b = e.top - p.collisionPosition.marginTop,
- f = b - j,
- g = b + p.collisionHeight - h - j,
- d = p.my[1] === "top",
- n = d ? -p.elemHeight : p.my[1] === "bottom" ? p.elemHeight : 0,
- c = p.at[1] === "top" ? p.targetHeight : p.at[1] === "bottom" ? -p.targetHeight : 0,
- k = -2 * p.offset[1],
- l,
- m;
- if (f < 0) {
- m = e.top + n + c + k + p.collisionHeight - h - o;
- if ((e.top + n + c + k) > f && (m < 0 || m < C(f))) {
- e.top += n + c + k
- }
- } else {
- if (g > 0) {
- l = e.top - p.collisionPosition.marginTop + n + c + k - j;
- if ((e.top + n + c + k) > g && (l > 0 || C(l) < g)) {
- e.top += n + c + k
- }
- }
- }
- }
- },
- flipfit : {
- left : function () {
- E.ui.position.flip.left.apply(this, arguments);
- E.ui.position.fit.left.apply(this, arguments)
- },
- top : function () {
- E.ui.position.flip.top.apply(this, arguments);
- E.ui.position.fit.top.apply(this, arguments)
- }
- }
- };
- (function () {
- var c,
- b,
- a,
- d,
- e,
- g = document.getElementsByTagName("body")[0],
- f = document.createElement("div");
- c = document.createElement(g ? "div" : "body");
- a = {
- visibility : "hidden",
- width : 0,
- height : 0,
- border : 0,
- margin : 0,
- background : "none"
- };
- if (g) {
- E.extend(a, {
- position : "absolute",
- left : "-1000px",
- top : "-1000px"
- })
- }
- for (e in a) {
- c.style[e] = a[e]
- }
- c.appendChild(f);
- b = g || document.documentElement;
- b.insertBefore(c, b.firstChild);
- f.style.cssText = "position: absolute; left: 10.7432222px;";
- d = E(f).offset().left;
- E.support.offsetFractions = d > 10 && d < 11;
- c.innerHTML = "";
- b.removeChild(c)
- })()
- }
- (jQuery));
- (function (e, f) {
- var d = 0;
- e.widget("ui.autocomplete", {
- version : "1.10.2",
- defaultElement : "<input>",
- options : {
- appendTo : null,
- autoFocus : false,
- delay : 300,
- minLength : 1,
- position : {
- my : "left top",
- at : "left bottom",
- collision : "none"
- },
- source : null,
- change : null,
- close : null,
- focus : null,
- open : null,
- response : null,
- search : null,
- select : null
- },
- pending : 0,
- _create : function () {
- var b,
- a,
- c,
- k = this.element[0].nodeName.toLowerCase(),
- l = k === "textarea",
- m = k === "input";
- this.isMultiLine = l ? true : m ? false : this.element.prop("isContentEditable");
- this.valueMethod = this.element[l || m ? "val" : "text"];
- this.isNewMenu = true;
- this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off");
- this._on(this.element, {
- keydown : function (h) {
- if (this.element.prop("readOnly")) {
- b = true;
- c = true;
- a = true;
- return
- }
- b = false;
- c = false;
- a = false;
- var g = e.ui.keyCode;
- switch (h.keyCode) {
- case g.PAGE_UP:
- b = true;
- this._move("previousPage", h);
- break;
- case g.PAGE_DOWN:
- b = true;
- this._move("nextPage", h);
- break;
- case g.UP:
- b = true;
- this._keyEvent("previous", h);
- break;
- case g.DOWN:
- b = true;
- this._keyEvent("next", h);
- break;
- case g.ENTER:
- case g.NUMPAD_ENTER:
- if (this.menu.active) {
- b = true;
- h.preventDefault();
- this.menu.select(h)
- }
- break;
- case g.TAB:
- if (this.menu.active) {
- this.menu.select(h)
- }
- break;
- case g.ESCAPE:
- if (this.menu.element.is(":visible")) {
- this._value(this.term);
- this.close(h);
- h.preventDefault()
- }
- break;
- default:
- a = true;
- this._searchTimeout(h);
- break
- }
- },
- keypress : function (h) {
- if (b) {
- b = false;
- h.preventDefault();
- return
- }
- if (a) {
- return
- }
- var g = e.ui.keyCode;
- switch (h.keyCode) {
- case g.PAGE_UP:
- this._move("previousPage", h);
- break;
- case g.PAGE_DOWN:
- this._move("nextPage", h);
- break;
- case g.UP:
- this._keyEvent("previous", h);
- break;
- case g.DOWN:
- this._keyEvent("next", h);
- break
- }
- },
- input : function (g) {
- if (c) {
- c = false;
- g.preventDefault();
- return
- }
- this._searchTimeout(g)
- },
- focus : function () {
- this.selectedItem = null;
- this.previous = this._value()
- },
- blur : function (g) {
- if (this.cancelBlur) {
- delete this.cancelBlur;
- return
- }
- clearTimeout(this.searching);
- this.close(g);
- this._change(g)
- }
- });
- this._initSource();
- this.menu = e("<ul>").addClass("ui-autocomplete ui-front typeahead dropdown-menu").appendTo(this._appendTo()).menu({
- input : e(),
- role : null
- }).hide().data("ui-menu");
- this._on(this.menu.element, {
- mousedown : function (h) {
- h.preventDefault();
- this.cancelBlur = true;
- this._delay(function () {
- delete this.cancelBlur
- });
- var g = this.menu.element[0];
- if (!e(h.target).closest(".ui-menu-item").length) {
- this._delay(function () {
- var j = this;
- this.document.one("mousedown", function (o) {
- if (o.target !== j.element[0] && o.target !== g && !e.contains(g, o.target)) {
- j.close()
- }
- })
- })
- }
- },
- menufocus : function (j, g) {
- if (this.isNewMenu) {
- this.isNewMenu = false;
- if (j.originalEvent && /^mouse/.test(j.originalEvent.type)) {
- this.menu.blur();
- this.document.one("mousemove", function () {
- e(j.target).trigger(j.originalEvent)
- });
- return
- }
- }
- var h = g.item.data("ui-autocomplete-item");
- if (false !== this._trigger("focus", j, {
- item : h
- })) {
- if (j.originalEvent && /^key/.test(j.originalEvent.type)) {
- this._value(h.value)
- }
- } else {
- this.liveRegion.text(h.value)
- }
- },
- menuselect : function (j, o) {
- var h = o.item.data("ui-autocomplete-item"),
- g = this.previous;
- if (this.element[0] !== this.document[0].activeElement) {
- this.element.focus();
- this.previous = g;
- this._delay(function () {
- this.previous = g;
- this.selectedItem = h
- })
- }
- if (false !== this._trigger("select", j, {
- item : h
- })) {
- this._value(h.value)
- }
- this.term = this._value();
- this.close(j);
- this.selectedItem = h
- }
- });
- this.liveRegion = e("<span>", {
- role : "status",
- "aria-live" : "polite"
- }).addClass("ui-helper-hidden-accessible").insertAfter(this.element);
- this._on(this.window, {
- beforeunload : function () {
- this.element.removeAttr("autocomplete")
- }
- })
- },
- _destroy : function () {
- clearTimeout(this.searching);
- this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");
- this.menu.element.remove();
- this.liveRegion.remove()
- },
- _setOption : function (b, a) {
- this._super(b, a);
- if (b === "source") {
- this._initSource()
- }
- if (b === "appendTo") {
- this.menu.element.appendTo(this._appendTo())
- }
- if (b === "disabled" && a && this.xhr) {
- this.xhr.abort()
- }
- },
- _appendTo : function () {
- var a = this.options.appendTo;
- if (a) {
- a = a.jquery || a.nodeType ? e(a) : this.document.find(a).eq(0)
- }
- if (!a) {
- a = this.element.closest(".ui-front")
- }
- if (!a.length) {
- a = this.document[0].body
- }
- return a
- },
- _initSource : function () {
- var c,
- a,
- b = this;
- if (e.isArray(this.options.source)) {
- c = this.options.source;
- this.source = function (k, j) {
- j(e.ui.autocomplete.filter(c, k.term))
- }
- } else {
- if (typeof this.options.source === "string") {
- a = this.options.source;
- this.source = function (k, j) {
- if (b.xhr) {
- b.xhr.abort()
- }
- b.xhr = e.ajax({
- url : a,
- data : k,
- dataType : "json",
- success : function (g) {
- j(g)
- },
- error : function () {
- j([])
- }
- })
- }
- } else {
- this.source = this.options.source
- }
- }
- },
- _searchTimeout : function (a) {
- clearTimeout(this.searching);
- this.searching = this._delay(function () {
- if (this.term !== this._value()) {
- this.selectedItem = null;
- this.search(null, a)
- }
- }, this.options.delay)
- },
- search : function (a, b) {
- a = a != null ? a : this._value();
- this.term = this._value();
- if (a.length < this.options.minLength) {
- return this.close(b)
- }
- if (this._trigger("search", b) === false) {
- return
- }
- return this._search(a)
- },
- _search : function (a) {
- this.pending++;
- this.element.addClass("ui-autocomplete-loading");
- this.cancelSearch = false;
- this.source({
- term : a
- }, this._response())
- },
- _response : function () {
- var a = this,
- b = ++d;
- return function (c) {
- if (b === d) {
- a.__response(c)
- }
- a.pending--;
- if (!a.pending) {
- a.element.removeClass("ui-autocomplete-loading")
- }
- }
- },
- __response : function (a) {
- if (a) {
- a = this._normalize(a)
- }
- this._trigger("response", null, {
- content : a
- });
- if (!this.options.disabled && a && a.length && !this.cancelSearch) {
- this._suggest(a);
- this._trigger("open")
- } else {
- this._close()
- }
- },
- close : function (a) {
- this.cancelSearch = true;
- this._close(a)
- },
- _close : function (a) {
- if (this.menu.element.is(":visible")) {
- this.menu.element.hide();
- this.menu.blur();
- this.isNewMenu = true;
- this._trigger("close", a)
- }
- },
- _change : function (a) {
- if (this.previous !== this._value()) {
- this._trigger("change", a, {
- item : this.selectedItem
- })
- }
- },
- _normalize : function (a) {
- if (a.length && a[0].label && a[0].value) {
- return a
- }
- return e.map(a, function (b) {
- if (typeof b === "string") {
- return {
- label : b,
- value : b
- }
- }
- return e.extend({
- label : b.label || b.value,
- value : b.value || b.label
- }, b)
- })
- },
- _suggest : function (b) {
- var a = this.menu.element.empty();
- this._renderMenu(a, b);
- this.isNewMenu = true;
- this.menu.refresh();
- a.show();
- this._resizeMenu();
- a.position(e.extend({
- of : this.element
- }, this.options.position));
- if (this.options.autoFocus) {
- this.menu.next()
- }
- },
- _resizeMenu : function () {
- var a = this.menu.element;
- a.css({
- left : "",
- top : ""
- });
- a.outerWidth(Math.max(a.width("").outerWidth() + 1, this.element.outerWidth()))
- },
- _renderMenu : function (a, c) {
- var b = this;
- e.each(c, function (k, j) {
- b._renderItemData(a, j)
- })
- },
- _renderItemData : function (a, b) {
- return this._renderItem(a, b).data("ui-autocomplete-item", b)
- },
- _renderItem : function (a, b) {
- return e("<li>").append(e("<a>").html(b.label)).appendTo(a)
- },
- _move : function (b, a) {
- if (!this.menu.element.is(":visible")) {
- this.search(null, a);
- return
- }
- if (this.menu.isFirstItem() && /^previous/.test(b) || this.menu.isLastItem() && /^next/.test(b)) {
- this._value(this.term);
- this.menu.blur();
- return
- }
- this.menu[b](a)
- },
- widget : function () {
- return this.menu.element
- },
- _value : function () {
- return this.valueMethod.apply(this.element, arguments)
- },
- _keyEvent : function (a, b) {
- if (!this.isMultiLine || this.menu.element.is(":visible")) {
- this._move(a, b);
- b.preventDefault()
- }
- }
- });
- e.extend(e.ui.autocomplete, {
- escapeRegex : function (a) {
- return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&").replace(/[a?????]/g, "[a\xE0\xE1\xE2\xE3\xE4]").replace(/[e????]/g, "[e\xE8\xE9\xEA\xEB]").replace(/[i????]/g, "[i\xEC\xED\xEE\xEF]").replace(/[o?????]/g, "[o\xF2\xF3\xF4\xF5\xF6]").replace(/[u????]/g, "[u\xF9\xFA\xFB\xFC]").replace(/[c?]/g, "[c\xE7]").replace(/[?]/g, "[n\xF1]")
- },
- filter : function (c, a) {
- var b = new RegExp(e.ui.autocomplete.escapeRegex(a), "i");
- return e.grep(c, function (h) {
- return b.test(h.label || h.value || h)
- })
- }
- })
- }
- (jQuery));
- (function (d, c) {
- d.widget("ui.autocomplete_bold", d.ui.autocomplete, {
- _create : function () {
- d.ui.autocomplete.prototype._create.apply(this, []);
- this.element.data(d.ui.autocomplete.prototype.widgetFullName, this.element.data(d.ui.autocomplete_bold.prototype.widgetFullName))
- },
- _renderItem : function (a, k) {
- var j = k.label,
- b = d.trim(this.term).match(/\w+/g),
- m;
- for (var l = 0; b && l < b.length; l++) {
- j = j.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + d.ui.autocomplete.escapeRegex(b[l]) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>")
- }
- m = d("<li>").data("item.autocomplete", k).append("<a>" + j + "</a>");
- if (k.cssClass) {
- m.addClass(k.cssClass)
- }
- return m.appendTo(a)
- }
- })
- }
- (jQuery));
- (function (f) {
- var h = 0;
- function e(b, a) {
- var c = (b.attr("aria-describedby") || "").split(/\s+/);
- c.push(a);
- b.data("ui-tooltip-id", a).attr("aria-describedby", f.trim(c.join(" ")))
- }
- function g(c) {
- var b = c.data("ui-tooltip-id"),
- d = (c.attr("aria-describedby") || "").split(/\s+/),
- a = f.inArray(b, d);
- if (a !== -1) {
- d.splice(a, 1)
- }
- c.removeData("ui-tooltip-id");
- d = f.trim(d.join(" "));
- if (d) {
- c.attr("aria-describedby", d)
- } else {
- c.removeAttr("aria-describedby")
- }
- }
- f.widget("ui.tooltip", {
- version : "1.10.2",
- options : {
- content : function () {
- var a = f(this).attr("title") || "";
- return f("<a>").text(a).html()
- },
- hide : true,
- items : "[title]:not([disabled])",
- position : {
- my : "left top+15",
- at : "left bottom",
- collision : "flipfit flip"
- },
- show : true,
- tooltipClass : null,
- track : false,
- close : null,
- open : null
- },
- _create : function () {
- this._on({
- mouseover : "open",
- focusin : "open"
- });
- this.tooltips = {};
- this.parents = {};
- if (this.options.disabled) {
- this._disable()
- }
- },
- _setOption : function (c, a) {
- var b = this;
- if (c === "disabled") {
- this[a ? "_disable" : "_enable"]();
- this.options[c] = a;
- return
- }
- this._super(c, a);
- if (c === "content") {
- f.each(this.tooltips, function (d, k) {
- b._updateContent(k)
- })
- }
- },
- _disable : function () {
- var a = this;
- f.each(this.tooltips, function (b, d) {
- var c = f.Event("blur");
- c.target = c.currentTarget = d[0];
- a.close(c, true)
- });
- this.element.find(this.options.items).addBack().each(function () {
- var b = f(this);
- if (b.is("[title]")) {
- b.data("ui-tooltip-title", b.attr("title")).attr("title", "")
- }
- })
- },
- _enable : function () {
- this.element.find(this.options.items).addBack().each(function () {
- var a = f(this);
- if (a.data("ui-tooltip-title")) {
- a.attr("title", a.data("ui-tooltip-title"))
- }
- })
- },
- open : function (c) {
- var a = this,
- b = f(c ? c.target : this.element).closest(this.options.items);
- if (!b.length || b.data("ui-tooltip-id")) {
- return
- }
- if (b.attr("title")) {
- b.data("ui-tooltip-title", b.attr("title"))
- }
- b.data("ui-tooltip-open", true);
- if (c && c.type === "mouseover") {
- b.parents().each(function () {
- var d = f(this),
- k;
- if (d.data("ui-tooltip-open")) {
- k = f.Event("blur");
- k.target = k.currentTarget = this;
- a.close(k, true)
- }
- if (d.attr("title")) {
- d.uniqueId();
- a.parents[this.id] = {
- element : this,
- title : d.attr("title")
- };
- d.attr("title", "")
- }
- })
- }
- this._updateContent(b, c)
- },
- _updateContent : function (b, d) {
- var m,
- l = this.options.content,
- a = this,
- c = d ? d.type : null;
- if (typeof l === "string") {
- return this._open(d, b, l)
- }
- m = l.call(b[0], function (j) {
- if (!b.data("ui-tooltip-open")) {
- return
- }
- a._delay(function () {
- if (d) {
- d.type = c
- }
- this._open(d, b, j)
- })
- });
- if (m) {
- this._open(d, b, m)
- }
- },
- _open : function (o, b, q) {
- var a,
- n,
- p,
- c = f.extend({}, this.options.position);
- if (!q) {
- return
- }
- a = this._find(b);
- if (a.length) {
- a.find(".ui-tooltip-content").html(q);
- return
- }
- if (b.is("[title]")) {
- if (o && o.type === "mouseover") {
- b.attr("title", "")
- } else {
- b.removeAttr("title")
- }
- }
- a = this._tooltip(b);
- e(b, a.attr("id"));
- a.find(".ui-tooltip-content").html(q);
- function d(j) {
- c.of = j;
- if (a.is(":hidden")) {
- return
- }
- a.position(c)
- }
- if (this.options.track && o && /^mouse/.test(o.type)) {
- this._on(this.document, {
- mousemove : d
- });
- d(o)
- } else {
- a.position(f.extend({
- of : b
- }, this.options.position))
- }
- a.hide();
- this._show(a, this.options.show);
- if (this.options.show && this.options.show.delay) {
- p = this.delayedShow = setInterval(function () {
- if (a.is(":visible")) {
- d(c.of);
- clearInterval(p)
- }
- }, f.fx.interval)
- }
- this._trigger("open", o, {
- tooltip : a
- });
- n = {
- keyup : function (k) {
- if (k.keyCode === f.ui.keyCode.ESCAPE) {
- var j = f.Event(k);
- j.currentTarget = b[0];
- this.close(j, true)
- }
- },
- remove : function () {
- this._removeTooltip(a)
- }
- };
- if (!o || o.type === "mouseover") {
- n.mouseleave = "close"
- }
- if (!o || o.type === "focusin") {
- n.focusout = "close"
- }
- this._on(true, b, n)
- },
- close : function (d) {
- var b = this,
- c = f(d ? d.currentTarget : this.element),
- a = this._find(c);
- if (this.closing) {
- return
- }
- clearInterval(this.delayedShow);
- if (c.data("ui-tooltip-title")) {
- c.attr("title", c.data("ui-tooltip-title"))
- }
- g(c);
- a.stop(true);
- this._hide(a, this.options.hide, function () {
- b._removeTooltip(f(this))
- });
- c.removeData("ui-tooltip-open");
- this._off(c, "mouseleave focusout keyup");
- if (c[0] !== this.element[0]) {
- this._off(c, "remove")
- }
- this._off(this.document, "mousemove");
- if (d && d.type === "mouseleave") {
- f.each(this.parents, function (m, l) {
- f(l.element).attr("title", l.title);
- delete b.parents[m]
- })
- }
- this.closing = true;
- this._trigger("close", d, {
- tooltip : a
- });
- this.closing = false
- },
- _tooltip : function (c) {
- var b = "ui-tooltip-" + h++,
- a = f("<div>").attr({
- id : b,
- role : "tooltip"
- }).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass || ""));
- f("<div>").addClass("ui-tooltip-content").appendTo(a);
- a.appendTo(this.document[0].body);
- this.tooltips[b] = c;
- return a
- },
- _find : function (a) {
- var b = a.data("ui-tooltip-id");
- return b ? f("#" + b) : f()
- },
- _removeTooltip : function (a) {
- a.remove();
- delete this.tooltips[a.attr("id")]
- },
- _destroy : function () {
- var a = this;
- f.each(this.tooltips, function (b, d) {
- var c = f.Event("blur");
- c.target = c.currentTarget = d[0];
- a.close(c, true);
- f("#" + b).remove();
- if (d.data("ui-tooltip-title")) {
- d.attr("title", d.data("ui-tooltip-title"));
- d.removeData("ui-tooltip-title")
- }
- })
- }
- })
- }
- (jQuery));
- (function (w, m) {
- var s,
- q,
- p,
- u,
- v = "ui-button ui-widget ui-state-default ui-corner-all",
- o = "ui-state-hover ui-state-active ",
- n = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
- t = function () {
- var a = w(this).find(":ui-button");
- setTimeout(function () {
- a.button("refresh")
- }, 1)
- },
- r = function (c) {
- var d = c.name,
- a = c.form,
- b = w([]);
- if (d) {
- d = d.replace(/'/g, "\\'");
- if (a) {
- b = w(a).find("[name='" + d + "']")
- } else {
- b = w("[name='" + d + "']", c.ownerDocument).filter(function () {
- return !this.form
- })
- }
- }
- return b
- };
- w.widget("ui.button", {
- version : "1.10.2",
- defaultElement : "<button>",
- options : {
- disabled : null,
- text : true,
- label : null,
- icons : {
- primary : null,
- secondary : null
- }
- },
- _create : function () {
- this.element.closest("form").unbind("reset" + this.eventNamespace).bind("reset" + this.eventNamespace, t);
- if (typeof this.options.disabled !== "boolean") {
- this.options.disabled = !!this.element.prop("disabled")
- } else {
- this.element.prop("disabled", this.options.disabled)
- }
- this._determineButtonType();
- this.hasTitle = !!this.buttonElement.attr("title");
- var c = this,
- d = this.options,
- b = this.type === "checkbox" || this.type === "radio",
- a = !b ? "ui-state-active" : "",
- e = "ui-state-focus";
- if (d.label === null) {
- d.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html())
- }
- this._hoverable(this.buttonElement);
- this.buttonElement.addClass(v).attr("role", "button").bind("mouseenter" + this.eventNamespace, function () {
- if (d.disabled) {
- return
- }
- if (this === s) {
- w(this).addClass("ui-state-active")
- }
- }).bind("mouseleave" + this.eventNamespace, function () {
- if (d.disabled) {
- return
- }
- w(this).removeClass(a)
- }).bind("click" + this.eventNamespace, function (f) {
- if (d.disabled) {
- f.preventDefault();
- f.stopImmediatePropagation()
- }
- });
- this.element.bind("focus" + this.eventNamespace, function () {
- c.buttonElement.addClass(e)
- }).bind("blur" + this.eventNamespace, function () {
- c.buttonElement.removeClass(e)
- });
- if (b) {
- this.element.bind("change" + this.eventNamespace, function () {
- if (u) {
- return
- }
- c.refresh()
- });
- this.buttonElement.bind("mousedown" + this.eventNamespace, function (f) {
- if (d.disabled) {
- return
- }
- u = false;
- q = f.pageX;
- p = f.pageY
- }).bind("mouseup" + this.eventNamespace, function (f) {
- if (d.disabled) {
- return
- }
- if (q !== f.pageX || p !== f.pageY) {
- u = true
- }
- })
- }
- if (this.type === "checkbox") {
- this.buttonElement.bind("click" + this.eventNamespace, function () {
- if (d.disabled || u) {
- return false
- }
- })
- } else {
- if (this.type === "radio") {
- this.buttonElement.bind("click" + this.eventNamespace, function () {
- if (d.disabled || u) {
- return false
- }
- w(this).addClass("ui-state-active");
- c.buttonElement.attr("aria-pressed", "true");
- var f = c.element[0];
- r(f).not(f).map(function () {
- return w(this).button("widget")[0]
- }).removeClass("ui-state-active").attr("aria-pressed", "false")
- })
- } else {
- this.buttonElement.bind("mousedown" + this.eventNamespace, function () {
- if (d.disabled) {
- return false
- }
- w(this).addClass("ui-state-active");
- s = this;
- c.document.one("mouseup", function () {
- s = null
- })
- }).bind("mouseup" + this.eventNamespace, function () {
- if (d.disabled) {
- return false
- }
- w(this).removeClass("ui-state-active")
- }).bind("keydown" + this.eventNamespace, function (f) {
- if (d.disabled) {
- return false
- }
- if (f.keyCode === w.ui.keyCode.SPACE || f.keyCode === w.ui.keyCode.ENTER) {
- w(this).addClass("ui-state-active")
- }
- }).bind("keyup" + this.eventNamespace + " blur" + this.eventNamespace, function () {
- w(this).removeClass("ui-state-active")
- });
- if (this.buttonElement.is("a")) {
- this.buttonElement.keyup(function (f) {
- if (f.keyCode === w.ui.keyCode.SPACE) {
- w(this).click()
- }
- })
- }
- }
- }
- this._setOption("disabled", d.disabled);
- this._resetButton()
- },
- _determineButtonType : function () {
- var a,
- b,
- c;
- if (this.element.is("[type=checkbox]")) {
- this.type = "checkbox"
- } else {
- if (this.element.is("[type=radio]")) {
- this.type = "radio"
- } else {
- if (this.element.is("input")) {
- this.type = "input"
- } else {
- this.type = "button"
- }
- }
- }
- if (this.type === "checkbox" || this.type === "radio") {
- a = this.element.parents().last();
- b = "label[for='" + this.element.attr("id") + "']";
- this.buttonElement = a.find(b);
- if (!this.buttonElement.length) {
- a = a.length ? a.siblings() : this.element.siblings();
- this.buttonElement = a.filter(b);
- if (!this.buttonElement.length) {
- this.buttonElement = a.find(b)
- }
- }
- this.element.addClass("ui-helper-hidden-accessible");
- c = this.element.is(":checked");
- if (c) {
- this.buttonElement.addClass("ui-state-active")
- }
- this.buttonElement.prop("aria-pressed", c)
- } else {
- this.buttonElement = this.element
- }
- },
- widget : function () {
- return this.buttonElement
- },
- _destroy : function () {
- this.element.removeClass("ui-helper-hidden-accessible");
- this.buttonElement.removeClass(v + " " + o + " " + n).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
- if (!this.hasTitle) {
- this.buttonElement.removeAttr("title")
- }
- },
- _setOption : function (a, b) {
- this._super(a, b);
- if (a === "disabled") {
- if (b) {
- this.element.prop("disabled", true)
- } else {
- this.element.prop("disabled", false)
- }
- return
- }
- this._resetButton()
- },
- refresh : function () {
- var a = this.element.is("input, button") ? this.element.is(":disabled") : this.element.hasClass("ui-button-disabled");
- if (a !== this.options.disabled) {
- this._setOption("disabled", a)
- }
- if (this.type === "radio") {
- r(this.element[0]).each(function () {
- if (w(this).is(":checked")) {
- w(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true")
- } else {
- w(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false")
- }
- })
- } else {
- if (this.type === "checkbox") {
- if (this.element.is(":checked")) {
- this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true")
- } else {
- this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false")
- }
- }
- }
- },
- _resetButton : function () {
- if (this.type === "input") {
- if (this.options.label) {
- this.element.val(this.options.label)
- }
- return
- }
- var e = this.buttonElement.removeClass(n),
- d = w("<span></span>", this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),
- c = this.options.icons,
- b = c.primary && c.secondary,
- a = [];
- if (c.primary || c.secondary) {
- if (this.options.text) {
- a.push("ui-button-text-icon" + (b ? "s" : (c.primary ? "-primary" : "-secondary")))
- }
- if (c.primary) {
- e.prepend("<span class='ui-button-icon-primary ui-icon " + c.primary + "'></span>")
- }
- if (c.secondary) {
- e.append("<span class='ui-button-icon-secondary ui-icon " + c.secondary + "'></span>")
- }
- if (!this.options.text) {
- a.push(b ? "ui-button-icons-only" : "ui-button-icon-only");
- if (!this.hasTitle) {
- e.attr("title", w.trim(d))
- }
- }
- } else {
- a.push("ui-button-text-only")
- }
- e.addClass(a.join(" "))
- }
- });
- w.widget("ui.buttonset", {
- version : "1.10.2",
- options : {
- items : "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
- },
- _create : function () {
- this.element.addClass("ui-buttonset")
- },
- _init : function () {
- this.refresh()
- },
- _setOption : function (a, b) {
- if (a === "disabled") {
- this.buttons.button("option", a, b)
- }
- this._super(a, b)
- },
- refresh : function () {
- var a = this.element.css("direction") === "rtl";
- this.buttons = this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function () {
- return w(this).button("widget")[0]
- }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a ? "ui-corner-right" : "ui-corner-left").end().filter(":last").addClass(a ? "ui-corner-left" : "ui-corner-right").end().end()
- },
- _destroy : function () {
- this.element.removeClass("ui-buttonset");
- this.buttons.map(function () {
- return w(this).button("widget")[0]
- }).removeClass("ui-corner-left ui-corner-right").end().button("destroy")
- }
- })
- }
- (jQuery));
- (function (d, c) {
- d.widget("ui.combobox", {
- options : {
- selector : null,
- viewselect : false,
- input : null,
- appendTo : null,
- autoFocus : false,
- delay : 0,
- minLength : 0,
- position : {
- my : "left top",
- at : "left bottom",
- collision : "none"
- },
- source : null,
- change : null,
- close : null,
- focus : null,
- open : null,
- response : null,
- search : null,
- select : null
- },
- _create : function () {
- this.wrapper = d("<span>").addClass("ui-combobox").insertAfter(this.element);
- this._initSource();
- this._createAutocomplete();
- this._createShowAllButton()
- },
- _select : function (b, a) {
- a.item.option.selected = true;
- this._trigger("select", b, {
- item : a.item.option
- })
- },
- _Selector : function (a) {
- var b = d.extend({}, this.options),
- f = this;
- b.select = function (h, e) {
- f._select(h, e)
- };
- b.change = function (h, e) {
- f._removeIfInvalid(h, e)
- };
- if (this.options.selector) {
- switch (this.options.selector) {
- case "ui.autocomplete":
- a.autocomplete(b);
- break;
- case "ui.autocomplete_category":
- a.autocomplete_category(b);
- break;
- default:
- a.autocomplete(b);
- break
- }
- } else {
- a.autocomplete(b)
- }
- },
- _createAutocomplete : function () {
- var b = this.element.children(":selected"),
- a = b.val() ? b.text() : "",
- f = this;
- this.input = this.options.input = d("<input>").appendTo(this.wrapper).val(a).attr("title", "").addClass("ui-state-default ui-combobox-input ui-widget ui-widget-content ui-corner-left").tooltip({
- tooltipClass : "ui-state-highlight"
- });
- this._Selector(this.input);
- if (!this.options.viewselect) {
- this.element.toggle()
- }
- this._on(this.input, {
- click : function (j, e) {
- var k = d(j.target);
- if (k.autocomplete("widget").is(":visible")) {
- k.autocomplete("widget").hide()
- } else {
- k.autocomplete("search", "")
- }
- }
- })
- },
- _createShowAllButton : function () {
- var a = false;
- d("<a>").attr("tabIndex", -1).tooltip().appendTo(this.wrapper).button({
- icons : {
- primary : "ui-icon-triangle-1-s"
- },
- text : false
- }).removeClass("ui-corner-all").addClass("ui-corner-right ui-combobox-toggle").mousedown(function () {
- input = d(this).parent().find("input");
- a = input.autocomplete("widget").is(":visible")
- }).click(function () {
- input = d(this).parent().find("input");
- input.focus();
- if (a) {
- return
- }
- input.autocomplete("search", "")
- })
- },
- _initSource : function () {
- if (d.isArray(this.options.source)) {
- array = this.options.source;
- this.source = function (b, a) {
- a(d.ui.autocomplete.filter(array, b.term))
- }
- } else {
- if (typeof this.options.source === "string") {
- url = this.options.source;
- this.source = function (b, a) {
- if (that.xhr) {
- that.xhr.abort()
- }
- that.xhr = d.ajax({
- url : url,
- data : b,
- dataType : "json",
- success : function (f) {
- a(f)
- },
- error : function () {
- a([])
- }
- })
- }
- } else {
- if (this.options.source == null) {
- this.options.source = d.proxy(this, "_source")
- }
- }
- }
- },
- _source : function (b, a) {
- var f = new RegExp(d.ui.autocomplete.escapeRegex(b.term), "i");
- a(this.element.children("option").map(function () {
- var e = d(this).text();
- if (this.value && (!b.term || f.test(e))) {
- return {
- label : e,
- value : e,
- option : this
- }
- }
- }))
- },
- _removeIfInvalid : function (k, j) {
- if (j.item) {
- this._trigger("change", k, {
- item : j.item.option
- });
- return
- }
- var b = this.input.val(),
- a = b.toLowerCase(),
- h = false;
- this.element.children("option").each(function () {
- if (d(this).text().toLowerCase() === a) {
- this.selected = h = true;
- return false
- }
- });
- if (h) {
- this._trigger("change", k, {
- item : this.element.children("option:selected")
- });
- return
- }
- this.input.val("").tooltip("open");
- this.element.val("");
- this._delay(function () {
- this.input.tooltip("close").attr("title", "")
- }, 2500);
- this.input.data("ui-autocomplete").term = ""
- },
- _destroy : function () {
- this.wrapper.remove();
- this.element.show()
- }
- })
- }
- (jQuery));
- (function (b) {
- b.simplePlaceholder = {
- placeholderClass : null,
- hidePlaceholder : function () {
- var a = b(this);
- if (a.val() == a.attr("placeholder") && a.data(b.simplePlaceholder.placeholderData)) {
- a.val("").removeClass(b.simplePlaceholder.placeholderClass).data(b.simplePlaceholder.placeholderData, false)
- }
- },
- showPlaceholder : function () {
- var a = b(this);
- if (a.val() == "") {
- a.val(a.attr("placeholder")).addClass(b.simplePlaceholder.placeholderClass).data(b.simplePlaceholder.placeholderData, true)
- }
- },
- preventPlaceholderSubmit : function () {
- b(this).find(".simple-placeholder").each(function (d) {
- var a = b(this);
- if (a.val() == a.attr("placeholder") && a.data(b.simplePlaceholder.placeholderData)) {
- a.val("")
- }
- });
- return true
- }
- };
- b.fn.simplePlaceholder = function (d) {
- if (document.createElement("input").placeholder == undefined) {
- var a = {
- placeholderClass : "placeholder",
- placeholderData : "simplePlaceholder.placeholding"
- };
- if (d) {
- b.extend(a, d)
- }
- b.extend(b.simplePlaceholder, a);
- this.each(function () {
- var c = b(this);
- c.focus(b.simplePlaceholder.hidePlaceholder);
- c.blur(b.simplePlaceholder.showPlaceholder);
- c.data(b.simplePlaceholder.placeholderData, false);
- if (c.val() == "") {
- c.val(c.attr("placeholder"));
- c.addClass(b.simplePlaceholder.placeholderClass);
- c.data(b.simplePlaceholder.placeholderData, true)
- }
- c.addClass("simple-placeholder");
- b(this.form).submit(b.simplePlaceholder.preventPlaceholderSubmit)
- })
- }
- return this
- }
- })(jQuery);
- var flipCounter = function (ab, S) {
- var aa = {
- value : 0,
- inc : 1,
- pace : 1000,
- auto : true,
- tFH : 39,
- bFH : 64,
- fW : 53,
- bOffset : 390
- };
- var U = window.document,
- V = typeof ab !== "undefined" && ab !== "" ? ab : "flip-counter",
- W = U.getElementById(V);
- var d = {};
- for (var T in aa) {
- d[T] = (T in S) ? S[T] : aa[T]
- }
- var X = [],
- Y = [],
- J,
- M,
- y,
- o,
- x = null,
- I,
- K,
- ae = {
- q : null,
- pace : 0,
- inc : 0
- };
- this.setValue = function (a) {
- if (L(a)) {
- y = d.value;
- o = a;
- d.value = a;
- Z(y, o)
- }
- return this
- };
- this.setIncrement = function (a) {
- d.inc = L(a) ? a : aa.inc;
- return this
- };
- this.setPace = function (a) {
- d.pace = L(a) ? a : aa.pace;
- return this
- };
- this.setAuto = function (a) {
- if (a && !d.auto) {
- d.auto = true;
- R()
- }
- if (!a && d.auto) {
- if (x) {
- ac()
- }
- d.auto = false
- }
- return this
- };
- this.step = function () {
- if (!d.auto) {
- R()
- }
- return this
- };
- this.add = function (a) {
- if (L(a)) {
- y = d.value;
- d.value += a;
- o = d.value;
- Z(y, o)
- }
- return this
- };
- this.subtract = function (a) {
- if (L(a)) {
- y = d.value;
- d.value -= a;
- if (d.value >= 0) {
- o = d.value
- } else {
- o = "0";
- d.value = 0
- }
- Z(y, o)
- }
- return this
- };
- this.incrementTo = function (j, e, h) {
- if (x) {
- ac()
- }
- if (typeof e != "undefined") {
- var b = L(e) ? e * 1000 : 10000,
- f = typeof h != "undefined" && L(h) ? h : d.pace,
- k = typeof j != "undefined" && L(j) ? j - d.value : 0,
- a,
- l,
- c,
- g = 0;
- ae.q = null;
- f = (b / k > f) ? Math.round((b / k) / 10) * 10 : f;
- a = Math.floor(b / f);
- l = Math.floor(k / a);
- c = ad(k, a, l, f, b);
- if (k > 0) {
- while (c.result === false && g < 100) {
- f += 10;
- a = Math.floor(b / f);
- l = Math.floor(k / a);
- c = ad(k, a, l, f, b);
- g++
- }
- if (g == 100) {
- d.inc = ae.inc;
- d.pace = ae.pace
- } else {
- d.inc = l;
- d.pace = f
- }
- Q(j, true, a)
- }
- } else {
- Q(j)
- }
- };
- this.getValue = function () {
- return d.value
- };
- this.stop = function () {
- if (x) {
- ac()
- }
- return this
- };
- function R() {
- y = d.value;
- d.value += d.inc;
- o = d.value;
- Z(y, o);
- if (d.auto === true) {
- x = setTimeout(R, d.pace)
- }
- }
- function Q(a, g, f) {
- var b = d.value,
- c = (typeof g == "undefined") ? false : g,
- e = (typeof f == "undefined") ? 1 : f;
- if (c === true) {
- e--
- }
- if (b != a) {
- y = d.value,
- d.auto = true;
- if (b + d.inc <= a && e != 0) {
- b += d.inc
- } else {
- b = a
- }
- d.value = b;
- o = d.value;
- Z(y, o);
- x = setTimeout(function () {
- Q(a, c, e)
- }, d.pace)
- } else {
- d.auto = false
- }
- }
- function Z(e, b) {
- X = O(e);
- Y = O(b);
- var g,
- c = X.length,
- a = Y.length;
- if (a > c) {
- g = a - c;
- while (g > 0) {
- ag(a - g + 1, Y[a - g]);
- g--
- }
- }
- if (a < c) {
- g = c - a;
- while (g > 0) {
- P(c - g);
- g--
- }
- }
- for (var f = 0; f < c; f++) {
- if (Y[f] != X[f]) {
- af(f, X[f], Y[f])
- }
- }
- }
- function af(f, h, k) {
- var g,
- e = 0,
- b,
- c,
- j = ["-" + d.fW + "px -" + (h * d.tFH) + "px", (d.fW * -2) + "px -" + (h * d.tFH) + "px", "0 -" + (k * d.tFH) + "px", "-" + d.fW + "px -" + (h * d.bFH + d.bOffset) + "px", (d.fW * -2) + "px -" + (k * d.bFH + d.bOffset) + "px", (d.fW * -3) + "px -" + (k * d.bFH + d.bOffset) + "px", "0 -" + (k * d.bFH + d.bOffset) + "px"];
- if (d.auto === true && d.pace <= 300) {
- switch (f) {
- case 0:
- g = d.pace / 6;
- break;
- case 1:
- g = d.pace / 5;
- break;
- case 2:
- g = d.pace / 4;
- break;
- case 3:
- g = d.pace / 3;
- break;
- default:
- g = d.pace / 1.5;
- break
- }
- } else {
- g = 80
- }
- g = (g > 80) ? 80 : g;
- function a() {
- if (e < 7) {
- b = e < 3 ? "t" : "b";
- c = U.getElementById(V + "_" + b + "_d" + f);
- if (c) {
- c.style.backgroundPosition = j[e]
- }
- e++;
- if (e != 3) {
- setTimeout(a, g)
- } else {
- a()
- }
- }
- }
- a()
- }
- function O(a) {
- return a.toString().split("").reverse()
- }
- function ag(c, b) {
- var a = Number(c) - 1;
- I = U.createElement("ul");
- I.className = "cd";
- I.id = V + "_d" + a;
- I.innerHTML = '<li class="t" id="' + V + "_t_d" + a + '"></li><li class="b" id="' + V + "_b_d" + a + '"></li>';
- if (a % 3 == 0) {
- K = U.createElement("ul");
- K.className = "cd";
- K.innerHTML = '<li class="s"></li>';
- W.insertBefore(K, W.firstChild)
- }
- W.insertBefore(I, W.firstChild);
- U.getElementById(V + "_t_d" + a).style.backgroundPosition = "0 -" + (b * d.tFH) + "px";
- U.getElementById(V + "_b_d" + a).style.backgroundPosition = "0 -" + (b * d.bFH + d.bOffset) + "px"
- }
- function P(c) {
- var a = U.getElementById(V + "_d" + c);
- W.removeChild(a);
- var b = W.firstChild.firstChild;
- if ((" " + b.className + " ").indexOf(" s ") > -1) {
- a = b.parentNode;
- W.removeChild(a)
- }
- }
- function N(c) {
- var b = c.toString(),
- f = b.length,
- e = 1,
- g;
- for (g = 0; g < f; g++) {
- I = U.createElement("ul");
- I.className = "cd";
- I.id = V + "_d" + g;
- I.innerHTML = I.innerHTML = '<li class="t" id="' + V + "_t_d" + g + '"></li><li class="b" id="' + V + "_b_d" + g + '"></li>';
- W.insertBefore(I, W.firstChild);
- if (e != (f) && e % 3 == 0) {
- K = U.createElement("ul");
- K.className = "cd";
- K.innerHTML = '<li class="s"></li>';
- W.insertBefore(K, W.firstChild)
- }
- e++
- }
- var a = O(b);
- for (g = 0; g < f; g++) {
- U.getElementById(V + "_t_d" + g).style.backgroundPosition = "0 -" + (a[g] * d.tFH) + "px";
- U.getElementById(V + "_b_d" + g).style.backgroundPosition = "0 -" + (a[g] * d.bFH + d.bOffset) + "px"
- }
- if (d.auto === true) {
- x = setTimeout(R, d.pace)
- }
- }
- function ad(h, g, j, f, b) {
- var c = {
- result : true
- },
- e;
- c.cond1 = (h / g >= 1) ? true : false;
- c.cond2 = (g * j <= h) ? true : false;
- c.cond3 = (Math.abs(g * j - h) <= 10) ? true : false;
- c.cond4 = (Math.abs(g * f - b) <= 100) ? true : false;
- c.cond5 = (g * f <= b) ? true : false;
- if (c.cond1 && c.cond2 && c.cond4 && c.cond5) {
- e = Math.abs(h - (g * j)) + Math.abs(g * f - b);
- if (ae.q === null) {
- ae.q = e
- }
- if (e <= ae.q) {
- ae.pace = f;
- ae.inc = j
- }
- }
- for (var a = 1; a <= 5; a++) {
- if (c["cond" + a] === false) {
- c.result = false
- }
- }
- return c
- }
- function L(a) {
- return !isNaN(parseFloat(a)) && isFinite(a)
- }
- function ac() {
- clearTimeout(x);
- x = null
- }
- N(d.value)
- };
- window.requestAnimFrame = (function () {
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (d, c) {
- window.setTimeout(d, 1000 / 60)
- }
- })();
- window.requestInterval = function (f, g) {
- if (!window.requestAnimationFrame && !window.webkitRequestAnimationFrame && !(window.mozRequestAnimationFrame && window.mozCancelRequestAnimationFrame) && !window.oRequestAnimationFrame && !window.msRequestAnimationFrame) {
- return window.setInterval(f, g)
- }
- var h = new Date().getTime(),
- k = new Object();
- function j() {
- k.value = requestAnimFrame(j);
- var b = new Date().getTime(),
- a = b - h;
- if (a >= g) {
- f.call();
- h = new Date().getTime()
- }
- }
- k.value = requestAnimFrame(j);
- return k
- };
- window.clearRequestInterval = function (b) {
- window.cancelAnimationFrame ? window.cancelAnimationFrame(b.value) : window.webkitCancelAnimationFrame ? window.webkitCancelAnimationFrame(b.value) : window.webkitCancelRequestAnimationFrame ? window.webkitCancelRequestAnimationFrame(b.value) : window.mozCancelRequestAnimationFrame ? window.mozCancelRequestAnimationFrame(b.value) : window.oCancelRequestAnimationFrame ? window.oCancelRequestAnimationFrame(b.value) : window.msCancelRequestAnimationFrame ? window.msCancelRequestAnimationFrame(b.value) : clearInterval(b)
- };
- window.requestTimeout = function (f, g) {
- if (!window.requestAnimationFrame && !window.webkitRequestAnimationFrame && !(window.mozRequestAnimationFrame && window.mozCancelRequestAnimationFrame) && !window.oRequestAnimationFrame && !window.msRequestAnimationFrame) {
- return window.setTimeout(f, g)
- }
- var h = new Date().getTime(),
- k = new Object();
- function j() {
- var b = new Date().getTime(),
- a = b - h;
- a >= g ? f.call() : k.value = requestAnimFrame(j)
- }
- k.value = requestAnimFrame(j);
- return k
- };
- window.clearRequestTimeout = function (b) {
- window.cancelAnimationFrame ? window.cancelAnimationFrame(b.value) : window.webkitCancelAnimationFrame ? window.webkitCancelAnimationFrame(b.value) : window.webkitCancelRequestAnimationFrame ? window.webkitCancelRequestAnimationFrame(b.value) : window.mozCancelRequestAnimationFrame ? window.mozCancelRequestAnimationFrame(b.value) : window.oCancelRequestAnimationFrame ? window.oCancelRequestAnimationFrame(b.value) : window.msCancelRequestAnimationFrame ? window.msCancelRequestAnimationFrame(b.value) : clearTimeout(b)
- };
- var $p = function () {
- var e = arguments,
- f = e[0],
- d = false;
- if (typeof f === "string") {
- d = e[1] || false
- } else {
- if (f && !f[0] && !f.length) {
- f = [f]
- }
- }
- return $p.core(f, d)
- }, pure = $p;
- $p.core = function (F, aa, I) {
- var O = [],
- T,
- S,
- P = "_s" + Math.floor(Math.random() * 1000000) + "_",
- ag = "_a" + Math.floor(Math.random() * 1000000) + "_",
- E = /^(\+)?([^\@\+]+)?\@?([^\+]+)?(\+)?$/,
- af = {
- IMG : "src",
- INPUT : "value"
- },
- Q = Array.isArray ? function (a) {
- return Array.isArray(a)
- }
- : function (a) {
- return Object.prototype.toString.call(a) === "[object Array]"
- };
- I = I || V();
- switch (typeof F) {
- case "string":
- O = I.find(aa || document, F);
- if (O.length === 0) {
- Y('The template "' + F + '" was not found')
- }
- break;
- case "undefined":
- Y("The root of the template is undefined, check your selector");
- break;
- default:
- O = F
- }
- for (T = 0, S = O.length; T < S; T++) {
- I[T] = O[T]
- }
- I.length = S;
- function Y(a) {
- if (typeof console !== "undefined") {
- console.log(a)
- }
- throw ("pure error: " + a)
- }
- function V() {
- var a = $p.plugins,
- b = function () {};
- b.prototype = a;
- b.prototype.compile = a.compile || ad;
- b.prototype.render = a.render || H;
- b.prototype.autoRender = a.autoRender || ae;
- b.prototype.find = a.find || X;
- b.prototype._compiler = ac;
- b.prototype._error = Y;
- return new b()
- }
- function K(a) {
- return a.outerHTML || (function (b) {
- var d = document.createElement("div"),
- c;
- d.appendChild(b.cloneNode(true));
- c = d.innerHTML;
- d = null;
- return c
- }
- (a))
- }
- function M(a, b) {
- return function (c) {
- return a(String(b.call(c.item || c.context, c)))
- }
- }
- function X(b, a) {
- if (typeof b === "string") {
- a = b;
- b = false
- }
- return (b || document).querySelectorAll(a)
- }
- function ab(a, b) {
- return function (k) {
- var c = [a[0]],
- f = a.length,
- h,
- d,
- l,
- e,
- g;
- try {
- for (g = 1; g < f; g++) {
- h = b[g].call(this, k);
- d = a[g];
- if (h === "") {
- l = c[c.length - 1];
- if ((e = l.search(/[^\s]+=\"?$/)) > -1) {
- c[c.length - 1] = l.substring(0, e);
- d = d.substr(1)
- }
- }
- c[c.length] = h;
- c[c.length] = d
- }
- return c.join("")
- } catch (j) {
- if (console && console.log) {
- console.log(j.stack || j.message + " (" + j.type + (j["arguments"] ? ", " + j["arguments"].join("-") : "") + "). Use Firefox or Chromium/Chrome to get a full stack of the error. ")
- }
- return ""
- }
- }
- }
- function J(a) {
- var b = a.match(/^(\w+)\s*<-\s*(\S+)?$/);
- if (b === null) {
- Y('bad loop spec: "' + a + '"')
- }
- if (b[1] === "item") {
- Y('"item<-..." is a reserved word for the current running iteration.\n\nPlease choose another name for your loop.')
- }
- if (!b[2] || b[2].toLowerCase() === "context") {
- b[2] = function (c) {
- return c.context
- }
- } else {
- if ((b[2] && b[2].indexOf("context") === 0)) {
- b[2] = Z(b[2].replace(/^context\.?/, ""))
- }
- }
- return {
- name : b[1],
- sel : b[2]
- }
- }
- function Z(a) {
- if (typeof(a) === "function") {
- return function (k) {
- var j = a.call(k.item || k.context || k, k);
- return !j && j !== 0 ? "" : j
- }
- }
- var f = a.match(/^[\da-zA-Z\$_\@][\w\$:\-]*(\.[\w\$:\-]*[^\.])*$/),
- h = false,
- b = a,
- e = [],
- d = [],
- g = 0,
- c;
- if (f === null) {
- if (/\'|\"/.test(b.charAt(0))) {
- if (/\'|\"/.test(b.charAt(b.length - 1))) {
- c = b.substring(1, b.length - 1);
- return function () {
- return c
- }
- }
- } else {
- while ((f = b.match(/#\{([^{}]+)\}/)) !== null) {
- h = true;
- e[g++] = b.slice(0, f.index);
- d[g] = Z(f[1]);
- b = b.slice(f.index + f[0].length, b.length)
- }
- }
- if (!h) {
- return function () {
- return a
- }
- }
- e[g] = b;
- return ab(e, d)
- }
- f = a.split(".");
- return function (o) {
- var n = o.context || o,
- j = o[f[0]],
- l = 0,
- k,
- m;
- if (j && typeof j.item !== "undefined") {
- l += 1;
- if (f[l] === "pos") {
- return j.pos
- }
- n = j.item
- }
- k = f.length;
- while (l < k) {
- if (!n) {
- break
- }
- m = n[f[l]];
- n = typeof m === "function" ? n[f[l]].call(n) : m;
- l++
- }
- return (!n && n !== 0) ? "" : n
- }
- }
- function U(o, e, l) {
- var h,
- g,
- d,
- p,
- r,
- a = [],
- j,
- b,
- n,
- f,
- k,
- m,
- q,
- c;
- if (typeof e === "string") {
- h = e;
- j = e.match(E);
- if (!j) {
- Y("bad selector syntax: " + e)
- }
- g = j[1];
- d = j[2];
- p = j[3];
- r = j[4];
- if (d === "." || (!d && p)) {
- a[0] = o
- } else {
- a = I.find(o, d)
- }
- if (!a || a.length === 0) {
- return Y('The node "' + e + '" was not found in the template:\n' + K(o).replace(/\t/g, " "))
- }
- } else {
- g = e.prepend;
- p = e.attr;
- r = e.append;
- a = [o]
- }
- if (g || r) {
- if (g && r) {
- Y("append/prepend cannot take place at the same time")
- } else {
- if (l) {
- Y("no append/prepend/replace modifiers allowed for loop target")
- } else {
- if (r && l) {
- Y("cannot append with loop (sel: " + h + ")")
- }
- }
- }
- }
- if (p) {
- k = (/^style$/i).test(p);
- m = (/^class$/i).test(p);
- q = m ? "className" : p;
- b = function (s, u) {
- s.setAttribute(ag + p, u);
- if (s[q] && !k) {
- try {
- s[q] = ""
- } catch (t) {}
- }
- if (s.nodeType === 1) {
- s.removeAttribute(p);
- if (m) {
- s.removeAttribute(q)
- }
- }
- };
- if (k || m) {
- if (k) {
- n = function (s) {
- return s.style.cssText
- }
- } else {
- n = function (s) {
- return s.className
- }
- }
- } else {
- n = function (s) {
- return s.getAttribute(p)
- }
- }
- f = function (s) {
- return s.replace(/\"/g, """)
- };
- if (g) {
- c = function (t, s) {
- b(t, s + n(t))
- }
- } else {
- if (r) {
- c = function (t, s) {
- b(t, n(t) + s)
- }
- } else {
- c = function (t, s) {
- b(t, s)
- }
- }
- }
- } else {
- if (l) {
- c = function (t, u) {
- var s = t.parentNode;
- if (s) {
- s.insertBefore(document.createTextNode(u), t.nextSibling);
- s.removeChild(t)
- } else {
- Y("The template root, can't be looped.")
- }
- }
- } else {
- if (g) {
- c = function (t, s) {
- t.insertBefore(document.createTextNode(s), t.firstChild)
- }
- } else {
- if (r) {
- c = function (t, s) {
- t.appendChild(document.createTextNode(s))
- }
- } else {
- c = function (t, s) {
- while (t.firstChild) {
- t.removeChild(t.firstChild)
- }
- t.appendChild(document.createTextNode(s))
- }
- }
- }
- }
- f = function (s) {
- return s
- }
- }
- return {
- attr : p,
- nodes : a,
- set : c,
- sel : h,
- quotefn : f
- }
- }
- function R(a, c) {
- var b = P + c + ":",
- d;
- for (d = 0; d < a.nodes.length; d++) {
- a.set(a.nodes[d], b)
- }
- }
- function N(b, e, c, a, d) {
- return function (o) {
- var q = e(o),
- j = o[b],
- f = {
- items : q
- },
- n = 0,
- k,
- g = [],
- p = function (s, v, t, r) {
- var u = o.pos,
- x = o.item,
- w = o.items;
- o.pos = v.pos = s;
- o.item = v.item = q[s];
- o.items = q;
- if (typeof r !== "undefined") {
- (o.length = r)
- }
- if (typeof t === "function" && t.call(o.item, o) === false) {
- n++;
- return
- }
- g.push(c.call(o.item, o));
- o.pos = u;
- o.item = x;
- o.items = w
- },
- h,
- m,
- l;
- o[b] = f;
- if (Q(q)) {
- k = q.length || 0;
- if (typeof a === "function") {
- q.sort(function (s, r) {
- return a.call(o, s, r)
- })
- }
- for (m = 0, l = k; m < l; m++) {
- p(m, f, d, k - n)
- }
- } else {
- if (q && typeof a !== "undefined") {
- Y("sort is only available on arrays, not objects")
- }
- for (h in q) {
- if (q.hasOwnProperty(h)) {
- p(h, f, d)
- }
- }
- }
- if (typeof j !== "undefined") {
- o[b] = j
- } else {
- delete o[b]
- }
- return g.join("")
- }
- }
- function L(p, d, j, m) {
- var q = false,
- h,
- c,
- n,
- e,
- o,
- b,
- k,
- a,
- f,
- g,
- l;
- for (e in j) {
- if (j.hasOwnProperty(e)) {
- if (e === "sort") {
- c = j.sort
- } else {
- if (e === "filter") {
- n = j.filter
- } else {
- if (q) {
- Y("cannot have more than one loop on a target")
- } else {
- h = e;
- q = true
- }
- }
- }
- }
- }
- if (!h) {
- Y("Error in the selector: " + d + "\nA directive action must be a string, a function or a loop(<-)")
- }
- o = j[h];
- if (typeof(o) === "string" || typeof(o) === "function") {
- j = {};
- j[h] = {
- root : o
- };
- return L(p, d, j, m)
- }
- b = J(h);
- k = Z(b.sel);
- a = U(p, d, true);
- f = a.nodes;
- for (T = 0; T < f.length; T++) {
- g = f[T];
- l = ac(g, o);
- m[m.length] = M(a.quotefn, N(b.name, k, l, c, n));
- a.nodes = [g];
- R(a, m.length - 1)
- }
- return a
- }
- function W(d, k) {
- var b = d.getElementsByTagName("*"),
- p = [],
- a = {
- a : [],
- l : {}
- },
- l,
- g,
- j,
- h,
- f,
- e,
- c,
- m,
- n;
- for (j = -1, h = b.length; j < h; j++) {
- c = j > -1 ? b[j] : d;
- if (c.nodeType === 1 && c.className !== "") {
- m = c.className.split(" ");
- for (f = 0, e = m.length; f < e; f++) {
- n = m[f];
- l = o(n, c.tagName);
- if (l !== false) {
- g = (/nodevalue/i).test(l.attr);
- if (l.sel.indexOf("@") > -1 || g) {
- c.className = c.className.replace("@" + l.attr, "");
- if (g) {
- l.attr = false
- }
- }
- p.push({
- n : c,
- cspec : l
- })
- }
- }
- }
- }
- function o(w, z) {
- var v = w.match(E),
- x = v[3] || af[z],
- u = {
- prepend : !!v[1],
- prop : v[2],
- attr : x,
- append : !!v[4],
- sel : w
- },
- t,
- s,
- r,
- q,
- y;
- for (t = a.a.length - 1; t >= 0; t--) {
- r = a.a[t];
- q = r.l[0];
- y = q && q[u.prop];
- if (typeof y !== "undefined") {
- u.prop = r.p + "." + u.prop;
- if (a.l[u.prop] === true) {
- y = y[0]
- }
- break
- }
- }
- if (typeof y === "undefined") {
- y = Z(u.prop)(Q(k) ? k[0] : k);
- if (y === "") {
- return false
- }
- }
- if (Q(y)) {
- a.a.push({
- l : y,
- p : u.prop
- });
- a.l[u.prop] = true;
- u.t = "loop"
- } else {
- u.t = "str"
- }
- return u
- }
- return p
- }
- function ac(s, t, u, w) {
- var q = [],
- l,
- k,
- v,
- j,
- x,
- g,
- m,
- h,
- n,
- r,
- b,
- c,
- a,
- o,
- p,
- e,
- d = [],
- f;
- w = w || (u && W(s, u));
- if (u) {
- while (w.length > 0) {
- v = w[0].cspec;
- j = w[0].n;
- w.splice(0, 1);
- if (v.t === "str") {
- x = U(j, v, false);
- R(x, q.length);
- q[q.length] = M(x.quotefn, Z(v.prop))
- } else {
- m = Z(v.sel);
- x = U(j, v, true);
- g = x.nodes;
- for (l = 0, k = g.length; l < k; l++) {
- h = g[l];
- n = ac(h, false, u, w);
- q[q.length] = M(x.quotefn, N(v.sel, m, n));
- x.nodes = [h];
- R(x, q.length - 1)
- }
- }
- }
- }
- for (c in t) {
- if (t.hasOwnProperty(c)) {
- o = 0;
- r = t[c];
- b = c.split(/\s*,\s*/);
- a = b.length;
- do {
- if (typeof(r) === "function" || typeof(r) === "string") {
- c = b[o];
- x = U(s, c, false);
- R(x, q.length);
- q[q.length] = M(x.quotefn, Z(r))
- } else {
- L(s, c, r, q)
- }
- } while (++o < a)
- }
- }
- p = K(s);
- p = p.replace(/<([^>]+)\s(value\=""|selected)\s?([^>]*)>/ig, "<$1 $3>");
- p = p.split(ag).join("");
- e = p.split(P);
- for (o = 1; o < e.length; o++) {
- f = e[o];
- d[o] = q[parseInt(f, 10)];
- e[o] = f.substring(f.indexOf(":") + 1)
- }
- return ab(e, d)
- }
- function ad(c, d, a) {
- var b = ac((a || this[0]).cloneNode(true), c, d);
- return function (e) {
- return b({
- context : e
- })
- }
- }
- function H(e, d) {
- var c = typeof d === "function" && d,
- b,
- a;
- for (b = 0, a = this.length; b < a; b++) {
- this[b] = G(this[b], (c || I.compile(d, false, this[b]))(e, false))
- }
- return this
- }
- function ae(e, d) {
- var c = I.compile(d, e, this[0]),
- b,
- a;
- for (b = 0, a = this.length; b < a; b++) {
- this[b] = G(this[b], c(e, false))
- }
- return this
- }
- function G(e, c) {
- var b,
- d = e.parentNode,
- f = 0,
- a;
- if (!d) {
- d = document.createElement("DIV");
- d.appendChild(e)
- }
- switch (e.tagName) {
- case "BODY":
- d.removeChild(e);
- d.innerHTML += c;
- return d.getElementsByTagName("BODY")[0];
- case "TBODY":
- case "THEAD":
- case "TFOOT":
- c = "<TABLE>" + c + "</TABLE>";
- f = 1;
- break;
- case "TR":
- c = "<TABLE><TBODY>" + c + "</TBODY></TABLE>";
- f = 2;
- break;
- case "TD":
- case "TH":
- c = "<TABLE><TBODY><TR>" + c + "</TR></TBODY></TABLE>";
- f = 3;
- break;
- case "OPTGROUP":
- case "OPTION":
- c = "<SELECT>" + c + "</SELECT>";
- f = 1;
- break
- }
- a = document.createElement("SPAN");
- a.style.display = "none";
- document.body.appendChild(a);
- a.innerHTML = c;
- b = a.firstChild;
- while (f--) {
- b = b.firstChild
- }
- d.insertBefore(b, e);
- d.removeChild(e);
- document.body.removeChild(a);
- e = b;
- b = d = null;
- return e
- }
- return I
- };
- $p.plugins = {};
- $p.libs = {
- dojo : function () {
- return function (d, c) {
- return dojo.query(c, d)
- }
- },
- domassistant : function () {
- DOMAssistant.attach({
- publicMethods : ["compile", "render", "autoRender"],
- compile : function (c, d) {
- return $p([this]).compile(c, d)
- },
- render : function (d, c) {
- return $($p([this]).render(d, c))[0]
- },
- autoRender : function (d, c) {
- return $($p([this]).autoRender(d, c))[0]
- }
- });
- return function (d, c) {
- return $(d).cssSelect(c)
- }
- },
- ext : function () {
- return function (d, c) {
- return Ext.query(c, d)
- }
- },
- jquery : function () {
- jQuery.fn.extend({
- directives : function (b) {
- this._pure_d = b;
- return this
- },
- compile : function (c, d) {
- return $p(this).compile(this._pure_d || c, d)
- },
- render : function (d, c) {
- return jQuery($p(this).render(d, this._pure_d || c))
- },
- autoRender : function (d, c) {
- return jQuery($p(this).autoRender(d, this._pure_d || c))
- }
- });
- return function (d, c) {
- return jQuery(d).find(c)
- }
- },
- mootools : function () {
- Element.implement({
- compile : function (c, d) {
- return $p(this).compile(c, d)
- },
- render : function (d, c) {
- return $p([this]).render(d, c)
- },
- autoRender : function (d, c) {
- return $p([this]).autoRender(d, c)
- }
- });
- return function (d, c) {
- return $(d).getElements(c)
- }
- },
- prototype : function () {
- Element.addMethods({
- compile : function (f, d, e) {
- return $p([f]).compile(d, e)
- },
- render : function (f, e, d) {
- return $p([f]).render(e, d)
- },
- autoRender : function (f, e, d) {
- return $p([f]).autoRender(e, d)
- }
- });
- return function (d, c) {
- d = d === document ? d.body : d;
- return typeof d === "string" ? $$(d) : $(d).select(c)
- }
- },
- sizzle : function () {
- return function (d, c) {
- return Sizzle(c, d)
- }
- },
- sly : function () {
- return function (d, c) {
- return Sly(c, d)
- }
- },
- yui : function () {
- if (typeof document.querySelector === "undefined") {
- YUI().use("node", function (b) {
- $p.plugins.find = function (a, d) {
- return b.NodeList.getDOMNodes(b.one(a).all(d))
- }
- })
- }
- YUI.add("pure-yui", function (b) {
- b.Node.prototype.directives = function (a) {
- this._pure_d = a;
- return this
- };
- b.Node.prototype.compile = function (d, a) {
- return $p([this._node]).compile(this._pure_d || d, a)
- };
- b.Node.prototype.render = function (a, d) {
- return b.one($p([this._node]).render(a, this._pure_d || d))
- };
- b.Node.prototype.autoRender = function (a, d) {
- return b.one($p([this._node]).autoRender(a, this._pure_d || d))
- }
- }, "0.1", {
- requires : ["node"]
- });
- return true
- }
- };
- (function () {
- var c,
- d = (typeof dojo !== "undefined" && "dojo") || (typeof DOMAssistant !== "undefined" && "domassistant") || (typeof Ext !== "undefined" && "ext") || (typeof jQuery !== "undefined" && "jquery") || (typeof MooTools !== "undefined" && "mootools") || (typeof Prototype !== "undefined" && "prototype") || (typeof Sizzle !== "undefined" && "sizzle") || (typeof Sly !== "undefined" && "sly") || (typeof YUI !== "undefined" && "yui");
- if (d) {
- c = $p.libs[d]()
- }
- if (typeof document.querySelector === "undefined") {
- if (typeof c === "function") {
- $p.plugins.find = c
- } else {
- if (!c) {
- throw ("you need a JS library with a CSS selector engine")
- }
- }
- }
- if (typeof exports !== "undefined") {
- exports.$p = $p
- }
- })();
- "use strict";
- var DACore = (typeof(DACore) === "undefined") ? {}
- : DACore;
- DACore.Base = DACore.Base || {};
- DACore.Base.AjaxCommunication = {
- URLBASE : "/App_WebServices/Ajax/",
- AjaxParams : {
- type : "POST",
- contentType : "application/json; charset=utf-8",
- url : "",
- dataType : "json",
- async : true
- },
- ajaxCall : function (h, g, e) {
- var f = DACore.Base.AjaxCommunication;
- $.ajax({
- type : f.AjaxParams.type,
- contentType : f.AjaxParams.contentType,
- url : f.URLBASE + g,
- data : (h) ? JSON.stringify(h) : h,
- dataType : f.AjaxParams.dataType,
- async : f.AjaxParams.async,
- success : e,
- error : function (b, a, c) {
- f.ErrorHandler(b, a, c, e)
- }
- })
- },
- ErrorHandler : function (f, h, g, j) {
- var k;
- k = {
- Error : {
- Code : -1,
- Description : "error"
- }
- };
- j(k)
- }
- };
- "use strict";
- var DACore = (typeof(DACore) === "undefined") ? {}
- : DACore;
- $(function () {
- DACore.Courses.init()
- });
- var _lectiva_cfs_prefix;
- var lectiva_cfs_render;
- DACore.Courses = {
- settings : {
- Find : "",
- Data : null,
- url : ""
- },
- init : function () {
- var b = this;
- lectiva_cfs_render = function (a) {
- b.Response(a, b)
- };
- this.onRequest = (typeof(CFSGrid) !== "undefined") ? CFSGrid : null
- },
- URLBASE : function () {
- return DACore.Courses.settings.url
- },
- onRequest : null,
- onResponse : null,
- Request : function (d, f) {
- var e = this;
- e.settings.Find = d;
- e.settings.url = f;
- _lectiva_cfs_prefix = e.URLBASE();
- if (e.onRequest) {
- e.onRequest(d)
- }
- },
- Response : function (f, d) {
- var e = d;
- e.settings.Data = f;
- if (e.onResponse) {
- e.onResponse(f)
- }
- }
- };
- "use strict";
- var DACore = (typeof(DACore) === "undefined") ? {}
- : DACore;
- $(function () {
- DACore.Vacancy.init()
- });
- DACore.Vacancy = {
- cache : {},
- oRequests : {},
- base : DACore.Base,
- URLBASE : "Vacancy.asmx",
- url : {
- VacanciesAutocomplete : "/VacanciesAutocomplete",
- VacancyTotalGroupCounter : "/VacancyTotalGroupCounter",
- List_MyVacancies : "/List_MyVacancies",
- HasDelegationVacancies : "/HasDelegationVacancies",
- Invite : "/Invite",
- Visualize : "/Visualize",
- VisualizeFreemium : "/VisualizeFreemium",
- List_Vacancy_Invite : "/List_Vacancy_Invite",
- List_Vacancies : "/List_Vacancy",
- Vacancy_Fast_Insert : "/Vacancy_Fast_Insert",
- ListVacaciesId : "/ListVacaciesId",
- List_ByAffinity : "/List_ByAffinity",
- ListVacanciesMicrosite : "/ListVacanciesMicrosite",
- IsVacancyDuplicated : "/IsVacancyDuplicated",
- ListVacanciesForNewMatch : "/ListVacanciesForNewMatch",
- GetIdLocation2 : "/GetIdLocation2",
- ListKillerQuestions : "/ListKillerQuestions",
- ReadQuestions : "/ReadQuestions",
- DeleteQuestion : "/DeleteQuestion"
- },
- init : function () {},
- AjaxUrl : function (b) {
- return this.URLBASE + this.url[b]
- },
- VacanciesAutocomplete : function (g, h, e) {
- var f = {
- pTerm : g,
- pSemanticFind : h
- };
- this.base.AjaxCommunication.ajaxCall(f, this.AjaxUrl("VacanciesAutocomplete"), e)
- },
- VacancyTotalGroupCounter : function (b) {
- this.base.AjaxCommunication.ajaxCall(null, this.AjaxUrl("VacancyTotalGroupCounter"), b)
- },
- List_MyVacancies : function (d, f) {
- var e = {
- ListIdCandidates : d
- };
- this.base.AjaxCommunication.ajaxCall(e, this.AjaxUrl("List_MyVacancies"), f)
- },
- HasDelegationVacancies : function (e, f) {
- var d = {
- IdCompany : e
- };
- this.base.AjaxCommunication.ajaxCall(d, this.AjaxUrl("HasDelegationVacancies"), f)
- },
- Invite : function (k, f, h, j) {
- var g = {
- ListIdVacancies : k,
- ListIdCandidates : f,
- SendSMS : h
- };
- this.base.AjaxCommunication.ajaxCall(g, this.AjaxUrl("Invite"), j)
- },
- Visualize : function (h, e, g) {
- var f = {
- ListIdVacancies : h,
- ListIdCandidates : e
- };
- this.base.AjaxCommunication.ajaxCall(f, this.AjaxUrl("Visualize"), g)
- },
- VisualizeFreemium : function (h, e, g) {
- var f = {
- ListIdVacancies : h,
- ListIdCandidates : e
- };
- this.base.AjaxCommunication.ajaxCall(f, this.AjaxUrl("VisualizeFreemium"), g)
- },
- List_Vacancy_Invite : function (f, d) {
- var e = {
- pIdCandidate : f
- };
- this.base.AjaxCommunication.ajaxCall(e, this.AjaxUrl("List_Vacancy_Invite"), d)
- },
- List_Vacancies : function (f, d) {
- var e = {
- pIdCandidate : f
- };
- this.base.AjaxCommunication.ajaxCall(e, this.AjaxUrl("List_Vacancies"), d)
- },
- List_ByAffinity : function (h, g, e) {
- var f = {
- pPageNumber : h,
- pPageSize : g
- };
- this.base.AjaxCommunication.ajaxCall(f, this.AjaxUrl("List_ByAffinity"), e)
- },
- ListVacaciesId : function (k, j, l) {
- var g = this,
- h = "ListVacaciesId" + k + j,
- m = {
- pFind : k,
- pPage : j
- };
- if (g.oRequests[h]) {
- setTimeout(function () {
- g.ListVacaciesId(k, j, l)
- }, 100);
- return
- }
- if (g.cache[h]) {
- l(g.cache[h])
- } else {
- g.oRequests[h] = 1;
- g.base.AjaxCommunication.ajaxCall(m, g.AjaxUrl("ListVacaciesId"), function (a) {
- delete g.oRequests[h];
- g.cache[h] = a;
- l(a)
- })
- }
- },
- Vacancy_Fast_Insert : function (l, p, n, q, o, m, j) {
- var k = {
- pVacancy : l,
- pEmail : p,
- pIdUser : n,
- pCompanyCEP : q,
- pIdCompany : o,
- pUrl : m
- };
- this.base.AjaxCommunication.ajaxCall(k, this.AjaxUrl("Vacancy_Fast_Insert"), j)
- },
- ListVacanciesMicrosite : function (d, f) {
- var e = {
- listDelegations : d
- };
- this.base.AjaxCommunication.ajaxCall(e, this.AjaxUrl("ListVacanciesMicrosite"), f)
- },
- IsVacancyDuplicated : function (l, o, q, p, m, n, j) {
- var k = {
- pIdVacancy : l,
- pIdCompany : o,
- pIdCategory1 : q,
- pIdCategory2 : p,
- pIdManagerialLevel : m,
- pIdLocation3 : n
- };
- this.base.AjaxCommunication.ajaxCall(k, this.AjaxUrl("IsVacancyDuplicated"), j)
- },
- ListVacanciesForNewMatch : function (f, d) {
- var e = {
- pIdVacancy : f
- };
- this.base.AjaxCommunication.ajaxCall(e, this.AjaxUrl("ListVacanciesForNewMatch"), d)
- },
- GetIdLocation2 : function (e, h, g) {
- var f = {
- Latitude : e,
- Longitude : h
- };
- this.base.AjaxCommunication.ajaxCall(f, this.AjaxUrl("GetIdLocation2"), g)
- },
- ListKillerQuestions : function (f, d) {
- var e = {
- pIdKillerQuestionFolder : f
- };
- this.base.AjaxCommunication.ajaxCall(e, this.AjaxUrl("ListKillerQuestions"), d)
- },
- ReadQuestions : function (f, d) {
- var e = {
- pIdKillerQuestion : f
- };
- this.base.AjaxCommunication.ajaxCall(e, this.AjaxUrl("ReadQuestions"), d)
- },
- DeleteQuestion : function (f, d) {
- var e = {
- pIdKillerQuestion : f
- };
- this.base.AjaxCommunication.ajaxCall(e, this.AjaxUrl("DeleteQuestion"), d)
- }
- };
- "use strict";
- var DACore = (typeof(DACore) === "undefined") ? {}
- : DACore;
- $(function () {
- DACore.Company.init()
- });
- DACore.Company = {
- base : DACore.Base,
- URLBASE : "Company.asmx",
- oURL : {
- GetCompaniesLogos : "/ListCompanyLogos",
- VacancyTotalGroupCounter : "/VacancyTotalGroupCounter",
- DeleteFinder : "/DeleteFinder",
- InsertCompanyComment : "/InsertCompanyComment",
- CanConsumeVacancy : "/CanConsumeVacancy",
- CompaniesAutocomplete : "/CompaniesAutocomplete",
- GetCompanyUsers : "/GetCompanyUsers",
- DeleteSharedVacancyUser : "/DeleteSharedVacancyUser",
- AddSharedVacancyUser : "/AddSharedVacancyUser",
- GetStatistics : "/GetStatistics",
- UpdateCompanyNotificationStatus : "/UpdateCompanyNotificationStatus",
- InsertCompanyChangeContract : "/InsertCompanyChangeContract",
- GetCompanyNotification : "/GetCompanyNotification",
- SendMarketyouRequest : "/SendMarketyouRequest",
- ConsumeDownloadAvaliacao : "/ConsumeDownloadAvaliacao",
- UpdateCompanyMessage : "/UpdateCompanyMessage",
- AddOportunityRenovate : "/AddOportunityRenovate",
- SendTestRequest : "/SendTestRequest"
- },
- init : function () {},
- AjaxCall : function (h, g, e) {
- var f = this;
- f.base.AjaxCommunication.ajaxCall(h, f.URLBASE + f.oURL[g], e)
- },
- GetCompaniesLogos : function (f, k, h, j) {
- var g = {
- pIdsRetrieved : f,
- pPageSize : k,
- pProduct : h
- };
- this.AjaxCall(g, "GetCompaniesLogos", j)
- },
- VacancyTotalGroupCounter : function (b) {
- this.AjaxCall({}, "VacancyTotalGroupCounter", b)
- },
- DeleteFinder : function (e, f) {
- var d = {
- IdCompanyFinder : e
- };
- this.AjaxCall(d, "DeleteFinder", f)
- },
- InsertCompanyComment : function (s, q, p, k, r, o, l, m) {
- var n = {
- IdCandidate : s,
- IdCompany : q,
- IdUser : p,
- UserName : k,
- IdCommentType : r,
- IdVacancy : o,
- text : l
- };
- this.AjaxCall(n, "InsertCompanyComment", m)
- },
- CanConsumeVacancy : function (f, d) {
- var e = {
- pIdCompany : f
- };
- this.AjaxCall(e, "CanConsumeVacancy", d)
- },
- CompaniesAutocomplete : function (f, d) {
- var e = {
- pTerm : f
- };
- this.AjaxCall(e, "CompaniesAutocomplete", d)
- },
- GetCompanyUsers : function (g, h, e) {
- var f = {
- IdCompanyEncrypted : g,
- FilterAdmin : h
- };
- this.AjaxCall(f, "GetCompanyUsers", e)
- },
- DeleteSharedVacancyUser : function (h, g, e) {
- var f = {
- IdUserEncrypted : h,
- IdVacancyUserEncrypted : g
- };
- this.AjaxCall(f, "DeleteSharedVacancyUser", e)
- },
- AddSharedVacancyUser : function (h, g, e) {
- var f = {
- IdUserEncrypted : h,
- IdVacancyEncrypted : g
- };
- this.AjaxCall(f, "AddSharedVacancyUser", e)
- },
- GetStatistics : function (f, d) {
- var e = {
- IdRelatoryType : f
- };
- this.AjaxCall(e, "GetStatistics", d)
- },
- UpdateCompanyNotificationStatus : function (g, h, e) {
- var f = {
- pIdCompanyNotification : g,
- pIdNotificationStatus : h
- };
- this.AjaxCall(f, "UpdateCompanyNotificationStatus", e)
- },
- InsertCompanyChangeContract : function (e, f) {
- var d = {
- IdActionChangeContract : e
- };
- this.AjaxCall(d, "InsertCompanyChangeContract", f)
- },
- GetCompanyNotification : function (f, d) {
- var e = {
- pPage : f
- };
- this.AjaxCall(e, "GetCompanyNotification", d)
- },
- SendMarketyouRequest : function (e, g, h) {
- var f = {
- IdCandidate : e,
- IdVacancy : g
- };
- this.AjaxCall(f, "SendMarketyouRequest", h)
- },
- ConsumeDownloadAvaliacao : function (h, g, e) {
- var f = {
- IdCandidateEncrypted : h,
- IdCompanyEncrypted : g
- };
- this.AjaxCall(f, "ConsumeDownloadAvaliacao", e)
- },
- UpdateCompanyMessage : function (f, d) {
- var e = {
- IdCompanyMessage : f
- };
- this.AjaxCall(e, "UpdateCompanyMessage", d)
- },
- AddOportunityRenovate : function (g, e, h) {
- var f = {
- Phone : g,
- Name : e
- };
- this.AjaxCall(f, "AddOportunityRenovate", h)
- },
- SendTestRequest : function (k, h, j, f) {
- var g = {
- pIdCandidate : k,
- pIdVacancy : h,
- pIdTest : j
- };
- this.AjaxCall(g, "SendTestRequest", f)
- }
- };
- "use strict";
- var DACore = (typeof(DACore) === "undefined") ? {}
- : DACore;
- $(function () {
- DACore.User.init()
- });
- DACore.User = {
- base : DACore.Base,
- URLBASE : "User.asmx",
- url : {
- Login : "/Login",
- Alert24x7_IsValidate : "/Alert24x7_IsValidate",
- Alert24x7_AddAlert : "/Alert24x7_AddAlert",
- Alert24x7_AddAlertEmail : "/Alert24x7_AddAlertEmail",
- Alert24x7_AddAlertCourses : "/Alert24x7_AddAlertCourses"
- },
- init : function () {},
- Login : function (l, j, k, m) {
- var h = this,
- g = {
- pEmail : l,
- pPwd : j,
- pIsRememberChecked : k
- };
- h.base.AjaxCommunication.ajaxCall(g, this.AjaxUrl("Login"), m)
- },
- Alert24x7_IsValidate : function (j, h, k) {
- var g = this,
- f = {
- pCoursesCheck : j,
- pFind : h
- };
- g.base.AjaxCommunication.ajaxCall(f, this.AjaxUrl("Alert24x7_IsValidate"), k)
- },
- Alert24x7_AddAlertEmail : function (m, k, n, l, o) {
- var j = this,
- h = {
- pEmail : m,
- pPwd : k,
- pCoursesCheck : n,
- pFind : l
- };
- j.base.AjaxCommunication.ajaxCall(h, this.AjaxUrl("Alert24x7_AddAlertEmail"), o)
- },
- Alert24x7_AddAlert : function (j, l, k, m) {
- var h = this,
- g = {
- pIdUser : j,
- pCoursesCheck : l,
- pFind : k
- };
- h.base.AjaxCommunication.ajaxCall(g, this.AjaxUrl("Alert24x7_AddAlert"), m)
- },
- Alert24x7_AddAlertCourses : function (h, k, j) {
- var g = this,
- f = {
- pIdUser : h,
- pCoursesCheck : k,
- pFind : j
- };
- g.base.AjaxCommunication.ajaxCall(f, this.AjaxUrl("Alert24x7_AddAlertCourses"), pCallBack)
- },
- AjaxUrl : function (b) {
- return this.URLBASE + this.url[b]
- }
- };
- "use strict";
- var BRCore = (typeof(BRCore) === "undefined") ? {}
- : BRCore;
- $(function () {
- BRCore.Vacancy.init()
- });
- BRCore.Vacancy = {
- HasError : "",
- scDA : "",
- cache : {},
- init : function () {
- this.HasError = BRCore.Utils.Errors.HasError;
- this.scDA = DACore.Vacancy
- },
- Invite : function (k, f, h, j) {
- var g = this;
- g.scDA.Invite(k, f, h, function (a) {
- g.EndInvite(a, j)
- })
- },
- EndInvite : function (f, d) {
- var e = f && f.d || f;
- if (this.HasError(e) && e.Error.Code == webUI.Utils.Enums.AjaxCalls.ErrorCodes.LOGOUT) {
- document.location.reload(true)
- } else {
- d(e)
- }
- },
- Visualize : function (h, e, g) {
- var f = this;
- f.scDA.Visualize(h, e, function (a) {
- f.EndVisualize(a, g)
- })
- },
- VisualizeFreemium : function (j, k, h) {
- var f = this,
- g = "VisualizeFreemium|" + j + "|" + k;
- if (f.cache[g]) {
- f.EndVisualize(f.cache[g], h)
- } else {
- f.scDA.VisualizeFreemium(j, k, function (a) {
- f.EndVisualize(a, h, g)
- })
- }
- },
- EndVisualize : function (h, j, k) {
- var g = this,
- f = h && h.d || h;
- if (this.HasError(f) && f.Error.Code == webUI.Utils.Enums.AjaxCalls.ErrorCodes.LOGOUT) {
- document.location.reload(true)
- } else {
- if (k) {
- g.cache[k] = h
- }
- j(f)
- }
- },
- List_MyVacancies : function (d, f) {
- var e = this;
- e.scDA.List_MyVacancies(d, function (a) {
- e.EndList_MyVacancies(a, f)
- })
- },
- EndList_MyVacancies : function (f, d) {
- var e = f && f.d || f;
- if (!this.HasError(e)) {
- d(e)
- } else {
- document.location.reload(true)
- }
- },
- HasDelegationVacancies : function (d, f) {
- var e = this;
- DACore.Vacancy.HasDelegationVacancies(d, function (a) {
- e.EndHasDelegationVacancies(a, f)
- })
- },
- EndHasDelegationVacancies : function (f, d) {
- var e = (!f.d) ? f : f.d;
- if (!this.HasError(e)) {
- d(e)
- } else {
- document.location.reload(true)
- }
- },
- AutocompleteSimple : function (g, h, e) {
- var f = this;
- f.scDA.VacanciesAutocomplete(g, h, function (a) {
- f.EndGenericCall(a, e)
- })
- },
- VacancyTotalGroupCounter : function (c) {
- var d = this;
- this.scDA.VacancyTotalGroupCounter(function (a) {
- d.EndVacancyTotalGroupCounter(a, c)
- })
- },
- EndVacancyTotalGroupCounter : function (pData, pCallBack) {
- var lData = pData && pData.d || pData;
- if (!this.HasError(lData)) {
- lData.Data.IniDate = eval(lData.Data.IniDate.replace(/\/Date\((\d+)\)\//gi, "new Date($1).toJSON()"));
- lData.Data.EndDate = eval(lData.Data.EndDate.replace(/\/Date\((\d+)\)\//gi, "new Date($1).toJSON()"));
- var _valIncPace = BRCore.Utils.Counters.getValIncPace(lData.Data);
- lData = _valIncPace
- } else {}
- pCallBack(lData)
- },
- List_Vacancy_Invite : function (f, d) {
- var e = this;
- e.scDA.List_Vacancy_Invite(f, function (a) {
- e.EndGenericCall(a, d)
- })
- },
- List_Vacancies : function (d, f) {
- var e = this;
- e.scDA.List_Vacancies(d, function (a) {
- e.EndGenericCall(a, f)
- })
- },
- List_ByAffinity : function (h, g, e) {
- var f = this;
- f.scDA.List_ByAffinity(h, g, function (a) {
- f.EndGenericCall(a, e)
- })
- },
- Vacancy_Fast_Insert : function (l, p, n, q, o, m, j) {
- var k = this;
- k.scDA.Vacancy_Fast_Insert(l, p, n, q, o, m, function (a) {
- k.EndGenericCall(a, j)
- })
- },
- ListVacaciesId : function (h, g, e) {
- var f = this;
- f.scDA.ListVacaciesId(h, g, function (a) {
- f.EndGenericCall(a, e)
- })
- },
- ListVacanciesMicrosite : function (h, g) {
- var e = this,
- f = "ListVacanciesMicrosite_" + (h ? 1 : 0);
- if (e.cache[f]) {
- e.EndGenericCall(e.cache[f], g)
- } else {
- DACore.Vacancy.ListVacanciesMicrosite(h, function (a) {
- e.cache[f] = a;
- e.EndGenericCall(a, g)
- })
- }
- },
- IsVacancyDuplicated : function (l, o, q, p, m, n, j) {
- var k = this;
- DACore.Vacancy.IsVacancyDuplicated(l, o, q, p, m, n, function (a) {
- k.EndGenericCall(a, j)
- })
- },
- ListVacanciesForNewMatch : function (f, d) {
- var e = this;
- DACore.Vacancy.ListVacanciesForNewMatch(f, function (a) {
- e.EndGenericCall(a, d)
- })
- },
- GetIdLocation2 : function (e, h, g) {
- var f = this;
- DACore.Vacancy.GetIdLocation2(e, h, function (a) {
- f.EndGenericCall(a, g)
- })
- },
- ListKillerQuestions : function (f, d) {
- var e = this;
- DACore.Vacancy.ListKillerQuestions(f, function (a) {
- e.EndGenericCall(a, d)
- })
- },
- ReadQuestions : function (f, d) {
- var e = this;
- DACore.Vacancy.ReadQuestions(f, function (a) {
- e.EndGenericCall(a, d)
- })
- },
- DeleteQuestion : function (f, d) {
- var e = this;
- DACore.Vacancy.DeleteQuestion(f, function (a) {
- e.EndGenericCall(a, d)
- })
- },
- EndGenericCall : function (f, d) {
- var e = f && f.d || f;
- if (!this.HasError(e)) {}
- else {}
- d(e)
- }
- };
- "use strict";
- var BRCore = (typeof(BRCore) === "undefined") ? {}
- : BRCore;
- $(function () {
- BRCore.Courses.init()
- });
- BRCore.Courses = {
- scDA : "",
- init : function () {
- this.scDA = DACore.Courses
- },
- GetCourses : function (h, g, e) {
- var f = this;
- this.scDA.onResponse = function (a) {
- f.EndGetCourses(a, e)
- };
- this.scDA.Request(h, g)
- },
- EndGetCourses : function (f, d) {
- var e = {
- Data : f,
- Error : null
- };
- d(e)
- }
- };
- var BRCore = (typeof(BRCore) === "undefined") ? {}
- : BRCore;
- $(function () {
- BRCore.Company.init()
- });
- BRCore.Company = {
- HasError : "",
- Cache : [],
- init : function () {
- this.HasError = BRCore.Utils.Errors.HasError
- },
- EndGenericCall : function (f, d) {
- var e = (!f.d) ? f : f.d;
- if (!this.HasError(e)) {}
- else {}
- d(e)
- },
- GetCompaniesLogos : function (f, e, g, h) {
- DACore.Company.GetCompaniesLogos(f, e, g, function (a) {
- BRCore.Company.EndGenericCall(a, h)
- })
- },
- VacancyTotalGroupCounter : function (c) {
- var d = this;
- DACore.Company.VacancyTotalGroupCounter(function (a) {
- d.EndVacancyTotalGroupCounter(a, c)
- })
- },
- EndVacancyTotalGroupCounter : function (g, h) {
- var e = (!g.d) ? g : g.d;
- if (!this.HasError(e)) {
- var f = BRCore.Utils.Counters.getValIncPace(g.Data);
- h(f)
- } else {}
- },
- DeleteFinder : function (d, f) {
- var e = this;
- DACore.Company.DeleteFinder(d, function (a) {
- e.EndGenericCall(a, f)
- })
- },
- InsertCompanyComment : function (r, p, o, k, q, n, l, m) {
- var s = this;
- DACore.Company.InsertCompanyComment(r, p, o, k, q, n, l, function (a) {
- s.EndGenericCall(a, m)
- })
- },
- CanConsumeVacancy : function (f, d) {
- var e = this;
- DACore.Company.CanConsumeVacancy(f, function (a) {
- e.EndGenericCall(a, d)
- })
- },
- CompaniesAutocomplete : function (f, d) {
- var e = this;
- DACore.Company.CompaniesAutocomplete(f, function (a) {
- e.EndGenericCall(a, d)
- })
- },
- GetCompanyUsers : function (h, j, k) {
- var f = this,
- g = "GetCompanyUsers_" + h + "_" + j;
- if (f.Cache[g]) {
- f.EndGenericCall(f.Cache[g], k)
- } else {
- DACore.Company.GetCompanyUsers(h, j, function (a) {
- f.Cache[g] = a;
- f.EndGenericCall(a, k)
- })
- }
- },
- DeleteSharedVacancyUser : function (h, g, e) {
- var f = this;
- DACore.Company.DeleteSharedVacancyUser(h, g, function (a) {
- f.EndGenericCall(a, e)
- })
- },
- AddSharedVacancyUser : function (h, g, e) {
- var f = this;
- DACore.Company.AddSharedVacancyUser(h, g, function (a) {
- f.EndGenericCall(a, e)
- })
- },
- GetStatistics : function (f, d) {
- var e = this;
- DACore.Company.GetStatistics(f, function (a) {
- e.EndGenericCall(a, d)
- })
- },
- UpdateCompanyNotificationStatus : function (g, h, e) {
- var f = this;
- DACore.Company.UpdateCompanyNotificationStatus(g, h, function (a) {
- f.EndGenericCall(a, e)
- })
- },
- InsertCompanyChangeContract : function (d, f) {
- var e = this;
- DACore.Company.InsertCompanyChangeContract(d, function (a) {
- e.EndGenericCall(a, f)
- })
- },
- GetCompanyNotification : function (f, d) {
- var e = this;
- DACore.Company.GetCompanyNotification(f, function (a) {
- e.EndGenericCall(a, d)
- })
- },
- SendMarketyouRequest : function (e, g, h) {
- var f = this;
- DACore.Company.SendMarketyouRequest(e, g, function (a) {
- f.EndGenericCall(a, h)
- })
- },
- ConsumeDownloadAvaliacao : function (h, g, e) {
- var f = this;
- DACore.Company.ConsumeDownloadAvaliacao(h, g, function (a) {
- f.EndGenericCall(a, e)
- })
- },
- UpdateCompanyMessage : function (f, d) {
- var e = this;
- DACore.Company.UpdateCompanyMessage(f, function (a) {
- e.EndGenericCall(a, d)
- })
- },
- AddOportunityRenovate : function (g, e, h) {
- var f = this;
- DACore.Company.AddOportunityRenovate(g, e, function (a) {
- f.EndGenericCall(a, h)
- })
- },
- SendTestRequest : function (k, h, j, f) {
- var g = this;
- DACore.Company.SendTestRequest(k, h, j, function (a) {
- g.EndGenericCall(a, f)
- })
- }
- };
- "use strict";
- var BRCore = (typeof(BRCore) === "undefined") ? {}
- : BRCore;
- $(function () {
- BRCore.User.init()
- });
- BRCore.User = {
- HasError : "",
- init : function () {
- this.HasError = BRCore.Utils.Errors.HasError
- },
- Login : function (k, h, j, f) {
- var g = this;
- DACore.User.Login(k, h, j, function (a) {
- g.EndGenericCall(a, f)
- })
- },
- Alert24x7_IsValidate : function (h, g, e) {
- var f = this;
- DACore.User.Alert24x7_IsValidate(h, g, function (a) {
- f.EndGenericCall(a, e)
- })
- },
- Alert24x7_AddAlertEmail : function (l, j, m, k, g) {
- var h = this;
- DACore.User.Alert24x7_AddAlertEmail(l, j, m, k, function (a) {
- h.EndGenericCall(a, g)
- })
- },
- Alert24x7_AddAlert : function (h, k, j, f) {
- var g = this;
- DACore.User.Alert24x7_AddAlert(h, k, j, function (a) {
- g.EndGenericCall(a, f)
- })
- },
- Alert24x7_AddAlertCourses : function (h, k, j, f) {
- var g = this;
- DACore.User.Alert24x7_AddAlertCourses(h, k, j, function (a) {
- g.EndGenericCall(a, f)
- })
- },
- EndGenericCall : function (f, d) {
- var e = f && f.d || f;
- if (!this.HasError(e)) {}
- else {}
- d(e)
- }
- };
- "use strict";
- var BRCore = (typeof(BRCore) === "undefined") ? {}
- : BRCore;
- BRCore.Utils = BRCore.Utils || {};
- $(function () {
- BRCore.Utils.Errors.init()
- });
- BRCore.Utils.Errors = {
- init : function () {},
- HasError : function (b) {
- return (!b || (b && b.Error && b.Error.Code && b.Error.Code != 0))
- }
- };
- "use strict";
- var BRCore = (typeof(BRCore) === "undefined") ? {}
- : BRCore;
- BRCore.Utils = BRCore.Utils || {};
- BRCore.Utils.Counters = {
- getValIncPace : function (b) {
- return this.iniAtts(b)
- },
- iniAtts : function (j) {
- var m = this,
- k = {
- val : 0,
- inc : 1,
- pace : 0
- },
- g,
- h = new Date(),
- l = h.getTime() + (h.getTimezoneOffset() * 60000);
- j.IniDate = m.convertISOtoMillis(j.IniDate);
- j.EndDate = m.convertISOtoMillis(j.EndDate);
- if (l > j.EndDate) {
- k.pace = j.EndDate - j.IniDate;
- k.inc = 0;
- k.val = j.EndValue
- } else {
- g = m.getPace(j);
- k.pace = (g < 1000) ? 1000 : g;
- k.inc = m.getInc(j, g);
- k.val = m.getVal(j, g)
- }
- return k
- },
- convertISOtoMillis : function (k) {
- var s = k,
- l = s.substring(0, 4),
- n = s.substring(5, 7),
- r = s.substring(8, 10),
- q = s.substring(11, 13),
- o = s.substring(14, 16),
- m = s.substring(17, 19),
- p = s.substring(20, 23);
- s = new Date(l, Number(n) - 1, r, q, o, m, p);
- return s.getTime()
- },
- getPace : function (c) {
- var d = c.EndDate - c.IniDate;
- if (c.IniValue != c.EndValue) {
- d = parseInt(d / (c.EndValue - c.IniValue), 10)
- }
- return d
- },
- getVal : function (k, j) {
- var m = k.EndValue,
- l = k.EndDate - k.IniDate,
- h = new Date(),
- g = h.getTime() + (h.getTimezoneOffset() * 60000);
- if (g > k.EndDate) {
- m = k.EndValue
- } else {
- if (l != j) {
- m = k.IniValue + Math.round((g - k.IniDate) / j)
- }
- }
- return m
- },
- getInc : function (d, f) {
- var e = 1;
- if (f < 1000) {
- e = Math.ceil(1000 / f)
- }
- return e
- }
- };
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.ctrl = webUI.ctrl || {};
- webUI.ctrl.Other = webUI.ctrl.Other || {};
- webUI.ctrl.Other.ClaimSlider = function (b) {
- this.oCarousel = "";
- this.aImgSrc = [];
- this.idxImg = 0;
- this.settings = {
- divContainer : ".js_publicityDiv ul",
- btPrevSlide : ".js_prevSlide",
- btNextSlide : ".js_nextSlide",
- divIndicators : ".js_indicators",
- divIndTagName : "li",
- interval : 10000,
- speed : 1000,
- autorunCarousel : true
- };
- this.options = {};
- this.init = function (a) {
- this.options = $.extend(this.settings, a);
- this.preLoadImgs();
- this.oCarousel = new webUI.Utils.FadeSlides(this.options, this.options.autorunCarousel)
- };
- this.preLoadImgs = function () {
- this.aImgSrc = $(this.options.divContainer + " img[loadsrc]").map(function () {
- return $(this).attr("loadsrc")
- }).get();
- if (this.aImgSrc.length) {
- this.loadImg()
- }
- };
- this.loadImg = function () {
- var d = this,
- a = "";
- $("<img>").on("load", function () {
- a = $(this).attr("loadsrc");
- $('img[loadsrc="' + a + '"]').attr("src", a);
- if (d.aImgSrc.length) {
- d.aImgSrc.shift();
- d.loadImg()
- }
- }).attr("src", d.aImgSrc[0]).attr("loadsrc", d.aImgSrc[0])
- };
- this.init(b)
- };
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.ctrl = webUI.ctrl || {};
- webUI.ctrl.Other = webUI.ctrl.Other || {};
- webUI.ctrl.Other.PublicGroupCounters = function (b) {
- this.oFlipCounter = "",
- this.intervalHandler = 0,
- this.settings = {
- interval : 60 * 60 * 1000,
- divContainerId : "",
- value : 0,
- inc : 0,
- auto : false,
- pace : 1000,
- tFH : 20,
- bFH : 26,
- fW : 37,
- bOffset : 200
- };
- this.options = {};
- this.init = function (a) {
- this.options = $.extend(this.settings, a);
- this.createFlipCounterObject()
- };
- this.createFlipCounterObject = function () {
- var a = $(".flip-counter");
- this.options.divContainerId = a.attr("id");
- this.options.value = Number(a.attr("ini-val"));
- this.oFlipCounter = new flipCounter(this.options.divContainerId, this.options)
- };
- this.intervalGetSrvData = function (d) {
- var a = this;
- this.options.interval = d || this.options.interval;
- if (this.intervalHandler) {
- clearInterval(this.intervalHandler)
- }
- this.getValIncPace();
- if (this.options.interval) {
- this.handlerInterval = setInterval(function () {
- a.getValIncPace()
- }, this.options.interval)
- }
- };
- this.getValIncPace = function () {
- var a = this;
- BRCore.Vacancy.VacancyTotalGroupCounter(function (d) {
- a.setValIncPace(d)
- })
- };
- this.setValIncPace = function (a) {
- if (!a) {
- return
- }
- if (a.val) {
- this.oFlipCounter.setValue(a.val)
- }
- if (a.inc) {
- this.oFlipCounter.setIncrement(a.inc)
- }
- if (a.pace) {
- this.oFlipCounter.setPace(a.pace)
- }
- if (!$.isEmptyObject(a)) {
- this.oFlipCounter.setAuto(true)
- }
- };
- this.init(b)
- };
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.ctrl = webUI.ctrl || {};
- webUI.ctrl.Other = webUI.ctrl.Other || {};
- webUI.ctrl.Other.Access = function (b) {
- this.configValidate = {
- aLogin : false,
- btnLogin : false,
- divAccessGuaranted : true,
- aSessionCompany : false,
- navNavigationBar : false
- };
- this.settings = {
- Header : ".jsHeader",
- aLogin : ".js_aLogin",
- txtLogin : ".js_txtlogin",
- chkSalvar : ".js_chkSalvar",
- txtPwd : ".js_txtPwd",
- inputsForm : ".js_divPanelLogin input",
- chkRemember : ".js_chkRemember input[type=checkbox]",
- btnLogin : ".js_btnLogin",
- btnInsertCV : ".js_btnInsertCV",
- divPanelLogin : ".js_divPanelLogin",
- txt_account_type : ".js_txt_account_type",
- btnInsertVacancy : 'a[id$="btnInsertVacancy"]',
- NavigationBar : ".js_NavigationBar",
- divAccessGuaranted : ".js_divAccessGuaranted",
- aSessionCandidate : ".js_aSessionCandidate",
- aSessionCompany : ".js_aSessionCompany",
- divContent : ".js_divContent",
- liAccountTypeText : ".js_liAccountType_text",
- liAccountTypeLink : ".js_liAccountType_link",
- imgContainer : ".js_imgContainer img",
- liCandidatePhoto : ".js_candidatePhoto",
- cvStatus : ".js_cvStatus",
- isCompany : false,
- btnInsertCompany : ".js_btnInsertCompany",
- preference : null,
- UserType : 0,
- liCandidate : ".js_liCandidate",
- liCompany : ".js_liCompany",
- liCourse : ".js_liCourse",
- liConcursos : ".js_liConcursos",
- formPublic : ".jsPublic",
- myArea : ".js_myArea",
- lnkHelpCandidate : ".js_lnkHelpCandidate",
- lnkFindVacancies : ".js_lnkFindVacancies",
- lnkcourses : ".js_lnkcourses"
- };
- this.Result = {
- Ok : 0,
- Ko : 1,
- Ko_IsCompany : 2,
- Ko_IsCandidate : 3,
- Ko_Login : 4,
- Ko_Pwd : 5,
- Ko_BloquedUser : 6
- };
- this.options = {};
- this.init = function (e) {
- var a = this,
- f;
- a.options = f = $.extend(a.settings, e);
- if ($(f.Header).hasClass("isPremium")) {
- $(f.txt_account_type).removeClass("txtPlus").addClass("txtPremium").text("PREMIUM")
- }
- if (webUI.Cookies.Preference.IdTypeUser != 0) {
- $(f.btnInsertVacancy).hide()
- }
- if (f.preference) {
- a.UserLogged()
- }
- a.setupAvatar();
- a.bindEvents();
- if (webUI.Cookies.Preference.IdLocation2 > 0) {
- $(a.settings.lnkFindVacancies).attr("href", "http://" + window.location.host + "/empregos.aspx?Provincia=" + webUI.Cookies.Preference.IdLocation2)
- }
- if (webUI.Cookies.Preference.IdLocation3 > 0) {
- $(a.settings.lnkcourses).attr("href", $(a.settings.lnkcourses).attr("href") + "?i3lr=" + webUI.Cookies.Preference.IdLocation3)
- }
- };
- this.bindEvents = function () {
- var a = this;
- if (a.options.UserType == 1) {}
- if (a.options.UserType == 2) {
- $(a.options.aSessionCandidate).on({
- click : function (d) {
- a.OnClick_aSessionCandidate(d, this)
- }
- });
- $(document).on({
- click : function (d) {
- a.OnClick_outSessionCandidate(d, this)
- }
- })
- }
- if (a.options.UserType == 0) {
- a.bind_btnLogin();
- $(a.options.aLogin).on({
- click : function (d) {
- a.OnClick_aLogin(d, this)
- }
- });
- $(document).on({
- click : function (d) {
- a.OnClick_outLogin(d, this)
- }
- });
- $(a.options.inputsForm).on("keypress", function (d) {
- if (13 == (d.keyCode || d.which)) {
- $(a.options.btnLogin).click();
- return false
- }
- })
- }
- };
- this.bind_btnLogin = function () {
- var d = this,
- a = $(d.options.btnLogin);
- a.off("click").on("click", function (c) {
- d.OnClick_btnLogin(c, this)
- }).removeClass("disabled").text(a.attr("restore-text"))
- };
- this.OnClick_aLogin = function (f, e) {
- var a = this;
- if (f) {
- f.preventDefault()
- }
- a.ShowLoginPanel()
- };
- this.OnClick_outLogin = function (f, e) {
- var a = this;
- if (!$(f.target).closest(a.options.divPanelLogin).length) {
- if ($(a.options.divPanelLogin).hasClass("open")) {
- $(a.options.divPanelLogin).removeClass("open")
- }
- }
- };
- this.OnClick_btnLogin = function (f, e) {
- var a = this;
- if (f) {
- f.preventDefault()
- }
- if (a.IsValid()) {
- a.DoLogin()
- }
- };
- this.OnClick_aSessionCandidate = function (f, e) {
- var a = this;
- if (f) {
- f.preventDefault()
- }
- a.ShowAccessPanel(e)
- };
- this.OnClick_outSessionCandidate = function (f, e) {
- var a = this;
- if (!$(f.target).closest(a.options.divAccessGuaranted).length) {
- if ($(a.options.divContent).hasClass("open")) {
- $(a.options.divContent).removeClass("open")
- }
- }
- };
- this.ClickOn_btnInsertCV = function (a, f, e) {
- a.preventDefault();
- a.stopPropagation();
- xt_click($(a.target).get(0), "C", f, e, "N");
- if ("undefined" != typeof oDefaultCompany) {
- oDefaultCompany.ClickOn_btnVacancy(a, 1);
- return false
- } else {
- location.assign("/Candidate/CV/Insert.aspx")
- }
- };
- this.setupAvatar = function (k) {
- var o = new Image(),
- p = 80,
- n = "icon-candidate-man icon-candidate-woman",
- a = $(".js_candidatePhoto"),
- q = $(this.options.imgContainer),
- l = k || q.attr("preload-image"),
- m = function (c) {
- a.removeClass("man woman");
- q.attr("src", l).removeClass(n).css({
- "margin-top" : (p - c.height) / 2,
- "margin-left" : a.width() / 2 - c.width / 2
- })
- };
- if (o.addEventListener) {
- o.addEventListener("load", function (c) {
- m(this)
- }, false)
- } else {
- o.attachEvent("onload", function (c) {
- m(o)
- })
- }
- if (l) {
- o.src = l
- }
- };
- this.IsValid = function () {
- return webUI.Utils.Validation.Validate(this.options.divPanelLogin)
- };
- this.ShowLoginPanel = function () {
- var a = this;
- $(a.options.divPanelLogin).toggleClass("open");
- if ($(a.options.divPanelLogin).hasClass("open")) {
- $(a.options.txtLogin).focus()
- }
- };
- this.DoLogin = function () {
- var k = this,
- l,
- j,
- h,
- m,
- a;
- l = $(k.options.txtLogin).val();
- j = $(k.options.txtPwd).val();
- h = $(k.options.chkRemember).is(":checked");
- a = $(k.options.btnLogin);
- a.off("click").on("click", function (c) {
- c.preventDefault()
- }).addClass("disabled").attr("restore-text", a.text()).text(a.attr("loading-text"));
- BRCore.User.Login(l, j, h, function (c) {
- k.EndLogin(c)
- })
- };
- this.EndLogin = function (e) {
- var f = this,
- a;
- if (!BRCore.Utils.Errors.HasError(e)) {
- f.RedirectUser(e.Data.UrlRedirect)
- } else {
- switch (e.Data.Result) {
- case f.Result.Ko_Login:
- window.location.assign("/login.aspx?err=" + f.Result.Ko_Login);
- break;
- case f.Result.Ko_Pwd:
- ShowError($(f.options.txtPwd), true, "errPwd", e.Error.Description);
- showTooltip($(f.options.txtPwd));
- f.bind_btnLogin();
- $(f.options.txtPwd).focus();
- break;
- case f.Result.Ko_BloquedUser:
- window.location.assign("/login.aspx?err=" + f.Result.Ko_BloquedUser);
- break;
- default:
- window.location.assign("/login.aspx?err=" + f.Result.Ko);
- break
- }
- }
- };
- this.ClearForm = function () {
- var a = this;
- $(a.options.txtLogin).val("");
- $(a.options.txtPwd).val("")
- };
- this.RedirectUser = function (e) {
- var a = this,
- f = a.options.preference.Read();
- if (f.IdTypeUser == 2) {
- window.location.assign(e)
- } else {
- if (f.IdTypeUser == 1) {
- window.location.assign(e)
- }
- }
- };
- this.UserLogged = function () {
- var f = this,
- e = f.options.preference,
- a = {};
- if (f.options.isCompany) {
- setTimeout(function () {
- $(f.options.btnInsertCV).text("Anuncie suas vagas gratis").attr({
- title : "Anuncie suas vagas gratis",
- href : "javascript:void(0)",
- }).off("click").on("click", function (c) {
- f.ClickOn_btnInsertCV(c, 5, "HomeEmp::Menu::AnuncieSuaVaga")
- })
- }, 100);
- $(f.options.btnInsertCompany).show()
- } else {
- setTimeout(function () {
- $(f.options.btnInsertCV).off("click").on("click", function (c) {
- f.ClickOn_btnInsertCV(c, 1, "HomeCand::AnuncieCV::Cabecera")
- })
- }, 100)
- }
- if (e.IdTypeUser == 1) {
- a = {
- divAccessGuaranted : false,
- aSessionCompany : true,
- navNavigationBar : true
- };
- this.CompanyLogged(a)
- } else {
- if (e.IdTypeUser == 2) {
- a = {
- navNavigationBar : ((window.location.pathname.toLowerCase() == "/") || (window.location.pathname.toLowerCase() == "/default.aspx") || (window.location.pathname.toLowerCase() == "/defaultcompany.aspx"))
- };
- this.CandiateLogged(a)
- }
- }
- };
- this.CandiateLogged = function (h) {
- var l = this,
- a = $.extend(l.configValidate, h),
- k = l.options,
- j = l.options.preference,
- m = $(k.formPublic).length;
- if (!a.aLogin) {
- $(k.aLogin).hide()
- }
- if (!a.btnInsertCV) {
- $(k.btnInsertCV).hide()
- }
- if (!a.btnInsertCompany) {
- $(k.btnInsertCompany).hide()
- }
- if (!a.navNavigationBar) {
- $(k.NavigationBar).hide()
- }
- $(k.aSessionCandidate).attr("title", "Olá, " + j.NameUser);
- $(k.aSessionCandidate + " .js_spanSession").html("Olá, " + j.NameUser);
- if (j.IdContractTypeProduct == 16) {
- $(k.liAccountTypeText).text("Conta Premium");
- $(k.liAccountTypeLink).text("Resumo").attr("href", "/Candidate/premium/subscription/detail.aspx");
- if (!m) {
- $(k.Header).addClass("isPremium")
- }
- $(k.txt_account_type).removeClass("txtPlus").addClass("txtPremium").text("PREMIUM");
- $(k.lnkHelpCandidate).attr("href", "/Ajuda/Como_usar_infojobs_area_de_candidato__4632.aspx")
- } else {
- $(k.liAccountTypeText).text("Conta Básica");
- $(k.liAccountTypeLink).html('<span class="icon-candidate-smallPremium"></span> Upgrade').attr("href", "/Candidate/Premium/Contract/Contract.aspx?iscw=236");
- $(k.lnkHelpCandidate).attr("href", "/Ajuda/Como_usar_infojobs_area_de_candidato__1292.aspx")
- }
- if (a.divAccessGuaranted) {
- $(k.divAccessGuaranted).show();
- if (j.IdSex == 2) {
- $(k.liCandidatePhoto).removeClass("woman man").addClass("woman")
- } else {
- $(k.liCandidatePhoto).removeClass("woman man").addClass("man")
- }
- if (j.IdStatus == 2) {
- if (j.CompleteCV > 79) {
- $(k.cvStatus + " h3").html("CV <span>" + j.CompleteCV.toString() + "%</span> completo");
- $(k.cvStatus + " a").html("Editar")
- } else {
- if (j.CompleteCV > 49) {
- $(k.cvStatus + " h3").html("CV <span>" + j.CompleteCV.toString() + "%</span> completo");
- $(k.cvStatus + " a").html("Melhorar perfil")
- } else {
- $(k.cvStatus + " h3").html("CV incompleto");
- $(k.cvStatus + " a").html("Preencher agora!")
- }
- }
- } else {
- if (j.IdStatus == 6) {
- $(k.cvStatus + " h3").html("CV incompleto");
- $(k.cvStatus + " a").html("Ativar")
- } else {
- if (j.IdStatus == 1) {
- $(k.cvStatus + " h3").html("CV incompleto");
- $(k.cvStatus + " a").html("Completar");
- if (!$(k.cvStatus).hasClass("incoplete")) {
- $(k.cvStatus).addClass("incoplete")
- }
- } else {}
- }
- }
- }
- };
- this.CompanyLogged = function (e) {
- var f = this,
- a = $.extend(f.configValidate, e);
- if (!a.aLogin) {
- $(f.options.aLogin).hide()
- }
- if (!a.btnInsertCV) {
- $(f.options.btnInsertCV).hide()
- }
- if (!a.btnInsertCompany) {
- $(f.options.btnInsertCompany).hide()
- }
- if (a.divAccessGuaranted) {
- $(f.options.divAccessGuaranted).show()
- }
- if (a.aSessionCompany) {
- $(f.options.aSessionCompany).show()
- }
- };
- this.ShowAccessPanel = function (g) {
- var k = this,
- j = k.options,
- h = k.options.preference,
- a = $(k.options.imgContainer);
- $(j.divContent).toggleClass("open");
- if ($(j.divContent).hasClass("open")) {
- if (h && h.PhotoUrl != "") {
- k.setupAvatar(h.PhotoUrl)
- } else {
- if (a.attr("preload-image") != "") {
- k.setupAvatar(a.attr("preload-image"))
- }
- }
- a.attr("preload-image", "")
- }
- };
- this.UnCheck_AllMenu = function () {
- var a = this,
- d = a.options;
- $(d.liCandidate).removeClass("active");
- $(d.liCourse).removeClass("active");
- $(d.liCourse).removeClass("active");
- $(d.liConcursos).removeClass("active")
- };
- this.init(b)
- };
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.ctrl = webUI.ctrl || {};
- webUI.ctrl.Company_Vacancy_ListRead = webUI.ctrl.Company_Vacancy_ListRead || {};
- webUI.ctrl.Company_Vacancy_ListRead.Finder = function (pSettings) {
- var me = this,
- lsKey = "locationUser",
- DIFFERENCE_DAYS = 7;
- this.$inpCidadeOuEstado = "";
- this.aKeywords = [];
- this.scSntzr = "";
- this.browser = {};
- this.settings = {
- url_base : "/empregos",
- url_end : ".aspx",
- boxSearch : ".js_boxSearch",
- inpAutoComplete : ".js_txtFti",
- inpComboStates : ".js_ddStates",
- btSearch : ".jsBtnSearch",
- hdn_is_preview : ".js_hdn_is_preview",
- hdnFindVacancy : '.box-search input[type=hidden][id$="hdnFindVacancy"]',
- loadParams : true
- };
- this.options = {};
- this.init = function (pSettings) {
- var _me = this,
- _opts;
- _me.options = _opts = $.extend(_me.settings, pSettings);
- $(_opts.btSearch).removeAttr("disabled onclick");
- _me.browser = webUI.Utils.Browser;
- _me.$inpCidadeOuEstado = $(_opts.inpComboStates);
- _me.scSntzr = webUI.Utils.Sanitizier;
- _me.aKeywords = _me.GetCookieKeywords();
- _me.txtAutocomplete();
- _me.txtComboStates();
- $(":text").simplePlaceholder();
- if (!Number(webUI.Cookies.Preference.IdTypeUser) && !($(_opts.inpAutoComplete).is("[microsite]"))) {
- LoadPosition()
- }
- _me.bindEvents()
- };
- this.bindEvents = function () {
- var _me = this,
- _opts = _me.options,
- _$inpAutoComplete = $(_opts.inpAutoComplete),
- _$btSearch = $(_opts.btSearch);
- _$btSearch.on("click", function (e) {
- _me.OnClick_BtnSearch(e)
- });
- _$inpAutoComplete.on({
- mouseover : function () {
- _$btSearch.parent().addClass("HighlightSend")
- },
- mouseout : function () {
- _$btSearch.parent().removeClass("HighlightSend")
- }
- });
- var _a = [_me.$inpCidadeOuEstado, _$inpAutoComplete];
- $.each(_a, function (i, el) {
- if (el && el.on) {
- el.on("keypress", function (e) {
- if (e.keyCode == $.ui.keyCode.ENTER) {
- _me.OnClick_BtnSearch();
- return false
- }
- })
- }
- })
- };
- this.OnClick_BtnSearch = function (e) {
- if (e) {
- e.preventDefault()
- }
- var _opts = this.options,
- _params = webUI.Utils.URLSearch.getJSON(),
- _$inpAutoComplete = $(_opts.inpAutoComplete),
- _palabra = _$inpAutoComplete.val(),
- _provinciaStr = $(_opts.inpComboStates).combobox("option", "input").val(),
- _provincia = $(_opts.inpComboStates).val(),
- _scSU = webUI.Utils.SemanticURL,
- _searchOpts = [];
- if (_palabra == _$inpAutoComplete.attr("placeholder")) {
- _palabra = ""
- }
- if (_palabra) {
- _searchOpts.push(_scSU.getItem("Palabra", _palabra, 1))
- }
- if (_provincia) {
- _searchOpts.push(_scSU.getItem("Provincia", _provincia, _provinciaStr))
- }
- if (_params && _opts.loadParams) {
- for (var _param in _params) {
- if (-1 == "Palabra_Provincia".indexOf(_param)) {
- _searchOpts.push(_scSU.getItem(_param, _params[_param], 1))
- }
- }
- }
- if ("1" == $(_opts.hdn_is_preview).val()) {
- for (var i = 0; i < _searchOpts.length; i++) {
- if (_searchOpts[i].key == "Date") {
- _searchOpts[i].val = new Date().getTime()
- }
- }
- }
- $(_opts.btSearch).attr("disabled", "disabled").html("<strong>Carregando...</strong>").off("click");
- window.location.assign(_scSU.getURL(_searchOpts, _opts.url_base, _opts.url_end))
- };
- this.GetCookieKeywords = function () {
- var _cookieVal = webUI.Utils.browserCookies.getCookie("vacancyPrevNext") || {
- keywords : []
- };
- if (_cookieVal) {
- try {
- _cookieVal = eval(_cookieVal)
- } catch (e) {
- if (-1 == _cookieVal.indexOf(",keywords:")) {
- _cookieVal.keywords = []
- } else {
- var p1 = _cookieVal.indexOf(",keywords:") + 10,
- p2 = _cookieVal.indexOf(",callmethod:"),
- _kws = _cookieVal.substring(p1, p2);
- _kws = _kws.split("','");
- if (_kws.length) {
- _kws[0] = _kws[0].substr(2);
- if (_kws.length > 1) {
- var _el = _kws[_kws.length - 1];
- _el = _el.substring(0, _el.length - 2);
- _kws[_kws.length - 1] = _el
- }
- }
- _cookieVal = eval(_cookieVal.substring(0, p1 - 10) + _cookieVal.substr(p2));
- _cookieVal.keywords = _kws
- }
- }
- }
- return _cookieVal.keywords || []
- };
- this.txtAutocomplete = function () {
- var lSemanticFind = "";
- var _me = this;
- $(this.options.inpAutoComplete).autocomplete_bold({
- source : function (request, response) {
- BRCore.Vacancy.AutocompleteSimple(request.term, _me.Filter(), function (pData) {
- _me.End_txtAutocomplete(pData, request, response)
- })
- }
- })
- };
- this.Filter = function () {
- var _me = this,
- _opts = _me.options,
- _retval = $(_opts.hdnFindVacancy).val(),
- _provincia = $(_opts.inpComboStates).val(),
- _scSU = webUI.Utils.SemanticURL,
- _searchOpts = [];
- _searchOpts.push({
- js_selector : "$Provincia$",
- value : [_provincia]
- });
- _retval = _scSU.getSemantic(_searchOpts, _retval);
- return _retval
- };
- this.End_txtAutocomplete = function (pData, request, response) {
- var _me = this,
- _opts = _me.options,
- lData = [],
- _$ctrl = $(this.options.inpAutoComplete),
- _requestTerm = webUI.Utils.Sanitizier(request.term),
- _aPrevMatch = $.grep(_me.aKeywords, function (el, i) {
- return webUI.Utils.Sanitizier(el).startsWith(_requestTerm)
- });
- if (_aPrevMatch.length) {
- for (var i = 0; i < _aPrevMatch.length; i++) {
- lData.push({
- label : _aPrevMatch[i],
- value : _aPrevMatch[i],
- cssClass : "prevSearch",
- option : _$ctrl
- });
- _aPrevMatch[i] = _me.scSntzr(_aPrevMatch[i])
- }
- }
- if (!BRCore.Utils.Errors.HasError(pData)) {
- for (var i = 0; i < pData.Data.length; i++) {
- if (-1 == $.inArray(_me.scSntzr(pData.Data[i].Text), _aPrevMatch)) {
- lData.push({
- label : pData.Data[i].Text,
- value : pData.Data[i].Text,
- option : _$ctrl
- })
- }
- }
- } else {
- console.error(pData.Errors)
- }
- response(lData)
- };
- this.txtComboStates = function () {
- var _me = this,
- _ph = "Todo o Brasil",
- _html,
- _class,
- _$bt,
- _browser = webUI.Utils.webBrowser.detect();
- _me.$inpCidadeOuEstado.combobox({
- appendTo : "#" + _me.options.inpComboStates.substr(1) + "_list",
- source : function (request, response) {
- var matcher = new RegExp("(?![^&;]+;)(?!<[^<>]*)(^" + $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "i");
- response($(_me.options.inpComboStates).children("option").map(function () {
- var text = $(this).text();
- if (!request.term || matcher.test(text)) {
- return {
- label : text.replace(matcher, "<b>$1</b>"),
- value : text,
- option : this
- }
- }
- }))
- }
- }).hide().next().find("input").addClass("span4").prop("placeholder", _ph).prop("type", "text").css("background-color", "white");
- _me.$inpCidadeOuEstado = _me.$inpCidadeOuEstado.combobox("option", "input")
- };
- function LoadPosition() {
- var locationUser = null,
- today = new Date();
- locationUser = localStorage.getItem(lsKey);
- if (locationUser) {
- locationUser = JSON.parse(locationUser);
- var MsDiff = today - new Date(locationUser.timestamp),
- diffDays = Math.round(MsDiff / 86400000);
- if (diffDays > DIFFERENCE_DAYS) {
- localStorage.removeItem(lsKey);
- locationUser = null
- }
- }
- if (!locationUser) {
- if (navigator && navigator.geolocation) {
- navigator.geolocation.getCurrentPosition(function (position) {
- LoadPosition_callback(position)
- }, null)
- }
- } else {
- if (locationUser.idlocation2 > 0) {
- SetState(locationUser.idlocation2)
- }
- }
- }
- function LoadPosition_callback(position) {
- var _Data = {
- Latitude : position.coords.latitude,
- Longitude : position.coords.longitude
- };
- BRCore.Vacancy.GetIdLocation2(_Data.Latitude, _Data.Longitude, function (pData) {
- SetState(pData.Data);
- _Data.idlocation2 = pData.Data;
- _Data.timestamp = new Date();
- localStorage.setItem(lsKey, JSON.stringify(_Data))
- })
- }
- function SetState(pIdLocation2) {
- var _$drpStates = $(me.options.inpComboStates),
- _val = _$drpStates.val(pIdLocation2).find(":selected").text();
- _$drpStates.combobox("option", "input").val(_val)
- }
- this.init(pSettings)
- };
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.ctrl = webUI.ctrl || {};
- webUI.ctrl.Company = webUI.ctrl.Company || {};
- webUI.ctrl.Company.CompanyLogosFade = function (b) {
- this.aLogos = [];
- this.ctAnims = 0;
- this.oCarousel = "";
- this.eofReached = false;
- this.idx = 0;
- this.$ulContainer = "";
- this.busy = 0;
- this.stop = 0;
- this.hInterval = 0;
- this.settings = {
- ulContainer : ".js_LogosSlider_div",
- LogosSlider_li : ".js_LogosSlider_li",
- rowActive : ".js_row .active",
- rowInactive : '.js_row:not(".active")',
- ulrowActive : ".js_row.active .js_LogosSlider_list",
- ulrowInactive : '.js_row:not(".active") .js_LogosSlider_list',
- btPrevSlide : ".js_LogosSlider_prev",
- btNextSlide : ".js_LogosSlider_next",
- tmplLogo : ".tmpl_logoSlider",
- logosAmount : 6,
- maxNumLogos : 0,
- interval : 0,
- maxAnims : 0,
- hoverSuffix : "",
- idProducts : []
- };
- this.options = {};
- this.tmplDirectives = {
- ".js_LogosSlider_li" : {
- "elem<-elems" : {
- "@idcompany" : "elem.Id",
- ".js_LogosSlider_a@href" : "elem.Url",
- ".js_LogosSlider_img@src" : function () {
- return ($("body").hasClass("homeV2")) ? this.Src : this.SrcTh
- },
- ".js_LogosSlider_img@alt" : "elem.Title",
- ".js_LogosSlider_img@title" : "elem.Title"
- }
- }
- };
- this.scHasError = "";
- this.scUtils = "";
- this.init = function (h) {
- var m = this,
- l = m.options = $.extend(m.settings, h),
- a,
- k = [],
- j;
- this.scUtils = webUI.ctrl.Utils;
- this.scHasError = BRCore.Utils.Errors.HasError;
- m.$ulContainer = $(m.options.ulContainer);
- if ($(m.options.LogosSlider_li).length) {
- this.aLogos = $(m.options.LogosSlider_li).map(function (c) {
- j = {
- Id : $(this).attr("idcompany"),
- Title : $(this).attr("title"),
- Src : $(this).find("img").attr("src"),
- SrcTh : $(this).find("img").attr("src").replace(/(\_.*?\.jpg)/i, "_th.jpg"),
- SrcThi : $(this).find("img").attr("src").replace(/(\_.*?\.jpg)/i, "_thi.jpg"),
- Url : $(this).find("a").attr("href")
- };
- j = ($.inArray(j.Id, k) > -1) ? null : j;
- if (j != null) {
- k.push(j.Id)
- } else {
- m.eofReached = true
- }
- return j
- }).get()
- }
- m.oCarousel = new webUI.Utils.FadeCarousel(h);
- m.BindEvents()
- };
- this.BindEvents = function () {
- var a = this,
- d = a.options;
- if (d.hoverSuffix) {
- $(document).on("mouseenter", d.ulContainer + " img", function (c) {
- a.OnMouseEnter_Logo(c)
- }).on("mouseleave", d.ulContainer + " img", function (c) {
- a.OnMouseLeave_Logo(c)
- })
- }
- a.oCarousel.OnClick_BtPrevSlide = function (c) {
- a.OnClick_BtPrevSlide(c)
- };
- a.oCarousel.OnClick_BtNextSlide = function (c) {
- a.OnClick_BtNextSlide(c)
- }
- };
- this.OnMouseEnter_Logo = function (e) {
- var a = $(e.target),
- f = a.attr("src");
- a.data("origSrc", f).attr("src", f.replace(/(\_.*?\.jpg)/i, this.options.hoverSuffix))
- };
- this.OnMouseLeave_Logo = function (d) {
- var a = $(d.target);
- a.attr("src", a.data("origSrc"))
- };
- this.setInterval = function () {
- var a = this,
- d = a.options;
- if (a.hInterval) {
- clearInterval(a.hInterval)
- }
- a.hInterval = setInterval(function () {
- if (a.stop) {
- clearInterval(a.hInterval)
- }
- a.animateLogos()
- }, d.interval)
- };
- this.OnClick_BtPrevSlide = function (d) {
- var a = this;
- d.preventDefault();
- if (!a.busy) {
- a.removeNotActive();
- a.renderLogos(a.GetLogosPage(1));
- a.setInterval();
- this.animateLogos()
- }
- };
- this.OnClick_BtNextSlide = function (d) {
- var a = this;
- d.preventDefault();
- a.setInterval();
- a.animateLogos()
- };
- this.animateLogos = function () {
- var a = this,
- d = a.options;
- if (document.hasFocus() && !a.busy) {
- a.oCarousel.anim(function () {
- a.removeNotActive();
- a.GetCompaniesLogos();
- if (d.maxAnims && ++a.ctAnims == d.maxAnims) {
- a.oCarousel.stopAnim();
- a.stop = 1
- }
- })
- }
- };
- this.removeNotActive = function () {
- var a = this.options;
- $(a.ulContainer + " " + a.ulrowInactive).children().remove()
- };
- this.GetCompaniesLogos = function (j, h, k) {
- var m = this,
- l = m.options,
- a;
- m.busy = 1;
- if (!m.eofReached) {
- m.aIDsRetrieved = j || $.map(m.aLogos, function (c) {
- return c.Id
- });
- a = h || l.logosAmount;
- l.idProducts = k || l.idProducts;
- BRCore.Company.GetCompaniesLogos(m.aIDsRetrieved, a, m.options.idProducts, function (c) {
- m.EndGetCompaniesLogos(c)
- })
- } else {
- m.renderLogos(m.GetLogosPage())
- }
- };
- this.EndGetCompaniesLogos = function (g) {
- var j = this,
- h = j.options,
- a = g.Data,
- k = g.Finder;
- if (!this.scHasError(g)) {
- if (a.length) {
- j.aLogos = j.aLogos.concat(a);
- if (j.options.maxNumLogos > 0 && j.aLogos.length > j.options.maxNumLogos) {
- j.aLogos.splice(0, a.length);
- j.idx -= (a.length);
- if (j.idx < 0) {
- j.idx = 0
- }
- }
- if (k && k.subtotal == k.total) {
- j.eofReached = true;
- console.log("eofLogosReached")
- }
- j.renderLogos(j.GetLogosPage());
- if (h.interval && !j.hInterval) {
- j.setInterval()
- }
- }
- }
- };
- this.renderLogos = function (g) {
- var j = this,
- k = $(j.options.LogosSlider_li).length == 0,
- a = {
- elems : g
- },
- h = j.options.ulContainer + " " + j.options.ulrowInactive;
- if (g.length > j.options.logosAmount) {
- g = g.slice(0, j.options.logosAmount)
- }
- webUI.Utils.CtrlTmpl.tmplHandle(this.options.tmplLogo, h, a, this.tmplDirectives, 1);
- if (k) {
- h = j.options.ulContainer + " " + j.options.ulrowActive;
- a = {
- elems : j.GetLogosPage()
- };
- if (a.elems.length > j.options.logosAmount) {
- a.elems = a.elems.slice(0, j.options.logosAmount)
- }
- webUI.Utils.CtrlTmpl.tmplHandle(this.options.tmplLogo, h, a, this.tmplDirectives, 1)
- }
- j.busy = 0
- };
- this.GetLogosPage = function (g) {
- var j = this,
- h = j.options,
- a,
- k;
- if (g) {
- j.idx = j.GetFirstVisibleIdx();
- j.idx -= h.logosAmount;
- if (j.idx < 0) {
- j.idx = j.aLogos.length - Math.abs(j.idx);
- a = j.aLogos.slice(j.idx, j.aLogos.length);
- k = h.logosAmount - (j.aLogos.length - j.idx);
- a = a.concat(j.aLogos.slice(0, k))
- } else {
- k = j.idx + h.logosAmount;
- a = j.aLogos.slice(j.idx, k)
- }
- } else {
- k = j.idx + h.logosAmount;
- if (k > j.aLogos.length) {
- a = j.aLogos.slice(j.idx, j.aLogos.length);
- k = h.logosAmount - (j.aLogos.length - j.idx);
- a = a.concat(j.aLogos.slice(0, k))
- } else {
- a = j.aLogos.slice(j.idx, k)
- }
- }
- j.idx = k;
- return a
- };
- this.GetFirstVisibleIdx = function () {
- var f = this.options,
- a = $(f.ulContainer + " " + f.ulrowActive).find("li:first").attr("idcompany");
- for (var e = 0; e < this.aLogos.length; e++) {
- if (a == this.aLogos[e].Id) {
- return e
- }
- }
- return -1
- };
- this.init(b)
- };
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.Utils = webUI.Utils || {};
- webUI.Utils.Courses = function (c) {
- this.oData = null;
- this.scTmpl = null;
- this.settings = {
- url : "",
- finder : "",
- container : null,
- configPosition : {
- intoGrid : false,
- gridSelector : null,
- row_divisor : null,
- position : 0
- },
- tmplID : null,
- autoGetCourses : 0,
- maxCourses : 9999
- };
- this.options = {};
- this.directive = {
- ".jsCourseBlock" : {
- "elem<-Data" : {
- ".@class+" : function (a) {
- return a.pos == 1 ? " middle" : ""
- },
- ".js_Logo_li@style" : function () {
- return this.center_logo ? "" : "display:none"
- },
- ".js_Logo_li" : function () {
- return this.center_logo ? '<img src="' + this.center_logo + '" style="cursor:pointer" onclick="window.open(\'' + this.url + "&ov=11')\" />" : ""
- },
- ".js_link_a" : function () {
- var a = this.name;
- if (a.length > 29) {
- a = a.substring(0, 30) + "..."
- }
- return a
- },
- ".js_link_a@title" : "elem.name",
- ".js_link_a@href" : function () {
- return (this.canusemodal) ? "javascript:void(0);" : this.url + "&ov=11"
- },
- ".js_link_a@target" : function () {
- return (this.canusemodal) ? "" : "_blank"
- },
- ".js_link_a@onclick" : function () {
- return (this.canusemodal) ? this.modal.replace("onclick=", "") : ""
- },
- ".js_loc1" : "elem.center_name",
- ".js_loc2" : function () {
- return this.price + " - " + this.ubication
- }
- }
- }
- };
- var d = '<div class="tmpls" style="display: none"> <ul class="tmplCourse"> <li class="span4 jsCourseBlock"> <ul class="cursoPopular"> <li class="js_Logo_li"></li> <li class="title"><a class="js_link_a" title="" href="#" target="#"></a></li> <li class="Centro js_loc1"></li> <li class="Consultar js_loc2"></li> </ul> </li> </ul> </div>';
- this.init = function (a) {
- var b = this;
- b.options = $.extend(b.settings, a || {});
- b.scTmpl = webUI.Utils.CtrlTmpl.tmplHandle;
- if (!$(".tmpls .tmplCourse").length) {
- $("body").append(d)
- }
- if (b.options.autoGetCourses) {
- b.GetCourses(b.options.finder)
- }
- };
- this.GetCourses = function (a) {
- var b = this;
- BRCore.Courses.GetCourses(a, b.options.url, function (f) {
- b.EndGetCourses(f)
- })
- };
- this.EndGetCourses = function (a) {
- var b = this;
- b.Render(a)
- };
- this.Render = function (a) {
- var m = this,
- l = m.options,
- o,
- k,
- n;
- if (l.configPosition.intoGrid) {
- k = l.container.substr(1);
- o = $("<div>").attr("id", k).addClass(k);
- n = $(l.selector).find(l.row_divisor).length;
- $(l.selector).find(l.row_divisor).eq(Math.min(l.positon, n)).after(o)
- }
- if ($(l.container).length && a && a.Data && a.Data.length) {
- a.Data = a.Data.splice(0, l.maxCourses);
- var b = m.directive;
- if (l.directive) {
- b = l.directive
- }
- m.scTmpl(l.tmplID, $(l.container), a, b);
- m.oData = a
- }
- };
- this.init(c)
- };
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.Utils = webUI.Utils || {};
- $(function () {
- if (parseFloat($.fn.jquery) < 1.9) {
- $.fn.on = $.fn.bind;
- $.fn.off = $.fn.unbind
- }
- var g = webUI.Utils,
- h = g.webBrowser.detect();
- if (h) {
- var e = ("MSIE" == h.name) ? "IE" : h.name,
- f = $("body").addClass("browser" + e + " browser" + e + h.version);
- if ("iOS" == h.platform) {
- f.addClass("browseriOS")
- }
- }
- g.LazyLoad.init();
- g.OriginVisit.init();
- if (jQuery().simplePlaceholder) {
- $(":text[placeholder],textarea[placeholder]").simplePlaceholder()
- }
- if ($(".js_linkTooltip:first").length) {
- g.setupTooltips()
- }
- g.Loading.init()
- });
- webUI.Utils.MaxLengthTextArea = function (j, k, l) {
- var h = $(j),
- m = h.val(),
- g = m.length;
- if (g > k) {
- h.val(m.substring(0, k));
- g = k
- }
- $(l).text(g)
- };
- webUI.Utils.Loading = {
- bodyNoScroll : 0,
- init : function () {
- var d,
- c;
- if ($("#fancybox-loading").length) {
- $('div[id="fancybox-loading"],div[id="fancybox-overlay"]').remove()
- }
- if (parseFloat($.fn.jquery) > 1.3) {
- d = $("<img>", {
- src : "/App_Theme/images/new/loadingNoText.gif"
- });
- c = $("<span>", {
- "class" : "fancybox-textLoading"
- });
- $("<div>", {
- id : "fancybox-loading",
- style : "display:none"
- }).append(d).append(c).appendTo("body");
- $("<div>", {
- id : "fancybox-overlay",
- style : "display:none"
- }).appendTo("body")
- } else {
- d = $('<img src="/App_Theme/images/new/loadingNoText.gif" />');
- c = $('<span class="fancybox-textLoading"></span>');
- $('<div id="fancybox-loading" style="display:none"></div>').append(d).append(c).appendTo("body");
- $('<div id="fancybox-overlay" style"display:none"></div>').appendTo("body")
- }
- },
- ShowLoading : function (f) {
- var e = $("#fancybox-loading"),
- d = f || "Carregando";
- e.show().find("span").text(d);
- this.ShowLoadingLayer()
- },
- ShowLoadingLayer : function (g) {
- var e = this,
- f = 0,
- h = function () {
- var a = $(document).height();
- if (f == a) {
- $("#fancybox-overlay").css("height", a)
- } else {
- f = a;
- setTimeout(h, 100)
- }
- };
- if (g) {
- e.bodyNoScroll = 1;
- $("body").css("overflow", "hidden")
- }
- $("#fancybox-overlay").show().css("height", $(window).height());
- h()
- },
- HideLoading : function () {
- $("#fancybox-overlay,#fancybox-loading").hide();
- if (this.bodyNoScroll) {
- $("body").css("overflow", "auto")
- }
- }
- };
- webUI.Utils.setupTooltips = function () {
- var g = this,
- h = ".js_linkTooltip",
- e = $(h),
- f = "";
- if (e.length) {
- e.hover(function (a) {
- var c = $(a.target),
- b;
- if (!c.hasClass(h.substr(1))) {
- c = c.closest(h)
- }
- b = c.attr("class");
- b = b.match(/\bjs_tooltip_show[^\b]*?\b/)[0].replace("show", "div");
- f = $("." + b);
- f.removeClass("hidden").show()
- }, function (a) {
- f.addClass("hidden").hide()
- })
- }
- };
- webUI.Utils.Popup = {
- zindex : 10600,
- oPopups : {},
- Center : function (l, k) {
- webUI.Utils.Loading.ShowLoadingLayer();
- var o = this,
- j = $(l),
- h = $(window),
- m = k || this.zindex,
- n = function () {
- var b = h.width() / 2 - j.outerWidth(true) / 2,
- a = h.height() / 2 - j.outerHeight(true) / 2;
- if (b < 0) {
- b = 0
- }
- if (a < 0) {
- a = 0
- }
- j.css({
- "z-index" : m,
- position : "fixed",
- left : b,
- top : a
- })
- };
- j.removeClass("hidden").show();
- n();
- setTimeout(n, 1);
- if (!this.oPopups[l]) {
- this.oPopups[l] = l;
- h.on("resize", function () {
- if (o.oPopups[l]) {
- if (j.is(":visible")) {
- o.Center(l)
- } else {
- delete o.oPopups[l]
- }
- }
- })
- }
- },
- Hide : function (b) {
- $(b).hide();
- webUI.Utils.Loading.HideLoading()
- }
- };
- webUI.Utils.MonthNames = {
- GetLong : function (b) {
- return ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"][b]
- },
- GetShort : function (b) {
- return ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"][b]
- }
- };
- String.prototype.startsWith = function (b) {
- return (this.match("^" + b) == b)
- };
- webUI.Utils.thousandsSeparator = function (b) {
- return Number(b).toLocaleString()
- };
- webUI.Utils.randomNumber = function (d, c) {
- d = d || 0;
- c = c || 9999999999;
- return Math.floor(Math.random() * c) + d
- };
- webUI.Utils.GetRegularExpEmail = function () {
- return /^([0-9a-zA-Z]+)([\.\-][0-9a-zA-Z]+|([\.]?[_\-]+)+[0-9a-zA-Z]*|([_\-]+[\.]?)+[0-9a-zA-Z]*)*[_\-]?@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4})(\]?)$/g
- };
- webUI.Utils.GetIdSelector = function (b) {
- return "#" + b.attr("id")
- };
- webUI.Utils.getScrollTop = function () {
- if (typeof pageYOffset != "undefined") {
- return pageYOffset
- } else {
- var d = document.body,
- c = document.documentElement;
- c = (c.clientHeight) ? c : d;
- return c.scrollTop
- }
- };
- webUI.Utils.URLSearch = {
- getJSON : function (m, l) {
- var q = {},
- k = [],
- p = m || document.location.search,
- j = p && "?" == p.charAt(0) ? 1 : 0;
- if (!p) {
- return q
- }
- p = p.substr(j);
- k = p.split("&");
- for (var n = 0, o; n < k.length; n++) {
- p = k[n].split("=");
- o = decodeURIComponent(p[0]);
- if (l) {
- o = o.toLowerCase()
- }
- q[o] = decodeURIComponent(p[1])
- }
- return q
- },
- getSearch : function (f) {
- var e = "",
- d = 0;
- if (!JSON) {
- return ""
- }
- return "?" + $.param(f).replace(/\+/g, "%20")
- },
- setSearchGetURL : function (k, j) {
- var l = j || document.location.href,
- m = "",
- h = {},
- g = l.indexOf("?");
- if (g != -1) {
- m = l.substr(g);
- l = l.substring(0, g)
- }
- h = this.getJSON(m);
- if (k) {
- $.extend(h, k)
- }
- return l + this.getSearch(h)
- }
- };
- webUI.Utils.CtrlTmpl = {
- tmplHandle : function (l, m, h, o, n, k) {
- var j = "string" == typeof l ? $(".tmpls " + l) : l;
- j = j.eq(0).clone();
- j = (o) ? j.render(h, o) : j.autoRender(h);
- if (n && $.trim($(m).html())) {
- $(m).empty()
- }
- if (parseFloat($.fn.jquery) > 1.3) {
- j = j.children().unwrap()
- }
- (k == "prepend") ? j.prependTo(m) : j.appendTo(m)
- }
- };
- webUI.Utils.webBrowser = {
- ua : navigator.userAgent,
- detect : function () {
- var f = "";
- if (-1 != this.ua.indexOf(" rv:11")) {
- f = {
- name : "MSIE",
- version : 11,
- platform : this.getPlatform()
- }
- } else {
- for (var e = 0, h = ["Chrome", "Safari", "Opera", "Firefox", "MSIE"], g = 0; !f && e < h.length; e++) {
- if ((g = this.ua.indexOf(h[e])) != -1) {
- f = {
- name : h[e],
- version : this.getVersion(h[e], g),
- platform : this.getPlatform()
- }
- }
- }
- }
- f.isMobile = (-1 != "Android_iOS_ipa".indexOf(f.platform) ? 1 : 0);
- webUI.Utils.Browser.set(f);
- return f
- },
- getVersion : function (d, c) {
- return parseInt(this.ua.substr((("Safari" == d) ? (this.ua.indexOf("Version/") + 8) : c + d.length + 1)), 10)
- },
- getPlatform : function () {
- if (this.ua.match(/android/i)) {
- return "Android"
- }
- if (this.ua.match(/iPod|iPhone/)) {
- return "iOS"
- }
- if (this.ua.match(/iPad/)) {
- return "ipa"
- }
- var b = navigator.platform;
- if (b) {
- return b.substring(0, 3)
- }
- return ""
- }
- };
- webUI.Utils.Browser = {
- IE : 0,
- IElt10 : 0,
- Firefox : 0,
- Safari : 0,
- Chrome : 0,
- Opera : 0,
- info : "",
- set : function (c) {
- if (!c) {
- return
- }
- var d = this;
- this.info = c;
- switch (c.name) {
- case "MSIE":
- d.IE = 1;
- d.IElt10 = (c.version < 10);
- break;
- case "Firefox":
- d.Firefox = 1;
- break;
- case "Safari":
- d.Safari = 1;
- break;
- case "Chrome":
- d.Chrome = 1;
- break;
- case "Opera":
- d.Opera = 1;
- break
- }
- return d
- },
- init : function () {
- return this.set(webUI.Utils.webBrowser.detect())
- }
- };
- webUI.Utils.LazyLoad = {
- toHandler : 0,
- init : function (c) {
- var d = this;
- this.run(c);
- if (!c) {
- $(window).bind("scroll", function () {
- d.ctrlExec()
- }).bind("resize", function () {
- d.ctrlExec()
- })
- }
- },
- ctrlExec : function () {
- var b = this;
- if (this.toHandler) {
- clearTimeout(this.toHandler)
- }
- this.toHandler = setTimeout(function () {
- b.run()
- }, 500)
- },
- run : function (pNotLazy) {
- var _me = this;
- setTimeout(function () {
- $("*[exec-js]").each(function () {
- if (pNotLazy || (!pNotLazy && webUI.Utils.getScrollTop() + 300 >= ($(this).offset().top - $(window).height()))) {
- eval($(this).attr("exec-js"));
- $(this).removeAttr("exec-js")
- }
- })
- }, 1000)
- }
- };
- webUI.Utils.ConverterSpecialChars = {
- convertpEnc2Char : function (c) {
- var d = this,
- c = Utf8.decode(c);
- c = c.replace(/((%[A-Fa-f0-9]{2})+)/g, function (b, a) {
- return d.convertpEsc2Char(a)
- }).replace(/([\+])+/g, " ");
- return c
- },
- convertpEsc2Char : function (j) {
- var k = "";
- var o = 0;
- var l = 0;
- var m = j.split("%");
- for (var n = 1; n < m.length; n++) {
- var b = parseInt(m[n], 16);
- switch (o) {
- case 0:
- if (0 <= b && b <= 127) {
- k += this.dec2char(b)
- } else {
- if (192 <= b && b <= 223) {
- o = 1;
- l = b & 31
- } else {
- if (224 <= b && b <= 239) {
- o = 2;
- l = b & 15
- } else {
- if (240 <= b && b <= 247) {
- o = 3;
- l = b & 7
- } else {
- k += "convertpEsc2Char: error " + this.dec2hex(b) + "! "
- }
- }
- }
- }
- break;
- case 1:
- if (b < 128 || b > 191) {
- k += "convertpEsc2Char: error " + this.dec2hex(b) + "! "
- }
- o--;
- k += this.dec2char((l << 6) | (b - 128));
- l = 0;
- break;
- case 2:
- case 3:
- if (b < 128 || b > 191) {
- k += "convertpEsc2Char: error " + this.dec2hex(b) + "! "
- }
- l = (l << 6) | (b - 128);
- o--;
- break
- }
- }
- return k
- },
- dec2char : function (d) {
- var c = "";
- if (d <= 65535) {
- c += String.fromCharCode(d)
- } else {
- if (d <= 1114111) {
- d -= 65536;
- c += String.fromCharCode(55296 | (d >> 10)) + String.fromCharCode(56320 | (d & 1023))
- } else {
- c += "dec2char error: Code point out of range: " + dec2hex(d)
- }
- }
- return c
- },
- dec2hex : function (b) {
- return (b + 0).toString(16).toUpperCase()
- }
- };
- webUI.Utils.browserCookies = {
- setCookie : function (p, l, j, o, k, n) {
- var m = new Date();
- m.setTime(m.getTime());
- if (j) {
- j = j * 1000 * 60 * 60 * 24
- }
- var q = new Date(m.getTime() + (j));
- document.cookie = p + "=" + l + ((j) ? ";expires=" + q.toGMTString() : "") + ((o) ? ";path=" + o : "") + ((k) ? ";domain=" + k : "") + ((n) ? ";secure" : "")
- },
- getCookie : function (d) {
- var c = document.cookie.split(d + "=");
- return (c.length == 2) ? unescape(c.pop().split(";").shift()) : ""
- },
- getCookiePreference : function (h) {
- var g = document.cookie.indexOf(h + "=");
- var e = g + h.length + 1;
- if ((!g) && (h != document.cookie.substring(0, h.length))) {
- return null
- }
- if (g == -1) {
- return null
- }
- var f = document.cookie.indexOf(";", e);
- if (f == -1) {
- f = document.cookie.length
- }
- return document.cookie.substring(e, f)
- },
- deleteCookie : function (d, f, e) {
- document.cookie = d + "=null;expires=Thu, 01-Jan-1970 00:00:01 GMT" + ((f) ? ";path=" + f : "") + ((e) ? ";domain=" + e : "")
- }
- };
- webUI.Utils.SearchHighlight = {
- kw : "",
- settings : {},
- run : function (c, d) {
- this.kw = $('[id$="txtKeyword"]').val();
- if (this.kw) {
- this.kw = decodeURIComponent(this.kw);
- this.settings = {
- exact : "exact",
- highlight : c || "",
- nohighlight : d,
- keys : this.kw
- };
- $(document).SearchHighlight(this.settings)
- }
- },
- inPopup : function (c) {
- if (this.kw) {
- var d = $.extend(this.settings, {
- highlight : c
- });
- $(c).SearchHighlight(d)
- }
- }
- };
- webUI.Utils.OriginVisit = {
- init : function () {
- var n = "",
- l = "",
- j = [],
- m,
- h = webUI.Utils.browserCookies,
- k = "";
- if (window.location.search != null) {
- l = window.location.search.substring(1);
- j = l.split("&");
- for (var o = 0; o < j.length; o++) {
- m = j[o].split("=");
- if (m[0].toLowerCase() == "origenvisita") {
- n = m[1]
- }
- if (m[0].toLowerCase() == "xtor") {
- k = m[1]
- }
- }
- }
- if (n != "") {
- if (h.getCookie("IdOriginVisit") != null) {
- h.deleteCookie("IdOriginVisit", "/", "infojobs.com.br")
- }
- h.setCookie("IdOriginVisit", n, 1, "/", "infojobs.com.br", "")
- }
- if (k != "") {
- if (h.getCookie("tidx") != null) {
- h.deleteCookie("tidx", "/", "infojobs.com.br")
- }
- h.setCookie("tidx", k, 1, "/", "infojobs.com.br", "")
- }
- }
- };
- webUI.Utils.Sanitizier = function (b) {
- return (!b) ? "" : jQuery.trim(b).toLowerCase().replace(/[àáäãâ]/g, "a").replace(/[èéëê]/g, "e").replace(/[ìíïî]/g, "i").replace(/[òóöõô]/g, "o").replace(/[ùúüû]/g, "u").replace(/[ç]/g, "c").replace(/[ñ]/g, "n")
- };
- var Utf8 = {
- encode : function (h) {
- h = h.replace(/\r\n/g, "\n");
- var g = "";
- for (var c = 0; c < h.length; c++) {
- var f = h.charCodeAt(c);
- if (f < 128) {
- g += String.fromCharCode(f)
- } else {
- if ((f > 127) && (f < 2048)) {
- g += String.fromCharCode((f >> 6) | 192);
- g += String.fromCharCode((f & 63) | 128)
- } else {
- g += String.fromCharCode((f >> 12) | 224);
- g += String.fromCharCode(((f >> 6) & 63) | 128);
- g += String.fromCharCode((f & 63) | 128)
- }
- }
- }
- return g
- },
- decode : function (j) {
- var k = "";
- var l = 0;
- var h = 0;
- var c = 0;
- var m = 0;
- while (l < j.length) {
- h = j.charCodeAt(l);
- if (h < 128) {
- k += String.fromCharCode(h);
- l++
- } else {
- if ((h > 191) && (h < 224)) {
- m = j.charCodeAt(l + 1);
- k += String.fromCharCode(((h & 31) << 6) | (m & 63));
- l += 2
- } else {
- m = j.charCodeAt(l + 1);
- c3 = j.charCodeAt(l + 2);
- k += String.fromCharCode(((h & 15) << 12) | ((m & 63) << 6) | (c3 & 63));
- l += 3
- }
- }
- }
- return k
- }
- };
- if (!Date.prototype.toISOString) {
- (function () {
- function b(a) {
- if (a < 10) {
- return "0" + a
- }
- return a
- }
- Date.prototype.toISOString = function () {
- return this.getUTCFullYear() + "-" + b(this.getUTCMonth() + 1) + "-" + b(this.getUTCDate()) + "T" + b(this.getUTCHours()) + ":" + b(this.getUTCMinutes()) + ":" + b(this.getUTCSeconds()) + "." + (this.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + "Z"
- }
- }
- ())
- }
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.Utils = webUI.Utils || {};
- webUI.Utils.FadeCarousel = function (c, d) {
- this.$ulContainer = "";
- this.hInterval = 0;
- this.stop = 0;
- this.settings = {
- ulContainer : "",
- btPrevSlide : "",
- btNextSlide : "",
- endReachedFunc : "",
- interval : 0
- };
- this.options = {};
- this.init = function (a, b) {
- var h = this,
- g = h.options = $.extend({}, h.settings, a);
- h.$ulContainer = $(g.ulContainer);
- h.bindEvents();
- if (g.endReachedFunc) {
- h.computeNumItems()
- }
- if (b) {
- setTimeout(function () {
- h.setLoop()
- }, 1000)
- }
- };
- this.bindEvents = function () {
- var b = this,
- a = b.options;
- b.$ulContainer.hover(function () {
- b.stopAnim()
- }, function () {
- b.resumeAnim()
- });
- $(a.btNextSlide).on("click", function (e) {
- b.OnClick_BtNextSlide(e)
- });
- $(a.btPrevSlide).on("click", function (e) {
- b.OnClick_BtPrevSlide(e)
- })
- };
- this.setLoop = function (a, b) {
- var f = this;
- if (f.hInterval) {
- clearInterval(f.hInterval)
- }
- f.hInterval = setInterval(function () {
- f.anim()
- }, f.options.interval)
- };
- this.stopAnim = function () {
- this.stop = 1
- };
- this.resumeAnim = function () {
- this.stop = 0
- };
- this.anim = function (a) {
- if (this.stop) {
- return
- }
- var f = this.$ulContainer.find(".js_row.active"),
- b = f.next().length ? f.next() : f.prev();
- f.fadeOut("normal", function () {
- f.css("z-index", 1).removeClass("active");
- b.addClass("active").fadeIn("normal");
- if (a != null) {
- a()
- }
- })
- };
- this.OnClick_BtPrevSlide = function (a) {
- if (a) {
- a.preventDefault()
- }
- };
- this.OnClick_BtNextSlide = function (a) {
- if (a) {
- a.preventDefault()
- }
- };
- this.computeNumItems = function (a) {};
- this.ctrlCounter = function (a) {};
- this.init(c, d)
- };
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.Utils = webUI.Utils || {};
- webUI.Utils.FadeSlides = function (c, d) {
- this.handlerInterval = 0;
- this.pause = 0;
- this.childrenTag = "";
- this.busy = 0;
- this.idx = 0;
- this.settings = {
- divContainer : "",
- btPrevSlide : "",
- btNextSlide : "",
- divIndicators : "",
- divIndTagName : "",
- divIndShowNum : false,
- interval : 4000,
- speed : 1000,
- direction : 0
- };
- this.options = {};
- this.init = function (a, b) {
- var j = this,
- h = j.options = $.extend({}, this.settings, a),
- k = $(h.divContainer);
- j.childrenTag = k.css("visibility", "hidden").children(":first").prop("nodeName").toLowerCase();
- k.children().hide();
- if (h.divIndicators) {
- this.generateIndicators()
- }
- if (b) {
- this.run()
- }
- if (!k.is(":visible")) {
- return
- }
- };
- this.generateIndicators = function () {
- var b = this,
- h = $(this.options.divIndicators).empty(),
- g,
- a = "<" + this.options.divIndTagName + ">";
- $(b.options.divContainer).children().each(function (e) {
- g = $(a).attr("data-idx", e);
- if ("<a>" == a) {
- g.attr("href", "#")
- }
- if (b.options.divIndShowNum) {
- g.text(e + 1)
- }
- if (e == b.idx) {
- g.addClass("active")
- }
- h.append(g).append(" ")
- });
- b.bindIndicatorsClicks()
- };
- this.run = function () {
- var b = this,
- a = b.options,
- f = $(a.divContainer);
- setTimeout(function () {
- $(a.divContainer).children().show().end().css("visibility", "visible").hide().fadeIn("slow");
- b.bindEvents()
- }, 500);
- b.bindInterval()
- };
- this.bindEvents = function () {
- var f = this,
- b = f.options,
- a = f.options.divContainer;
- if (b.btPrevSlide) {
- a += "," + b.btPrevSlide
- }
- if (b.btNextSlide) {
- a += "," + b.btNextSlide
- }
- if (b.divIndicators) {
- a += "," + b.divIndicators
- }
- $(a).on({
- mouseover : function () {
- f.pause = 1
- },
- mouseout : function () {
- f.pause = 0
- }
- });
- $(b.btNextSlide).on("click", function (e) {
- f.clickOnNext(e)
- });
- $(b.btPrevSlide).on("click", function (e) {
- f.clickOnPrev(e)
- })
- };
- this.bindIndicatorsClicks = function () {
- var a = this;
- $(a.options.divIndicators).children().on("click", function (b) {
- a.clickOnIndicator(b)
- })
- };
- this.clickOnIndicator = function (a) {
- if (a) {
- a.preventDefault
- }
- var e = $(a.target),
- b = e.attr("data-idx");
- this.anotherSlide("", b)
- };
- this.clickOnNext = function (a) {
- if (a) {
- a.preventDefault
- }
- this.anotherSlide(0)
- };
- this.clickOnPrev = function (a) {
- if (a) {
- a.preventDefault
- }
- this.anotherSlide(1)
- };
- this.anotherSlide = function (b, a) {
- var f = this;
- if (!f.busy) {
- clearInterval(f.handlerInterval);
- f.doAnimation(b, a);
- $(f.ulContainer).promise().done(function () {
- f.bindInterval()
- })
- }
- };
- this.bindInterval = function () {
- var a = this;
- a.handlerInterval = setInterval(function () {
- if (!a.pause) {
- a.doAnimation()
- }
- }, a.options.interval)
- };
- this.doAnimation = function (b, a) {
- var m = this,
- l = m.options,
- o = b || l.direction;
- if (2 == o) {
- return
- }
- this.busy = 1;
- var p = $(l.divContainer + " .active"),
- q;
- if (a) {
- if (a == p.index()) {
- return
- } else {
- q = $(l.divContainer).children().eq(a)
- }
- } else {
- var n = l.divContainer + " " + this.childrenTag,
- q = (!o) ? ((p.next().length) ? p.next() : $(n + ":first")) : ((p.prev().length) ? p.prev() : $(n + ":last"))
- }
- m.idx = q.css("z-index", 2).index();
- if (l.divIndicators) {
- m.generateIndicators()
- }
- p.fadeOut(l.speed, function () {
- p.css("z-index", 1).show().removeClass("active");
- q.css("z-index", 3).addClass("active");
- m.busy = 0
- })
- };
- this.init(c, d)
- };
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.Utils = webUI.Utils || {};
- webUI.Utils.SemanticURL = {
- url_base : "",
- getURL : function (n, m, l) {
- if (!n || !n.length) {
- n = []
- }
- var r = m || this.url_base,
- s = [];
- for (var q = 0, o = n, k = ""; q < o.length; q++) {
- s.push(o[q].key + "=" + (isNaN(parseInt(o[q].val, 10)) ? this.removeSpecialChars(o[q].val) : o[q].val))
- }
- r += l;
- if (s.length) {
- r += "?"
- }
- for (var q = 0, p = s.length; q < p; q++) {
- if (q) {
- r += "&"
- }
- r += s[q]
- }
- return r
- },
- getURLNoFinder : function (o, n, m) {
- if (!o || !o.length) {
- o = []
- }
- var j = n || this.url_base,
- k = [];
- for (var q = 0, p = o, l = ""; q < p.length; q++) {
- if (p[q].semantic) {
- l = (1 == p[q].semantic) ? p[q].val : p[q].semantic;
- if (p[q].key == "Palabra") {
- j += "-de-" + l
- } else {
- if (p[q].key == "Provincia") {
- j += "-em-" + l
- } else {
- j += "-" + l
- }
- }
- }
- k.push(encodeURI(p[q].key + "=" + p[q].val))
- }
- j += m;
- return encodeURI(j)
- },
- getInEnglishAlphabet : function (j) {
- if (!j || !j.length) {
- return ""
- }
- j = j.replace(/^\s+|\s+$/g, "").toLowerCase();
- var g = "ãàáäâèéëêìíïîòóöôùúüûñç·/_,:;",
- h = "aaaaaeeeeiiiioooouuuunc------";
- for (var f = 0, k = g.length; f < k; f++) {
- j = j.replace(new RegExp(g.charAt(f), "g"), h.charAt(f))
- }
- return j.replace(/[^a-z0-9 -]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-")
- },
- removeSpecialChars : function (g) {
- var f = "$·&¡!,/\"'";
- for (var e = 0, h = f.length; e < h; e++) {
- g = g.replace(new RegExp(f.charAt(e), "g"), " ")
- }
- g = g.replace(/[?]/g, " ").replace(/^\s+/g, "").replace(/\s+$/g, "").replace(/\s+/g, " ");
- return encodeURI(g)
- },
- getItem : function (e, g, h) {
- var f = {
- key : e,
- val : g
- };
- if (h) {
- f.semantic = h
- }
- return f
- },
- getSemantic : function (e, h) {
- var g = h;
- for (var f = 0; f < e.length; f++) {
- g = g.replace(e[f].js_selector, ((e[f].js_selector) ? e[f].value.toString() : ""))
- }
- g = g.replace(/\$[^\$]+\$/g, "");
- return g.toString()
- }
- };
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.Utils = webUI.Utils || {};
- var lblErrorNoFloat = 0;
- webUI.Utils.Validation = {
- NoTooltipLeft : 0,
- FirstExec : 1,
- LastErrorControl : null,
- validateNoFocus : 0,
- NoValidate : function () {
- var b = document.getElementById("aspnetForm");
- b.onsubmit = ""
- },
- Validate : function (m, n, l) {
- webUI.Utils.Validation.LastErrorControl = null;
- var h = webUI.Utils.webBrowser.detect();
- var o = true;
- var k = "";
- if ($(".mAlert").length) {
- $(".mAlert").addClass("hidden")
- }
- if ($(".error").length) {
- $(".error").removeClass("error")
- }
- if ($(".merror").length) {
- $(".merror").addClass("hidden")
- }
- if ($(".mError").length) {
- $(".mError").addClass("hidden")
- }
- $(m).find("[ctrlerror]").reverse().each(function () {
- k = $(this)["0"].value;
- if ($(this).parent().css("display") != "none") {
- if (!ValidateField($(this))) {
- o = false
- }
- } else {
- if ($(this).parent().css("display") == "none") {
- $(this).val("");
- if (!IsHiddenControl($(this))) {
- $(this)["0"].value = k
- }
- }
- }
- });
- var j = webUI.Utils.Validation.LastErrorControl;
- if (j && j.length) {
- showTooltip(j, $("#" + j.attr("CtrlError")));
- if (!l) {
- j.focus()
- }
- }
- if (!o && n) {
- alert(n)
- }
- return o
- },
- ShowTooltip : function (d, c) {
- showTooltip(d, c)
- },
- ShowTooltipError : function (f, g, e, h) {
- ShowError(f, g, e, h)
- }
- };
- function ValidateSection(l, m, n, o) {
- var p = true,
- k = "";
- webUI.Utils.Validation.LastErrorControl = "";
- l = l || "form";
- if (!n) {
- n = "input:visible,input[type=password]:visible,textarea:visible,select:visible"
- }
- if (!o) {
- $("form").find("div.divEnviando").attr("style", "display:block");
- $("form").find("input.buttonDisbl").attr("style", "display:none")
- }
- if ($(".mAlert").length > 0) {
- $(".mAlert").addClass("hidden")
- }
- if ($(l).find(".error").length > 0) {
- $(l).find(".error").removeClass("error")
- }
- if ($(l).find(".mError").length > 0) {
- $(l).find(".mError").addClass("hidden")
- }
- if ($(l).find(".merror").length > 0) {
- if ($(l).find(".merrorsmall").length > 0) {
- $(l).find(".merrorsmall").removeClass("merrorsmall")
- }
- $(l).find(".merror").addClass("hidden")
- }
- var s = "",
- q = "",
- r = [];
- $(l).find(n).reverse().each(function () {
- s = $(this);
- if (s.prop("disabled")) {
- return true
- }
- if (s.attr("type") == "radio") {
- var a = s.closest("[ctrlerror]");
- if (a.length) {
- q = a.attr("ctrlerror");
- if (-1 == $.inArray(q, r)) {
- r.push(q);
- if (!$(':radio[name="' + s.attr("name") + '"]:checked').length) {
- $("#" + q).text(a.attr("rfverrormessage")).removeClass("hidden").addClass("error");
- p = false
- } else {
- $("#" + q).addClass("hidden")
- }
- }
- }
- } else {
- k = s["0"].value;
- if (s.parent().css("display") != "none") {
- if (!ValidateField(s)) {
- p = false
- }
- } else {
- if (s.parent().css("display") == "none") {
- s.val("");
- if (!IsHiddenControl(s)) {
- s["0"].value = k
- }
- }
- }
- }
- });
- if (!p) {
- if (m) {
- alert(m)
- }
- if (!o) {
- $("form").find("div.divEnviando,input.buttonDisbl").removeAttr("style")
- }
- s = webUI.Utils.Validation.LastErrorControl;
- if (s) {
- s.focus();
- showTooltipError(s)
- }
- }
- return p
- }
- function ltrim(b) {
- return b.replace(/^\s+/, "")
- }
- function rtrim(b) {
- return b.replace(/\s+$/, "")
- }
- function trim(b) {
- return rtrim(ltrim(b))
- }
- function ValidateField(e, f) {
- var d = true;
- webUI.Utils.Validation.validateNoFocus = f;
- d = NonValidCharacters(e);
- if (d) {
- d = SpecificValidator(e)
- }
- if (d) {
- d = RequiredFieldValidator(e)
- }
- if (d) {
- d = DependantFieldValidator(e)
- }
- if (d) {
- d = RegularExpressionValidator(e)
- }
- if (d) {
- d = CompareValidator(e)
- }
- if (d) {
- d = RangeValidator(e)
- }
- if (d) {
- d = LengthValidator(e)
- }
- webUI.Utils.Validation.validateNoFocus = 0;
- return d
- }
- var regexNotAllowSpecial = /[^A-Za-z\s\dçÇ\-\+\,\.\(\)&'áàéèíìóòúùäëïöüãõâêîôû]/gi;
- function NonValidCharacters(f) {
- var e = true;
- if ((f.is("input[type=text]") || f.is("textarea") || f.is("input[type=password]")) && f.val() != null && f.val() != "") {
- e = SanitizeCarryReturn(f);
- var g = trim(f.val());
- if ((!f.attr("revRegExp") && !f.attr("svSpecificFunction")) && g != "" && (f.attr("type") == "text" || f[0].type == "textarea" || f[0].type == "password")) {
- if (!f.attr("nvcErrorMessage")) {
- if (!f.attr("nvcAllowSpecial")) {
- g = g.replace(regexNotAllowSpecial, "")
- }
- if (!f.attr("nvcAllowCPF")) {
- g = g.replace(/[0-9]{3}\.[0-9]{3}\.[0-9]{3}\-[0-9]{2}/g, "")
- }
- if (!f.attr("nvcAllowCNPJ")) {
- g = g.replace(/[0-9]{2}\.[0-9]{3}\.[0-9]{3}\/[0-9]{4}\-[0-9]{2}/g, "")
- }
- if (!f.attr("nvcAllowEmail")) {
- g = g.replace(/^([0-9a-zA-Z]+)([\.\-][0-9a-zA-Z]+|([\.]?[_\-]+)+[0-9a-zA-Z]*|([_\-]+[\.]?)+[0-9a-zA-Z]*)*[_\-]?@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4})(\]?)$/g, "")
- }
- if (!f.attr("nvcAllowUrl")) {
- g = g.replace(/(((ht|f)tp(s?)|(HT|F)TP(S?))\:\/\/)?([a-zA-Z]+\.)(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9}\S*/g, "")
- }
- if (!f.attr("nvcAllowPhone")) {
- g = g.replace(/([\d]{1,})([\d+\-\(\)\.]){6,20}/g, "")
- }
- if (!f.attr("nvcAllowBreakLine")) {
- g = g.replace(/\n/g, "")
- }
- g = g.replace(/\u0001/g, "");
- g = g.replace(/(\<\/.*\>)/g, "");
- g = g.replace(/(\<.*\>)/g, "")
- } else {
- var h;
- if (e && !f.attr("nvcAllowSpecial")) {
- h = new RegExp(regexNotAllowSpecial);
- e = !g.match(h)
- }
- if (e && !f.attr("nvcAllowCPF")) {
- h = new RegExp(/[0-9]{3}\.[0-9]{3}\.[0-9]{3}\-[0-9]{2}/g);
- e = !g.match(h)
- }
- if (e && !f.attr("nvcAllowCNPJ")) {
- h = new RegExp(/[0-9]{2}\.[0-9]{3}\.[0-9]{3}\/[0-9]{4}\-[0-9]{2}/g);
- e = !g.match(h)
- }
- if (e && !f.attr("nvcAllowEmail")) {
- h = new RegExp(/^([0-9a-zA-Z]+)([\.\-][0-9a-zA-Z]+|([\.]?[_\-]+)+[0-9a-zA-Z]*|([_\-]+[\.]?)+[0-9a-zA-Z]*)*[_\-]?@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4})(\]?)$/g);
- e = !g.match(h)
- }
- if (e && !f.attr("nvcAllowUrl")) {
- h = new RegExp(/(((ht|f)tp(s?)|(HT|F)TP(S?))\:\/\/)?([a-zA-Z]+\.)(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9}\S*/g);
- e = !g.match(h)
- }
- if (e && !f.attr("nvcAllowPhone")) {
- h = new RegExp(/([\d]{1,})([\d+\-\(\)\.]){6,20}/g);
- e = !g.match(h)
- }
- if (!f.attr("nvcAllowBreakLine")) {
- h = new RegExp(/\n/g);
- e = !g.match(h)
- }
- g = g.replace(/\u0001/g, "");
- g = g.replace(/(\<\/.*\>)/g, "");
- g = g.replace(/(\<.*\>)/g, "");
- ShowError(f, !e, f.attr("ctrlError"), f.attr("nvcErrorMessage"))
- }
- }
- if (f.attr("type") == "file") {
- f.text(g)
- } else {
- f.val(g)
- }
- }
- return e
- }
- function RequiredFieldValidator(e) {
- var f = false;
- if (e.attr("rfvRequired")) {
- if (e.attr("rfvGroupType")) {
- $(e).find(e.attr("rfvGroupType")).each(function () {
- if ($(this).parent().attr("type") == "select-multiple") {
- if (!f && $(this).attr("selected")) {
- f = true
- }
- } else {
- if ($(this).attr("type") == "checkbox" || $(this).attr("type") == "radio") {
- if (!f) {
- f = $(this).is(":checked")
- }
- } else {
- if (!f && $(this).val() != "") {
- f = true
- }
- }
- }
- })
- } else {
- if (e.attr("type") == "checkbox") {
- if (e.is(":checked")) {
- f = true
- }
- } else {
- if (e.prop("nodeName") == "INPUT" && e.val() && -1 != e.val().toLowerCase().indexOf("selecione")) {
- f = false
- } else {
- var d = e.attr("rfvInitValue") ? e.attr("rfvInitValue") : "";
- if (e.val() != d && e.val() != "") {
- f = true
- }
- }
- }
- }
- } else {
- f = true
- }
- ShowError(e, !f, e.attr("ctrlError"), e.attr("rfvErrorMessage"));
- return f
- }
- function RegularExpressionValidator(f) {
- var k = false;
- if (f.attr("revRegExp") && f.val() != "") {
- var g = f.attr("revRegExp");
- var j = new RegExp(g);
- var h = f.val();
- h = h.replace(/\n/g, " ");
- h = h.replace(/\u0001/g, " ");
- if (h.match(j)) {
- k = true;
- if (g == "^([0-9]){5}-([0-9]){3}$|^([0-9]){8}$") {
- var j = new RegExp("^([0-9]){8}$");
- if (h.match(j)) {
- h = h.substring(0, 5) + "-" + h.substr(5);
- f.val(h)
- }
- }
- }
- } else {
- k = true
- }
- ShowError(f, !k, f.attr("ctrlError"), f.attr("revErrorMessage"));
- return k
- }
- function CompareValidator(h) {
- var m = true;
- if ((h.attr("cvValueToCompare") || h.attr("cvControlToCompare")) && h.attr("cvOperator") && h.val() != "") {
- var j = trim(h.attr("cvValueToCompare") ? h.attr("cvValueToCompare").toLowerCase() : $("#" + h.attr("cvControlToCompare")).val().toLowerCase());
- var k = h.val().toLowerCase();
- var g = h.attr("cvIncrement") ? h.attr("cvIncrement").toLowerCase() : 0;
- var l = h.attr("cvOperator").toLowerCase();
- if (h.attr("cvType") == "date") {
- if (g > 0) {
- String.prototype.fechaMMDDAAAA = function () {
- return this.replace(/^(\d{2})\/(\d{2})\/(\d{4})$/, "$2/$1/$3")
- };
- f2 = new Date(j.fechaMMDDAAAA());
- NumberOfMonths = g / 60 / 24 / 30;
- j = GetFormatNumer(f2.getDate()) + "/" + GetFormatNumer((f2.getMonth() + NumberOfMonths + 1)) + "/" + f2.getFullYear()
- }
- m = ValidDates(k, j, h.attr("cvOperator").toLowerCase())
- } else {
- if (h.attr("cvType") == "text") {
- switch (h.attr("cvoperator").toLowerCase()) {
- case "!=":
- if (k == j) {
- m = false
- }
- break
- }
- } else {
- if (h.attr("cvType") == "hour") {
- var m = true;
- String.prototype.horaHHmm = function () {
- return this.replace(/^(\d{2}):(\d{2})$/, "$1$2")
- };
- h1 = k.horaHHmm();
- h2 = j.horaHHmm();
- switch (h.attr("cvoperator").toLowerCase()) {
- case ">":
- m = (parseInt(h1, 10) > parseInt(h2, 10));
- break;
- case "<":
- m = (parseInt(h1, 10) < parseInt(h2, 10));
- break;
- case "=":
- if (isNaN(Number(h1)) && isNaN(Number(h2))) {
- m = h1 == h2
- } else {
- m = (parseInt(h1, 10) == parseInt(h2, 10))
- }
- break;
- case "!":
- m = h1 != j;
- break;
- case ">=":
- m = (parseInt(h1, 10) >= parseInt(h2, 10));
- break;
- case "<=":
- m = (parseInt(h1, 10) <= parseInt(h2, 10));
- break;
- case "in":
- m = !(h1.indexOf(h2) >= 0);
- break
- }
- } else {
- if (g > 0) {
- j += g
- }
- switch (h.attr("cvoperator").toLowerCase()) {
- case ">":
- m = (parseInt(k, 10) > parseInt(j, 10));
- break;
- case "<":
- m = (parseInt(k, 10) < parseInt(j, 10));
- break;
- case "=":
- if (isNaN(Number(k)) && isNaN(Number(j))) {
- m = k == j
- } else {
- m = (parseInt(k, 10) == parseInt(j, 10))
- }
- break;
- case "!":
- m = k != j;
- break;
- case ">=":
- m = (parseInt(k, 10) >= parseInt(j, 10));
- break;
- case "<=":
- m = (parseInt(k, 10) <= parseInt(j, 10));
- break;
- case "in":
- m = !(k.indexOf(j) >= 0);
- break;
- case "asword":
- m = !(k.indexOf(" " + j) >= 0);
- break
- }
- }
- }
- }
- }
- ShowError(h, !m, h.attr("ctrlError"), h.attr("cvErrorMessage"));
- return m
- }
- function RangeValidator(d) {
- var c = true;
- if (d.attr("rvMinValue") && d.attr("rvMaxValue") && d.val() != "") {
- if (d.attr("rvInclusive") || d.attr("rvInclusive") == "true") {
- if (d.attr("rvType") == "date") {
- c = ValidDates(d.attr("rvMinValue"), d.val(), "<=")
- } else {
- c = (parseInt(d.val(), 10) >= parseInt(d.attr("rvMinValue"), 10)) && (parseInt(d.val(), 10) <= parseInt(d.attr("rvMaxValue"), 10))
- }
- } else {
- if (d.attr("rvType") == "date") {
- c = ValidDates(d.attr("rvMinValue"), d.val(), "<")
- } else {
- c = (parseInt(d.val(), 10) > parseInt(d.attr("rvMinValue"), 10)) && (parseInt(d.val(), 10) < parseInt(d.attr("rvMaxValue"), 10))
- }
- }
- }
- ShowError(d, !c, d.attr("ctrlError"), d.attr("rvErrorMessage"));
- return c
- }
- function LengthValidator(d) {
- var c = true;
- if (d.attr("lvLengthValue") && d.val() != "") {
- c = (parseInt(d.val().length, 10)) <= parseInt(d.attr("lvLengthValue"), 10)
- }
- if (d.attr("lvLengthValueMin") && d.val() != "") {
- c = (parseInt(d.val().length, 10)) >= parseInt(d.attr("lvLengthValueMin"), 10)
- }
- ShowError(d, !c, d.attr("ctrlError"), d.attr("lvErrorMessage"));
- return c
- }
- function LengthCleaner(g, h) {
- var e = $(g),
- f = (h.charAt(0) == ".") ? $(h) : $("#" + h);
- if ((parseInt(e.val().length, 10)) <= parseInt(e.attr("lvLengthValue"), 10)) {
- if (f.length) {
- f.text((parseInt(e.attr("lvLengthValue"), 10) - e.val().length).toString())
- }
- return true
- } else {
- e.val(e.val().substring(0, parseInt(e.attr("lvLengthValue"), 10)));
- if (f.length) {
- $(f).text((parseInt(e.attr("lvLengthValue"), 10) - e.value.length).toString())
- }
- return false
- }
- }
- function SpecificValidator(ctrl) {
- var IsValid = true;
- var InitialSvErrorMessage = ctrl.attr("svErrorMessage");
- if (ctrl.attr("svSpecificFunction") && ctrl.val() != "") {
- for (var i in ctrl.attr("svSpecificFunction").split("|")) {
- if (IsValid) {
- if (ctrl.attr("svExtraParams") && ctrl.attr("svExtraParams").split("|")[i] != "") {
- eval("IsValid = " + ctrl.attr("svSpecificFunction").split("|")[i] + "(ctrl, " + ctrl.attr("svExtraParams").split("|")[i] + ");")
- } else {
- eval("IsValid = " + ctrl.attr("svSpecificFunction").split("|")[i] + "(ctrl);")
- }
- ShowError(ctrl, !IsValid, ctrl.attr("ctrlError"), ctrl.attr("svErrorMessage").split("|")[i]);
- ctrl.attr("svErrorMessage", InitialSvErrorMessage);
- if (!IsValid) {
- return IsValid
- }
- }
- }
- }
- ShowError(ctrl, !IsValid, ctrl.attr("ctrlError"), ctrl.attr("svErrorMessage"));
- return IsValid
- }
- function DependantFieldValidator(d) {
- var c = true;
- if (d.attr("dvDepends")) {
- if (($("#" + d.attr("dvdepends")).val() != "" && d.val() != "") || ($("#" + d.attr("dvDepends")).val() == "" && d.val() == "")) {
- c = c
- }
- if (($("#" + d.attr("dvDepends")).val() == "" && d.val() != "")) {
- c = !c
- }
- }
- ShowError(d, !c, d.attr("ctrlError"), d.attr("dvErrorMessage"));
- return c
- }
- function ValidDates(h, g, j) {
- var k = true;
- String.prototype.fechaDDMMAAAA = function () {
- return this.replace(/^(\d{2})\/(\d{2})\/(\d{4})$/, "$2/$1/$3")
- };
- String.prototype.fechaMMDDAAAA = function () {
- return this.replace(/^(\d{2})\/(\d{2})\/(\d{4})$/, "$2/$1/$3")
- };
- var m = h;
- var l = g;
- f1 = new Date(m.fechaMMDDAAAA());
- f2 = new Date(l.fechaMMDDAAAA());
- switch (j) {
- case ">":
- k = f1 > f2;
- break;
- case "<":
- k = f1 < f2;
- break;
- case "=":
- k = f1 = f2;
- break;
- case "!":
- k = f1 != f2;
- break;
- case ">=":
- k = f1 >= f2;
- break;
- case "<=":
- k = f1 <= f2;
- break
- }
- return k
- }
- function ShowError(f, h, k, j) {
- var g;
- if ("input" == f.get(0).nodeName.toLowerCase() && "hidden" == f.attr("type")) {
- return
- }
- if (f && $(f).attr("ctrlError") && $("#" + $(f).attr("ctrlError")).length == 0) {
- $(f).after("<div id='" + $(f).attr("ctrlError") + "' class='merror hidden alert alert-error'></div>")
- }
- g = $("#" + $(f).attr("ctrlError"));
- if ("select" == f.get(0).nodeName.toLowerCase() && f.data("uiCombobox") != null) {
- f = f.combobox("option").input;
- if (f.length) {
- f.attr("ctrlerror", k);
- $("#" + k).insertAfter(f)
- }
- }
- if (h && j != "") {
- g.html("<span>" + j + "</span><span class='arrow'></span>").removeClass("hidden");
- if (-1 == "INPUT_TEXTAREA_SELECT_UL".indexOf(f.prop("tagName"))) {
- f = f.prev()
- }
- f.addClass("error");
- if (f.attr("type") == "hidden" && f.attr("CtrlFocus")) {
- f = $("#" + f.attr("CtrlFocus"))
- }
- if (typeof(f.attr("onblur")) == "undefined") {
- if (!f.attr("disabled")) {
- webUI.Utils.Validation.LastErrorControl = f
- }
- }
- attachTooltip(f, g)
- } else {
- if (g && g.html()) {
- if (g.length > 0 && g.is("div")) {
- g.addClass("hidden");
- f.removeClass("error");
- detachTooltip(f, g)
- }
- }
- }
- }
- function attachTooltip(d, c) {
- d.data("validate", "on").on("blur", function () {
- ctrlBlurItem($(this))
- });
- if (lblErrorNoFloat) {
- showTooltip(d, c);
- if (d.hasClass("ui-autocomplete-input")) {
- if (!d.parent().attr("class")) {
- d = d.parent()
- }
- d.parent().find("ul.ui-autocomplete").addClass("ui-autocomplete-error")
- }
- } else {
- d.add(c).on({
- mouseenter : function () {
- showTooltip(d, c)
- },
- mouseleave : function () {
- c.hide()
- }
- });
- c.addClass("alert alert-tooltip").css({
- position : "absolute",
- display : "none"
- })
- }
- }
- function detachTooltip(d, c) {
- d.data("validate", "off").off("mouseenter mouseleave");
- if (!c) {
- c = $("#" + d.attr("ctrlerror"))
- }
- if (c && c.length) {
- c.hide()
- }
- if (d.hasClass("ui-autocomplete-input")) {
- if (!d.parent().attr("class")) {
- d = d.parent()
- }
- d.parent().find("ul.ui-autocomplete").removeClass("ui-autocomplete-error")
- }
- }
- function ctrlBlurItem(c) {
- var d = ValidateField(c);
- if (lblErrorNoFloat) {
- if (d) {
- detachTooltip(c)
- }
- } else {
- if ("on" == c.data("validate") && !d) {
- ShowError(c)
- }
- }
- }
- function showTooltip(m, l) {
- var k = l || $("#" + m.attr("ctrlerror"));
- if (lblErrorNoFloat) {
- k.show()
- } else {
- $(".alert-tooltip:visible").hide();
- var q = m.focus().offset(),
- p = 0,
- j = 0,
- n = 0,
- o = k.height();
- p = o;
- j = parseInt(k.css("line-height"), 10);
- if (isNaN(j)) {
- j = 15
- }
- if (p != j) {
- p -= j
- }
- q.top -= p;
- if (q.top + o > m.offset().top) {
- q.top = m.offset().top - o;
- if (webUI.Utils.Validation.FirstExec) {
- webUI.Utils.Validation.FirstExec = 0;
- if (m.outerHeight(true) > 34) {
- q.top -= m.outerHeight(true)
- } else {
- q.top += 5
- }
- }
- }
- q.top -= 8;
- (webUI.Utils.Validation.NoTooltipLeft) ? k.show().offset({
- top : q.top
- }) : k.show().offset(q)
- }
- }
- function showTooltipError(f) {
- var e = f ? $(f) : $("input.error:first"),
- d = $("#" + e.attr("ctrlerror"));
- if (e.length) {
- showTooltip(e, d)
- }
- }
- jQuery.fn.clean = function () {
- this.find("input[type=text],input[type=hidden],input[type=checkbox],input[type=file],input[type=password],textarea,select").reverse().each(function () {
- $(this).text("").val("").removeClass("error")
- })
- };
- jQuery.fn.reverse = [].reverse;
- function lPad(h, j, f) {
- var k = j - h.length;
- var g = String(f).charAt(0);
- for (; k > 0; k--) {
- h = g + h
- }
- return (h)
- }
- function dvCpfCnpj(w, t) {
- if (t == null) {
- t = false
- }
- var r,
- q,
- p,
- j,
- s;
- var u = t ? 8 : 11;
- var o = t ? 14 : 11;
- var v = lPad(w, o, "0");
- v = v.substring(2, o);
- var k = "";
- for (q = 1; q <= 2; q++) {
- p = 2;
- j = 0;
- for (r = v.length - 1; r >= 0; r--) {
- j += (v.charAt(r) - "0") * p;
- p = (p - 1) % u + 2
- }
- s = 11 - j % 11;
- if (s > 9) {
- s = 0
- }
- v += s;
- k += s
- }
- return k
- }
- function IsCPF(m) {
- var j = m.val().replace(/[^\w\s]/gi, "");
- m.val(j);
- var g = j.substring(0, j.length - 2);
- var l = dvCpfCnpj(g, false);
- var h,
- k;
- if (j != g + l) {
- return false
- }
- h = true;
- for (k = 1; k < 11; k++) {
- h = h && (j.charAt(k - 1) == j.charAt(k))
- }
- return (!h)
- }
- function IsCNPJ(o) {
- var k = o.val().replace(/\s/g, " ");
- var h = k.substring(0, 8);
- var l = k.substring(8, 12);
- var n = dvCpfCnpj(h + l, true);
- var j;
- if (k != h + l + n) {
- return false
- }
- j = k.charAt(0) != "0";
- for (var m = 1; m < 8; m++) {
- j = j && (k.charAt(m - 1) == k.charAt(m))
- }
- if (j) {
- return false
- }
- if (l == "0000") {
- return false
- }
- return (h == "00000000" || parseInt(l, 10) <= 300 || h.substring(0, 3) != "000")
- }
- function IsCEP(f) {
- var e = true;
- var d;
- d = new RegExp(/([0-9]){5}([-])([0-9]){3}/g);
- e = !!f.match(d);
- return e
- }
- function NoValidateMessage(d) {
- var c = d.val().replace(/\s/g, " ");
- return true
- }
- function NoValidateListBox(b) {
- return true
- }
- function IsVacancyDescription(h) {
- var g = true;
- var k = h.val();
- var j = "";
- j = k.toLowerCase();
- j = j.replace(/\s/g, " ");
- var m;
- m = /\bpne\b/;
- if (j.search(m) != -1) {
- document.getElementById("errDescription").className = "merror merrorsmall";
- $("#ctl00_phMasterPage_cDescription_txtDescription").attr("svErrorMessage", 'Não é necessário descrever a opção de Portador de Necessidades especiais no título da Vaga. Caso a vaga seja habilitada para este perfil, selecione no formulário "Sim, esta vaga está habilitada a portadores de deficiência". Neste módulo, você poderá indicar mais informações sobre as condições da vaga. ');
- setFocus("ctl00_phMasterPage_cDeficiencies_chkDeficiency");
- return g = false
- }
- var l = new Array("pne", "deficiente", "deficientes", "deficiência", "deficiencia", "deficiências", "deficiencias", "portador de necessidade especial", "portadores de necessidades especiais", "portador de necessidade", "portadores de necessidades");
- for (i = 1; i < l.length; i++) {
- if (j.indexOf(l[i]) != -1) {
- document.getElementById("errDescription").className = "merror merrorsmall";
- $("#ctl00_phMasterPage_cDescription_txtDescription").attr("svErrorMessage", 'Não é necessário descrever a opção de Portador de Necessidades especiais no título da Vaga. Caso a vaga seja habilitada para este perfil, selecione no formulário "Sim, esta vaga está habilitada a portadores de deficiência". Neste módulo, você poderá indicar mais informações sobre as condições da vaga. ');
- setFocus("ctl00_phMasterPage_cDeficiencies_chkDeficiency");
- return g = false
- }
- }
- k = k.replace(/\u0001/g, "");
- m = new RegExp(/(www|http)(\W+\S+[^).,:;?\]\} \r\n$]+)/g);
- g = !k.match(m);
- m = new RegExp(/([a-zA-Z0-9_+\-\.]+[^!^#$%&/()¡ * Ç {}
- @ [áéíóúàèìòùäëïöü < > ] * ) @ (( \ [[0 - 9]{
- 1,
- 3
- }
- \ .[0 - 9]{
- 1,
- 3
- }
- \ .[0 - 9]{
- 1,
- 3
- }
- \ .) | (([a - zA - Z0 - 9 \ - ] + \ .) + ))([a - zA - Z]{
- 2,
- 4
- })( \ ] ? ) / g);
- g = g && !k.match(m);
- m = new RegExp(/([0-9+\s+\-\(\)\.]){7,20}/g);
- g = g && !k.match(m);
- if (g) {
- k = k.replace(/(\<\/.*\>)/g, "");
- k = k.replace(/(\<.*\>)/g, "");
- k = k.replace(/[\<\>!¡$€%&=?¿\[\]{}@#¬*\\]+/g, "");
- $("#ctl00_phMasterPage_cDescription_txtDescription").val(k)
- }
- return g
- }
- function CheckDate(e) {
- String.prototype.fechaDDMMAAAA = function () {
- return this.replace(/^(\d{2})\/(\d{2})\/(\d{4})$/, "$2/$1/$3")
- };
- String.prototype.fechaMMDDAAAA = function () {
- return this.replace(/^(\d{2})\/(\d{2})\/(\d{4})$/, "$2/$1/$3")
- };
- var d = e.value;
- var f = new Date().toDateString();
- f1 = new Date(d.fechaMMDDAAAA());
- f2 = new Date(f.fechaMMDDAAAA());
- if (f1 < f2) {
- alert("Data anterior à de hoje")
- }
- }
- function setFocus(b) {
- document.getElementById(b).focus()
- }
- function ValidateDeficienciesWords(j) {
- var o = SanitizeInvalidContent(j);
- if (o) {
- var l = j.val();
- var k = j.val().toLowerCase();
- var m = new Array("pne", "deficiente", "deficientes", "deficiência", "deficiencia", "deficiências", "deficiencias", "portador de necessidade especial", "portadores de necessidades especiais", "portador de necessidade", "portadores de necessidades");
- var n = /\bpne\b/;
- if (k.search(n) != -1) {
- $(j.attr("ctrlError")).addClass("merror merrorsmall");
- return o = false
- }
- var h = 1;
- while (h <= m.length && k.indexOf(m[h]) == -1) {
- h++
- }
- if (h < m.length) {
- $(j.attr("ctrlError")).addClass("merror merrorsmall");
- return o = false
- }
- }
- return o
- }
- function SanitizeInvalidContent(j) {
- var l = j.val();
- var p = true;
- var n;
- var m = false;
- $(j.attr("ctrlError")).addClass("merror hidden");
- n = new RegExp(/[0-9a-zA-Z]+@[0-9a-zA-Z]+[\.]{1}[0-9a-zA-Z]+[\.]?[0-9a-zA-Z]+/gi);
- if (!j.attr("nvcAllowEmail") && (!j.attr("svShowMessage"))) {
- l = l.replace(n, "")
- }
- if (!j.attr("nvcAllowEmail") && (j.attr("svShowMessage"))) {
- if (l.match(n)) {
- p = false
- }
- }
- n = new RegExp(/(((ht|f)tp(s?)|(HT|F)TP(S?))\:\/\/)?([a-zA-Z]+\.)(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9}\S*/g);
- if (!j.attr("nvcAllowUrl") && (!j.attr("svShowMessage"))) {
- l = l.replace(n, "")
- }
- if (!j.attr("nvcAllowUrl") && (j.attr("svShowMessage"))) {
- if (l.match(n)) {
- p = false
- }
- }
- if (!p) {
- j.attr("svErrorMessage", "Por favor revise os datos inseridos, nao se aceitam números, URL's ou e-mail neste campo.")
- }
- if (p && !j.attr("nvcAllowSpecial")) {
- l = l.replace(regexNotAllowSpecial, "")
- }
- if (p && !j.attr("nvcAllowNumbers")) {
- l = l.replace(/\d+\.?\d*/g, "")
- }
- if (p && j.attr("nvcAllowNumbers")) {
- n = new RegExp(/\d+\.?\d*/g);
- var k = l.match(n);
- var q = 0;
- var o = parseInt(j.attr("nvcAllowNumbers"), 10);
- while (k != null && q < k.length && o > 0) {
- if (k[q].length > o) {
- $(j.attr("ctrlError")).addClass("merror");
- j.attr("svErrorMessage", "Erro: contém mais de " + o.toString() + " digitos");
- return false
- }
- q++
- }
- }
- j.val(l);
- return p
- }
- function SanitizeCarryReturn(d) {
- var c = trim(d.val());
- if (!d.attr("nvcAllowBreakLine") && d.val() != "") {
- while (c.indexOf("\n\n") >= 0) {
- c = c.replace(/\n\n/g, "\n")
- }
- } else {
- while (c.indexOf("\n\n\n") >= 0) {
- c = c.replace(/\n\n\n/g, "\n\n")
- }
- }
- if (d.attr("type") == "file") {
- d.text(c)
- } else {
- d.val(c)
- }
- return true
- }
- function IsHiddenControl(e) {
- var d = true;
- var f = new RegExp(/_hdn/g);
- if (e["0"].id != null && e["0"].id.match(f)) {
- d = false
- }
- return d
- }
- function checkBirthDay(x) {
- var s = true;
- var q = new Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
- var u = new Array();
- var v = document.getElementById("ctl00_phMasterPage_cPersonalData_txtDay");
- var r = document.getElementById("ctl00_phMasterPage_cPersonalData_txtMonth");
- var n = document.getElementById("ctl00_phMasterPage_cPersonalData_txtYear");
- if (isNaN(n.value)) {
- return s = false
- } else {
- if (n.value < 1900) {
- return s = false
- }
- if (n.value / 4 == parseInt(n.value / 4)) {
- q[1] = 29
- }
- if (n.value.length < 4) {
- return s = false
- }
- }
- if (isNaN(r.value)) {
- return s = false
- } else {
- if (r.value < 1) {
- return s = false
- }
- if (r.value > 12) {
- return s = false
- }
- if (r.value.length == 1) {
- r.value = "0" + r.value
- }
- }
- if (isNaN(v.value)) {
- return s = false
- } else {
- if (v.value < 1) {
- return s = false
- }
- if (v.value > q[r.value - 1]) {
- return s = false
- }
- if (v.value.length == 1) {
- v.value = "0" + v.value
- }
- if (v.value == 29 && r.value == 2 && !isNaN(n.value) && !es_bisiesto(n.value)) {
- return s = false
- }
- }
- if ((!isNaN(n.value)) && (!isNaN(r.value)) && (!isNaN(v.value))) {
- var p = new Date();
- p = p.getTime();
- var w = new Date();
- w.setYear(n.value);
- w.setMonth(r.value - 1);
- w.setDate(v.value);
- var y = w.getTime();
- var t = (p < y);
- var o = (p > y);
- if ((t || n.value < 1900)) {
- return s = false
- }
- }
- return s
- }
- function es_bisiesto(b) {
- if (((b % 4 == 0) && b % 100 != 0) || b % 400 == 0) {
- return true
- }
- return false
- }
- function GetFormatNumer(b) {
- if (b < 10) {
- b = "0" + b.toString()
- }
- return (b)
- }
- function ValidateSalaryRange(f) {
- var e = true;
- var h = $('input[id$="txtSalaryMax"]').val();
- var g = f.val().toLowerCase();
- if (h != "" && !isNaN(parseInt(g, 10)) && !isNaN(parseInt(h, 10))) {
- e = (parseInt(g, 10) <= parseInt(h, 10));
- if (e) {
- e = (parseInt(h, 10) <= parseInt(g * 3, 10));
- if (!e) {
- f.removeAttr("svErrorMessage");
- f.attr("svErrorMessage", "Revise o salário inserido, a variação entre mínimo e máximo para a vaga é muito elevada. Você pode incluir comissão e bônus em Benefícios Oferecidos.")
- }
- }
- }
- ShowError(f, !e, f.attr("ctrlError"), f.attr("svErrorMessage"));
- return e
- }
- function ValidateDataBegEnd(y, p, o, n) {
- var u = true;
- var x = $("#" + p);
- var w = $("#" + o);
- var v = $("#" + n);
- var t = !isNaN(parseFloat(y.val())) ? parseInt(y.val(), 10) : null;
- var s = !isNaN(parseFloat(x.val())) ? parseInt(x.val(), 10) : null;
- var r = !isNaN(parseFloat(w.val())) ? parseInt(w.val(), 10) : null;
- var q = !isNaN(parseFloat(w.val())) ? parseInt(v.val(), 10) : null;
- if (w.attr("disabled") && v.attr("disabled")) {
- r = new Date().getMonth() + 1;
- q = new Date().getFullYear()
- }
- if (t && s && r && q) {
- u = ((s < q) || ((s == q) && (t <= r)))
- }
- if (!u) {
- x.addClass("error");
- if (!w.attr("disabled") && !v.attr("disabled")) {
- w.addClass("error");
- v.addClass("error")
- }
- }
- return u
- }
- function ValidateYoutubeLink(c) {
- var d = c.val();
- return (-1 != d.indexOf("youtu") && -1 == d.indexOf("/user/") && -1 == d.indexOf("/channel/"))
- }
- "use strict";
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.Cookies = webUI.Cookies || {};
- webUI.Cookies.Preference = {
- IdMapMode : 0,
- ShowAffinity : 0,
- ShowMatchListPopUp : 0,
- Email : "",
- Password : "",
- ShowPendingCalendar : 0,
- ShowInfoCalendar : 0,
- History : "",
- IdUser : "",
- ScrollCandidateList : 0,
- ScrollMatch : 0,
- ScrollCandidateListOld : 0,
- ToolbarOpen : 0,
- RememberUser : 1,
- IdTypeUser : 0,
- NameUser : "",
- Latitude : 0,
- Longitude : 0,
- IdSex : 1,
- ShowPromo : 1,
- Surname : "",
- Phone : "",
- IdLocation1 : 0,
- IdLocation2 : 0,
- IdLocation3 : 0,
- CEP : "",
- IdStudie1Max : 0,
- Age : 0,
- IdContractType : 0,
- ShowAndroidPromo : false,
- ShowAndroidPromoLogout : false,
- CorporativeColor : "",
- IdSalaryRange : 0,
- IsDeficiency : 0,
- IdContractWorkType : 0,
- PhotoUrl : "",
- CompleteCV : 0,
- IdStatus : 0,
- ShowPopupVacancy : false,
- IdCandidate : 0,
- ShowLimitedPopup : true,
- IdContractTypeProduct : 0,
- Coverter : null,
- CookieManage : null,
- init : function () {
- this.Coverter = webUI.Utils.ConverterSpecialChars;
- this.CookieManage = webUI.Utils.browserCookies;
- this.Read()
- },
- Read : function () {
- var h,
- f = [],
- e = [];
- h = this.CookieManage.getCookiePreference("Preferences");
- if (h) {
- f = h.split("&");
- for (var g = 0; g < f.length; g++) {
- var e = f[g].split("=");
- switch (e[0]) {
- case "IdMapMode":
- this.IdMapMode = e[1];
- break;
- case "ShowAffinity":
- this.ShowAffinity = e[1];
- break;
- case "ShowMatchListPopUp":
- this.ShowMatchListPopUp = e[1];
- break;
- case "Email":
- this.Email = e[1];
- break;
- case "Password":
- this.Password = e[1];
- break;
- case "ShowPendingCalendar":
- this.ShowPendingCalendar = e[1];
- break;
- case "ShowInfoCalendar":
- this.ShowInfoCalendar = e[1];
- break;
- case "History":
- this.History = e[1];
- break;
- case "IdUser":
- this.IdUser = e[1];
- break;
- case "ScrollCandidateList":
- this.ScrollCandidateList = e[1];
- break;
- case "ScrollMatch":
- this.ScrollMatch = e[1];
- break;
- case "ScrollCandidateListOld":
- this.ScrollCandidateListOld = e[1];
- break;
- case "ToolbarOpen":
- this.ToolbarOpen = e[1];
- break;
- case "RememberUser":
- this.RememberUser = e[1];
- break;
- case "IdTypeUser":
- this.IdTypeUser = e[1];
- break;
- case "NameUser":
- this.NameUser = this.Coverter.convertpEnc2Char(e[1]);
- break;
- case "Latitude":
- this.Latitude = e[1];
- break;
- case "Longitude":
- this.Longitude = e[1];
- break;
- case "IdSex":
- this.IdSex = e[1];
- break;
- case "ShowPromo":
- this.ShowPromo = e[1];
- break;
- case "Surname":
- this.Surname = this.Coverter.convertpEnc2Char(e[1]);
- break;
- case "Phone":
- this.Phone = e[1];
- break;
- case "IdLocation1":
- this.IdLocation1 = e[1];
- break;
- case "IdLocation2":
- this.IdLocation2 = e[1];
- break;
- case "IdLocation3":
- this.IdLocation3 = e[1];
- break;
- case "CEP":
- this.CEP = e[1];
- break;
- case "IdStudie1Max":
- this.IdStudie1Max = e[1];
- break;
- case "Age":
- this.Age = e[1];
- break;
- case "IdContractType":
- this.IdContractType = e[1];
- break;
- case "ShowAndroidPromo":
- this.ShowAndroidPromo = e[1];
- break;
- case "ShowAndroidPromoLogout":
- this.ShowAndroidPromoLogout = e[1];
- break;
- case "CorporativeColor":
- this.CorporativeColor = e[1];
- break;
- case "IdSalaryRange":
- this.IdSalaryRange = e[1];
- break;
- case "IsDeficiency":
- this.IsDeficiency = e[1];
- break;
- case "IdContractWorkType":
- this.IdContractWorkType = e[1];
- break;
- case "PhotoUrl":
- this.PhotoUrl = unescape(e[1]);
- break;
- case "CompleteCV":
- this.CompleteCV = e[1];
- break;
- case "IdStatus":
- this.IdStatus = e[1];
- break;
- case "ShowPopupVacancy":
- this.ShowPopupVacancy = e[1];
- break;
- case "IdCandidate":
- this.IdCandidate = e[1];
- break;
- case "ShowLimitedPopup":
- this.ShowLimitedPopup = e[1];
- break;
- case "IdContractTypeProduct":
- this.IdContractTypeProduct = e[1];
- break
- }
- }
- }
- return this
- },
- Write : function () {
- var b = "";
- b = "IdMapMode=" + this.IdMapMode.toString();
- b += "&ShowAffinity=" + this.ShowAffinity.toString();
- b += "&ShowMatchListPopUp=" + this.ShowMatchListPopUp.toString();
- b += "&Email=" + this.Email.toString();
- b += "&Password=";
- b += "&ShowPendingCalendar=" + this.ShowPendingCalendar.toString();
- b += "&ShowInfoCalendar=" + this.ShowInfoCalendar.toString();
- b += "&History=" + this.History.toString();
- b += "&IdUser=" + this.IdUser.toString();
- b += "&ScrollCandidateList=" + this.ScrollCandidateList.toString();
- b += "&ScrollMatch=" + this.ScrollMatch.toString();
- b += "&ScrollCandidateListOld=" + this.ScrollCandidateListOld.toString();
- b += "&ToolbarOpen=" + this.ToolbarOpen.toString();
- b += "&RememberUser=" + this.RememberUser.toString();
- b += "&IdTypeUser=" + this.IdTypeUser.toString();
- b += "&NameUser=" + this.NameUser.toString();
- b += "&Latitude=" + this.Latitude.toString();
- b += "&Longitude=" + this.Longitude.toString();
- b += "&IdSex=" + this.IdSex.toString();
- b += "&ShowPromo=" + this.ShowPromo.toString();
- b += "&Surname=" + this.Surname.toString();
- b += "&Phone=" + this.Phone.toString();
- b += "&IdLocation1=" + this.IdLocation1.toString();
- b += "&IdLocation2=" + this.IdLocation2.toString();
- b += "&IdLocation3=" + this.IdLocation3.toString();
- b += "&CEP=" + this.CEP.toString();
- b += "&IdStudie1Max=" + this.IdStudie1Max.toString();
- b += "&Age=" + this.Age.toString();
- b += "&IdContractType=" + this.IdContractType.toString();
- b += "&ShowAndroidPromo=" + this.ShowAndroidPromo.toString();
- b += "&CorporativeColor=" + this.CorporativeColor.toString();
- b += "&ShowAndroidPromoLogout=" + this.ShowAndroidPromoLogout.toString();
- b += "&IdSalaryRange=" + this.IdSalaryRange.toString();
- b += "&IsDeficiency=" + this.IsDeficiency.toString();
- b += "&IdContractWorkType=" + this.IdContractWorkType.toString();
- b += "&PhotoUrl=" + escape(this.PhotoUrl.toString());
- b += "&CompleteCV=" + this.CompleteCV.toString();
- b += "&IdStatus=" + this.IdStatus.toString();
- b += "&ShowPopupVacancy=" + this.ShowPopupVacancy.toString();
- b += "&IdCandidate=" + this.IdCandidate.toString();
- b += "&ShowLimitedPopup=" + this.ShowLimitedPopup.toString();
- b += "&IdContractTypeProduct=" + this.IdContractTypeProduct.toString();
- this.CookieManage.setCookie("Preferences", b, 86400, "/", "infojobs.com.br", "")
- }
- };
- webUI.Cookies.Preference.init();
- "use strict";
- $(function () {
- webUI.ctrl.MasterPage.WebMaster.init()
- });
- (function () {
- var j = document.location.pathname;
- if (j == "/" || j == "/Default.aspx") {
- var n = "Preferences",
- l = document.cookie.indexOf(n + "="),
- o = l + n.length + 1,
- q,
- k,
- m = /^IdContractTypeProduct/;
- if ((!l) && (n != document.cookie.substring(0, n.length))) {
- return
- }
- if (l == -1) {
- return
- }
- q = document.cookie.indexOf(";", o);
- if (q == -1) {
- q = document.cookie.length
- }
- k = document.cookie.substring(o, q).split("&");
- for (var p = 0; p < k.length; p++) {
- if (k[p].match(m)) {
- k = k[p].split("=");
- k = Number(k[1]);
- if (k == 16) {
- document.location.replace("/Candidate")
- }
- break
- }
- }
- }
- })();
- var webUI = (typeof(webUI) == "undefined") ? {}
- : webUI;
- webUI.ctrl = webUI.ctrl || {};
- webUI.ctrl.MasterPage = webUI.ctrl.MasterPage || {};
- webUI.ctrl.MasterPage.WebMaster = {
- settings : {
- DetailHorizontal : ".js_DetailHorizontal",
- olMenuCandidate : ".js_olMenuCandidate",
- formPublic : ".jsPublic"
- },
- oAccess : {},
- init : function () {
- var e = this,
- g,
- h = webUI.Cookies.Preference,
- g = {
- preference : h,
- UserType : h.IdTypeUser,
- isCompany : this.IsCompany()
- },
- f = (h.IdContractTypeProduct == 16);
- $("body").addClass(navigator.platform.substring(0, 3).toLowerCase());
- e.oAccess = new webUI.ctrl.Other.Access(g);
- if (h.IdTypeUser == 2) {
- if ($(e.settings.olMenuCandidate).length) {
- $(e.settings.olMenuCandidate).show();
- if (h.IdContractType && h.IdContractType > 0 && $(e.settings.formPublic).length == 0) {
- if (f) {
- $(e.settings.olMenuCandidate).addClass("isPremium");
- $(".js_txt_account_type").addClass("txtPremium").text("PREMIUM")
- }
- }
- }
- }
- },
- IsCompany : function () {
- var b = false;
- if ((window.location.href.toLowerCase().indexOf("/company/candidate1/list.aspx") > -1) || (window.location.href.toLowerCase().indexOf("/defaultcompany.aspx") > -1) || (window.location.href.toLowerCase().indexOf("/defaultcompanyv2.aspx") > -1)) {
- b = true
- }
- return b
- },
- ShowTopPublicity : function (c) {
- var d = this;
- if ($(d.settings.DetailHorizontal).length > 0) {
- $(d.settings.DetailHorizontal).attr("src", "/banner.aspx?" + $.param(c))
- }
- }
- };
- "use strict";
- $(function () {
- webUI.pages.Default.init()
- });
- var webUI = (typeof(webUI) == "undefined") ? {}
- : webUI;
- webUI.pages = webUI.pages || {};
- webUI.pages.Default = {
- notLazy : 1,
- logosInterval : 10000,
- withVideo : 1,
- isIE : 0,
- IEversion : 0,
- userLogged : 0,
- oFinderTop : {},
- oPublicityTop : {},
- oLogosTop : {},
- oLogosTopRow : {},
- oLogosBottom : {},
- oCounters : {},
- oCourses : {},
- settings : {
- hdnQueryCourses : ".js_hdnQueryCourses",
- DivContainer : ".jsTargetCourses",
- tmplItemCourses : ".tmplCourse",
- sectionPublicity : ".js_sectionPublicity"
- },
- init : function () {
- var p = this,
- o = webUI.Cookies.Preference,
- l = $('input[id$="hdnDomainVagas"]').val(),
- m = {
- url_base : l && ("http://" + l + "/empregos")
- },
- j = null,
- n = "",
- q = $(".logos-slider");
- p.oFinderTop = new webUI.ctrl.Company_Vacancy_ListRead.Finder(m);
- p.userLogged = Number(o.IdTypeUser);
- p.isIE = webUI.Utils.Browser.IE;
- p.IEversion = webUI.Utils.Browser.info.version;
- if (p.userLogged && o.IdTypeUser == "2") {
- $(".sliderHome").css("backgroundImage", "none");
- $("form").addClass("userlogged");
- p.randomizeSlides();
- m = {
- autorunCarousel : false
- };
- p.oPublicityTop = new webUI.ctrl.Other.ClaimSlider(m, false);
- p.oPublicityTop.oCarousel.bindInterval = p.ControlAnimate;
- p.oPublicityTop.oCarousel.anotherSlide = p.OnClickSlide;
- p.oPublicityTop.oCarousel.run();
- $(".js_ClaimSlider").removeClass("hidden");
- setTimeout(function () {
- p.oPublicityTop.oCarousel.bindIndicatorsClicks()
- }, 500)
- }
- var k = q.eq(0).find(".js_LogosSlider_div").eq(0),
- m = p.getCompanyLogosSettings(k);
- if (!p.userLogged) {
- m.interval = p.logosInterval
- }
- p.oLogosTop = new webUI.ctrl.Company.CompanyLogosFade(m);
- if (!p.userLogged) {
- p.oLogosTop.setInterval()
- }
- k = q.eq(0).find(".js_LogosSlider_div").eq(1);
- m = p.getCompanyLogosSettings(k);
- m.idProducts = [44];
- if (!p.userLogged) {
- m.interval = p.logosInterval
- }
- k.addClass("bottom");
- p.oLogosTopRow = new webUI.ctrl.Company.CompanyLogosFade(m);
- if (!p.userLogged) {
- p.oLogosTopRow.setInterval()
- }
- var k = q.eq(1).find(".js_LogosSlider_div");
- m = p.getCompanyLogosSettings(k);
- m.idProducts = [23];
- m.interval = p.logosInterval;
- p.oLogosBottom = new webUI.ctrl.Company.CompanyLogosFade(m);
- if (!p.userLogged) {
- p.oLogosBottom.setInterval()
- }
- p.showCourses();
- if (webUI.Utils.LazyLoad) {
- webUI.Utils.LazyLoad.run(p.notLazy)
- }
- if (o.IdLocation2 > 0) {
- $(".js_ddStates option:selected").removeAttr("selected");
- $(".js_ddStates option[value='" + o.IdLocation2 + "']").attr("selected", "selected");
- $(".js_ddStates").next().children().attr("placeholder", $(".js_ddStates option[value='" + o.IdLocation2 + "']").text())
- }
- p.loadPublicity()
- },
- loadPublicity : function () {
- var d = this,
- e = $(d.settings.sectionPublicity),
- f = webUI.Cookies.Preference;
- if (e.length) {
- e.find("iframe[tmp_src]").each(function (a) {
- var h = $(this),
- b = new Date().getTime() + a,
- c = h.attr("tmp_src") + "&ts=" + b;
- h.attr("src", c).on("load", function () {
- e.show()
- })
- })
- }
- },
- loadBgVideo : function () {
- var g = this,
- e = $(".js_video_code"),
- f = $(".js_replace_by_video"),
- h = function () {
- f.removeClass("hidden");
- $(".js_img_video_poster").addClass("hidden")
- };
- f.html(e.html());
- e.remove();
- setTimeout(function () {
- var a = document.getElementById("js_bg_video");
- if (a) {
- (webUI.Utils.Browser.Safari) ? a.addEventListener("canplay", h, false) : a.oncanplay = h
- }
- }, 100)
- },
- getCompanyLogosSettings : function (c) {
- var d = webUI.Utils.GetIdSelector;
- return {
- ulContainer : d(c),
- LogosSlider_li : d(c) + " .js_LogosSlider_li",
- rowActive : d(c) + " .js_row .active",
- rowInactive : d(c) + ' .js_row:not(".active")',
- btPrevSlide : d(c.parent().find("a.js_LogosSlider_prev")),
- btNextSlide : d(c.parent().find("a.js_LogosSlider_next")),
- tmplLogo : ".tmpl_logoSlider",
- logosAmount : 6,
- maxNumLogos : 18,
- maxAnims : 5,
- hoverSuffix : ($("body").hasClass("homeV2")) ? null : "_t.jpg",
- idProducts : [28, 29, 30, 31, 32, 33, 34]
- }
- },
- ControlAnimate : function () {
- var b = webUI.pages.Default;
- b.oPublicityTop.oCarousel.handlerInterval = setInterval(function () {
- if (!b.oPublicityTop.oCarousel.pause && !b.oLogosTop.busy && !b.oLogosTop.oCarousel.stop && !b.oLogosTopRow.busy && !b.oLogosTopRow.oCarousel.stop) {
- b.oLogosTop.animateLogos();
- b.oLogosTopRow.animateLogos();
- b.oPublicityTop.oCarousel.doAnimation()
- }
- }, b.oPublicityTop.oCarousel.options.interval)
- },
- OnClickSlide : function (d, f) {
- var e = webUI.pages.Default;
- if (!e.oPublicityTop.oCarousel.busy && !e.oLogosTop.busy && !e.oLogosTopRow.busy) {
- clearInterval(e.oPublicityTop.oCarousel.handlerInterval);
- e.oLogosTop.animateLogos();
- e.oLogosTopRow.animateLogos();
- e.oPublicityTop.oCarousel.doAnimation(d, f);
- $(e.oPublicityTop.oCarousel.ulContainer).promise().done(function () {
- e.oPublicityTop.oCarousel.bindInterval()
- })
- }
- },
- randomizeSlides : function () {
- var b = (webUI.Cookies.Preference.IdTypeUser == 2) ? ".npr" : ".lcp";
- $(b).each(function () {
- $(this).closest(".js_publicityLI").remove()
- });
- $(".js_publicityUL").each(function () {
- $(this).children().sort(function () {
- return 0.5 - Math.random()
- }).remove().appendTo(this)
- });
- $(".js_publicityLI").removeClass("active").slice(4).remove();
- $(".js_publicityLI:first").addClass("active");
- $(".js_indicators li").slice(4).remove()
- },
- showCourses : function () {
- var d = this,
- c = {
- url : $(d.settings.hdnQueryCourses).attr("host"),
- container : d.settings.DivContainer,
- configPosition : {
- intoGrid : false
- },
- tmplID : $(d.settings.tmplItemCourses)
- };
- d.oCourses = new webUI.Utils.Courses(c);
- d.oCourses.directive = {
- ".jsCourseBlock" : {
- "elem<-Data" : {
- ".@class+" : function (a) {
- return a.pos == 1 ? " middle" : ""
- },
- ".js_Logo_li@style" : function () {
- return this.center_logo ? "" : "display:none"
- },
- ".js_Logo_li" : function () {
- return this.center_logo ? '<img src="' + this.center_logo + '" style="cursor:pointer" onclick="window.open(\'' + this.url + "&ov=11')\" />" : ""
- },
- ".js_link_a" : function () {
- var a = this.name;
- if (a.length > 29) {
- a = a.substring(0, 30) + "..."
- }
- return a
- },
- ".js_link_a@title" : "elem.name",
- ".js_link_a@href" : function () {
- return (this.canusemodal) ? "javascript:void(0);" : this.url + "&ov=11"
- },
- ".js_link_a@target" : function () {
- return (this.canusemodal) ? "" : "_blank"
- },
- ".js_link_a@onclick" : function () {
- return (this.canusemodal) ? this.modal.replace("onclick=", "") : ""
- },
- ".js_loc1" : "elem.center_name",
- ".js_loc2" : function () {
- return this.price + " - " + this.ubication
- }
- }
- }
- };
- if (d.oCourses.oData == null) {
- d.oCourses.GetCourses($(d.settings.hdnQueryCourses).attr("query"))
- }
- },
- };
- var webUI = (typeof(webUI) === "undefined") ? {}
- : webUI;
- webUI.Utils = webUI.Utils || {};
- var oStopAdBlock = {};
- $(function () {
- oStopAdBlock = new webUI.Utils.StopAdBlock()
- });
- webUI.Utils.StopAdBlock = function (p) {
- var u = 0,
- t = "hidden",
- r = {},
- m = {},
- q = {};
- function s(h) {
- q = $.extend(m, h || {});
- var g,
- k,
- e = webUI.Utils.browserCookies.getCookie,
- b = e("Preferences");
- if (b) {
- b = b.split("&");
- var d = {},
- c;
- for (var j in b) {
- c = b[j].split("=");
- d[c[0]] = c[1]
- }
- b = d
- } else {
- return
- }
- if (b.IdContractTypeProduct == 16 || b.IdTypeUser == "1") {
- return
- }
- var a = e("usip") < 5;
- $(".publicity,.js_DivPublicityBottom,.js_DivDetailCuadrado,.js_DivPublicityLateral").each(function () {
- g = $(this);
- k = n();
- r[k] = {
- ct : 0,
- hi : 0,
- $e : g
- };
- g.find("iframe").attr("rnd", k).on("load", function (x) {
- var y = r[$(x.target).attr("rnd")];
- y.hi = setInterval(function () {
- if (y.$e.hasClass(t) || u) {
- if (a) {
- l()
- } else {
- o(y.$e.removeClass(t).css("height", "auto").find("iframe"));
- u = 1;
- y.ct = 10
- }
- }
- if (++y.ct > 10) {
- clearInterval(y.hi)
- }
- }, 200)
- })
- });
- var f = $(".js_PublicityLateral");
- f.find("iframe").on("load", function (w) {
- g = $(this);
- if (!g.contents().find("body iframe").length) {
- if (a) {
- l()
- } else {
- f.removeClass(t);
- o(g)
- }
- }
- })
- }
- function n() {
- return Math.floor((Math.random() * 9999999999) + 1)
- }
- function o(c) {
- var b = "/app_theme/images/abb/o%img%.jpg",
- a = c.width();
- b = b.replace("%img%", a == 160 ? 1 : a == 300 ? 2 : 3);
- c.replaceWith('<a target="_blank" href="/ajuda/microsite_infojobs__9950.aspx"><img src="' + b + '" border="0" /></a>')
- }
- function l() {
- location.replace("/nopublicity.aspx")
- }
- s(p)
- };
- function getCookie(k) {
- var h = k + "=";
- var c = document.cookie.split(";");
- for (var j = 0; j < c.length; j++) {
- var g = c[j];
- while (g.charAt(0) == " ") {
- g = g.substring(1)
- }
- if (g.indexOf(h) == 0) {
- return g.substring(h.length, g.length)
- }
- }
- return ""
- };
Advertisement
Add Comment
Please, Sign In to add comment