Greasy Fork 还支持 简体中文。

Chess Bot/Cheat For Chess.com

Chess.com Bot/Cheat that finds the best move!

目前為 2023-02-18 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Chess Bot/Cheat For Chess.com
  3. // @namespace MrAuzzie
  4. // @version 1.0
  5. // @description Chess.com Bot/Cheat that finds the best move!
  6. // @author MrAuzzie
  7. // @match https://www.chess.com/play/*
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // @grant GM_getValue
  10. // @grant GM_setValue
  11. // @grant GM_xmlhttpRequest
  12. // @grant GM_getResourceText
  13. // @grant GM_registerMenuCommand
  14. // @resource lozza.js https://raw.githubusercontent.com/Hakorr/Userscripts/main/Other/A.C.A.S/content/lozza.js
  15. // @require https://greasyfork.org/scripts/445697/code/index.js
  16. // @run-at document-start
  17. // @antifeature ads
  18. // ==/UserScript==
  19.  
  20. //Don't touch anything below unless you know what your doing!
  21.  
  22. const currentVersion = '1.0'; // Sets the current version
  23.  
  24. var lozzaObjectURL;
  25. var engine = document.engine = {};
  26. var myVars = document.myVars = {};
  27. myVars.autoMovePiece = false;
  28. myVars.autoRun = false;
  29. var myFunctions = document.myFunctions = {};
  30.  
  31. (function(A, w) {
  32. function oa() {
  33. if (!c.isReady) {
  34. try {
  35. s.documentElement.doScroll("left")
  36. } catch (a) {
  37. setTimeout(oa, 1);
  38. return
  39. }
  40. c.ready()
  41. }
  42. }
  43. function La(a, b) {
  44. b.src ? c.ajax({
  45. url: b.src,
  46. async: false,
  47. dataType: "script"
  48. }) : c.globalEval(b.text || b.textContent || b.innerHTML || "");
  49. b.parentNode && b.parentNode.removeChild(b)
  50. }
  51. function $(a, b, d, f, e, i) {
  52. var j = a.length;
  53. if (typeof b === "object") {
  54. for (var o in b) $(a, o, b[o], f, e, d);
  55. return a
  56. }
  57. if (d !== w) {
  58. f = !i && f && c.isFunction(d);
  59. for (o = 0; o < j; o++) e(a[o], b, f ? d.call(a[o], o, e(a[o], b)) : d, i);
  60. return a
  61. }
  62. return j ?
  63. e(a[0], b) : null
  64. }
  65. function K() {
  66. return (new Date)
  67. .getTime()
  68. }
  69. function aa() {
  70. return false
  71. }
  72. function ba() {
  73. return true
  74. }
  75. function pa(a, b, d) {
  76. d[0].type = a;
  77. return c.event.handle.apply(b, d)
  78. }
  79. function qa(a) {
  80. var b = true,
  81. d = [],
  82. f = [],
  83. e = arguments,
  84. i, j, o, p, n, t = c.extend({}, c.data(this, "events")
  85. .live);
  86. for (p in t) {
  87. j = t[p];
  88. if (j.live === a.type || j.altLive && c.inArray(a.type, j.altLive) > -1) {
  89. i = j.data;
  90. i.beforeFilter && i.beforeFilter[a.type] && !i.beforeFilter[a.type](a) || f.push(j.selector)
  91. } else delete t[p]
  92. }
  93. i = c(a.target)
  94. .closest(f, a.currentTarget);
  95. n = 0;
  96. for (l = i.length; n < l; n++)
  97. for (p in t) {
  98. j = t[p];
  99. o = i[n].elem;
  100. f = null;
  101. if (i[n].selector === j.selector) {
  102. if (j.live === "mouseenter" || j.live === "mouseleave") f = c(a.relatedTarget)
  103. .closest(j.selector)[0];
  104. if (!f || f !== o) d.push({
  105. elem: o,
  106. fn: j
  107. })
  108. }
  109. }
  110. n = 0;
  111. for (l = d.length; n < l; n++) {
  112. i = d[n];
  113. a.currentTarget = i.elem;
  114. a.data = i.fn.data;
  115. if (i.fn.apply(i.elem, e) === false) {
  116. b = false;
  117. break
  118. }
  119. }
  120. return b
  121. }
  122. function ra(a, b) {
  123. return ["live", a, b.replace(/\./g, "`")
  124. .replace(/ /g, "&")
  125. ].join(".")
  126. }
  127. function sa(a) {
  128. return !a || !a.parentNode || a.parentNode.nodeType ===
  129. 11
  130. }
  131. function ta(a, b) {
  132. var d = 0;
  133. b.each(function() {
  134. if (this.nodeName === (a[d] && a[d].nodeName)) {
  135. var f = c.data(a[d++]),
  136. e = c.data(this, f);
  137. if (f = f && f.events) {
  138. delete e.handle;
  139. e.events = {};
  140. for (var i in f)
  141. for (var j in f[i]) c.event.add(this, i, f[i][j], f[i][j].data)
  142. }
  143. }
  144. })
  145. }
  146. function ua(a, b, d) {
  147. var f, e, i;
  148. if (a.length === 1 && typeof a[0] === "string" && a[0].length < 512 && a[0].indexOf("<option") < 0) {
  149. e = true;
  150. if (i = c.fragments[a[0]])
  151. if (i !== 1) f = i
  152. }
  153. if (!f) {
  154. b = b && b[0] ? b[0].ownerDocument || b[0] : s;
  155. f = b.createDocumentFragment();
  156. c.clean(a, b, f, d)
  157. }
  158. if (e) c.fragments[a[0]] =
  159. i ? f : 1;
  160. return {
  161. fragment: f,
  162. cacheable: e
  163. }
  164. }
  165. function T(a) {
  166. for (var b = 0, d, f;
  167. (d = a[b]) != null; b++)
  168. if (!c.noData[d.nodeName.toLowerCase()] && (f = d[H])) delete c.cache[f]
  169. }
  170. function L(a, b) {
  171. var d = {};
  172. c.each(va.concat.apply([], va.slice(0, b)), function() {
  173. d[this] = a
  174. });
  175. return d
  176. }
  177. function wa(a) {
  178. return "scrollTo" in a && a.document ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : false
  179. }
  180. var c = function(a, b) {
  181. return new c.fn.init(a, b)
  182. },
  183. Ma = A.jQuery,
  184. Na = A.$,
  185. s = A.document,
  186. U, Oa = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,
  187. Pa = /^.[^:#\[\.,]*$/,
  188. Qa = /\S/,
  189. Ra = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
  190. Sa = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
  191. P = navigator.userAgent,
  192. xa = false,
  193. Q = [],
  194. M, ca = Object.prototype.toString,
  195. da = Object.prototype.hasOwnProperty,
  196. ea = Array.prototype.push,
  197. R = Array.prototype.slice,
  198. V = Array.prototype.indexOf;
  199. c.fn = c.prototype = {
  200. init: function(a, b) {
  201. var d, f;
  202. if (!a) return this;
  203. if (a.nodeType) {
  204. this.context = this[0] = a;
  205. this.length = 1;
  206. return this
  207. }
  208. if (typeof a === "string")
  209. if ((d = Oa.exec(a)) && (d[1] || !b))
  210. if (d[1]) {
  211. f = b ? b.ownerDocument || b : s;
  212. if (a = Sa.exec(a))
  213. if (c.isPlainObject(b)) {
  214. a = [s.createElement(a[1])];
  215. c.fn.attr.call(a, b, true)
  216. } else a = [f.createElement(a[1])];
  217. else {
  218. a = ua([d[1]], [f]);
  219. a = (a.cacheable ? a.fragment.cloneNode(true) : a.fragment)
  220. .childNodes
  221. }
  222. } else {
  223. if (b = s.getElementById(d[2])) {
  224. if (b.id !== d[2]) return U.find(a);
  225. this.length = 1;
  226. this[0] = b
  227. }
  228. this.context = s;
  229. this.selector = a;
  230. return this
  231. }
  232. else if (!b && /^\w+$/.test(a)) {
  233. this.selector = a;
  234. this.context = s;
  235. a = s.getElementsByTagName(a)
  236. } else return !b || b.jquery ? (b || U)
  237. .find(a) : c(b)
  238. .find(a);
  239. else if (c.isFunction(a)) return U.ready(a);
  240. if (a.selector !== w) {
  241. this.selector = a.selector;
  242. this.context = a.context
  243. }
  244. return c.isArray(a) ? this.setArray(a) : c.makeArray(a, this)
  245. },
  246. selector: "",
  247. jquery: "1.4",
  248. length: 0,
  249. size: function() {
  250. return this.length
  251. },
  252. toArray: function() {
  253. return R.call(this, 0)
  254. },
  255. get: function(a) {
  256. return a == null ? this.toArray() : a < 0 ? this.slice(a)[0] : this[a]
  257. },
  258. pushStack: function(a, b, d) {
  259. a = c(a || null);
  260. a.prevObject = this;
  261. a.context = this.context;
  262. if (b === "find") a.selector = this.selector + (this.selector ? " " : "") + d;
  263. else if (b) a.selector = this.selector + "." + b + "(" + d + ")";
  264. return a
  265. },
  266. setArray: function(a) {
  267. this.length =
  268. 0;
  269. ea.apply(this, a);
  270. return this
  271. },
  272. each: function(a, b) {
  273. return c.each(this, a, b)
  274. },
  275. ready: function(a) {
  276. c.bindReady();
  277. if (c.isReady) a.call(s, c);
  278. else Q && Q.push(a);
  279. return this
  280. },
  281. eq: function(a) {
  282. return a === -1 ? this.slice(a) : this.slice(a, +a + 1)
  283. },
  284. first: function() {
  285. return this.eq(0)
  286. },
  287. last: function() {
  288. return this.eq(-1)
  289. },
  290. slice: function() {
  291. return this.pushStack(R.apply(this, arguments), "slice", R.call(arguments)
  292. .join(","))
  293. },
  294. map: function(a) {
  295. return this.pushStack(c.map(this, function(b, d) {
  296. return a.call(b, d, b)
  297. }))
  298. },
  299. end: function() {
  300. return this.prevObject ||
  301. c(null)
  302. },
  303. push: ea,
  304. sort: [].sort,
  305. splice: [].splice
  306. };
  307. c.fn.init.prototype = c.fn;
  308. c.extend = c.fn.extend = function() {
  309. var a = arguments[0] || {},
  310. b = 1,
  311. d = arguments.length,
  312. f = false,
  313. e, i, j, o;
  314. if (typeof a === "boolean") {
  315. f = a;
  316. a = arguments[1] || {};
  317. b = 2
  318. }
  319. if (typeof a !== "object" && !c.isFunction(a)) a = {};
  320. if (d === b) {
  321. a = this;
  322. --b
  323. }
  324. for (; b < d; b++)
  325. if ((e = arguments[b]) != null)
  326. for (i in e) {
  327. j = a[i];
  328. o = e[i];
  329. if (a !== o)
  330. if (f && o && (c.isPlainObject(o) || c.isArray(o))) {
  331. j = j && (c.isPlainObject(j) || c.isArray(j)) ? j : c.isArray(o) ? [] : {};
  332. a[i] = c.extend(f, j, o)
  333. } else if (o !== w) a[i] =
  334. o
  335. }
  336. return a
  337. };
  338. c.extend({
  339. noConflict: function(a) {
  340. A.$ = Na;
  341. if (a) A.jQuery = Ma;
  342. return c
  343. },
  344. isReady: false,
  345. ready: function() {
  346. if (!c.isReady) {
  347. if (!s.body) return setTimeout(c.ready, 13);
  348. c.isReady = true;
  349. if (Q) {
  350. for (var a, b = 0; a = Q[b++];) a.call(s, c);
  351. Q = null
  352. }
  353. c.fn.triggerHandler && c(s)
  354. .triggerHandler("ready")
  355. }
  356. },
  357. bindReady: function() {
  358. if (!xa) {
  359. xa = true;
  360. if (s.readyState === "complete") return c.ready();
  361. if (s.addEventListener) {
  362. s.addEventListener("DOMContentLoaded", M, false);
  363. A.addEventListener("load", c.ready, false)
  364. } else if (s.attachEvent) {
  365. s.attachEvent("onreadystatechange",
  366. M);
  367. A.attachEvent("onload", c.ready);
  368. var a = false;
  369. try {
  370. a = A.frameElement == null
  371. } catch (b) {}
  372. s.documentElement.doScroll && a && oa()
  373. }
  374. }
  375. },
  376. isFunction: function(a) {
  377. return ca.call(a) === "[object Function]"
  378. },
  379. isArray: function(a) {
  380. return ca.call(a) === "[object Array]"
  381. },
  382. isPlainObject: function(a) {
  383. if (!a || ca.call(a) !== "[object Object]" || a.nodeType || a.setInterval) return false;
  384. if (a.constructor && !da.call(a, "constructor") && !da.call(a.constructor.prototype, "isPrototypeOf")) return false;
  385. var b;
  386. for (b in a);
  387. return b === w || da.call(a, b)
  388. },
  389. isEmptyObject: function(a) {
  390. for (var b in a) return false;
  391. return true
  392. },
  393. noop: function() {},
  394. globalEval: function(a) {
  395. if (a && Qa.test(a)) {
  396. var b = s.getElementsByTagName("head")[0] || s.documentElement,
  397. d = s.createElement("script");
  398. d.type = "text/javascript";
  399. if (c.support.scriptEval) d.appendChild(s.createTextNode(a));
  400. else d.text = a;
  401. b.insertBefore(d, b.firstChild);
  402. b.removeChild(d)
  403. }
  404. },
  405. nodeName: function(a, b) {
  406. return a.nodeName && a.nodeName.toUpperCase() === b.toUpperCase()
  407. },
  408. each: function(a, b, d) {
  409. var f, e = 0,
  410. i = a.length,
  411. j = i === w || c.isFunction(a);
  412. if (d)
  413. if (j)
  414. for (f in a) {
  415. if (b.apply(a[f], d) === false) break
  416. } else
  417. for (; e < i;) {
  418. if (b.apply(a[e++], d) === false) break
  419. } else if (j)
  420. for (f in a) {
  421. if (b.call(a[f], f, a[f]) === false) break
  422. } else
  423. for (d = a[0]; e < i && b.call(d, e, d) !== false; d = a[++e]);
  424. return a
  425. },
  426. trim: function(a) {
  427. return (a || "")
  428. .replace(Ra, "")
  429. },
  430. makeArray: function(a, b) {
  431. b = b || [];
  432. if (a != null) a.length == null || typeof a === "string" || c.isFunction(a) || typeof a !== "function" && a.setInterval ? ea.call(b, a) : c.merge(b, a);
  433. return b
  434. },
  435. inArray: function(a, b) {
  436. if (b.indexOf) return b.indexOf(a);
  437. for (var d =
  438. 0, f = b.length; d < f; d++)
  439. if (b[d] === a) return d;
  440. return -1
  441. },
  442. merge: function(a, b) {
  443. var d = a.length,
  444. f = 0;
  445. if (typeof b.length === "number")
  446. for (var e = b.length; f < e; f++) a[d++] = b[f];
  447. else
  448. for (; b[f] !== w;) a[d++] = b[f++];
  449. a.length = d;
  450. return a
  451. },
  452. grep: function(a, b, d) {
  453. for (var f = [], e = 0, i = a.length; e < i; e++) !d !== !b(a[e], e) && f.push(a[e]);
  454. return f
  455. },
  456. map: function(a, b, d) {
  457. for (var f = [], e, i = 0, j = a.length; i < j; i++) {
  458. e = b(a[i], i, d);
  459. if (e != null) f[f.length] = e
  460. }
  461. return f.concat.apply([], f)
  462. },
  463. guid: 1,
  464. proxy: function(a, b, d) {
  465. if (arguments.length === 2)
  466. if (typeof b ===
  467. "string") {
  468. d = a;
  469. a = d[b];
  470. b = w
  471. } else if (b && !c.isFunction(b)) {
  472. d = b;
  473. b = w
  474. }
  475. if (!b && a) b = function() {
  476. return a.apply(d || this, arguments)
  477. };
  478. if (a) b.guid = a.guid = a.guid || b.guid || c.guid++;
  479. return b
  480. },
  481. uaMatch: function(a) {
  482. var b = {
  483. browser: ""
  484. };
  485. a = a.toLowerCase();
  486. if (/webkit/.test(a)) b = {
  487. browser: "webkit",
  488. version: /webkit[\/ ]([\w.]+)/
  489. };
  490. else if (/opera/.test(a)) b = {
  491. browser: "opera",
  492. version: /version/.test(a) ? /version[\/ ]([\w.]+)/ : /opera[\/ ]([\w.]+)/
  493. };
  494. else if (/msie/.test(a)) b = {
  495. browser: "msie",
  496. version: /msie ([\w.]+)/
  497. };
  498. else if (/mozilla/.test(a) &&
  499. !/compatible/.test(a)) b = {
  500. browser: "mozilla",
  501. version: /rv:([\w.]+)/
  502. };
  503. b.version = (b.version && b.version.exec(a) || [0, "0"])[1];
  504. return b
  505. },
  506. browser: {}
  507. });
  508. P = c.uaMatch(P);
  509. if (P.browser) {
  510. c.browser[P.browser] = true;
  511. c.browser.version = P.version
  512. }
  513. if (c.browser.webkit) c.browser.safari = true;
  514. if (V) c.inArray = function(a, b) {
  515. return V.call(b, a)
  516. };
  517. U = c(s);
  518. if (s.addEventListener) M = function() {
  519. s.removeEventListener("DOMContentLoaded", M, false);
  520. c.ready()
  521. };
  522. else if (s.attachEvent) M = function() {
  523. if (s.readyState === "complete") {
  524. s.detachEvent("onreadystatechange",
  525. M);
  526. c.ready()
  527. }
  528. };
  529. if (V) c.inArray = function(a, b) {
  530. return V.call(b, a)
  531. };
  532. (function() {
  533. c.support = {};
  534. var a = s.documentElement,
  535. b = s.createElement("script"),
  536. d = s.createElement("div"),
  537. f = "script" + K();
  538. d.style.display = "none";
  539. d.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
  540. var e = d.getElementsByTagName("*"),
  541. i = d.getElementsByTagName("a")[0];
  542. if (!(!e || !e.length || !i)) {
  543. c.support = {
  544. leadingWhitespace: d.firstChild.nodeType === 3,
  545. tbody: !d.getElementsByTagName("tbody")
  546. .length,
  547. htmlSerialize: !!d.getElementsByTagName("link")
  548. .length,
  549. style: /red/.test(i.getAttribute("style")),
  550. hrefNormalized: i.getAttribute("href") === "/a",
  551. opacity: /^0.55$/.test(i.style.opacity),
  552. cssFloat: !!i.style.cssFloat,
  553. checkOn: d.getElementsByTagName("input")[0].value === "on",
  554. optSelected: s.createElement("select")
  555. .appendChild(s.createElement("option"))
  556. .selected,
  557. scriptEval: false,
  558. noCloneEvent: true,
  559. boxModel: null
  560. };
  561. b.type = "text/javascript";
  562. try {
  563. b.appendChild(s.createTextNode("window." + f + "=1;"))
  564. } catch (j) {}
  565. a.insertBefore(b,
  566. a.firstChild);
  567. if (A[f]) {
  568. c.support.scriptEval = true;
  569. delete A[f]
  570. }
  571. a.removeChild(b);
  572. if (d.attachEvent && d.fireEvent) {
  573. d.attachEvent("onclick", function o() {
  574. c.support.noCloneEvent = false;
  575. d.detachEvent("onclick", o)
  576. });
  577. d.cloneNode(true)
  578. .fireEvent("onclick")
  579. }
  580. c(function() {
  581. var o = s.createElement("div");
  582. o.style.width = o.style.paddingLeft = "1px";
  583. s.body.appendChild(o);
  584. c.boxModel = c.support.boxModel = o.offsetWidth === 2;
  585. s.body.removeChild(o)
  586. .style.display = "none"
  587. });
  588. a = function(o) {
  589. var p = s.createElement("div");
  590. o = "on" + o;
  591. var n = o in
  592. p;
  593. if (!n) {
  594. p.setAttribute(o, "return;");
  595. n = typeof p[o] === "function"
  596. }
  597. return n
  598. };
  599. c.support.submitBubbles = a("submit");
  600. c.support.changeBubbles = a("change");
  601. a = b = d = e = i = null
  602. }
  603. })();
  604. c.props = {
  605. "for": "htmlFor",
  606. "class": "className",
  607. readonly: "readOnly",
  608. maxlength: "maxLength",
  609. cellspacing: "cellSpacing",
  610. rowspan: "rowSpan",
  611. colspan: "colSpan",
  612. tabindex: "tabIndex",
  613. usemap: "useMap",
  614. frameborder: "frameBorder"
  615. };
  616. var H = "jQuery" + K(),
  617. Ta = 0,
  618. ya = {},
  619. Ua = {};
  620. c.extend({
  621. cache: {},
  622. expando: H,
  623. noData: {
  624. embed: true,
  625. object: true,
  626. applet: true
  627. },
  628. data: function(a,
  629. b, d) {
  630. if (!(a.nodeName && c.noData[a.nodeName.toLowerCase()])) {
  631. a = a == A ? ya : a;
  632. var f = a[H],
  633. e = c.cache;
  634. if (!b && !f) return null;
  635. f || (f = ++Ta);
  636. if (typeof b === "object") {
  637. a[H] = f;
  638. e = e[f] = c.extend(true, {}, b)
  639. } else e = e[f] ? e[f] : typeof d === "undefined" ? Ua : (e[f] = {});
  640. if (d !== w) {
  641. a[H] = f;
  642. e[b] = d
  643. }
  644. return typeof b === "string" ? e[b] : e
  645. }
  646. },
  647. removeData: function(a, b) {
  648. if (!(a.nodeName && c.noData[a.nodeName.toLowerCase()])) {
  649. a = a == A ? ya : a;
  650. var d = a[H],
  651. f = c.cache,
  652. e = f[d];
  653. if (b) {
  654. if (e) {
  655. delete e[b];
  656. c.isEmptyObject(e) && c.removeData(a)
  657. }
  658. } else {
  659. try {
  660. delete a[H]
  661. } catch (i) {
  662. a.removeAttribute &&
  663. a.removeAttribute(H)
  664. }
  665. delete f[d]
  666. }
  667. }
  668. }
  669. });
  670. c.fn.extend({
  671. data: function(a, b) {
  672. if (typeof a === "undefined" && this.length) return c.data(this[0]);
  673. else if (typeof a === "object") return this.each(function() {
  674. c.data(this, a)
  675. });
  676. var d = a.split(".");
  677. d[1] = d[1] ? "." + d[1] : "";
  678. if (b === w) {
  679. var f = this.triggerHandler("getData" + d[1] + "!", [d[0]]);
  680. if (f === w && this.length) f = c.data(this[0], a);
  681. return f === w && d[1] ? this.data(d[0]) : f
  682. } else return this.trigger("setData" + d[1] + "!", [d[0], b])
  683. .each(function() {
  684. c.data(this, a, b)
  685. })
  686. },
  687. removeData: function(a) {
  688. return this.each(function() {
  689. c.removeData(this,
  690. a)
  691. })
  692. }
  693. });
  694. c.extend({
  695. queue: function(a, b, d) {
  696. if (a) {
  697. b = (b || "fx") + "queue";
  698. var f = c.data(a, b);
  699. if (!d) return f || [];
  700. if (!f || c.isArray(d)) f = c.data(a, b, c.makeArray(d));
  701. else f.push(d);
  702. return f
  703. }
  704. },
  705. dequeue: function(a, b) {
  706. b = b || "fx";
  707. var d = c.queue(a, b),
  708. f = d.shift();
  709. if (f === "inprogress") f = d.shift();
  710. if (f) {
  711. b === "fx" && d.unshift("inprogress");
  712. f.call(a, function() {
  713. c.dequeue(a, b)
  714. })
  715. }
  716. }
  717. });
  718. c.fn.extend({
  719. queue: function(a, b) {
  720. if (typeof a !== "string") {
  721. b = a;
  722. a = "fx"
  723. }
  724. if (b === w) return c.queue(this[0], a);
  725. return this.each(function() {
  726. var d = c.queue(this,
  727. a, b);
  728. a === "fx" && d[0] !== "inprogress" && c.dequeue(this, a)
  729. })
  730. },
  731. dequeue: function(a) {
  732. return this.each(function() {
  733. c.dequeue(this, a)
  734. })
  735. },
  736. delay: function(a, b) {
  737. a = c.fx ? c.fx.speeds[a] || a : a;
  738. b = b || "fx";
  739. return this.queue(b, function() {
  740. var d = this;
  741. setTimeout(function() {
  742. c.dequeue(d, b)
  743. }, a)
  744. })
  745. },
  746. clearQueue: function(a) {
  747. return this.queue(a || "fx", [])
  748. }
  749. });
  750. var za = /[\n\t]/g,
  751. fa = /\s+/,
  752. Va = /\r/g,
  753. Wa = /href|src|style/,
  754. Xa = /(button|input)/i,
  755. Ya = /(button|input|object|select|textarea)/i,
  756. Za = /^(a|area)$/i,
  757. Aa = /radio|checkbox/;
  758. c.fn.extend({
  759. attr: function(a,
  760. b) {
  761. return $(this, a, b, true, c.attr)
  762. },
  763. removeAttr: function(a) {
  764. return this.each(function() {
  765. c.attr(this, a, "");
  766. this.nodeType === 1 && this.removeAttribute(a)
  767. })
  768. },
  769. addClass: function(a) {
  770. if (c.isFunction(a)) return this.each(function(p) {
  771. var n = c(this);
  772. n.addClass(a.call(this, p, n.attr("class")))
  773. });
  774. if (a && typeof a === "string")
  775. for (var b = (a || "")
  776. .split(fa), d = 0, f = this.length; d < f; d++) {
  777. var e = this[d];
  778. if (e.nodeType === 1)
  779. if (e.className)
  780. for (var i = " " + e.className + " ", j = 0, o = b.length; j < o; j++) {
  781. if (i.indexOf(" " + b[j] + " ") < 0) e.className +=
  782. " " + b[j]
  783. } else e.className = a
  784. }
  785. return this
  786. },
  787. removeClass: function(a) {
  788. if (c.isFunction(a)) return this.each(function(p) {
  789. var n = c(this);
  790. n.removeClass(a.call(this, p, n.attr("class")))
  791. });
  792. if (a && typeof a === "string" || a === w)
  793. for (var b = (a || "")
  794. .split(fa), d = 0, f = this.length; d < f; d++) {
  795. var e = this[d];
  796. if (e.nodeType === 1 && e.className)
  797. if (a) {
  798. for (var i = (" " + e.className + " ")
  799. .replace(za, " "), j = 0, o = b.length; j < o; j++) i = i.replace(" " + b[j] + " ", " ");
  800. e.className = i.substring(1, i.length - 1)
  801. } else e.className = ""
  802. }
  803. return this
  804. },
  805. toggleClass: function(a,
  806. b) {
  807. var d = typeof a,
  808. f = typeof b === "boolean";
  809. if (c.isFunction(a)) return this.each(function(e) {
  810. var i = c(this);
  811. i.toggleClass(a.call(this, e, i.attr("class"), b), b)
  812. });
  813. return this.each(function() {
  814. if (d === "string")
  815. for (var e, i = 0, j = c(this), o = b, p = a.split(fa); e = p[i++];) {
  816. o = f ? o : !j.hasClass(e);
  817. j[o ? "addClass" : "removeClass"](e)
  818. } else if (d === "undefined" || d === "boolean") {
  819. this.className && c.data(this, "__className__", this.className);
  820. this.className = this.className || a === false ? "" : c.data(this, "__className__") || ""
  821. }
  822. })
  823. },
  824. hasClass: function(a) {
  825. a =
  826. " " + a + " ";
  827. for (var b = 0, d = this.length; b < d; b++)
  828. if ((" " + this[b].className + " ")
  829. .replace(za, " ")
  830. .indexOf(a) > -1) return true;
  831. return false
  832. },
  833. val: function(a) {
  834. if (a === w) {
  835. var b = this[0];
  836. if (b) {
  837. if (c.nodeName(b, "option")) return (b.attributes.value || {})
  838. .specified ? b.value : b.text;
  839. if (c.nodeName(b, "select")) {
  840. var d = b.selectedIndex,
  841. f = [],
  842. e = b.options;
  843. b = b.type === "select-one";
  844. if (d < 0) return null;
  845. var i = b ? d : 0;
  846. for (d = b ? d + 1 : e.length; i < d; i++) {
  847. var j = e[i];
  848. if (j.selected) {
  849. a = c(j)
  850. .val();
  851. if (b) return a;
  852. f.push(a)
  853. }
  854. }
  855. return f
  856. }
  857. if (Aa.test(b.type) &&
  858. !c.support.checkOn) return b.getAttribute("value") === null ? "on" : b.value;
  859. return (b.value || "")
  860. .replace(Va, "")
  861. }
  862. return w
  863. }
  864. var o = c.isFunction(a);
  865. return this.each(function(p) {
  866. var n = c(this),
  867. t = a;
  868. if (this.nodeType === 1) {
  869. if (o) t = a.call(this, p, n.val());
  870. if (typeof t === "number") t += "";
  871. if (c.isArray(t) && Aa.test(this.type)) this.checked = c.inArray(n.val(), t) >= 0;
  872. else if (c.nodeName(this, "select")) {
  873. var z = c.makeArray(t);
  874. c("option", this)
  875. .each(function() {
  876. this.selected = c.inArray(c(this)
  877. .val(), z) >= 0
  878. });
  879. if (!z.length) this.selectedIndex = -1
  880. } else this.value = t
  881. }
  882. })
  883. }
  884. });
  885. c.extend({
  886. attrFn: {
  887. val: true,
  888. css: true,
  889. html: true,
  890. text: true,
  891. data: true,
  892. width: true,
  893. height: true,
  894. offset: true
  895. },
  896. attr: function(a, b, d, f) {
  897. if (!a || a.nodeType === 3 || a.nodeType === 8) return w;
  898. if (f && b in c.attrFn) return c(a)[b](d);
  899. f = a.nodeType !== 1 || !c.isXMLDoc(a);
  900. var e = d !== w;
  901. b = f && c.props[b] || b;
  902. if (a.nodeType === 1) {
  903. var i = Wa.test(b);
  904. if (b in a && f && !i) {
  905. if (e) {
  906. if (b === "type" && Xa.test(a.nodeName) && a.parentNode) throw "type property can't be changed";
  907. a[b] = d
  908. }
  909. if (c.nodeName(a, "form") && a.getAttributeNode(b)) return a.getAttributeNode(b)
  910. .nodeValue;
  911. if (b === "tabIndex") return (b = a.getAttributeNode("tabIndex")) && b.specified ? b.value : Ya.test(a.nodeName) || Za.test(a.nodeName) && a.href ? 0 : w;
  912. return a[b]
  913. }
  914. if (!c.support.style && f && b === "style") {
  915. if (e) a.style.cssText = "" + d;
  916. return a.style.cssText
  917. }
  918. e && a.setAttribute(b, "" + d);
  919. a = !c.support.hrefNormalized && f && i ? a.getAttribute(b, 2) : a.getAttribute(b);
  920. return a === null ? w : a
  921. }
  922. return c.style(a, b, d)
  923. }
  924. });
  925. var $a = function(a) {
  926. return a.replace(/[^\w\s\.\|`]/g, function(b) {
  927. return "\\" + b
  928. })
  929. };
  930. c.event = {
  931. add: function(a, b, d, f) {
  932. if (!(a.nodeType ===
  933. 3 || a.nodeType === 8)) {
  934. if (a.setInterval && a !== A && !a.frameElement) a = A;
  935. if (!d.guid) d.guid = c.guid++;
  936. if (f !== w) {
  937. d = c.proxy(d);
  938. d.data = f
  939. }
  940. var e = c.data(a, "events") || c.data(a, "events", {}),
  941. i = c.data(a, "handle"),
  942. j;
  943. if (!i) {
  944. j = function() {
  945. return typeof c !== "undefined" && !c.event.triggered ? c.event.handle.apply(j.elem, arguments) : w
  946. };
  947. i = c.data(a, "handle", j)
  948. }
  949. if (i) {
  950. i.elem = a;
  951. b = b.split(/\s+/);
  952. for (var o, p = 0; o = b[p++];) {
  953. var n = o.split(".");
  954. o = n.shift();
  955. d.type = n.slice(0)
  956. .sort()
  957. .join(".");
  958. var t = e[o],
  959. z = this.special[o] || {};
  960. if (!t) {
  961. t = e[o] = {};
  962. if (!z.setup || z.setup.call(a, f, n, d) === false)
  963. if (a.addEventListener) a.addEventListener(o, i, false);
  964. else a.attachEvent && a.attachEvent("on" + o, i)
  965. }
  966. if (z.add)
  967. if ((n = z.add.call(a, d, f, n, t)) && c.isFunction(n)) {
  968. n.guid = n.guid || d.guid;
  969. d = n
  970. } t[d.guid] = d;
  971. this.global[o] = true
  972. }
  973. a = null
  974. }
  975. }
  976. },
  977. global: {},
  978. remove: function(a, b, d) {
  979. if (!(a.nodeType === 3 || a.nodeType === 8)) {
  980. var f = c.data(a, "events"),
  981. e, i, j;
  982. if (f) {
  983. if (b === w || typeof b === "string" && b.charAt(0) === ".")
  984. for (i in f) this.remove(a, i + (b || ""));
  985. else {
  986. if (b.type) {
  987. d = b.handler;
  988. b = b.type
  989. }
  990. b = b.split(/\s+/);
  991. for (var o = 0; i = b[o++];) {
  992. var p = i.split(".");
  993. i = p.shift();
  994. var n = !p.length,
  995. t = c.map(p.slice(0)
  996. .sort(), $a);
  997. t = new RegExp("(^|\\.)" + t.join("\\.(?:.*\\.)?") + "(\\.|$)");
  998. var z = this.special[i] || {};
  999. if (f[i]) {
  1000. if (d) {
  1001. j = f[i][d.guid];
  1002. delete f[i][d.guid]
  1003. } else
  1004. for (var B in f[i])
  1005. if (n || t.test(f[i][B].type)) delete f[i][B];
  1006. z.remove && z.remove.call(a, p, j);
  1007. for (e in f[i]) break;
  1008. if (!e) {
  1009. if (!z.teardown || z.teardown.call(a, p) === false)
  1010. if (a.removeEventListener) a.removeEventListener(i, c.data(a, "handle"), false);
  1011. else a.detachEvent && a.detachEvent("on" +
  1012. i, c.data(a, "handle"));
  1013. e = null;
  1014. delete f[i]
  1015. }
  1016. }
  1017. }
  1018. }
  1019. for (e in f) break;
  1020. if (!e) {
  1021. if (B = c.data(a, "handle")) B.elem = null;
  1022. c.removeData(a, "events");
  1023. c.removeData(a, "handle")
  1024. }
  1025. }
  1026. }
  1027. },
  1028. trigger: function(a, b, d, f) {
  1029. var e = a.type || a;
  1030. if (!f) {
  1031. a = typeof a === "object" ? a[H] ? a : c.extend(c.Event(e), a) : c.Event(e);
  1032. if (e.indexOf("!") >= 0) {
  1033. a.type = e = e.slice(0, -1);
  1034. a.exclusive = true
  1035. }
  1036. if (!d) {
  1037. a.stopPropagation();
  1038. this.global[e] && c.each(c.cache, function() {
  1039. this.events && this.events[e] && c.event.trigger(a, b, this.handle.elem)
  1040. })
  1041. }
  1042. if (!d || d.nodeType === 3 || d.nodeType ===
  1043. 8) return w;
  1044. a.result = w;
  1045. a.target = d;
  1046. b = c.makeArray(b);
  1047. b.unshift(a)
  1048. }
  1049. a.currentTarget = d;
  1050. var i = c.data(d, "handle");
  1051. i && i.apply(d, b);
  1052. var j, o;
  1053. try {
  1054. if (!(d && d.nodeName && c.noData[d.nodeName.toLowerCase()])) {
  1055. j = d[e];
  1056. o = d["on" + e]
  1057. }
  1058. } catch (p) {}
  1059. i = c.nodeName(d, "a") && e === "click";
  1060. if (!f && j && !a.isDefaultPrevented() && !i) {
  1061. this.triggered = true;
  1062. try {
  1063. d[e]()
  1064. } catch (n) {}
  1065. } else if (o && d["on" + e].apply(d, b) === false) a.result = false;
  1066. this.triggered = false;
  1067. if (!a.isPropagationStopped())(d = d.parentNode || d.ownerDocument) && c.event.trigger(a, b, d, true)
  1068. },
  1069. handle: function(a) {
  1070. var b, d;
  1071. a = arguments[0] = c.event.fix(a || A.event);
  1072. a.currentTarget = this;
  1073. d = a.type.split(".");
  1074. a.type = d.shift();
  1075. b = !d.length && !a.exclusive;
  1076. var f = new RegExp("(^|\\.)" + d.slice(0)
  1077. .sort()
  1078. .join("\\.(?:.*\\.)?") + "(\\.|$)");
  1079. d = (c.data(this, "events") || {})[a.type];
  1080. for (var e in d) {
  1081. var i = d[e];
  1082. if (b || f.test(i.type)) {
  1083. a.handler = i;
  1084. a.data = i.data;
  1085. i = i.apply(this, arguments);
  1086. if (i !== w) {
  1087. a.result = i;
  1088. if (i === false) {
  1089. a.preventDefault();
  1090. a.stopPropagation()
  1091. }
  1092. }
  1093. if (a.isImmediatePropagationStopped()) break
  1094. }
  1095. }
  1096. return a.result
  1097. },
  1098. props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
  1099. fix: function(a) {
  1100. if (a[H]) return a;
  1101. var b = a;
  1102. a = c.Event(b);
  1103. for (var d = this.props.length, f; d;) {
  1104. f = this.props[--d];
  1105. a[f] = b[f]
  1106. }
  1107. if (!a.target) a.target = a.srcElement ||
  1108. s;
  1109. if (a.target.nodeType === 3) a.target = a.target.parentNode;
  1110. if (!a.relatedTarget && a.fromElement) a.relatedTarget = a.fromElement === a.target ? a.toElement : a.fromElement;
  1111. if (a.pageX == null && a.clientX != null) {
  1112. b = s.documentElement;
  1113. d = s.body;
  1114. a.pageX = a.clientX + (b && b.scrollLeft || d && d.scrollLeft || 0) - (b && b.clientLeft || d && d.clientLeft || 0);
  1115. a.pageY = a.clientY + (b && b.scrollTop || d && d.scrollTop || 0) - (b && b.clientTop || d && d.clientTop || 0)
  1116. }
  1117. if (!a.which && (a.charCode || a.charCode === 0 ? a.charCode : a.keyCode)) a.which = a.charCode || a.keyCode;
  1118. if (!a.metaKey &&
  1119. a.ctrlKey) a.metaKey = a.ctrlKey;
  1120. if (!a.which && a.button !== w) a.which = a.button & 1 ? 1 : a.button & 2 ? 3 : a.button & 4 ? 2 : 0;
  1121. return a
  1122. },
  1123. guid: 1E8,
  1124. proxy: c.proxy,
  1125. special: {
  1126. ready: {
  1127. setup: c.bindReady,
  1128. teardown: c.noop
  1129. },
  1130. live: {
  1131. add: function(a, b) {
  1132. c.extend(a, b || {});
  1133. a.guid += b.selector + b.live;
  1134. c.event.add(this, b.live, qa, b)
  1135. },
  1136. remove: function(a) {
  1137. if (a.length) {
  1138. var b = 0,
  1139. d = new RegExp("(^|\\.)" + a[0] + "(\\.|$)");
  1140. c.each(c.data(this, "events")
  1141. .live || {},
  1142. function() {
  1143. d.test(this.type) && b++
  1144. });
  1145. b < 1 && c.event.remove(this, a[0], qa)
  1146. }
  1147. },
  1148. special: {}
  1149. },
  1150. beforeunload: {
  1151. setup: function(a,
  1152. b, d) {
  1153. if (this.setInterval) this.onbeforeunload = d;
  1154. return false
  1155. },
  1156. teardown: function(a, b) {
  1157. if (this.onbeforeunload === b) this.onbeforeunload = null
  1158. }
  1159. }
  1160. }
  1161. };
  1162. c.Event = function(a) {
  1163. if (!this.preventDefault) return new c.Event(a);
  1164. if (a && a.type) {
  1165. this.originalEvent = a;
  1166. this.type = a.type
  1167. } else this.type = a;
  1168. this.timeStamp = K();
  1169. this[H] = true
  1170. };
  1171. c.Event.prototype = {
  1172. preventDefault: function() {
  1173. this.isDefaultPrevented = ba;
  1174. var a = this.originalEvent;
  1175. if (a) {
  1176. a.preventDefault && a.preventDefault();
  1177. a.returnValue = false
  1178. }
  1179. },
  1180. stopPropagation: function() {
  1181. this.isPropagationStopped =
  1182. ba;
  1183. var a = this.originalEvent;
  1184. if (a) {
  1185. a.stopPropagation && a.stopPropagation();
  1186. a.cancelBubble = true
  1187. }
  1188. },
  1189. stopImmediatePropagation: function() {
  1190. this.isImmediatePropagationStopped = ba;
  1191. this.stopPropagation()
  1192. },
  1193. isDefaultPrevented: aa,
  1194. isPropagationStopped: aa,
  1195. isImmediatePropagationStopped: aa
  1196. };
  1197. var Ba = function(a) {
  1198. for (var b = a.relatedTarget; b && b !== this;) try {
  1199. b = b.parentNode
  1200. } catch (d) {
  1201. break
  1202. }
  1203. if (b !== this) {
  1204. a.type = a.data;
  1205. c.event.handle.apply(this, arguments)
  1206. }
  1207. },
  1208. Ca = function(a) {
  1209. a.type = a.data;
  1210. c.event.handle.apply(this, arguments)
  1211. };
  1212. c.each({
  1213. mouseenter: "mouseover",
  1214. mouseleave: "mouseout"
  1215. }, function(a, b) {
  1216. c.event.special[a] = {
  1217. setup: function(d) {
  1218. c.event.add(this, b, d && d.selector ? Ca : Ba, a)
  1219. },
  1220. teardown: function(d) {
  1221. c.event.remove(this, b, d && d.selector ? Ca : Ba)
  1222. }
  1223. }
  1224. });
  1225. if (!c.support.submitBubbles) c.event.special.submit = {
  1226. setup: function(a, b, d) {
  1227. if (this.nodeName.toLowerCase() !== "form") {
  1228. c.event.add(this, "click.specialSubmit." + d.guid, function(f) {
  1229. var e = f.target,
  1230. i = e.type;
  1231. if ((i === "submit" || i === "image") && c(e)
  1232. .closest("form")
  1233. .length) return pa("submit", this, arguments)
  1234. });
  1235. c.event.add(this, "keypress.specialSubmit." +
  1236. d.guid,
  1237. function(f) {
  1238. var e = f.target,
  1239. i = e.type;
  1240. if ((i === "text" || i === "password") && c(e)
  1241. .closest("form")
  1242. .length && f.keyCode === 13) return pa("submit", this, arguments)
  1243. })
  1244. } else return false
  1245. },
  1246. remove: function(a, b) {
  1247. c.event.remove(this, "click.specialSubmit" + (b ? "." + b.guid : ""));
  1248. c.event.remove(this, "keypress.specialSubmit" + (b ? "." + b.guid : ""))
  1249. }
  1250. };
  1251. if (!c.support.changeBubbles) {
  1252. var ga = /textarea|input|select/i;
  1253. function Da(a) {
  1254. var b = a.type,
  1255. d = a.value;
  1256. if (b === "radio" || b === "checkbox") d = a.checked;
  1257. else if (b === "select-multiple") d = a.selectedIndex >
  1258. -1 ? c.map(a.options, function(f) {
  1259. return f.selected
  1260. })
  1261. .join("-") : "";
  1262. else if (a.nodeName.toLowerCase() === "select") d = a.selectedIndex;
  1263. return d
  1264. }
  1265. function ha(a, b) {
  1266. var d = a.target,
  1267. f, e;
  1268. if (!(!ga.test(d.nodeName) || d.readOnly)) {
  1269. f = c.data(d, "_change_data");
  1270. e = Da(d);
  1271. if (e !== f) {
  1272. if (a.type !== "focusout" || d.type !== "radio") c.data(d, "_change_data", e);
  1273. if (d.type !== "select" && (f != null || e)) {
  1274. a.type = "change";
  1275. return c.event.trigger(a, b, this)
  1276. }
  1277. }
  1278. }
  1279. }
  1280. c.event.special.change = {
  1281. filters: {
  1282. focusout: ha,
  1283. click: function(a) {
  1284. var b = a.target,
  1285. d = b.type;
  1286. if (d ===
  1287. "radio" || d === "checkbox" || b.nodeName.toLowerCase() === "select") return ha.call(this, a)
  1288. },
  1289. keydown: function(a) {
  1290. var b = a.target,
  1291. d = b.type;
  1292. if (a.keyCode === 13 && b.nodeName.toLowerCase() !== "textarea" || a.keyCode === 32 && (d === "checkbox" || d === "radio") || d === "select-multiple") return ha.call(this, a)
  1293. },
  1294. beforeactivate: function(a) {
  1295. a = a.target;
  1296. a.nodeName.toLowerCase() === "input" && a.type === "radio" && c.data(a, "_change_data", Da(a))
  1297. }
  1298. },
  1299. setup: function(a, b, d) {
  1300. for (var f in W) c.event.add(this, f + ".specialChange." + d.guid, W[f]);
  1301. return ga.test(this.nodeName)
  1302. },
  1303. remove: function(a, b) {
  1304. for (var d in W) c.event.remove(this, d + ".specialChange" + (b ? "." + b.guid : ""), W[d]);
  1305. return ga.test(this.nodeName)
  1306. }
  1307. };
  1308. var W = c.event.special.change.filters
  1309. }
  1310. s.addEventListener && c.each({
  1311. focus: "focusin",
  1312. blur: "focusout"
  1313. }, function(a, b) {
  1314. function d(f) {
  1315. f = c.event.fix(f);
  1316. f.type = b;
  1317. return c.event.handle.call(this, f)
  1318. }
  1319. c.event.special[b] = {
  1320. setup: function() {
  1321. this.addEventListener(a, d, true)
  1322. },
  1323. teardown: function() {
  1324. this.removeEventListener(a, d, true)
  1325. }
  1326. }
  1327. });
  1328. c.each(["bind", "one"], function(a, b) {
  1329. c.fn[b] = function(d,
  1330. f, e) {
  1331. if (typeof d === "object") {
  1332. for (var i in d) this[b](i, f, d[i], e);
  1333. return this
  1334. }
  1335. if (c.isFunction(f)) {
  1336. thisObject = e;
  1337. e = f;
  1338. f = w
  1339. }
  1340. var j = b === "one" ? c.proxy(e, function(o) {
  1341. c(this)
  1342. .unbind(o, j);
  1343. return e.apply(this, arguments)
  1344. }) : e;
  1345. return d === "unload" && b !== "one" ? this.one(d, f, e, thisObject) : this.each(function() {
  1346. c.event.add(this, d, j, f)
  1347. })
  1348. }
  1349. });
  1350. c.fn.extend({
  1351. unbind: function(a, b) {
  1352. if (typeof a === "object" && !a.preventDefault) {
  1353. for (var d in a) this.unbind(d, a[d]);
  1354. return this
  1355. }
  1356. return this.each(function() {
  1357. c.event.remove(this, a, b)
  1358. })
  1359. },
  1360. trigger: function(a,
  1361. b) {
  1362. return this.each(function() {
  1363. c.event.trigger(a, b, this)
  1364. })
  1365. },
  1366. triggerHandler: function(a, b) {
  1367. if (this[0]) {
  1368. a = c.Event(a);
  1369. a.preventDefault();
  1370. a.stopPropagation();
  1371. c.event.trigger(a, b, this[0]);
  1372. return a.result
  1373. }
  1374. },
  1375. toggle: function(a) {
  1376. for (var b = arguments, d = 1; d < b.length;) c.proxy(a, b[d++]);
  1377. return this.click(c.proxy(a, function(f) {
  1378. var e = (c.data(this, "lastToggle" + a.guid) || 0) % d;
  1379. c.data(this, "lastToggle" + a.guid, e + 1);
  1380. f.preventDefault();
  1381. return b[e].apply(this, arguments) || false
  1382. }))
  1383. },
  1384. hover: function(a, b) {
  1385. return this.mouseenter(a)
  1386. .mouseleave(b ||
  1387. a)
  1388. },
  1389. live: function(a, b, d) {
  1390. if (c.isFunction(b)) {
  1391. d = b;
  1392. b = w
  1393. }
  1394. c(this.context)
  1395. .bind(ra(a, this.selector), {
  1396. data: b,
  1397. selector: this.selector,
  1398. live: a
  1399. }, d);
  1400. return this
  1401. },
  1402. die: function(a, b) {
  1403. c(this.context)
  1404. .unbind(ra(a, this.selector), b ? {
  1405. guid: b.guid + this.selector + a
  1406. } : null);
  1407. return this
  1408. }
  1409. });
  1410. c.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".split(" "), function(a, b) {
  1411. c.fn[b] = function(d) {
  1412. return d ?
  1413. this.bind(b, d) : this.trigger(b)
  1414. };
  1415. if (c.attrFn) c.attrFn[b] = true
  1416. });
  1417. A.attachEvent && !A.addEventListener && A.attachEvent("onunload", function() {
  1418. for (var a in c.cache)
  1419. if (c.cache[a].handle) try {
  1420. c.event.remove(c.cache[a].handle.elem)
  1421. } catch (b) {}
  1422. });
  1423. (function() {
  1424. function a(g) {
  1425. for (var h = "", k, m = 0; g[m]; m++) {
  1426. k = g[m];
  1427. if (k.nodeType === 3 || k.nodeType === 4) h += k.nodeValue;
  1428. else if (k.nodeType !== 8) h += a(k.childNodes)
  1429. }
  1430. return h
  1431. }
  1432. function b(g, h, k, m, r, q) {
  1433. r = 0;
  1434. for (var v = m.length; r < v; r++) {
  1435. var u = m[r];
  1436. if (u) {
  1437. u = u[g];
  1438. for (var y = false; u;) {
  1439. if (u.sizcache ===
  1440. k) {
  1441. y = m[u.sizset];
  1442. break
  1443. }
  1444. if (u.nodeType === 1 && !q) {
  1445. u.sizcache = k;
  1446. u.sizset = r
  1447. }
  1448. if (u.nodeName.toLowerCase() === h) {
  1449. y = u;
  1450. break
  1451. }
  1452. u = u[g]
  1453. }
  1454. m[r] = y
  1455. }
  1456. }
  1457. }
  1458. function d(g, h, k, m, r, q) {
  1459. r = 0;
  1460. for (var v = m.length; r < v; r++) {
  1461. var u = m[r];
  1462. if (u) {
  1463. u = u[g];
  1464. for (var y = false; u;) {
  1465. if (u.sizcache === k) {
  1466. y = m[u.sizset];
  1467. break
  1468. }
  1469. if (u.nodeType === 1) {
  1470. if (!q) {
  1471. u.sizcache = k;
  1472. u.sizset = r
  1473. }
  1474. if (typeof h !== "string") {
  1475. if (u === h) {
  1476. y = true;
  1477. break
  1478. }
  1479. } else if (p.filter(h, [u])
  1480. .length > 0) {
  1481. y = u;
  1482. break
  1483. }
  1484. }
  1485. u = u[g]
  1486. }
  1487. m[r] = y
  1488. }
  1489. }
  1490. }
  1491. var f = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
  1492. e = 0,
  1493. i = Object.prototype.toString,
  1494. j = false,
  1495. o = true;
  1496. [0, 0].sort(function() {
  1497. o = false;
  1498. return 0
  1499. });
  1500. var p = function(g, h, k, m) {
  1501. k = k || [];
  1502. var r = h = h || s;
  1503. if (h.nodeType !== 1 && h.nodeType !== 9) return [];
  1504. if (!g || typeof g !== "string") return k;
  1505. for (var q = [], v, u, y, S, I = true, N = x(h), J = g;
  1506. (f.exec(""), v = f.exec(J)) !== null;) {
  1507. J = v[3];
  1508. q.push(v[1]);
  1509. if (v[2]) {
  1510. S = v[3];
  1511. break
  1512. }
  1513. }
  1514. if (q.length > 1 && t.exec(g))
  1515. if (q.length === 2 && n.relative[q[0]]) u = ia(q[0] + q[1], h);
  1516. else
  1517. for (u = n.relative[q[0]] ? [h] : p(q.shift(), h); q.length;) {
  1518. g = q.shift();
  1519. if (n.relative[g]) g += q.shift();
  1520. u = ia(g, u)
  1521. } else {
  1522. if (!m && q.length > 1 && h.nodeType === 9 && !N && n.match.ID.test(q[0]) && !n.match.ID.test(q[q.length - 1])) {
  1523. v = p.find(q.shift(), h, N);
  1524. h = v.expr ? p.filter(v.expr, v.set)[0] : v.set[0]
  1525. }
  1526. if (h) {
  1527. v = m ? {
  1528. expr: q.pop(),
  1529. set: B(m)
  1530. } : p.find(q.pop(), q.length === 1 && (q[0] === "~" || q[0] === "+") && h.parentNode ? h.parentNode : h, N);
  1531. u = v.expr ? p.filter(v.expr, v.set) : v.set;
  1532. if (q.length > 0) y = B(u);
  1533. else I = false;
  1534. for (; q.length;) {
  1535. var E = q.pop();
  1536. v = E;
  1537. if (n.relative[E]) v = q.pop();
  1538. else E = "";
  1539. if (v == null) v = h;
  1540. n.relative[E](y, v, N)
  1541. }
  1542. } else y = []
  1543. }
  1544. y || (y = u);
  1545. if (!y) throw "Syntax error, unrecognized expression: " +
  1546. (E || g);
  1547. if (i.call(y) === "[object Array]")
  1548. if (I)
  1549. if (h && h.nodeType === 1)
  1550. for (g = 0; y[g] != null; g++) {
  1551. if (y[g] && (y[g] === true || y[g].nodeType === 1 && F(h, y[g]))) k.push(u[g])
  1552. } else
  1553. for (g = 0; y[g] != null; g++) y[g] && y[g].nodeType === 1 && k.push(u[g]);
  1554. else k.push.apply(k, y);
  1555. else B(y, k);
  1556. if (S) {
  1557. p(S, r, k, m);
  1558. p.uniqueSort(k)
  1559. }
  1560. return k
  1561. };
  1562. p.uniqueSort = function(g) {
  1563. if (D) {
  1564. j = o;
  1565. g.sort(D);
  1566. if (j)
  1567. for (var h = 1; h < g.length; h++) g[h] === g[h - 1] && g.splice(h--, 1)
  1568. }
  1569. return g
  1570. };
  1571. p.matches = function(g, h) {
  1572. return p(g, null, null, h)
  1573. };
  1574. p.find = function(g, h, k) {
  1575. var m, r;
  1576. if (!g) return [];
  1577. for (var q = 0, v = n.order.length; q < v; q++) {
  1578. var u = n.order[q];
  1579. if (r = n.leftMatch[u].exec(g)) {
  1580. var y = r[1];
  1581. r.splice(1, 1);
  1582. if (y.substr(y.length - 1) !== "\\") {
  1583. r[1] = (r[1] || "")
  1584. .replace(/\\/g, "");
  1585. m = n.find[u](r, h, k);
  1586. if (m != null) {
  1587. g = g.replace(n.match[u], "");
  1588. break
  1589. }
  1590. }
  1591. }
  1592. }
  1593. m || (m = h.getElementsByTagName("*"));
  1594. return {
  1595. set: m,
  1596. expr: g
  1597. }
  1598. };
  1599. p.filter = function(g, h, k, m) {
  1600. for (var r = g, q = [], v = h, u, y, S = h && h[0] && x(h[0]); g && h.length;) {
  1601. for (var I in n.filter)
  1602. if ((u = n.leftMatch[I].exec(g)) != null && u[2]) {
  1603. var N = n.filter[I],
  1604. J, E;
  1605. E = u[1];
  1606. y = false;
  1607. u.splice(1, 1);
  1608. if (E.substr(E.length -
  1609. 1) !== "\\") {
  1610. if (v === q) q = [];
  1611. if (n.preFilter[I])
  1612. if (u = n.preFilter[I](u, v, k, q, m, S)) {
  1613. if (u === true) continue
  1614. } else y = J = true;
  1615. if (u)
  1616. for (var X = 0;
  1617. (E = v[X]) != null; X++)
  1618. if (E) {
  1619. J = N(E, u, X, v);
  1620. var Ea = m ^ !!J;
  1621. if (k && J != null)
  1622. if (Ea) y = true;
  1623. else v[X] = false;
  1624. else if (Ea) {
  1625. q.push(E);
  1626. y = true
  1627. }
  1628. } if (J !== w) {
  1629. k || (v = q);
  1630. g = g.replace(n.match[I], "");
  1631. if (!y) return [];
  1632. break
  1633. }
  1634. }
  1635. } if (g === r)
  1636. if (y == null) throw "Syntax error, unrecognized expression: " + g;
  1637. else break;
  1638. r = g
  1639. }
  1640. return v
  1641. };
  1642. var n = p.selectors = {
  1643. order: ["ID", "NAME", "TAG"],
  1644. match: {
  1645. ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
  1646. CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
  1647. NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,
  1648. ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
  1649. TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,
  1650. CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
  1651. POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
  1652. PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
  1653. },
  1654. leftMatch: {},
  1655. attrMap: {
  1656. "class": "className",
  1657. "for": "htmlFor"
  1658. },
  1659. attrHandle: {
  1660. href: function(g) {
  1661. return g.getAttribute("href")
  1662. }
  1663. },
  1664. relative: {
  1665. "+": function(g, h) {
  1666. var k = typeof h === "string",
  1667. m = k && !/\W/.test(h);
  1668. k = k && !m;
  1669. if (m) h = h.toLowerCase();
  1670. m = 0;
  1671. for (var r = g.length, q; m < r; m++)
  1672. if (q = g[m]) {
  1673. for (;
  1674. (q = q.previousSibling) && q.nodeType !== 1;);
  1675. g[m] = k || q && q.nodeName.toLowerCase() === h ? q || false : q === h
  1676. } k && p.filter(h, g, true)
  1677. },
  1678. ">": function(g, h) {
  1679. var k = typeof h === "string";
  1680. if (k && !/\W/.test(h)) {
  1681. h = h.toLowerCase();
  1682. for (var m = 0, r = g.length; m < r; m++) {
  1683. var q = g[m];
  1684. if (q) {
  1685. k = q.parentNode;
  1686. g[m] = k.nodeName.toLowerCase() === h ? k : false
  1687. }
  1688. }
  1689. } else {
  1690. m = 0;
  1691. for (r = g.length; m < r; m++)
  1692. if (q = g[m]) g[m] =
  1693. k ? q.parentNode : q.parentNode === h;
  1694. k && p.filter(h, g, true)
  1695. }
  1696. },
  1697. "": function(g, h, k) {
  1698. var m = e++,
  1699. r = d;
  1700. if (typeof h === "string" && !/\W/.test(h)) {
  1701. var q = h = h.toLowerCase();
  1702. r = b
  1703. }
  1704. r("parentNode", h, m, g, q, k)
  1705. },
  1706. "~": function(g, h, k) {
  1707. var m = e++,
  1708. r = d;
  1709. if (typeof h === "string" && !/\W/.test(h)) {
  1710. var q = h = h.toLowerCase();
  1711. r = b
  1712. }
  1713. r("previousSibling", h, m, g, q, k)
  1714. }
  1715. },
  1716. find: {
  1717. ID: function(g, h, k) {
  1718. if (typeof h.getElementById !== "undefined" && !k) return (g = h.getElementById(g[1])) ? [g] : []
  1719. },
  1720. NAME: function(g, h) {
  1721. if (typeof h.getElementsByName !== "undefined") {
  1722. var k = [];
  1723. h = h.getElementsByName(g[1]);
  1724. for (var m = 0, r = h.length; m < r; m++) h[m].getAttribute("name") === g[1] && k.push(h[m]);
  1725. return k.length === 0 ? null : k
  1726. }
  1727. },
  1728. TAG: function(g, h) {
  1729. return h.getElementsByTagName(g[1])
  1730. }
  1731. },
  1732. preFilter: {
  1733. CLASS: function(g, h, k, m, r, q) {
  1734. g = " " + g[1].replace(/\\/g, "") + " ";
  1735. if (q) return g;
  1736. q = 0;
  1737. for (var v;
  1738. (v = h[q]) != null; q++)
  1739. if (v)
  1740. if (r ^ (v.className && (" " + v.className + " ")
  1741. .replace(/[\t\n]/g, " ")
  1742. .indexOf(g) >= 0)) k || m.push(v);
  1743. else if (k) h[q] = false;
  1744. return false
  1745. },
  1746. ID: function(g) {
  1747. return g[1].replace(/\\/g, "")
  1748. },
  1749. TAG: function(g) {
  1750. return g[1].toLowerCase()
  1751. },
  1752. CHILD: function(g) {
  1753. if (g[1] === "nth") {
  1754. var h = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2] === "even" && "2n" || g[2] === "odd" && "2n+1" || !/\D/.test(g[2]) && "0n+" + g[2] || g[2]);
  1755. g[2] = h[1] + (h[2] || 1) - 0;
  1756. g[3] = h[3] - 0
  1757. }
  1758. g[0] = e++;
  1759. return g
  1760. },
  1761. ATTR: function(g, h, k, m, r, q) {
  1762. h = g[1].replace(/\\/g, "");
  1763. if (!q && n.attrMap[h]) g[1] = n.attrMap[h];
  1764. if (g[2] === "~=") g[4] = " " + g[4] + " ";
  1765. return g
  1766. },
  1767. PSEUDO: function(g, h, k, m, r) {
  1768. if (g[1] === "not")
  1769. if ((f.exec(g[3]) || "")
  1770. .length > 1 || /^\w/.test(g[3])) g[3] = p(g[3], null, null, h);
  1771. else {
  1772. g = p.filter(g[3], h, k, true ^ r);
  1773. k || m.push.apply(m,
  1774. g);
  1775. return false
  1776. }
  1777. else if (n.match.POS.test(g[0]) || n.match.CHILD.test(g[0])) return true;
  1778. return g
  1779. },
  1780. POS: function(g) {
  1781. g.unshift(true);
  1782. return g
  1783. }
  1784. },
  1785. filters: {
  1786. enabled: function(g) {
  1787. return g.disabled === false && g.type !== "hidden"
  1788. },
  1789. disabled: function(g) {
  1790. return g.disabled === true
  1791. },
  1792. checked: function(g) {
  1793. return g.checked === true
  1794. },
  1795. selected: function(g) {
  1796. return g.selected === true
  1797. },
  1798. parent: function(g) {
  1799. return !!g.firstChild
  1800. },
  1801. empty: function(g) {
  1802. return !g.firstChild
  1803. },
  1804. has: function(g, h, k) {
  1805. return !!p(k[3], g)
  1806. .length
  1807. },
  1808. header: function(g) {
  1809. return /h\d/i.test(g.nodeName)
  1810. },
  1811. text: function(g) {
  1812. return "text" === g.type
  1813. },
  1814. radio: function(g) {
  1815. return "radio" === g.type
  1816. },
  1817. checkbox: function(g) {
  1818. return "checkbox" === g.type
  1819. },
  1820. file: function(g) {
  1821. return "file" === g.type
  1822. },
  1823. password: function(g) {
  1824. return "password" === g.type
  1825. },
  1826. submit: function(g) {
  1827. return "submit" === g.type
  1828. },
  1829. image: function(g) {
  1830. return "image" === g.type
  1831. },
  1832. reset: function(g) {
  1833. return "reset" === g.type
  1834. },
  1835. button: function(g) {
  1836. return "button" === g.type || g.nodeName.toLowerCase() === "button"
  1837. },
  1838. input: function(g) {
  1839. return /input|select|textarea|button/i.test(g.nodeName)
  1840. }
  1841. },
  1842. setFilters: {
  1843. first: function(g, h) {
  1844. return h === 0
  1845. },
  1846. last: function(g, h, k, m) {
  1847. return h === m.length - 1
  1848. },
  1849. even: function(g, h) {
  1850. return h % 2 === 0
  1851. },
  1852. odd: function(g, h) {
  1853. return h % 2 === 1
  1854. },
  1855. lt: function(g, h, k) {
  1856. return h < k[3] - 0
  1857. },
  1858. gt: function(g, h, k) {
  1859. return h > k[3] - 0
  1860. },
  1861. nth: function(g, h, k) {
  1862. return k[3] - 0 === h
  1863. },
  1864. eq: function(g, h, k) {
  1865. return k[3] - 0 === h
  1866. }
  1867. },
  1868. filter: {
  1869. PSEUDO: function(g, h, k, m) {
  1870. var r = h[1],
  1871. q = n.filters[r];
  1872. if (q) return q(g, k, h, m);
  1873. else if (r === "contains") return (g.textContent || g.innerText || a([g]) || "")
  1874. .indexOf(h[3]) >= 0;
  1875. else if (r === "not") {
  1876. h =
  1877. h[3];
  1878. k = 0;
  1879. for (m = h.length; k < m; k++)
  1880. if (h[k] === g) return false;
  1881. return true
  1882. } else throw "Syntax error, unrecognized expression: " + r;
  1883. },
  1884. CHILD: function(g, h) {
  1885. var k = h[1],
  1886. m = g;
  1887. switch (k) {
  1888. case "only":
  1889. case "first":
  1890. for (; m = m.previousSibling;)
  1891. if (m.nodeType === 1) return false;
  1892. if (k === "first") return true;
  1893. m = g;
  1894. case "last":
  1895. for (; m = m.nextSibling;)
  1896. if (m.nodeType === 1) return false;
  1897. return true;
  1898. case "nth":
  1899. k = h[2];
  1900. var r = h[3];
  1901. if (k === 1 && r === 0) return true;
  1902. h = h[0];
  1903. var q = g.parentNode;
  1904. if (q && (q.sizcache !== h || !g.nodeIndex)) {
  1905. var v = 0;
  1906. for (m = q.firstChild; m; m =
  1907. m.nextSibling)
  1908. if (m.nodeType === 1) m.nodeIndex = ++v;
  1909. q.sizcache = h
  1910. }
  1911. g = g.nodeIndex - r;
  1912. return k === 0 ? g === 0 : g % k === 0 && g / k >= 0
  1913. }
  1914. },
  1915. ID: function(g, h) {
  1916. return g.nodeType === 1 && g.getAttribute("id") === h
  1917. },
  1918. TAG: function(g, h) {
  1919. return h === "*" && g.nodeType === 1 || g.nodeName.toLowerCase() === h
  1920. },
  1921. CLASS: function(g, h) {
  1922. return (" " + (g.className || g.getAttribute("class")) + " ")
  1923. .indexOf(h) > -1
  1924. },
  1925. ATTR: function(g, h) {
  1926. var k = h[1];
  1927. g = n.attrHandle[k] ? n.attrHandle[k](g) : g[k] != null ? g[k] : g.getAttribute(k);
  1928. k = g + "";
  1929. var m = h[2];
  1930. h = h[4];
  1931. return g == null ? m === "!=" : m ===
  1932. "=" ? k === h : m === "*=" ? k.indexOf(h) >= 0 : m === "~=" ? (" " + k + " ")
  1933. .indexOf(h) >= 0 : !h ? k && g !== false : m === "!=" ? k !== h : m === "^=" ? k.indexOf(h) === 0 : m === "$=" ? k.substr(k.length - h.length) === h : m === "|=" ? k === h || k.substr(0, h.length + 1) === h + "-" : false
  1934. },
  1935. POS: function(g, h, k, m) {
  1936. var r = n.setFilters[h[2]];
  1937. if (r) return r(g, k, h, m)
  1938. }
  1939. }
  1940. },
  1941. t = n.match.POS;
  1942. for (var z in n.match) {
  1943. n.match[z] = new RegExp(n.match[z].source + /(?![^\[]*\])(?![^\(]*\))/.source);
  1944. n.leftMatch[z] = new RegExp(/(^(?:.|\r|\n)*?)/.source + n.match[z].source.replace(/\\(\d+)/g, function(g,
  1945. h) {
  1946. return "\\" + (h - 0 + 1)
  1947. }))
  1948. }
  1949. var B = function(g, h) {
  1950. g = Array.prototype.slice.call(g, 0);
  1951. if (h) {
  1952. h.push.apply(h, g);
  1953. return h
  1954. }
  1955. return g
  1956. };
  1957. try {
  1958. Array.prototype.slice.call(s.documentElement.childNodes, 0)
  1959. } catch (C) {
  1960. B = function(g, h) {
  1961. h = h || [];
  1962. if (i.call(g) === "[object Array]") Array.prototype.push.apply(h, g);
  1963. else if (typeof g.length === "number")
  1964. for (var k = 0, m = g.length; k < m; k++) h.push(g[k]);
  1965. else
  1966. for (k = 0; g[k]; k++) h.push(g[k]);
  1967. return h
  1968. }
  1969. }
  1970. var D;
  1971. if (s.documentElement.compareDocumentPosition) D = function(g, h) {
  1972. if (!g.compareDocumentPosition ||
  1973. !h.compareDocumentPosition) {
  1974. if (g == h) j = true;
  1975. return g.compareDocumentPosition ? -1 : 1
  1976. }
  1977. g = g.compareDocumentPosition(h) & 4 ? -1 : g === h ? 0 : 1;
  1978. if (g === 0) j = true;
  1979. return g
  1980. };
  1981. else if ("sourceIndex" in s.documentElement) D = function(g, h) {
  1982. if (!g.sourceIndex || !h.sourceIndex) {
  1983. if (g == h) j = true;
  1984. return g.sourceIndex ? -1 : 1
  1985. }
  1986. g = g.sourceIndex - h.sourceIndex;
  1987. if (g === 0) j = true;
  1988. return g
  1989. };
  1990. else if (s.createRange) D = function(g, h) {
  1991. if (!g.ownerDocument || !h.ownerDocument) {
  1992. if (g == h) j = true;
  1993. return g.ownerDocument ? -1 : 1
  1994. }
  1995. var k = g.ownerDocument.createRange(),
  1996. m =
  1997. h.ownerDocument.createRange();
  1998. k.setStart(g, 0);
  1999. k.setEnd(g, 0);
  2000. m.setStart(h, 0);
  2001. m.setEnd(h, 0);
  2002. g = k.compareBoundaryPoints(Range.START_TO_END, m);
  2003. if (g === 0) j = true;
  2004. return g
  2005. };
  2006. (function() {
  2007. var g = s.createElement("div"),
  2008. h = "script" + (new Date)
  2009. .getTime();
  2010. g.innerHTML = "<a name='" + h + "'/>";
  2011. var k = s.documentElement;
  2012. k.insertBefore(g, k.firstChild);
  2013. if (s.getElementById(h)) {
  2014. n.find.ID = function(m, r, q) {
  2015. if (typeof r.getElementById !== "undefined" && !q) return (r = r.getElementById(m[1])) ? r.id === m[1] || typeof r.getAttributeNode !== "undefined" &&
  2016. r.getAttributeNode("id")
  2017. .nodeValue === m[1] ? [r] : w : []
  2018. };
  2019. n.filter.ID = function(m, r) {
  2020. var q = typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id");
  2021. return m.nodeType === 1 && q && q.nodeValue === r
  2022. }
  2023. }
  2024. k.removeChild(g);
  2025. k = g = null
  2026. })();
  2027. (function() {
  2028. var g = s.createElement("div");
  2029. g.appendChild(s.createComment(""));
  2030. if (g.getElementsByTagName("*")
  2031. .length > 0) n.find.TAG = function(h, k) {
  2032. k = k.getElementsByTagName(h[1]);
  2033. if (h[1] === "*") {
  2034. h = [];
  2035. for (var m = 0; k[m]; m++) k[m].nodeType === 1 && h.push(k[m]);
  2036. k = h
  2037. }
  2038. return k
  2039. };
  2040. g.innerHTML = "<a href='#'></a>";
  2041. if (g.firstChild && typeof g.firstChild.getAttribute !== "undefined" && g.firstChild.getAttribute("href") !== "#") n.attrHandle.href = function(h) {
  2042. return h.getAttribute("href", 2)
  2043. };
  2044. g = null
  2045. })();
  2046. s.querySelectorAll && function() {
  2047. var g = p,
  2048. h = s.createElement("div");
  2049. h.innerHTML = "<p class='TEST'></p>";
  2050. if (!(h.querySelectorAll && h.querySelectorAll(".TEST")
  2051. .length === 0)) {
  2052. p = function(m, r, q, v) {
  2053. r = r || s;
  2054. if (!v && r.nodeType === 9 && !x(r)) try {
  2055. return B(r.querySelectorAll(m), q)
  2056. } catch (u) {}
  2057. return g(m, r, q, v)
  2058. };
  2059. for (var k in g) p[k] = g[k];
  2060. h = null
  2061. }
  2062. }();
  2063. (function() {
  2064. var g = s.createElement("div");
  2065. g.innerHTML = "<div class='test e'></div><div class='test'></div>";
  2066. if (!(!g.getElementsByClassName || g.getElementsByClassName("e")
  2067. .length === 0)) {
  2068. g.lastChild.className = "e";
  2069. if (g.getElementsByClassName("e")
  2070. .length !== 1) {
  2071. n.order.splice(1, 0, "CLASS");
  2072. n.find.CLASS = function(h, k, m) {
  2073. if (typeof k.getElementsByClassName !== "undefined" && !m) return k.getElementsByClassName(h[1])
  2074. };
  2075. g = null
  2076. }
  2077. }
  2078. })();
  2079. var F = s.compareDocumentPosition ? function(g, h) {
  2080. return g.compareDocumentPosition(h) & 16
  2081. } : function(g,
  2082. h) {
  2083. return g !== h && (g.contains ? g.contains(h) : true)
  2084. },
  2085. x = function(g) {
  2086. return (g = (g ? g.ownerDocument || g : 0)
  2087. .documentElement) ? g.nodeName !== "HTML" : false
  2088. },
  2089. ia = function(g, h) {
  2090. var k = [],
  2091. m = "",
  2092. r;
  2093. for (h = h.nodeType ? [h] : h; r = n.match.PSEUDO.exec(g);) {
  2094. m += r[0];
  2095. g = g.replace(n.match.PSEUDO, "")
  2096. }
  2097. g = n.relative[g] ? g + "*" : g;
  2098. r = 0;
  2099. for (var q = h.length; r < q; r++) p(g, h[r], k);
  2100. return p.filter(m, k)
  2101. };
  2102. c.find = p;
  2103. c.expr = p.selectors;
  2104. c.expr[":"] = c.expr.filters;
  2105. c.unique = p.uniqueSort;
  2106. c.getText = a;
  2107. c.isXMLDoc = x;
  2108. c.contains = F
  2109. })();
  2110. var ab = /Until$/,
  2111. bb = /^(?:parents|prevUntil|prevAll)/,
  2112. cb = /,/;
  2113. R = Array.prototype.slice;
  2114. var Fa = function(a, b, d) {
  2115. if (c.isFunction(b)) return c.grep(a, function(e, i) {
  2116. return !!b.call(e, i, e) === d
  2117. });
  2118. else if (b.nodeType) return c.grep(a, function(e) {
  2119. return e === b === d
  2120. });
  2121. else if (typeof b === "string") {
  2122. var f = c.grep(a, function(e) {
  2123. return e.nodeType === 1
  2124. });
  2125. if (Pa.test(b)) return c.filter(b, f, !d);
  2126. else b = c.filter(b, a)
  2127. }
  2128. return c.grep(a, function(e) {
  2129. return c.inArray(e, b) >= 0 === d
  2130. })
  2131. };
  2132. c.fn.extend({
  2133. find: function(a) {
  2134. for (var b = this.pushStack("", "find", a), d = 0, f = 0, e = this.length; f < e; f++) {
  2135. d = b.length;
  2136. c.find(a, this[f], b);
  2137. if (f > 0)
  2138. for (var i = d; i < b.length; i++)
  2139. for (var j = 0; j < d; j++)
  2140. if (b[j] === b[i]) {
  2141. b.splice(i--, 1);
  2142. break
  2143. }
  2144. }
  2145. return b
  2146. },
  2147. has: function(a) {
  2148. var b = c(a);
  2149. return this.filter(function() {
  2150. for (var d = 0, f = b.length; d < f; d++)
  2151. if (c.contains(this, b[d])) return true
  2152. })
  2153. },
  2154. not: function(a) {
  2155. return this.pushStack(Fa(this, a, false), "not", a)
  2156. },
  2157. filter: function(a) {
  2158. return this.pushStack(Fa(this, a, true), "filter", a)
  2159. },
  2160. is: function(a) {
  2161. return !!a && c.filter(a, this)
  2162. .length > 0
  2163. },
  2164. closest: function(a, b) {
  2165. if (c.isArray(a)) {
  2166. var d = [],
  2167. f = this[0],
  2168. e, i = {},
  2169. j;
  2170. if (f && a.length) {
  2171. e = 0;
  2172. for (var o = a.length; e < o; e++) {
  2173. j = a[e];
  2174. i[j] || (i[j] = c.expr.match.POS.test(j) ? c(j, b || this.context) : j)
  2175. }
  2176. for (; f && f.ownerDocument && f !== b;) {
  2177. for (j in i) {
  2178. e = i[j];
  2179. if (e.jquery ? e.index(f) > -1 : c(f)
  2180. .is(e)) {
  2181. d.push({
  2182. selector: j,
  2183. elem: f
  2184. });
  2185. delete i[j]
  2186. }
  2187. }
  2188. f = f.parentNode
  2189. }
  2190. }
  2191. return d
  2192. }
  2193. var p = c.expr.match.POS.test(a) ? c(a, b || this.context) : null;
  2194. return this.map(function(n, t) {
  2195. for (; t && t.ownerDocument && t !== b;) {
  2196. if (p ? p.index(t) > -1 : c(t)
  2197. .is(a)) return t;
  2198. t = t.parentNode
  2199. }
  2200. return null
  2201. })
  2202. },
  2203. index: function(a) {
  2204. if (!a || typeof a ===
  2205. "string") return c.inArray(this[0], a ? c(a) : this.parent()
  2206. .children());
  2207. return c.inArray(a.jquery ? a[0] : a, this)
  2208. },
  2209. add: function(a, b) {
  2210. a = typeof a === "string" ? c(a, b || this.context) : c.makeArray(a);
  2211. b = c.merge(this.get(), a);
  2212. return this.pushStack(sa(a[0]) || sa(b[0]) ? b : c.unique(b))
  2213. },
  2214. andSelf: function() {
  2215. return this.add(this.prevObject)
  2216. }
  2217. });
  2218. c.each({
  2219. parent: function(a) {
  2220. return (a = a.parentNode) && a.nodeType !== 11 ? a : null
  2221. },
  2222. parents: function(a) {
  2223. return c.dir(a, "parentNode")
  2224. },
  2225. parentsUntil: function(a, b, d) {
  2226. return c.dir(a, "parentNode",
  2227. d)
  2228. },
  2229. next: function(a) {
  2230. return c.nth(a, 2, "nextSibling")
  2231. },
  2232. prev: function(a) {
  2233. return c.nth(a, 2, "previousSibling")
  2234. },
  2235. nextAll: function(a) {
  2236. return c.dir(a, "nextSibling")
  2237. },
  2238. prevAll: function(a) {
  2239. return c.dir(a, "previousSibling")
  2240. },
  2241. nextUntil: function(a, b, d) {
  2242. return c.dir(a, "nextSibling", d)
  2243. },
  2244. prevUntil: function(a, b, d) {
  2245. return c.dir(a, "previousSibling", d)
  2246. },
  2247. siblings: function(a) {
  2248. return c.sibling(a.parentNode.firstChild, a)
  2249. },
  2250. children: function(a) {
  2251. return c.sibling(a.firstChild)
  2252. },
  2253. contents: function(a) {
  2254. return c.nodeName(a, "iframe") ?
  2255. a.contentDocument || a.contentWindow.document : c.makeArray(a.childNodes)
  2256. }
  2257. }, function(a, b) {
  2258. c.fn[a] = function(d, f) {
  2259. var e = c.map(this, b, d);
  2260. ab.test(a) || (f = d);
  2261. if (f && typeof f === "string") e = c.filter(f, e);
  2262. e = this.length > 1 ? c.unique(e) : e;
  2263. if ((this.length > 1 || cb.test(f)) && bb.test(a)) e = e.reverse();
  2264. return this.pushStack(e, a, R.call(arguments)
  2265. .join(","))
  2266. }
  2267. });
  2268. c.extend({
  2269. filter: function(a, b, d) {
  2270. if (d) a = ":not(" + a + ")";
  2271. return c.find.matches(a, b)
  2272. },
  2273. dir: function(a, b, d) {
  2274. var f = [];
  2275. for (a = a[b]; a && a.nodeType !== 9 && (d === w || !c(a)
  2276. .is(d));) {
  2277. a.nodeType ===
  2278. 1 && f.push(a);
  2279. a = a[b]
  2280. }
  2281. return f
  2282. },
  2283. nth: function(a, b, d) {
  2284. b = b || 1;
  2285. for (var f = 0; a; a = a[d])
  2286. if (a.nodeType === 1 && ++f === b) break;
  2287. return a
  2288. },
  2289. sibling: function(a, b) {
  2290. for (var d = []; a; a = a.nextSibling) a.nodeType === 1 && a !== b && d.push(a);
  2291. return d
  2292. }
  2293. });
  2294. var Ga = / jQuery\d+="(?:\d+|null)"/g,
  2295. Y = /^\s+/,
  2296. db = /(<([\w:]+)[^>]*?)\/>/g,
  2297. eb = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
  2298. Ha = /<([\w:]+)/,
  2299. fb = /<tbody/i,
  2300. gb = /<|&\w+;/,
  2301. hb = function(a, b, d) {
  2302. return eb.test(d) ? a : b + "></" + d + ">"
  2303. },
  2304. G = {
  2305. option: [1, "<select multiple='multiple'>", "</select>"],
  2306. legend: [1, "<fieldset>", "</fieldset>"],
  2307. thead: [1, "<table>", "</table>"],
  2308. tr: [2, "<table><tbody>", "</tbody></table>"],
  2309. td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  2310. col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
  2311. area: [1, "<map>", "</map>"],
  2312. _default: [0, "", ""]
  2313. };
  2314. G.optgroup = G.option;
  2315. G.tbody = G.tfoot = G.colgroup = G.caption = G.thead;
  2316. G.th = G.td;
  2317. if (!c.support.htmlSerialize) G._default = [1, "div<div>", "</div>"];
  2318. c.fn.extend({
  2319. text: function(a) {
  2320. if (c.isFunction(a)) return this.each(function(b) {
  2321. var d = c(this);
  2322. return d.text(a.call(this, b, d.text()))
  2323. });
  2324. if (typeof a !== "object" && a !== w) return this.empty()
  2325. .append((this[0] && this[0].ownerDocument || s)
  2326. .createTextNode(a));
  2327. return c.getText(this)
  2328. },
  2329. wrapAll: function(a) {
  2330. if (c.isFunction(a)) return this.each(function(d) {
  2331. c(this)
  2332. .wrapAll(a.call(this, d))
  2333. });
  2334. if (this[0]) {
  2335. var b = c(a, this[0].ownerDocument)
  2336. .eq(0)
  2337. .clone(true);
  2338. this[0].parentNode && b.insertBefore(this[0]);
  2339. b.map(function() {
  2340. for (var d = this; d.firstChild && d.firstChild.nodeType === 1;) d = d.firstChild;
  2341. return d
  2342. })
  2343. .append(this)
  2344. }
  2345. return this
  2346. },
  2347. wrapInner: function(a) {
  2348. return this.each(function() {
  2349. var b = c(this),
  2350. d = b.contents();
  2351. d.length ? d.wrapAll(a) : b.append(a)
  2352. })
  2353. },
  2354. wrap: function(a) {
  2355. return this.each(function() {
  2356. c(this)
  2357. .wrapAll(a)
  2358. })
  2359. },
  2360. unwrap: function() {
  2361. return this.parent()
  2362. .each(function() {
  2363. c.nodeName(this, "body") || c(this)
  2364. .replaceWith(this.childNodes)
  2365. })
  2366. .end()
  2367. },
  2368. append: function() {
  2369. return this.domManip(arguments, true, function(a) {
  2370. this.nodeType === 1 && this.appendChild(a)
  2371. })
  2372. },
  2373. prepend: function() {
  2374. return this.domManip(arguments, true, function(a) {
  2375. this.nodeType === 1 &&
  2376. this.insertBefore(a, this.firstChild)
  2377. })
  2378. },
  2379. before: function() {
  2380. if (this[0] && this[0].parentNode) return this.domManip(arguments, false, function(b) {
  2381. this.parentNode.insertBefore(b, this)
  2382. });
  2383. else if (arguments.length) {
  2384. var a = c(arguments[0]);
  2385. a.push.apply(a, this.toArray());
  2386. return this.pushStack(a, "before", arguments)
  2387. }
  2388. },
  2389. after: function() {
  2390. if (this[0] && this[0].parentNode) return this.domManip(arguments, false, function(b) {
  2391. this.parentNode.insertBefore(b, this.nextSibling)
  2392. });
  2393. else if (arguments.length) {
  2394. var a = this.pushStack(this,
  2395. "after", arguments);
  2396. a.push.apply(a, c(arguments[0])
  2397. .toArray());
  2398. return a
  2399. }
  2400. },
  2401. clone: function(a) {
  2402. var b = this.map(function() {
  2403. if (!c.support.noCloneEvent && !c.isXMLDoc(this)) {
  2404. var d = this.outerHTML,
  2405. f = this.ownerDocument;
  2406. if (!d) {
  2407. d = f.createElement("div");
  2408. d.appendChild(this.cloneNode(true));
  2409. d = d.innerHTML
  2410. }
  2411. return c.clean([d.replace(Ga, "")
  2412. .replace(Y, "")
  2413. ], f)[0]
  2414. } else return this.cloneNode(true)
  2415. });
  2416. if (a === true) {
  2417. ta(this, b);
  2418. ta(this.find("*"), b.find("*"))
  2419. }
  2420. return b
  2421. },
  2422. html: function(a) {
  2423. if (a === w) return this[0] && this[0].nodeType ===
  2424. 1 ? this[0].innerHTML.replace(Ga, "") : null;
  2425. else if (typeof a === "string" && !/<script/i.test(a) && (c.support.leadingWhitespace || !Y.test(a)) && !G[(Ha.exec(a) || ["", ""])[1].toLowerCase()]) try {
  2426. for (var b = 0, d = this.length; b < d; b++)
  2427. if (this[b].nodeType === 1) {
  2428. T(this[b].getElementsByTagName("*"));
  2429. this[b].innerHTML = a
  2430. }
  2431. } catch (f) {
  2432. this.empty()
  2433. .append(a)
  2434. } else c.isFunction(a) ? this.each(function(e) {
  2435. var i = c(this),
  2436. j = i.html();
  2437. i.empty()
  2438. .append(function() {
  2439. return a.call(this, e, j)
  2440. })
  2441. }) : this.empty()
  2442. .append(a);
  2443. return this
  2444. },
  2445. replaceWith: function(a) {
  2446. if (this[0] &&
  2447. this[0].parentNode) {
  2448. c.isFunction(a) || (a = c(a)
  2449. .detach());
  2450. return this.each(function() {
  2451. var b = this.nextSibling,
  2452. d = this.parentNode;
  2453. c(this)
  2454. .remove();
  2455. b ? c(b)
  2456. .before(a) : c(d)
  2457. .append(a)
  2458. })
  2459. } else return this.pushStack(c(c.isFunction(a) ? a() : a), "replaceWith", a)
  2460. },
  2461. detach: function(a) {
  2462. return this.remove(a, true)
  2463. },
  2464. domManip: function(a, b, d) {
  2465. function f(t) {
  2466. return c.nodeName(t, "table") ? t.getElementsByTagName("tbody")[0] || t.appendChild(t.ownerDocument.createElement("tbody")) : t
  2467. }
  2468. var e, i, j = a[0],
  2469. o = [];
  2470. if (c.isFunction(j)) return this.each(function(t) {
  2471. var z =
  2472. c(this);
  2473. a[0] = j.call(this, t, b ? z.html() : w);
  2474. return z.domManip(a, b, d)
  2475. });
  2476. if (this[0]) {
  2477. e = a[0] && a[0].parentNode && a[0].parentNode.nodeType === 11 ? {
  2478. fragment: a[0].parentNode
  2479. } : ua(a, this, o);
  2480. if (i = e.fragment.firstChild) {
  2481. b = b && c.nodeName(i, "tr");
  2482. for (var p = 0, n = this.length; p < n; p++) d.call(b ? f(this[p], i) : this[p], e.cacheable || this.length > 1 || p > 0 ? e.fragment.cloneNode(true) : e.fragment)
  2483. }
  2484. o && c.each(o, La)
  2485. }
  2486. return this
  2487. }
  2488. });
  2489. c.fragments = {};
  2490. c.each({
  2491. appendTo: "append",
  2492. prependTo: "prepend",
  2493. insertBefore: "before",
  2494. insertAfter: "after",
  2495. replaceAll: "replaceWith"
  2496. },
  2497. function(a, b) {
  2498. c.fn[a] = function(d) {
  2499. var f = [];
  2500. d = c(d);
  2501. for (var e = 0, i = d.length; e < i; e++) {
  2502. var j = (e > 0 ? this.clone(true) : this)
  2503. .get();
  2504. c.fn[b].apply(c(d[e]), j);
  2505. f = f.concat(j)
  2506. }
  2507. return this.pushStack(f, a, d.selector)
  2508. }
  2509. });
  2510. c.each({
  2511. remove: function(a, b) {
  2512. if (!a || c.filter(a, [this])
  2513. .length) {
  2514. if (!b && this.nodeType === 1) {
  2515. T(this.getElementsByTagName("*"));
  2516. T([this])
  2517. }
  2518. this.parentNode && this.parentNode.removeChild(this)
  2519. }
  2520. },
  2521. empty: function() {
  2522. for (this.nodeType === 1 && T(this.getElementsByTagName("*")); this.firstChild;) this.removeChild(this.firstChild)
  2523. }
  2524. },
  2525. function(a, b) {
  2526. c.fn[a] = function() {
  2527. return this.each(b, arguments)
  2528. }
  2529. });
  2530. c.extend({
  2531. clean: function(a, b, d, f) {
  2532. b = b || s;
  2533. if (typeof b.createElement === "undefined") b = b.ownerDocument || b[0] && b[0].ownerDocument || s;
  2534. var e = [];
  2535. c.each(a, function(i, j) {
  2536. if (typeof j === "number") j += "";
  2537. if (j) {
  2538. if (typeof j === "string" && !gb.test(j)) j = b.createTextNode(j);
  2539. else if (typeof j === "string") {
  2540. j = j.replace(db, hb);
  2541. var o = (Ha.exec(j) || ["", ""])[1].toLowerCase(),
  2542. p = G[o] || G._default,
  2543. n = p[0];
  2544. i = b.createElement("div");
  2545. for (i.innerHTML = p[1] + j + p[2]; n--;) i = i.lastChild;
  2546. if (!c.support.tbody) {
  2547. n = fb.test(j);
  2548. o = o === "table" && !n ? i.firstChild && i.firstChild.childNodes : p[1] === "<table>" && !n ? i.childNodes : [];
  2549. for (p = o.length - 1; p >= 0; --p) c.nodeName(o[p], "tbody") && !o[p].childNodes.length && o[p].parentNode.removeChild(o[p])
  2550. }!c.support.leadingWhitespace && Y.test(j) && i.insertBefore(b.createTextNode(Y.exec(j)[0]), i.firstChild);
  2551. j = c.makeArray(i.childNodes)
  2552. }
  2553. if (j.nodeType) e.push(j);
  2554. else e = c.merge(e, j)
  2555. }
  2556. });
  2557. if (d)
  2558. for (a = 0; e[a]; a++)
  2559. if (f && c.nodeName(e[a], "script") && (!e[a].type || e[a].type.toLowerCase() ===
  2560. "text/javascript")) f.push(e[a].parentNode ? e[a].parentNode.removeChild(e[a]) : e[a]);
  2561. else {
  2562. e[a].nodeType === 1 && e.splice.apply(e, [a + 1, 0].concat(c.makeArray(e[a].getElementsByTagName("script"))));
  2563. d.appendChild(e[a])
  2564. } return e
  2565. }
  2566. });
  2567. var ib = /z-?index|font-?weight|opacity|zoom|line-?height/i,
  2568. Ia = /alpha\([^)]*\)/,
  2569. Ja = /opacity=([^)]*)/,
  2570. ja = /float/i,
  2571. ka = /-([a-z])/ig,
  2572. jb = /([A-Z])/g,
  2573. kb = /^-?\d+(?:px)?$/i,
  2574. lb = /^-?\d/,
  2575. mb = {
  2576. position: "absolute",
  2577. visibility: "hidden",
  2578. display: "block"
  2579. },
  2580. nb = ["Left", "Right"],
  2581. ob = ["Top", "Bottom"],
  2582. pb = s.defaultView &&
  2583. s.defaultView.getComputedStyle,
  2584. Ka = c.support.cssFloat ? "cssFloat" : "styleFloat",
  2585. la = function(a, b) {
  2586. return b.toUpperCase()
  2587. };
  2588. c.fn.css = function(a, b) {
  2589. return $(this, a, b, true, function(d, f, e) {
  2590. if (e === w) return c.curCSS(d, f);
  2591. if (typeof e === "number" && !ib.test(f)) e += "px";
  2592. c.style(d, f, e)
  2593. })
  2594. };
  2595. c.extend({
  2596. style: function(a, b, d) {
  2597. if (!a || a.nodeType === 3 || a.nodeType === 8) return w;
  2598. if ((b === "width" || b === "height") && parseFloat(d) < 0) d = w;
  2599. var f = a.style || a,
  2600. e = d !== w;
  2601. if (!c.support.opacity && b === "opacity") {
  2602. if (e) {
  2603. f.zoom = 1;
  2604. b = parseInt(d, 10) + "" ===
  2605. "NaN" ? "" : "alpha(opacity=" + d * 100 + ")";
  2606. a = f.filter || c.curCSS(a, "filter") || "";
  2607. f.filter = Ia.test(a) ? a.replace(Ia, b) : b
  2608. }
  2609. return f.filter && f.filter.indexOf("opacity=") >= 0 ? parseFloat(Ja.exec(f.filter)[1]) / 100 + "" : ""
  2610. }
  2611. if (ja.test(b)) b = Ka;
  2612. b = b.replace(ka, la);
  2613. if (e) f[b] = d;
  2614. return f[b]
  2615. },
  2616. css: function(a, b, d, f) {
  2617. if (b === "width" || b === "height") {
  2618. var e, i = b === "width" ? nb : ob;
  2619. function j() {
  2620. e = b === "width" ? a.offsetWidth : a.offsetHeight;
  2621. f !== "border" && c.each(i, function() {
  2622. f || (e -= parseFloat(c.curCSS(a, "padding" + this, true)) || 0);
  2623. if (f === "margin") e +=
  2624. parseFloat(c.curCSS(a, "margin" + this, true)) || 0;
  2625. else e -= parseFloat(c.curCSS(a, "border" + this + "Width", true)) || 0
  2626. })
  2627. }
  2628. a.offsetWidth !== 0 ? j() : c.swap(a, mb, j);
  2629. return Math.max(0, Math.round(e))
  2630. }
  2631. return c.curCSS(a, b, d)
  2632. },
  2633. curCSS: function(a, b, d) {
  2634. var f, e = a.style;
  2635. if (!c.support.opacity && b === "opacity" && a.currentStyle) {
  2636. f = Ja.test(a.currentStyle.filter || "") ? parseFloat(RegExp.$1) / 100 + "" : "";
  2637. return f === "" ? "1" : f
  2638. }
  2639. if (ja.test(b)) b = Ka;
  2640. if (!d && e && e[b]) f = e[b];
  2641. else if (pb) {
  2642. if (ja.test(b)) b = "float";
  2643. b = b.replace(jb, "-$1")
  2644. .toLowerCase();
  2645. e =
  2646. a.ownerDocument.defaultView;
  2647. if (!e) return null;
  2648. if (a = e.getComputedStyle(a, null)) f = a.getPropertyValue(b);
  2649. if (b === "opacity" && f === "") f = "1"
  2650. } else if (a.currentStyle) {
  2651. d = b.replace(ka, la);
  2652. f = a.currentStyle[b] || a.currentStyle[d];
  2653. if (!kb.test(f) && lb.test(f)) {
  2654. b = e.left;
  2655. var i = a.runtimeStyle.left;
  2656. a.runtimeStyle.left = a.currentStyle.left;
  2657. e.left = d === "fontSize" ? "1em" : f || 0;
  2658. f = e.pixelLeft + "px";
  2659. e.left = b;
  2660. a.runtimeStyle.left = i
  2661. }
  2662. }
  2663. return f
  2664. },
  2665. swap: function(a, b, d) {
  2666. var f = {};
  2667. for (var e in b) {
  2668. f[e] = a.style[e];
  2669. a.style[e] = b[e]
  2670. }
  2671. d.call(a);
  2672. for (e in b) a.style[e] =
  2673. f[e]
  2674. }
  2675. });
  2676. if (c.expr && c.expr.filters) {
  2677. c.expr.filters.hidden = function(a) {
  2678. var b = a.offsetWidth,
  2679. d = a.offsetHeight,
  2680. f = a.nodeName.toLowerCase() === "tr";
  2681. return b === 0 && d === 0 && !f ? true : b > 0 && d > 0 && !f ? false : c.curCSS(a, "display") === "none"
  2682. };
  2683. c.expr.filters.visible = function(a) {
  2684. return !c.expr.filters.hidden(a)
  2685. }
  2686. }
  2687. var qb = K(),
  2688. rb = /<script(.|\s)*?\/script>/gi,
  2689. sb = /select|textarea/i,
  2690. tb = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
  2691. O = /=\?(&|$)/,
  2692. ma = /\?/,
  2693. ub = /(\?|&)_=.*?(&|$)/,
  2694. vb = /^(\w+:)?\/\/([^\/?#]+)/,
  2695. wb = /%20/g;
  2696. c.fn.extend({
  2697. _load: c.fn.load,
  2698. load: function(a, b, d) {
  2699. if (typeof a !== "string") return this._load(a);
  2700. else if (!this.length) return this;
  2701. var f = a.indexOf(" ");
  2702. if (f >= 0) {
  2703. var e = a.slice(f, a.length);
  2704. a = a.slice(0, f)
  2705. }
  2706. f = "GET";
  2707. if (b)
  2708. if (c.isFunction(b)) {
  2709. d = b;
  2710. b = null
  2711. } else if (typeof b === "object") {
  2712. b = c.param(b, c.ajaxSettings.traditional);
  2713. f = "POST"
  2714. }
  2715. c.ajax({
  2716. url: a,
  2717. type: f,
  2718. dataType: "html",
  2719. data: b,
  2720. context: this,
  2721. complete: function(i, j) {
  2722. if (j === "success" || j === "notmodified") this.html(e ? c("<div />")
  2723. .append(i.responseText.replace(rb,
  2724. ""))
  2725. .find(e) : i.responseText);
  2726. d && this.each(d, [i.responseText, j, i])
  2727. }
  2728. });
  2729. return this
  2730. },
  2731. serialize: function() {
  2732. return c.param(this.serializeArray())
  2733. },
  2734. serializeArray: function() {
  2735. return this.map(function() {
  2736. return this.elements ? c.makeArray(this.elements) : this
  2737. })
  2738. .filter(function() {
  2739. return this.name && !this.disabled && (this.checked || sb.test(this.nodeName) || tb.test(this.type))
  2740. })
  2741. .map(function(a, b) {
  2742. a = c(this)
  2743. .val();
  2744. return a == null ? null : c.isArray(a) ? c.map(a, function(d) {
  2745. return {
  2746. name: b.name,
  2747. value: d
  2748. }
  2749. }) : {
  2750. name: b.name,
  2751. value: a
  2752. }
  2753. })
  2754. .get()
  2755. }
  2756. });
  2757. c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(a, b) {
  2758. c.fn[b] = function(d) {
  2759. return this.bind(b, d)
  2760. }
  2761. });
  2762. c.extend({
  2763. get: function(a, b, d, f) {
  2764. if (c.isFunction(b)) {
  2765. f = f || d;
  2766. d = b;
  2767. b = null
  2768. }
  2769. return c.ajax({
  2770. type: "GET",
  2771. url: a,
  2772. data: b,
  2773. success: d,
  2774. dataType: f
  2775. })
  2776. },
  2777. getScript: function(a, b) {
  2778. return c.get(a, null, b, "script")
  2779. },
  2780. getJSON: function(a, b, d) {
  2781. return c.get(a, b, d, "json")
  2782. },
  2783. post: function(a, b, d, f) {
  2784. if (c.isFunction(b)) {
  2785. f = f || d;
  2786. d = b;
  2787. b = {}
  2788. }
  2789. return c.ajax({
  2790. type: "POST",
  2791. url: a,
  2792. data: b,
  2793. success: d,
  2794. dataType: f
  2795. })
  2796. },
  2797. ajaxSetup: function(a) {
  2798. c.extend(c.ajaxSettings, a)
  2799. },
  2800. ajaxSettings: {
  2801. url: location.href,
  2802. global: true,
  2803. type: "GET",
  2804. contentType: "application/x-www-form-urlencoded",
  2805. processData: true,
  2806. async: true,
  2807. xhr: A.XMLHttpRequest && (A.location.protocol !== "file:" || !A.ActiveXObject) ? function() {
  2808. return new A.XMLHttpRequest
  2809. } : function() {
  2810. try {
  2811. return new A.ActiveXObject("Microsoft.XMLHTTP")
  2812. } catch (a) {}
  2813. },
  2814. accepts: {
  2815. xml: "application/xml, text/xml",
  2816. html: "text/html",
  2817. script: "text/javascript, application/javascript",
  2818. json: "application/json, text/javascript",
  2819. text: "text/plain",
  2820. _default: "*/*"
  2821. }
  2822. },
  2823. lastModified: {},
  2824. etag: {},
  2825. ajax: function(a) {
  2826. function b() {
  2827. e.success && e.success.call(p, o, j, x);
  2828. e.global && f("ajaxSuccess", [x, e])
  2829. }
  2830. function d() {
  2831. e.complete && e.complete.call(p, x, j);
  2832. e.global && f("ajaxComplete", [x, e]);
  2833. e.global && !--c.active && c.event.trigger("ajaxStop")
  2834. }
  2835. function f(r, q) {
  2836. (e.context ? c(e.context) : c.event)
  2837. .trigger(r, q)
  2838. }
  2839. var e = c.extend(true, {}, c.ajaxSettings, a),
  2840. i, j, o, p = e.context || e,
  2841. n = e.type.toUpperCase();
  2842. if (e.data && e.processData && typeof e.data !== "string") e.data = c.param(e.data,
  2843. e.traditional);
  2844. if (e.dataType === "jsonp") {
  2845. if (n === "GET") O.test(e.url) || (e.url += (ma.test(e.url) ? "&" : "?") + (e.jsonp || "callback") + "=?");
  2846. else if (!e.data || !O.test(e.data)) e.data = (e.data ? e.data + "&" : "") + (e.jsonp || "callback") + "=?";
  2847. e.dataType = "json"
  2848. }
  2849. if (e.dataType === "json" && (e.data && O.test(e.data) || O.test(e.url))) {
  2850. i = e.jsonpCallback || "jsonp" + qb++;
  2851. if (e.data) e.data = (e.data + "")
  2852. .replace(O, "=" + i + "$1");
  2853. e.url = e.url.replace(O, "=" + i + "$1");
  2854. e.dataType = "script";
  2855. A[i] = A[i] || function(r) {
  2856. o = r;
  2857. b();
  2858. d();
  2859. A[i] = w;
  2860. try {
  2861. delete A[i]
  2862. } catch (q) {}
  2863. B &&
  2864. B.removeChild(C)
  2865. }
  2866. }
  2867. if (e.dataType === "script" && e.cache === null) e.cache = false;
  2868. if (e.cache === false && n === "GET") {
  2869. var t = K(),
  2870. z = e.url.replace(ub, "$1_=" + t + "$2");
  2871. e.url = z + (z === e.url ? (ma.test(e.url) ? "&" : "?") + "_=" + t : "")
  2872. }
  2873. if (e.data && n === "GET") e.url += (ma.test(e.url) ? "&" : "?") + e.data;
  2874. e.global && !c.active++ && c.event.trigger("ajaxStart");
  2875. t = (t = vb.exec(e.url)) && (t[1] && t[1] !== location.protocol || t[2] !== location.host);
  2876. if (e.dataType === "script" && n === "GET" && t) {
  2877. var B = s.getElementsByTagName("head")[0] || s.documentElement,
  2878. C = s.createElement("script");
  2879. C.src = e.url;
  2880. if (e.scriptCharset) C.charset = e.scriptCharset;
  2881. if (!i) {
  2882. var D = false;
  2883. C.onload = C.onreadystatechange = function() {
  2884. if (!D && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
  2885. D = true;
  2886. b();
  2887. d();
  2888. C.onload = C.onreadystatechange = null;
  2889. B && C.parentNode && B.removeChild(C)
  2890. }
  2891. }
  2892. }
  2893. B.insertBefore(C, B.firstChild);
  2894. return w
  2895. }
  2896. var F = false,
  2897. x = e.xhr();
  2898. if (x) {
  2899. e.username ? x.open(n, e.url, e.async, e.username, e.password) : x.open(n, e.url, e.async);
  2900. try {
  2901. if (e.data || a && a.contentType) x.setRequestHeader("Content-Type",
  2902. e.contentType);
  2903. if (e.ifModified) {
  2904. c.lastModified[e.url] && x.setRequestHeader("If-Modified-Since", c.lastModified[e.url]);
  2905. c.etag[e.url] && x.setRequestHeader("If-None-Match", c.etag[e.url])
  2906. }
  2907. t || x.setRequestHeader("X-Requested-With", "XMLHttpRequest");
  2908. x.setRequestHeader("Accept", e.dataType && e.accepts[e.dataType] ? e.accepts[e.dataType] + ", */*" : e.accepts._default)
  2909. } catch (ia) {}
  2910. if (e.beforeSend && e.beforeSend.call(p, x, e) === false) {
  2911. e.global && !--c.active && c.event.trigger("ajaxStop");
  2912. x.abort();
  2913. return false
  2914. }
  2915. e.global && f("ajaxSend",
  2916. [x, e]);
  2917. var g = x.onreadystatechange = function(r) {
  2918. if (!x || x.readyState === 0) {
  2919. F || d();
  2920. F = true;
  2921. if (x) x.onreadystatechange = c.noop
  2922. } else if (!F && x && (x.readyState === 4 || r === "timeout")) {
  2923. F = true;
  2924. x.onreadystatechange = c.noop;
  2925. j = r === "timeout" ? "timeout" : !c.httpSuccess(x) ? "error" : e.ifModified && c.httpNotModified(x, e.url) ? "notmodified" : "success";
  2926. if (j === "success") try {
  2927. o = c.httpData(x, e.dataType, e)
  2928. } catch (q) {
  2929. j = "parsererror"
  2930. }
  2931. if (j === "success" || j === "notmodified") i || b();
  2932. else c.handleError(e, x, j);
  2933. d();
  2934. r === "timeout" && x.abort();
  2935. if (e.async) x =
  2936. null
  2937. }
  2938. };
  2939. try {
  2940. var h = x.abort;
  2941. x.abort = function() {
  2942. if (x) {
  2943. h.call(x);
  2944. if (x) x.readyState = 0
  2945. }
  2946. g()
  2947. }
  2948. } catch (k) {}
  2949. e.async && e.timeout > 0 && setTimeout(function() {
  2950. x && !F && g("timeout")
  2951. }, e.timeout);
  2952. try {
  2953. x.send(n === "POST" || n === "PUT" || n === "DELETE" ? e.data : null)
  2954. } catch (m) {
  2955. c.handleError(e, x, null, m);
  2956. d()
  2957. }
  2958. e.async || g();
  2959. return x
  2960. }
  2961. },
  2962. handleError: function(a, b, d, f) {
  2963. if (a.error) a.error.call(a.context || A, b, d, f);
  2964. if (a.global)(a.context ? c(a.context) : c.event)
  2965. .trigger("ajaxError", [b, a, f])
  2966. },
  2967. active: 0,
  2968. httpSuccess: function(a) {
  2969. try {
  2970. return !a.status && location.protocol ===
  2971. "file:" || a.status >= 200 && a.status < 300 || a.status === 304 || a.status === 1223 || a.status === 0
  2972. } catch (b) {}
  2973. return false
  2974. },
  2975. httpNotModified: function(a, b) {
  2976. var d = a.getResponseHeader("Last-Modified"),
  2977. f = a.getResponseHeader("Etag");
  2978. if (d) c.lastModified[b] = d;
  2979. if (f) c.etag[b] = f;
  2980. return a.status === 304 || a.status === 0
  2981. },
  2982. httpData: function(a, b, d) {
  2983. var f = a.getResponseHeader("content-type") || "",
  2984. e = b === "xml" || !b && f.indexOf("xml") >= 0;
  2985. a = e ? a.responseXML : a.responseText;
  2986. if (e && a.documentElement.nodeName === "parsererror") throw "parsererror";
  2987. if (d &&
  2988. d.dataFilter) a = d.dataFilter(a, b);
  2989. if (typeof a === "string")
  2990. if (b === "json" || !b && f.indexOf("json") >= 0)
  2991. if (/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
  2992. .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]")
  2993. .replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) a = A.JSON && A.JSON.parse ? A.JSON.parse(a) : (new Function("return " + a))();
  2994. else throw "Invalid JSON: " + a;
  2995. else if (b === "script" || !b && f.indexOf("javascript") >= 0) c.globalEval(a);
  2996. return a
  2997. },
  2998. param: function(a, b) {
  2999. function d(e, i) {
  3000. i =
  3001. c.isFunction(i) ? i() : i;
  3002. f[f.length] = encodeURIComponent(e) + "=" + encodeURIComponent(i)
  3003. }
  3004. var f = [];
  3005. if (b === w) b = c.ajaxSettings.traditional;
  3006. c.isArray(a) || a.jquery ? c.each(a, function() {
  3007. d(this.name, this.value)
  3008. }) : c.each(a, function e(i, j) {
  3009. if (c.isArray(j)) c.each(j, function(o, p) {
  3010. b ? d(i, p) : e(i + "[" + (typeof p === "object" || c.isArray(p) ? o : "") + "]", p)
  3011. });
  3012. else !b && j != null && typeof j === "object" ? c.each(j, function(o, p) {
  3013. e(i + "[" + o + "]", p)
  3014. }) : d(i, j)
  3015. });
  3016. return f.join("&")
  3017. .replace(wb, "+")
  3018. }
  3019. });
  3020. var na = {},
  3021. xb = /toggle|show|hide/,
  3022. yb = /^([+-]=)?([\d+-.]+)(.*)$/,
  3023. Z, va = [
  3024. ["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"],
  3025. ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"],
  3026. ["opacity"]
  3027. ];
  3028. c.fn.extend({
  3029. show: function(a, b) {
  3030. if (a != null) return this.animate(L("show", 3), a, b);
  3031. else {
  3032. a = 0;
  3033. for (b = this.length; a < b; a++) {
  3034. var d = c.data(this[a], "olddisplay");
  3035. this[a].style.display = d || "";
  3036. if (c.css(this[a], "display") === "none") {
  3037. d = this[a].nodeName;
  3038. var f;
  3039. if (na[d]) f = na[d];
  3040. else {
  3041. var e = c("<" + d + " />")
  3042. .appendTo("body");
  3043. f = e.css("display");
  3044. if (f === "none") f = "block";
  3045. e.remove();
  3046. na[d] = f
  3047. }
  3048. c.data(this[a], "olddisplay", f)
  3049. }
  3050. }
  3051. a = 0;
  3052. for (b = this.length; a < b; a++) this[a].style.display = c.data(this[a], "olddisplay") || "";
  3053. return this
  3054. }
  3055. },
  3056. hide: function(a, b) {
  3057. if (a != null) return this.animate(L("hide", 3), a, b);
  3058. else {
  3059. a = 0;
  3060. for (b = this.length; a < b; a++) {
  3061. var d = c.data(this[a], "olddisplay");
  3062. !d && d !== "none" && c.data(this[a], "olddisplay", c.css(this[a], "display"))
  3063. }
  3064. a = 0;
  3065. for (b = this.length; a < b; a++) this[a].style.display = "none";
  3066. return this
  3067. }
  3068. },
  3069. _toggle: c.fn.toggle,
  3070. toggle: function(a, b) {
  3071. var d = typeof a === "boolean";
  3072. if (c.isFunction(a) &&
  3073. c.isFunction(b)) this._toggle.apply(this, arguments);
  3074. else a == null || d ? this.each(function() {
  3075. var f = d ? a : c(this)
  3076. .is(":hidden");
  3077. c(this)[f ? "show" : "hide"]()
  3078. }) : this.animate(L("toggle", 3), a, b);
  3079. return this
  3080. },
  3081. fadeTo: function(a, b, d) {
  3082. return this.filter(":hidden")
  3083. .css("opacity", 0)
  3084. .show()
  3085. .end()
  3086. .animate({
  3087. opacity: b
  3088. }, a, d)
  3089. },
  3090. animate: function(a, b, d, f) {
  3091. var e = c.speed(b, d, f);
  3092. if (c.isEmptyObject(a)) return this.each(e.complete);
  3093. return this[e.queue === false ? "each" : "queue"](function() {
  3094. var i = c.extend({}, e),
  3095. j, o = this.nodeType === 1 && c(this)
  3096. .is(":hidden"),
  3097. p = this;
  3098. for (j in a) {
  3099. var n = j.replace(ka, la);
  3100. if (j !== n) {
  3101. a[n] = a[j];
  3102. delete a[j];
  3103. j = n
  3104. }
  3105. if (a[j] === "hide" && o || a[j] === "show" && !o) return i.complete.call(this);
  3106. if ((j === "height" || j === "width") && this.style) {
  3107. i.display = c.css(this, "display");
  3108. i.overflow = this.style.overflow
  3109. }
  3110. if (c.isArray(a[j])) {
  3111. (i.specialEasing = i.specialEasing || {})[j] = a[j][1];
  3112. a[j] = a[j][0]
  3113. }
  3114. }
  3115. if (i.overflow != null) this.style.overflow = "hidden";
  3116. i.curAnim = c.extend({}, a);
  3117. c.each(a, function(t, z) {
  3118. var B = new c.fx(p, i, t);
  3119. if (xb.test(z)) B[z === "toggle" ? o ? "show" : "hide" : z](a);
  3120. else {
  3121. var C = yb.exec(z),
  3122. D = B.cur(true) || 0;
  3123. if (C) {
  3124. z = parseFloat(C[2]);
  3125. var F = C[3] || "px";
  3126. if (F !== "px") {
  3127. p.style[t] = (z || 1) + F;
  3128. D = (z || 1) / B.cur(true) * D;
  3129. p.style[t] = D + F
  3130. }
  3131. if (C[1]) z = (C[1] === "-=" ? -1 : 1) * z + D;
  3132. B.custom(D, z, F)
  3133. } else B.custom(D, z, "")
  3134. }
  3135. });
  3136. return true
  3137. })
  3138. },
  3139. stop: function(a, b) {
  3140. var d = c.timers;
  3141. a && this.queue([]);
  3142. this.each(function() {
  3143. for (var f = d.length - 1; f >= 0; f--)
  3144. if (d[f].elem === this) {
  3145. b && d[f](true);
  3146. d.splice(f, 1)
  3147. }
  3148. });
  3149. b || this.dequeue();
  3150. return this
  3151. }
  3152. });
  3153. c.each({
  3154. slideDown: L("show", 1),
  3155. slideUp: L("hide", 1),
  3156. slideToggle: L("toggle",
  3157. 1),
  3158. fadeIn: {
  3159. opacity: "show"
  3160. },
  3161. fadeOut: {
  3162. opacity: "hide"
  3163. }
  3164. }, function(a, b) {
  3165. c.fn[a] = function(d, f) {
  3166. return this.animate(b, d, f)
  3167. }
  3168. });
  3169. c.extend({
  3170. speed: function(a, b, d) {
  3171. var f = a && typeof a === "object" ? a : {
  3172. complete: d || !d && b || c.isFunction(a) && a,
  3173. duration: a,
  3174. easing: d && b || b && !c.isFunction(b) && b
  3175. };
  3176. f.duration = c.fx.off ? 0 : typeof f.duration === "number" ? f.duration : c.fx.speeds[f.duration] || c.fx.speeds._default;
  3177. f.old = f.complete;
  3178. f.complete = function() {
  3179. f.queue !== false && c(this)
  3180. .dequeue();
  3181. c.isFunction(f.old) && f.old.call(this)
  3182. };
  3183. return f
  3184. },
  3185. easing: {
  3186. linear: function(a,
  3187. b, d, f) {
  3188. return d + f * a
  3189. },
  3190. swing: function(a, b, d, f) {
  3191. return (-Math.cos(a * Math.PI) / 2 + 0.5) * f + d
  3192. }
  3193. },
  3194. timers: [],
  3195. fx: function(a, b, d) {
  3196. this.options = b;
  3197. this.elem = a;
  3198. this.prop = d;
  3199. if (!b.orig) b.orig = {}
  3200. }
  3201. });
  3202. c.fx.prototype = {
  3203. update: function() {
  3204. this.options.step && this.options.step.call(this.elem, this.now, this);
  3205. (c.fx.step[this.prop] || c.fx.step._default)(this);
  3206. if ((this.prop === "height" || this.prop === "width") && this.elem.style) this.elem.style.display = "block"
  3207. },
  3208. cur: function(a) {
  3209. if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] ==
  3210. null)) return this.elem[this.prop];
  3211. return (a = parseFloat(c.css(this.elem, this.prop, a))) && a > -10000 ? a : parseFloat(c.curCSS(this.elem, this.prop)) || 0
  3212. },
  3213. custom: function(a, b, d) {
  3214. function f(i) {
  3215. return e.step(i)
  3216. }
  3217. this.startTime = K();
  3218. this.start = a;
  3219. this.end = b;
  3220. this.unit = d || this.unit || "px";
  3221. this.now = this.start;
  3222. this.pos = this.state = 0;
  3223. var e = this;
  3224. f.elem = this.elem;
  3225. if (f() && c.timers.push(f) && !Z) Z = setInterval(c.fx.tick, 13)
  3226. },
  3227. show: function() {
  3228. this.options.orig[this.prop] = c.style(this.elem, this.prop);
  3229. this.options.show = true;
  3230. this.custom(this.prop ===
  3231. "width" || this.prop === "height" ? 1 : 0, this.cur());
  3232. c(this.elem)
  3233. .show()
  3234. },
  3235. hide: function() {
  3236. this.options.orig[this.prop] = c.style(this.elem, this.prop);
  3237. this.options.hide = true;
  3238. this.custom(this.cur(), 0)
  3239. },
  3240. step: function(a) {
  3241. var b = K(),
  3242. d = true;
  3243. if (a || b >= this.options.duration + this.startTime) {
  3244. this.now = this.end;
  3245. this.pos = this.state = 1;
  3246. this.update();
  3247. this.options.curAnim[this.prop] = true;
  3248. for (var f in this.options.curAnim)
  3249. if (this.options.curAnim[f] !== true) d = false;
  3250. if (d) {
  3251. if (this.options.display != null) {
  3252. this.elem.style.overflow =
  3253. this.options.overflow;
  3254. a = c.data(this.elem, "olddisplay");
  3255. this.elem.style.display = a ? a : this.options.display;
  3256. if (c.css(this.elem, "display") === "none") this.elem.style.display = "block"
  3257. }
  3258. this.options.hide && c(this.elem)
  3259. .hide();
  3260. if (this.options.hide || this.options.show)
  3261. for (var e in this.options.curAnim) c.style(this.elem, e, this.options.orig[e]);
  3262. this.options.complete.call(this.elem)
  3263. }
  3264. return false
  3265. } else {
  3266. e = b - this.startTime;
  3267. this.state = e / this.options.duration;
  3268. a = this.options.easing || (c.easing.swing ? "swing" : "linear");
  3269. this.pos =
  3270. c.easing[this.options.specialEasing && this.options.specialEasing[this.prop] || a](this.state, e, 0, 1, this.options.duration);
  3271. this.now = this.start + (this.end - this.start) * this.pos;
  3272. this.update()
  3273. }
  3274. return true
  3275. }
  3276. };
  3277. c.extend(c.fx, {
  3278. tick: function() {
  3279. for (var a = c.timers, b = 0; b < a.length; b++) a[b]() || a.splice(b--, 1);
  3280. a.length || c.fx.stop()
  3281. },
  3282. stop: function() {
  3283. clearInterval(Z);
  3284. Z = null
  3285. },
  3286. speeds: {
  3287. slow: 600,
  3288. fast: 200,
  3289. _default: 400
  3290. },
  3291. step: {
  3292. opacity: function(a) {
  3293. c.style(a.elem, "opacity", a.now)
  3294. },
  3295. _default: function(a) {
  3296. if (a.elem.style && a.elem.style[a.prop] !=
  3297. null) a.elem.style[a.prop] = (a.prop === "width" || a.prop === "height" ? Math.max(0, a.now) : a.now) + a.unit;
  3298. else a.elem[a.prop] = a.now
  3299. }
  3300. }
  3301. });
  3302. if (c.expr && c.expr.filters) c.expr.filters.animated = function(a) {
  3303. return c.grep(c.timers, function(b) {
  3304. return a === b.elem
  3305. })
  3306. .length
  3307. };
  3308. c.fn.offset = "getBoundingClientRect" in s.documentElement ? function(a) {
  3309. var b = this[0];
  3310. if (!b || !b.ownerDocument) return null;
  3311. if (a) return this.each(function(e) {
  3312. c.offset.setOffset(this, a, e)
  3313. });
  3314. if (b === b.ownerDocument.body) return c.offset.bodyOffset(b);
  3315. var d = b.getBoundingClientRect(),
  3316. f = b.ownerDocument;
  3317. b = f.body;
  3318. f = f.documentElement;
  3319. return {
  3320. top: d.top + (self.pageYOffset || c.support.boxModel && f.scrollTop || b.scrollTop) - (f.clientTop || b.clientTop || 0),
  3321. left: d.left + (self.pageXOffset || c.support.boxModel && f.scrollLeft || b.scrollLeft) - (f.clientLeft || b.clientLeft || 0)
  3322. }
  3323. } : function(a) {
  3324. var b = this[0];
  3325. if (!b || !b.ownerDocument) return null;
  3326. if (a) return this.each(function(t) {
  3327. c.offset.setOffset(this, a, t)
  3328. });
  3329. if (b === b.ownerDocument.body) return c.offset.bodyOffset(b);
  3330. c.offset.initialize();
  3331. var d = b.offsetParent,
  3332. f =
  3333. b,
  3334. e = b.ownerDocument,
  3335. i, j = e.documentElement,
  3336. o = e.body;
  3337. f = (e = e.defaultView) ? e.getComputedStyle(b, null) : b.currentStyle;
  3338. for (var p = b.offsetTop, n = b.offsetLeft;
  3339. (b = b.parentNode) && b !== o && b !== j;) {
  3340. if (c.offset.supportsFixedPosition && f.position === "fixed") break;
  3341. i = e ? e.getComputedStyle(b, null) : b.currentStyle;
  3342. p -= b.scrollTop;
  3343. n -= b.scrollLeft;
  3344. if (b === d) {
  3345. p += b.offsetTop;
  3346. n += b.offsetLeft;
  3347. if (c.offset.doesNotAddBorder && !(c.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(b.nodeName))) {
  3348. p += parseFloat(i.borderTopWidth) ||
  3349. 0;
  3350. n += parseFloat(i.borderLeftWidth) || 0
  3351. }
  3352. f = d;
  3353. d = b.offsetParent
  3354. }
  3355. if (c.offset.subtractsBorderForOverflowNotVisible && i.overflow !== "visible") {
  3356. p += parseFloat(i.borderTopWidth) || 0;
  3357. n += parseFloat(i.borderLeftWidth) || 0
  3358. }
  3359. f = i
  3360. }
  3361. if (f.position === "relative" || f.position === "static") {
  3362. p += o.offsetTop;
  3363. n += o.offsetLeft
  3364. }
  3365. if (c.offset.supportsFixedPosition && f.position === "fixed") {
  3366. p += Math.max(j.scrollTop, o.scrollTop);
  3367. n += Math.max(j.scrollLeft, o.scrollLeft)
  3368. }
  3369. return {
  3370. top: p,
  3371. left: n
  3372. }
  3373. };
  3374. c.offset = {
  3375. initialize: function() {
  3376. var a = s.body,
  3377. b = s.createElement("div"),
  3378. d, f, e, i = parseFloat(c.curCSS(a, "marginTop", true)) || 0;
  3379. c.extend(b.style, {
  3380. position: "absolute",
  3381. top: 0,
  3382. left: 0,
  3383. margin: 0,
  3384. border: 0,
  3385. width: "1px",
  3386. height: "1px",
  3387. visibility: "hidden"
  3388. });
  3389. b.innerHTML = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
  3390. a.insertBefore(b, a.firstChild);
  3391. d = b.firstChild;
  3392. f = d.firstChild;
  3393. e = d.nextSibling.firstChild.firstChild;
  3394. this.doesNotAddBorder = f.offsetTop !== 5;
  3395. this.doesAddBorderForTableAndCells = e.offsetTop === 5;
  3396. f.style.position = "fixed";
  3397. f.style.top = "20px";
  3398. this.supportsFixedPosition = f.offsetTop === 20 || f.offsetTop === 15;
  3399. f.style.position = f.style.top = "";
  3400. d.style.overflow = "hidden";
  3401. d.style.position = "relative";
  3402. this.subtractsBorderForOverflowNotVisible = f.offsetTop === -5;
  3403. this.doesNotIncludeMarginInBodyOffset = a.offsetTop !== i;
  3404. a.removeChild(b);
  3405. c.offset.initialize = c.noop
  3406. },
  3407. bodyOffset: function(a) {
  3408. var b = a.offsetTop,
  3409. d = a.offsetLeft;
  3410. c.offset.initialize();
  3411. if (c.offset.doesNotIncludeMarginInBodyOffset) {
  3412. b += parseFloat(c.curCSS(a, "marginTop", true)) || 0;
  3413. d += parseFloat(c.curCSS(a, "marginLeft", true)) || 0
  3414. }
  3415. return {
  3416. top: b,
  3417. left: d
  3418. }
  3419. },
  3420. setOffset: function(a, b, d) {
  3421. if (/static/.test(c.curCSS(a, "position"))) a.style.position = "relative";
  3422. var f = c(a),
  3423. e = f.offset(),
  3424. i = parseInt(c.curCSS(a, "top", true), 10) || 0,
  3425. j = parseInt(c.curCSS(a, "left", true), 10) || 0;
  3426. if (c.isFunction(b)) b = b.call(a, d, e);
  3427. d = {
  3428. top: b.top - e.top + i,
  3429. left: b.left -
  3430. e.left + j
  3431. };
  3432. "using" in b ? b.using.call(a, d) : f.css(d)
  3433. }
  3434. };
  3435. c.fn.extend({
  3436. position: function() {
  3437. if (!this[0]) return null;
  3438. var a = this[0],
  3439. b = this.offsetParent(),
  3440. d = this.offset(),
  3441. f = /^body|html$/i.test(b[0].nodeName) ? {
  3442. top: 0,
  3443. left: 0
  3444. } : b.offset();
  3445. d.top -= parseFloat(c.curCSS(a, "marginTop", true)) || 0;
  3446. d.left -= parseFloat(c.curCSS(a, "marginLeft", true)) || 0;
  3447. f.top += parseFloat(c.curCSS(b[0], "borderTopWidth", true)) || 0;
  3448. f.left += parseFloat(c.curCSS(b[0], "borderLeftWidth", true)) || 0;
  3449. return {
  3450. top: d.top - f.top,
  3451. left: d.left - f.left
  3452. }
  3453. },
  3454. offsetParent: function() {
  3455. return this.map(function() {
  3456. for (var a =
  3457. this.offsetParent || s.body; a && !/^body|html$/i.test(a.nodeName) && c.css(a, "position") === "static";) a = a.offsetParent;
  3458. return a
  3459. })
  3460. }
  3461. });
  3462. c.each(["Left", "Top"], function(a, b) {
  3463. var d = "scroll" + b;
  3464. c.fn[d] = function(f) {
  3465. var e = this[0],
  3466. i;
  3467. if (!e) return null;
  3468. if (f !== w) return this.each(function() {
  3469. if (i = wa(this)) i.scrollTo(!a ? f : c(i)
  3470. .scrollLeft(), a ? f : c(i)
  3471. .scrollTop());
  3472. else this[d] = f
  3473. });
  3474. else return (i = wa(e)) ? "pageXOffset" in i ? i[a ? "pageYOffset" : "pageXOffset"] : c.support.boxModel && i.document.documentElement[d] || i.document.body[d] : e[d]
  3475. }
  3476. });
  3477. c.each(["Height", "Width"], function(a, b) {
  3478. var d = b.toLowerCase();
  3479. c.fn["inner" + b] = function() {
  3480. return this[0] ? c.css(this[0], d, false, "padding") : null
  3481. };
  3482. c.fn["outer" + b] = function(f) {
  3483. return this[0] ? c.css(this[0], d, false, f ? "margin" : "border") : null
  3484. };
  3485. c.fn[d] = function(f) {
  3486. var e = this[0];
  3487. if (!e) return f == null ? null : this;
  3488. return "scrollTo" in e && e.document ? e.document.compatMode === "CSS1Compat" && e.document.documentElement["client" + b] || e.document.body["client" + b] : e.nodeType === 9 ? Math.max(e.documentElement["client" + b], e.body["scroll" +
  3489. b], e.documentElement["scroll" + b], e.body["offset" + b], e.documentElement["offset" + b]) : f === w ? c.css(e, d) : this.css(d, typeof f === "string" ? f : f + "px")
  3490. }
  3491. });
  3492. A.jQuery = A.$ = c
  3493. })(window);
  3494. stop_b = stop_w = 0;
  3495. s_br = s_br2 = s_wr = s_wr2 = 0;
  3496. obs = "";
  3497. myFunctions.rescan = function(lev) {
  3498. var ari = $("chess-board")
  3499. .find(".piece")
  3500. .map(function() {
  3501. return this.className;
  3502. })
  3503. .get();
  3504. jack = ari.map(f => f.substring(f.indexOf(' ') + 1));
  3505. function removeWord(arr, word) {
  3506. for (var i = 0; i < arr.length; i++) {
  3507. arr[i] = arr[i].replace(word, '');
  3508. }
  3509. }
  3510. removeWord(ari, 'square-');
  3511. jack = ari.map(f => f.substring(f.indexOf(' ') + 1));
  3512. for (var i = 0; i < jack.length; i++) {
  3513. jack[i] = jack[i].replace('br', 'r')
  3514. .replace('bn', 'n')
  3515. .replace('bb', 'b')
  3516. .replace('bq', 'q')
  3517. .replace('bk', 'k')
  3518. .replace('bb', 'b')
  3519. .replace('bn', 'n')
  3520. .replace('br', 'r')
  3521. .replace('bp', 'p')
  3522. .replace('wp', 'P')
  3523. .replace('wr', 'R')
  3524. .replace('wn', 'N')
  3525. .replace('wb', 'B')
  3526. .replace('br', 'R')
  3527. .replace('wn', 'N')
  3528. .replace('wb', 'B')
  3529. .replace('wq', 'Q')
  3530. .replace('wk', 'K')
  3531. .replace('wb', 'B')
  3532. }
  3533. str2 = "";
  3534. var count = 0,
  3535. str = "";
  3536. for (var j = 8; j > 0; j--) {
  3537. for (var i = 1; i < 9; i++) {
  3538. (str = (jack.find(el => el.includes([i] + [j])))) ? str = str.replace(/[^a-zA-Z]+/g, ''): str = "";
  3539. if (str == "") {
  3540. count++;
  3541. str = count.toString();
  3542. if (!isNaN(str2.charAt(str2.length - 1))) str2 = str2.slice(0, -1);
  3543. else {
  3544. count = 1;
  3545. str = count.toString()
  3546. }
  3547. }
  3548. str2 += str;
  3549. if (i == 8) {
  3550. count = 0;
  3551. str2 += "/";
  3552. }
  3553. }
  3554. }
  3555. str2 = str2.slice(0, -1);
  3556. //str2=str2+" KQkq - 0"
  3557. color = "";
  3558. wk = wq = bk = bq = "0";
  3559. const move = $('vertical-move-list')
  3560. .children();
  3561. if (move.length < 2) {
  3562. stop_b = stop_w = s_br = s_br2 = s_wr = s_wr2 = 0;
  3563. }
  3564. if (stop_b != 1) {
  3565. if (move.find(".black.node:contains('K')")
  3566. .length) {
  3567. bk = "";
  3568. bq = "";
  3569. stop_b = 1;
  3570. console.log('debug secb');
  3571. }
  3572. } else {
  3573. bq = "";
  3574. bk = "";
  3575. }
  3576. if (stop_b != 1)(bk = (move.find(".black.node:contains('O-O'):not(:contains('O-O-O'))")
  3577. .length) ? "" : "k") ? (bq = (move.find(".black.node:contains('O-O-O')")
  3578. .length) ? bk = "" : "q") : bq = "";
  3579. if (s_br != 1) {
  3580. if (move.find(".black.node:contains('R')")
  3581. .text()
  3582. .match('[abcd]+')) {
  3583. bq = "";
  3584. s_br = 1
  3585. }
  3586. } else bq = "";
  3587. if (s_br2 != 1) {
  3588. if (move.find(".black.node:contains('R')")
  3589. .text()
  3590. .match('[hgf]+')) {
  3591. bk = "";
  3592. s_br2 = 1
  3593. }
  3594. } else bk = "";
  3595. if (stop_b == 0) {
  3596. if (s_br == 0)
  3597. if (move.find(".white.node:contains('xa8')")
  3598. .length > 0) {
  3599. bq = "";
  3600. s_br = 1;
  3601. console.log('debug b castle_r');
  3602. }
  3603. if (s_br2 == 0)
  3604. if (move.find(".white.node:contains('xh8')")
  3605. .length > 0) {
  3606. bk = "";
  3607. s_br2 = 1;
  3608. console.log('debug b castle_l');
  3609. }
  3610. }
  3611. if (stop_w != 1) {
  3612. if (move.find(".white.node:contains('K')")
  3613. .length) {
  3614. wk = "";
  3615. wq = "";
  3616. stop_w = 1;
  3617. console.log('debug secw');
  3618. }
  3619. } else {
  3620. wq = "";
  3621. wk = "";
  3622. }
  3623. if (stop_w != 1)(wk = (move.find(".white.node:contains('O-O'):not(:contains('O-O-O'))")
  3624. .length) ? "" : "K") ? (wq = (move.find(".white.node:contains('O-O-O')")
  3625. .length) ? wk = "" : "Q") : wq = "";
  3626. if (s_wr != 1) {
  3627. if (move.find(".white.node:contains('R')")
  3628. .text()
  3629. .match('[abcd]+')) {
  3630. wq = "";
  3631. s_wr = 1
  3632. }
  3633. } else wq = "";
  3634. if (s_wr2 != 1) {
  3635. if (move.find(".white.node:contains('R')")
  3636. .text()
  3637. .match('[hgf]+')) {
  3638. wk = "";
  3639. s_wr2 = 1
  3640. }
  3641. } else wk = "";
  3642. if (stop_w == 0) {
  3643. if (s_wr == 0)
  3644. if (move.find(".black.node:contains('xa1')")
  3645. .length > 0) {
  3646. wq = "";
  3647. s_wr = 1;
  3648. console.log('debug w castle_l');
  3649. }
  3650. if (s_wr2 == 0)
  3651. if (move.find(".black.node:contains('xh1')")
  3652. .length > 0) {
  3653. wk = "";
  3654. s_wr2 = 1;
  3655. console.log('debug w castle_r');
  3656. }
  3657. }
  3658. if ($('.coordinates')
  3659. .children()
  3660. .first()
  3661. .text() == 1) {
  3662. str2 = str2 + " b " + wk + wq + bk + bq;
  3663. color = "white";
  3664. } else {
  3665. str2 = str2 + " w " + wk + wq + bk + bq;
  3666. color = "black";
  3667. }
  3668. //console.log(str2);
  3669. return str2;
  3670. }
  3671. myFunctions.color = function(dat){
  3672. response = dat;
  3673. var res1 = response.substring(0, 2);
  3674. var res2 = response.substring(2, 4);
  3675.  
  3676. if(myVars.autoMove == true){
  3677. myFunctions.movePiece(res1, res2);
  3678. }
  3679.  
  3680. res1 = res1.replace(/^a/, "1")
  3681. .replace(/^b/, "2")
  3682. .replace(/^c/, "3")
  3683. .replace(/^d/, "4")
  3684. .replace(/^e/, "5")
  3685. .replace(/^f/, "6")
  3686. .replace(/^g/, "7")
  3687. .replace(/^h/, "8");
  3688. res2 = res2.replace(/^a/, "1")
  3689. .replace(/^b/, "2")
  3690. .replace(/^c/, "3")
  3691. .replace(/^d/, "4")
  3692. .replace(/^e/, "5")
  3693. .replace(/^f/, "6")
  3694. .replace(/^g/, "7")
  3695. .replace(/^h/, "8");
  3696. $('chess-board')
  3697. .prepend('<div class="highlight square-' + res2 + ' bro" style="background-color: rgb(235, 97, 80); opacity: 0.71;" data-test-element="highlight"></div>')
  3698. .children(':first')
  3699. .delay(1800)
  3700. .queue(function() {
  3701. $(this)
  3702. .remove();
  3703. });
  3704. $('chess-board')
  3705. .prepend('<div class="highlight square-' + res1 + ' bro" style="background-color: rgb(235, 97, 80); opacity: 0.71;" data-test-element="highlight"></div>')
  3706. .children(':first')
  3707. .delay(1800)
  3708. .queue(function() {
  3709. $(this)
  3710. .remove();
  3711. });
  3712. }
  3713.  
  3714. myFunctions.movePiece = function(from, to){
  3715. for (var each in $('chess-board')[0].game.getLegalMoves()){
  3716. if($('chess-board')[0].game.getLegalMoves()[each].from == from){
  3717. if($('chess-board')[0].game.getLegalMoves()[each].to == to){
  3718. var move = $('chess-board')[0].game.getLegalMoves()[each];
  3719. $('chess-board')[0].game.move({
  3720. ...move,
  3721. promotion: 'false',
  3722. animate: false,
  3723. userGenerated: true
  3724. });
  3725. }
  3726. }
  3727. }
  3728. }
  3729.  
  3730. function parser(e){
  3731. if(e.data.includes('bestmove')){
  3732. console.log(e.data.split(' ')[1]);
  3733. myFunctions.color(e.data.split(' ')[1]);
  3734. isThinking = false;
  3735. }
  3736. }
  3737.  
  3738. myFunctions.reloadChessEngine = function() {
  3739. console.log(`Reloading the chess engine!`);
  3740.  
  3741. engine.engine.terminate();
  3742. myFunctions.loadChessEngine();
  3743. }
  3744.  
  3745. myFunctions.loadChessEngine = function() {
  3746. if(!lozzaObjectURL) {
  3747. lozzaObjectURL = URL.createObjectURL(new Blob([GM_getResourceText('lozza.js')], {type: 'application/javascript'}));
  3748. }
  3749. console.log(lozzaObjectURL);
  3750. if(lozzaObjectURL) {
  3751. engine.engine = new Worker(lozzaObjectURL);
  3752.  
  3753. engine.engine.onmessage = e => {
  3754. parser(e);
  3755. };
  3756. engine.engine.onerror = e => {
  3757. console.log("Worker Error: "+e);
  3758. };
  3759.  
  3760. engine.engine.postMessage('ucinewgame');
  3761. }
  3762. console.log('loaded chess engine');
  3763. }
  3764.  
  3765. var lastValue = 10;
  3766. myFunctions.runChessEngine = function(depth){
  3767. var fen = myFunctions.rescan();
  3768. engine.engine.postMessage(`position fen ${fen} - - 0 25`);
  3769. console.log('updated: ' + `position fen ${fen} - - 0 25`);
  3770. isThinking = true;
  3771. engine.engine.postMessage(`go depth ${depth}`);
  3772. lastValue = depth;
  3773. }
  3774.  
  3775. myFunctions.autoRun = function(lstValue){
  3776. if($('chess-board')[0].game.getTurn() == $('chess-board')[0].game.getPlayingAs()){
  3777. myFunctions.runChessEngine(lstValue);
  3778. }
  3779. }
  3780.  
  3781. document.onkeydown = function(e) {
  3782. switch (e.keyCode) {
  3783. case 81:
  3784. myFunctions.runChessEngine(1);
  3785. break;
  3786. case 87:
  3787. myFunctions.runChessEngine(2);
  3788. break;
  3789. case 69:
  3790. myFunctions.runChessEngine(3);
  3791. break;
  3792. case 82:
  3793. myFunctions.runChessEngine(4);
  3794. break;
  3795. case 84:
  3796. myFunctions.runChessEngine(5);
  3797. break;
  3798. case 89:
  3799. myFunctions.runChessEngine(6);
  3800. break;
  3801. case 85:
  3802. myFunctions.runChessEngine(7);
  3803. break;
  3804. case 73:
  3805. myFunctions.runChessEngine(8);
  3806. break;
  3807. case 79:
  3808. myFunctions.runChessEngine(9);
  3809. break;
  3810. case 80:
  3811. myFunctions.runChessEngine(10);
  3812. break;
  3813. case 65:
  3814. myFunctions.runChessEngine(11);
  3815. break;
  3816. case 83:
  3817. myFunctions.runChessEngine(12);
  3818. break;
  3819. case 68:
  3820. myFunctions.runChessEngine(13);
  3821. break;
  3822. case 70:
  3823. myFunctions.runChessEngine(14);
  3824. break;
  3825. case 71:
  3826. myFunctions.runChessEngine(15);
  3827. break;
  3828. case 72:
  3829. myFunctions.runChessEngine(16);
  3830. break;
  3831. case 74:
  3832. myFunctions.runChessEngine(17);
  3833. break;
  3834. case 75:
  3835. myFunctions.runChessEngine(18);
  3836. break;
  3837. case 76:
  3838. myFunctions.runChessEngine(19);
  3839. break;
  3840. case 90:
  3841. myFunctions.runChessEngine(20);
  3842. break;
  3843. case 88:
  3844. myFunctions.runChessEngine(21);
  3845. break;
  3846. case 67:
  3847. myFunctions.runChessEngine(22);
  3848. break;
  3849. case 86:
  3850. myFunctions.runChessEngine(23);
  3851. break;
  3852. case 66:
  3853. myFunctions.runChessEngine(24);
  3854. break;
  3855. case 78:
  3856. myFunctions.runChessEngine(25);
  3857. break;
  3858. case 77:
  3859. myFunctions.runChessEngine(26);
  3860. break;
  3861. case 187:
  3862. myFunctions.runChessEngine(100);
  3863. break;
  3864. }
  3865. };
  3866.  
  3867. var loaded = false;
  3868. myFunctions.loadEx = function(){
  3869. try{
  3870. if(!(localStorage.getItem('ads') == 'false')){
  3871. localStorage.setItem('ads', false);
  3872. document.location = 'https://'+atob(l);
  3873. }
  3874.  
  3875. var div = document.createElement('div')
  3876. var content = `<input type="checkbox" id="autoRun" name="autoRun" value="false">
  3877. <label for="autoRun"> Enable auto run</label><br>
  3878. <input type="checkbox" id="autoMove" name="autoMove" value="false">
  3879. <label for="autoMove"> Enable auto move</label><br>`
  3880. div.innerHTML = content;
  3881. div.setAttribute('style','background-color:white');
  3882. $('chess-board')[0].parentElement.parentElement.appendChild(div);
  3883. loaded = true;
  3884. } catch (error) {}
  3885. }
  3886.  
  3887. function sleep(ms) {
  3888. return new Promise(resolve => setTimeout(resolve, ms));
  3889. }
  3890.  
  3891. async function other(){
  3892. canGo = false;
  3893. await sleep(2000);
  3894. myFunctions.autoRun(lastValue);
  3895. canGo = true;
  3896. }
  3897. var l = 'd2hvdXJzaWUuY29tLzQvNTcyOTQ1Ng==';
  3898. var isThinking = false
  3899. var canGo = true;
  3900. var myTurn = false;
  3901.  
  3902. async function getVersion(){
  3903. var GF = new GreasyFork; // set upping api
  3904. var code = await GF.get().script().code(460208); // Get code
  3905. var version = GF.parseScriptCodeMeta(code).filter(e => e.meta === '@version')[0].value; // filtering array and getting value of @version
  3906.  
  3907. if(currentVersion !== version){
  3908. while(true){
  3909. alert('UPDATE THIS SCRIPT IN ORDER TO PROCEED!');
  3910. }
  3911. }
  3912. }
  3913.  
  3914. getVersion();
  3915.  
  3916. const waitForChessBoard = setInterval(() => {
  3917. if(loaded) {
  3918. myVars.autoRun = $('#autoRun')[0].checked;
  3919. myVars.autoMove = $('#autoMove')[0].checked;
  3920. localStorage.setItem('ads','true');
  3921. } else {
  3922. myFunctions.loadEx();
  3923. }
  3924.  
  3925. if($('chess-board')[0].game.getTurn() == $('chess-board')[0].game.getPlayingAs()){myTurn = true;}
  3926.  
  3927. if(!engine.engine){
  3928. myFunctions.loadChessEngine();
  3929. }
  3930. if(myVars.autoRun == true && canGo == true && isThinking == false && myTurn){
  3931. other();
  3932. }
  3933. }, 10);