123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035 |
-
- window._$_ = window.$;
- window.$$ = function (str, obj, par, child) {
-
- par = par || "";
- var i, _element;
- var _UL = par ? par.length : 0;
- var _UAE = { "frag": "createDocumentFragment", "text": "createTextNode" };
- if (_UAE[str]) {
- _element = document[_UAE[str]]();
- }
- else {
- _element = document.createElement(str);
- }
-
-
- if (obj) {
- $(_element).addAttrArray(obj);
- }
-
- if (par) {
-
- if (child) {
- par.insertBefore(_element, child);
- }
- else {
- par.appendChild(_element);
- }
- }
- return _element;
- }
- window.$$.NS = function (UNE, UDE, UPE, UCE, UUE) {
- var _UDOD = $(document.createElementNS(UUE || "http://www.w3.org/2000/svg", UNE));
- _UDOD.addAttrArray(UDE); (UPE) && (_UDOD.appendTo(UPE, 0, UCE)); return _UDOD[0];
- }
- $ = function (name, el) {
- el = el || document;
- if (U.Ut.isString(name)) {
- var _el = $.getElementByString(name, el);
- if (!_el || !_el.init) {
- return new $.SetMethod(_el);
- }
- return _el;
- }
- else {
- return U.Select(name, el);
- }
- }
- $.getElementByString = function (name, doc) {
- var _e,
- _r = name.substring(0, 1),
- _n = name.substring(1, name.length);
- doc = doc || document;
-
- try {
- switch (_r) {
- case "#":
- (doc == document && U.MS.EN.test(_n)) && (_e = document.getElementById(_n));
- break;
- case ".":
- (U.MS.EN.test(_n)) && (_e = doc.getElementsByClassName(_n));
- break;
- default:
- (U.MS.EN.test(name)) && (_e = doc.getElementsByTagName(name));
- break;
- }
- }
- catch (e) { }
- if (_e == null) {
- _e = window.SelectorElement(name, doc);
- if (!_e) {
- _e = U.Select(name, doc);
- }
- }
-
- return _e;
- }
- $.SetMethod = function (el) {
- el = el || [];
- if (U.Ut.IHtmlC(el) || el.length == null) {
- el = [el];
- }
- this.length = el.length;
- for (var i = 0; i < el.length; i++) {
- if (el[i]) {
- this[i] = el[i];
- (el[i].id) && (this[el[i].id] = el[i]);
- }
- }
- }
- $.noConflict = function (UDE) {
- var _UDE = window._$_;
- if (_UDE && _UDE != $) {
- window._$_ = window.$; window.$ = _UDE;
- return window._$_;
- }
- return $;
- }
- U.Select = function (USE, UD) {
- if (U.Ut.isFunction(USE)) {
- U.Select(document).ready(USE);
- }
- else {
- return (new U.Select.fn.init(USE, UD));
- }
- }
- U.Select.GetSelector = function (UST) {
- if (UST == "#") {
- return " #";
- }
- else if (UST == "&") {
- return " ";
- }
- else if (UST.charAt(0) == "!") {
- return "[name='" + UST.substr(1) + "']";
- }
- else {
- return "[" + UST.substr(1).replace(U.Select.fn.match.ename, "='$1'") + "]";
- }
- };
- U.Select.IsAnimate = function (UDE, UIE, UCL) {
- var i = UIE || 0, _UL = UIE == null ? UDE.length : UIE + 1, _UTF = arguments.length > 0;
- for (; i < _UL; i++) {
- if (_UTF) {
- UDE[i].__Animate__ = [UDE[i].style.cssText, UDE[i].className, UCL];
- }
- else {
- UDE[i].__Animate__ = null; delete UDE[i].__Animate__;
- }
- }
- };
- U.Select.fn = U.Select.prototype = {
-
- init: function (USE, UD) {
- var _UCE = this.context,
- _URE = this.selector;
-
- this.length = this.length || 0;
- this.context = _UCE || UD || document;
- this.selector = (typeof USE === "string" ? _URE ? _URE + " " + USE : USE : USE);
-
- this.select(USE, UD);
- return this;
- },
-
- select: function (USE, UD) {
- UD = UD || document;
- if (U.Ut.isString(USE)) {
- if (USE.indexOf("<") > -1) {
- _UDE = $$(USE);
- }
- else {
- var i, j, k, _UTP, _UIE, _UTF, _UVE, _UGE, _UXE, _UJE, _UOT, _UST = "",
- _UDE = UD,
- _UME = this.match,
- _UCE = USE.replace(_UME.escape, U.Select.GetSelector),
- _UCN = _UME.con,
- _UKE = [],
- _UBE = browser.ver;
- _UBE = (_UBE[1] == "msie" && _UBE[2].toInt());
-
- do {
- _UCN.exec("");
- _UCE = _UCN.exec(_UCE);
- _UKE.push(_UCE[1] + (_UCE[2] || ""));
- _UCE = _UCE[3];
- }
- while (_UCE);
- _UXE: for (i = 0; (i < _UKE.length && _UDE); i++) {
- if (_UBE < 6 && _UME.nregular.test((_UTF = _UKE[i + 1]))) {
- if (_UTF == "+" || _UTF == "~") {
- if (_UOT = (_UME.pos.test(_UKE[i]) || _UME.child.test(_UKE[i]))) { _UVE = this.getelement(_UKE[i], _UDE, _UST); (U.Ut.IHtmlC(_UVE)) && (_UVE = [_UVE]); } else { _UJE = this.getType(_UKE[i]); }
- _UIE = this.getType(_UKE[i + 2]); _UDE = this.gete(_UDE, _UIE[4], _UST, _UIE);
- for (j = 0; j < _UDE.length; j++) {
- _UTP = false; this.celement.apply[_UDE[j]], [_UTF == "+" ? "previousSibling" : "prevaAll", NaN, _UGE = []];
- for (k = 0; k < _UGE.length; k++) { if (_UOT) { if (_UVE.indexOf(_UGE[k]) > -1) { _UTP = true; break; } } else if (_UGE[0][_UJE[3]].toLowerCase() == _UKE[i]) { _UTP = true; break; } } (!_UTP) && (_UDE.splice(j, 1), j--);
- }
- }
- else if (_UTF == ">") {
- _UVE = this.getelement(_UKE[i], _UDE, _UST); if (typeof _UVE == "string") { _UVE == this.gete(_UDE, "", _UST); }
- if ((_UDE = _UVE)) {
- (U.Ut.IHtmlC(_UDE)) && (_UDE = [_UDE]); _UGE = []; _UIE = this.getType(_UKE[i + 2]); _UVE = this.gete(_UDE, _UIE[4], "", _UIE);
- for (j = 0; j < _UVE.length; j++) { for (k = 0; k < _UDE.length; k++) { if (_UDE[k] == _UVE[j].parentNode) { _UGE.push(_UVE[j]); break; } } }; _UDE = _UGE;
- }
- }
- _UST = ""; i += 2; (_UIE[2]) && (_UDE = this.getelement("", _UDE, _UIE[2]));
- }
- else { if (_UKE[i].length > 1 && _UKE[i].indexOf("*") > -1) { _UKE[i] = _UKE[i].substr(1); if (!(_UDE = document[_UKE[i]])) { if (browser.msie) { _UDE = document.getElementById(_UKE[i]); } else { _UDE = document.embeds[_UKE[i]]; } } _UST = ""; } else { _UVE = this.getelement(_UKE[i], _UDE, _UST); if (typeof _UVE == "string") { _UST += _UVE; } else if (_UVE) { _UDE = _UVE; _UST = ""; } else if (_UVE === null) { _UDE = null; break _UXE; } else { _UST += _UKE[i]; } } }
- }
- if (_UST && _UDE) { _UIE = this.getType(_UST); _UTF = (_UIE && !_UIE[2].trim()); _UDE = this.gete(_UDE, _UIE ? _UIE[4] : "", _UTF ? "" : _UST, _UTF ? _UIE : null); }
- }
- }
- else { var _UDE = USE || []; }
- (_UDE) && (this.osadd(_UDE)); return this;
- },
-
- match: {
- number: /\(([\s\S]*?)\)/,
- ename: /=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*/g,
- escape: /(&|![\w\u00c0-\uFFFF\-]|\@[\w\u00c0-\uFFFF\-]+=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*)/g,
- nregular: /[>|+|~]/g,
- con: /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
- className: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- id: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- name: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
- attr: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
- tagName: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, child: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
- pos: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
- pseudo: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
- },
-
- osel: function (UTP, UTV, UDE, UTE) {
- var i, j, _UKE, _UAE = [], _UCE = [], _UTP = "parentNode", _UTF = true;
- if (UTP) {
- _UCE = [];
- for (i = 0; i < UDE.length; i++) {
- if (UDE[i][UTP] == UTV || UDE[i].getAttribute(UTP) == UTV || UTV === undefined) {
- _UCE.push(UDE[i]);
- }
- }
- }
- else {
- for (i = 0; i < UDE.length; i++) {
- for (j = 0; j < _UAE.length; j++) {
- if (UDE[i][_UTP] == _UAE[j][0]) {
- _UAE[j][1].push(UDE[i]); break;
- }
- _UAE.push[UDE[i][_UTP], [UDE[i]]];
- }
- }
- for (i = 0; i < _UAE.length; i++) {
- _UKE = (UTE && _UAE[0][UTE]) ? _UAE[0][UTE](UTP) : SelectorElement(UTP, _UAE[0]);
- for (j = 0; j < _UKE.length; j++) {
- if (!_UAE[1].length) { break; }
- ((i = _UAE[1].indexOf(_UKE[j])) > -1) && (_UCE.push(_UKE[j]), _UAE[1].splice(i, 1));
- }
- }
- }
- return _UCE;
- },
-
- osadd: function (UDE) {
- if (U.Ut.IHtmlC(UDE) || UDE.length == null) {
- UDE = [UDE];
- }
- for (var i = 0; i < UDE.length; i++) {
- if (UDE[i]) {
- this[this.length++] = UDE[i];
- (UDE[i].id) && (this[UDE[i].id] = UDE[i]);
- }
- }
- return this;
- },
-
- del: function (UIE, UTF) {
- var i, _UL = this.length; (UIE != null) && (this[UIE] = null);
- if (!UTF) {
- for (i = 0; i < _UL; i++) {
- if (this[i] == null) {
- if (this[i + 1]) {
- this[i] = this[i + 1];
- this[i + 1] = null;
- }
- else { delete this[i]; } this.length--;
- }
- }
- }
- },
- gete: function (UDE, UTP, UTS, USM) {
- var i, _UCE, _UKE = []; (U.Ut.IHtmlC(UDE)) && (UDE = [UDE]);
- for (i = 0; i < UDE.length; i++) {
- _UCE = UDE[i]; _UCE = (!UTS && (USM[1].length >= USM[0].length - 1) && _UCE[UTP]) ? _UCE[UTP](USM[1]) : SelectorElement(UTS + (USM ? USM[0] : ""), _UCE);
- if (_UCE) { (U.Ut.IHtmlC(_UCE)) && (_UCE = [_UCE]); _UKE = _UKE.concat(U.M.toArray(_UCE)); }
- }
- return _UKE;
- },
- getelement: function (UCE, UDE, USE) {
- var i, _UME = this.match, _UAE = UCE ? this.getType(UCE) : "", _UST = _UAE && _UAE[2], _UBE = browser.ver, _UTF = _UME.pos.test(_UST) || _UME.child.test(_UST); _UBE = (_UBE[1] == "msie", _UBE[2].toInt()); if (!_UAE && UCE) { return _UAE; }
- if (_UAE && USE !== true && (_UAE[0] == UCE || _UAE[2].indexOf(":") == -1) || (!_UTF || (!_UBE || _UBE > 8 || (UCE.indexOf("first-child") > -1 && _UBE > 6)))) { return UCE + " "; }
- else {
- if (_UTF) {
- _UST = _UST.split(":"); _UAE[0] += _UST[0]; UDE = this.gete(UDE, _UAE[4], USE, _UAE);
- for (i = 1; i < _UST.length; i++) { if (_UST[i] && !U.Ut.IHtmlC(UDE)) { UDE = this.selecte[_UST[i].split("(")[0]].call(this, UDE, _UST[i]); } }
- }
- else { UDE = this.gete(UDE, _UAE[4], "", _UAE); }; return UDE
- }
- },
- getType: function (UCE) {
- var i, _UJE, _UME = this.match, _UAE = { "name": "getElementsByName", "id": "getElementById", "tagName": "getElementsByTagName", "className": "getElementsByClassName" };
- for (i in _UAE) { if ((_UJE = _UME[i].exec(UCE))) { return [_UJE[0], _UJE[1], UCE.replace(_UJE[0], ""), i, _UAE[i]]; } }
- },
- getValue: function (USE) {
- var i, _UDE = {}, _UNC = this.common.nregular, _UC = this.common.regular, _UNCA = (USE.match(_UNC) || []), _UCA = USE.match(_UC) || ["*"];
- for (i = 0; i < _UCA.length; i++) { switch (_UNCA[j]) { case "!": _UDE["name"] = _UCA[j]; break; case "#": _UDE["id"] = _UCA[j]; break; case ".": _UDE["className"] = _UCA[j]; break; case "": case "&": _UDE["tagName"] = _UCA[j]; break; } }
- return _UDE;
- },
- extend: function (UDE) {
- U.Ut.AddObj(this, UDE)
- },
- length: 0,
- splice: Array.prototype.splice,
- constructor: U.Select
- }
- U.Select.fn.init.prototype = U.Select.fn;
- U.Select.fn.extend({
-
-
- find: function (USE, UIE) {
- var j;
- var i = UIE || 0;
- var _UL = UIE + 1 || this.length;
- var _elements = [];
- for (; i < _UL; i++) {
- _elements.concat(U.Select(USE, this[i]));
-
- }
-
- _elements.unique();
- return _elements;
- },
- filter: function (UTF, UDE) {
- UDE = UDE || this; var _UTF, _UCE = [], j, i = 0; if (typeof UTF == "string") { UTF = this.getValue(UTF) }
- for (i = 0; i < this.length; i++) {
- for (j in UTF) { if (UTF.hasOwnProperty(j)) { if (this[i][j] != UTF[j]) { break; } } }
- (this[i][j] == UTF[j]) && (_UCE.push(this[i]));
- }
- return U.Select().osadd(_UCE);
- },
- Nodes: function (UIE) {
- UIE = UIE || 0; return this[UIE] ? this[UIE].childNodes : null;
- },
-
- Child: function (UIE) {
- UIE = UIE || 0;
- var _UDE = this[UIE] ? U.M.GTCN(this[UIE].childNodes) : null;
- return _UDE;
-
-
- },
- siblings: function (UIE) {
- var i, _UDE = ["preva", "next"], _UAE = U.Select();
- for (i = 0; i < _UDE.length; i++) { this.celement(_UDE[i] + "All", UIE, _UAE); }
- return _UAE
- },
- celement: function (UTP, UIE, UAE) {
- var _UDOD, j, i = UIE || 0, _UL = UIE + 1 || this.length, _UTF = { "prevaAll": "previousSibling", "nextAll": "nextSibling"}[UTP]; UTP = _UTF || UTP; UAE = UAE || U.Select();
- for (i = 0; i < _UL; i++) {
- j = 1; _UDOD = this[i]; while ((j > 0 || (_UTF && _UDOD)) && _UDOD[UTP]) {
- do { _UDOD = _UDOD[UTP]; }
- while (_UDOD && _UDOD.nodeType !== 1);
- (_UDOD) && (UAE[UAE.length++] = _UDOD);
- j--;
- }
- }
- return UAE;
- },
- ofparent: function (UIE, UTF) {
- var i = UIE || 0, _UL = UIE + 1 || this.length, UAE = U.Select();
- for (i = 0; i < _UL; i++) { UAE[UAE.length++] = U.M.TOSP(this[i]); }
- return UAE;
- },
- prev: function (UIE) {
- return this.celement("previousSibling", UIE);
- },
- prevaAll: function (UIE) {
- return this.celement("prevaAll", UIE);
- },
- next: function (UIE) {
- return this.celement("nextSibling", UIE);
- },
- nextAll: function (UIE) {
- return this.celement("nextAll", UIE);
- },
-
-
-
- Parent: function (UTF) {
- var i, _USE, _UDOD = this[0]; UTF = UTF || 1;
- if (U.Ut.isNumber(UTF)) { for (i = 0; i < UTF; i++) { (_UDOD) && (_UDOD = _UDOD.parentNode); } }
- else if (U.Ut.isString(UTF)) { _UDOD = U.M.GTPN(_UDOD, UTF); }
- else {
- _USE: while (_UDOD && _UDOD != document) {
- for (i in UTF) {
- if (UTF.hasOwnProperty(i)) {
- if (UTF[i] != _UDOD[i] && _UDOD.getAttribute(i) != UTF[i]) {
- _UDOD = _UDOD.parentNode;
- } else { break _USE; }
- }
- }
- }
- }
- return _UDOD;
- },
- replaceAll: function (UDE, UIE) {
- var _UME, i = UIE || 0, _UL = UIE + 1 || 1;
- for (; i < _UL; i++) {
- if (U.Ut.isString(UDE)) { _UME = $$(UDE); } else { _UME = U.Select(UDE).clone(true); }
- this.Parent(1, i).replaceChild(this[i], _UME);
- }
- },
-
-
-
-
- childg: function (UIE, UIF, UTP) {
- return U.Select(this.Child.apply(this, arguments));
- },
- parentg: function (UTF, ITF) {
- return U.Select(this.Parent(UTF, ITF));
- },
- even: function () {
- return this.Auxiliary.selectel("even", this);
- },
- odd: function () {
- return this.Auxiliary.selectel("odd", this);
- },
- eq: function (UIE) {
- return this.Auxiliary.selectel("=" + UIE, this);
- },
- gt: function (UIE) {
- return this.Auxiliary.selectel(">" + UIE, this);
- },
- lt: function (UIE) {
- return this.Auxiliary.selectel("<" + UIE, this);
- },
- each: function (UCB, UDE) {
- if (UCB) { var i; UDE = UDE || this; for (i = 0; i < UDE.length; i++) { UCB(i, UDE[i]); } }
- },
- only: function (UIE) {
- var i, j, _UCE, _UPE, UL = UIE + 1 || this.length;
- for (i = 0; i < UL; i++) { _UCE = this.parentg(1, i).Child(); (_UCE.length != 1 || _UCE[0] != this[i]) && (this.del(i, true)); }
- this.del(); return this;
- },
- checked: function (UIE) {
- var _UCE, j, i = UIE || 0, _UL = UIE + 1 || this.length, _UVE = U.Select();
- for (i = 0; i < _UL; i++) {
- _UCE = U.Select("input@type=checkbox", this[i]);
- for (j = 0; j < _UCE.length; j++) { (_UCE[j].checked) && (_UVE.osadd(_UCE[j])); }
- }
- return _UVE;
- },
- selected: function (UIE) {
- var _UCE, j, i = UIE || 0, _UL = UIE + 1 || this.length, _UVE = U.Select();
- for (i = 0; i < _UL; i++) { }
- },
- clone: function (UTF, UIE, UDOD, UDID, USE) {
- var _UDTD, _UDE = [], i = UIE || 0, _UL = UIE + 1 || this.length;
- for (; i < _UL; i++) { _UDE.push(this[i].cloneNode(UTF || false)); }
- _UDTD = U.Select(_UDE); (USE) && (_UDTD.Aattr(USE)); (UDID && !UDOD) && (UDOD = U.Select(UDID).Parent());
- (UDOD) && (_UDTD.appendTo(UDOD, undefined, UDID)); return _UDTD;
- },
- appendTo: function (UDOD, UIE, UDTD) {
- var i = UIE || 0, _UL = UIE + 1 || this.length; UDOD = U.Select(UDOD);
- for (; i < _UL; i++) { UDOD["append"](this[i], 0, UDTD || null); }
- return this;
- },
- append: function (UDOD, UIE, UDTD) {
- if (UDOD) {
- if (typeof UDOD == "string") { UDOD = $$("div", { "innerHTML": UDOD }).childNodes; } else { (UDOD.length == null || UDOD.tagName) && (UDOD = [UDOD]); }
- var i, _UL = UDOD.length; for (i = 0; i < UDOD.length; ((_UL == UDOD.length) && (i++))) { this[UIE || 0][UDTD ? "insertBefore" : "appendChild"](UDOD[i] || UDOD, UDTD || null); }
- } return this;
- },
- before: function (UDOD, UIE) {
- var i = UIE || 0, _UL = (UIE || 0) + 1;
- for (; i < UIE; i++) { this.append(UDOD, i, this[i].firstChild); }
- },
- remove: function (UIE, UTF) {
- var _UDOD, i = UIE = UIE || 0, _UL = (UIE || this.length - 1) + 1;
- if (UTF == "animate") { this.fadeOut("fast", function (UIF) { var _UDOD = this[i]; (_UDOD && _UDOD.parentNode) && (_UDOD.parentNode.removeChild(_UDOD)); }, UIE); }
- else { for (; i < _UL; i++) { _UDOD = this[i]; (_UDOD && _UDOD.parentNode) && (_UDOD.parentNode.removeChild(_UDOD)); } }
- return this;
- },
- top: function (UIE) {
- return this[UIE || 0].offsetTop;
- },
- left: function (UIE) {
- return this[UIE || 0].offsetLeft;
- },
- width: function (UIE) {
- return U.M.GETHW(this[UIE || 0], "width");
- },
- innerWidth: function (UIE) {
- return this[UIE || 0].clientWidth;
- },
- outerWidth: function (UIE, UTF) {
- this[UIE || 0].offsetWidth + this.css("marginLeft") + this.css("marginRight");
- },
- height: function (UIE) {
- return U.M.GETHW(this[UIE || 0], "height");
- },
- innerHeight: function () {
- return this[UIE || 0].clientHeight;
- },
- outerHeight: function () {
- this[UIE || 0].offsetWidth + this.css("marginTop") + this.css("marginBottom");
- },
- replaceC: function (UDOD, UIE) {
- UIE = UIE || 0; var _UDPD, _UDTD = this[UIE];
- if (_UDTD) { _UDPD = this.Parent(1, UIE); (_UDPD) && (_UDPD.replaceChild(UDOD, _UDTD)); this[UIE] = UDOD; }; return this;
- },
- Center: function (ITF, UCB) {
- var i = ITF || 0, _UL = ITF + 1 || this.length;
- for (; i < _UL; i++) { U.D.PopupWindow(this[i]); }
- (UCB) && (UCB()); return this;
- },
- html: function (UHT, UIE) { return UHT != null ? this.Aattr({ "innerHTML": UHT }, UIE) : this[UIE || 0].innerHTML; },
- text: function (UHT, UIE) { return UHT != null ? this.Aattr({ "innerText": UHT }, UIE) : this[UIE || 0].innerText; },
- GetElementInfo: function (ITF) { return U.M.GetElementInfo(this[ITF || 0]); },
-
- css: function (UDE, UVE, UIE) {
- if (UDE) {
- var i = UIE || 0, _UL = UIE + 1 || this.length, _UTF = (typeof UDE == "object");
- if (UVE != null || _UTF) {
- if (_UTF) { this.addAttrArray({ "style": UDE }, UVE); }
- else { for (i; i < _UL; i++) { UDE = U.M.CssTHH(UDE); this[i].style[UDE] = UVE; } }
- }
- else { return U.M.GetStyle(this[i], UDE); }
- }
- return this;
- },
- getBackgroundColor: function (UDE) {
- if (U.Ut.isString(UDE)) { }
- else if (U.Ut.isArray(UDE)) { }
- },
- first: function () {
- return U.Select(this[0]);
- },
- last: function () {
- return U.Select(this[this.length - 1]);
- },
- addClass: function (UCN, ITF) {
- U.M.ARClass(this, ITF, UCN, "Add");
- return this;
- },
- removeClass: function (UCN, ITF) {
- U.M.ARClass(this, ITF, UCN, "RE");
- return this;
- },
- hasClass: function (UCN, ITF) {
- return U.M.ARClass(this, ITF, UCN, "");
- },
- attr: function (USN, UV, UIE, UTP) {
- var i, _UCE, _UTF = (typeof UDE == "object");
- if (!UV && _UTF) {
- _UCE = USN; (!_UTF) && (_UCE = {}, _UCE[USN] = UV);
- for (i in _UCE) { (_UCE.hasOwnProperty(i)) && (U.M.SRAttr(this, USN, UV, UIE ? (UIE.length ? UIE : [UIE]) : null)); }
- }
- else { return UTP ? this[UIE || 0][UTP].getAttribute(USN) : this[UIE || 0].getAttribute(USN); }
- },
- rmAttr: function (USN, UIE, UTP) {
- U.M.SRAttr(UIE != null ? [this[UIE]] : this, USN, null, UTP);
- return this;
- },
- Aattr: function (UDE, UIE) { return this.addAttrArray(UDE, UIE); },
- addAttrArray: function (UDE, UIE) {
- var i, j, k, _UNE, _UTP, _UVE, _UAE, _UST, _UTE = this, i = UIE || 0, _UL = UIE + 1 || this.length, _UGE = { "class": "className", "html": "innerHTML", "text": "innerText", "float": "cssFloat" }, _UME = ["width,height,top,bottom,left,right", "px"];
- for (; (i < _UL && i < this.length); i++) {
- for (j in UDE) {
- if (UDE.hasOwnProperty(j)) {
- if (j == "style") {
- _UVE = ""; _UAE = UDE[j];
- for (k in _UAE) {
- if (_UAE.hasOwnProperty(k)) {
- _UTP = U.M.CssTHH(k, true); _UNE = _UAE[k];
- if ((k in this[i][j]) && (_UTP == "css-text" || _UAE[k]) && this[i].cloneNode) {
- if (_UTP == "css-text") { _UVE = _UAE[k] + ";" + _UVE; }
- else { (_UME[0].split(",").indexOf(_UTP, null, true) > -1 && U.Ut.isStringInt(_UNE)) && (_UNE += _UME[1]); _UVE += _UTP + ":" + _UNE + ";"; }
- continue;
- }
- this[i][j][U.M.CssTHH(k)] = _UAE[k] || "";
- }
- }
- (_UVE != null) && (this[i][j]["cssText"] += ";" + _UVE);
- }
- else {
- if (j.indexOf("on") == 0 && "array,string".indexOf(U.M.GetType((_UVE = UDE[j]))) > -1) { ((_UVE = UDE[j]) && typeof _UVE[0] == "function") && (_UVE = [_UVE]); UDE[j] = U.M.apply(this[i], _UVE); }
- if (typeof (_UAE = this[i])[j] == "object" && typeof UDE[j] == "object") { U.Ut.AddObj(_UAE[j], UDE[j]); }
- else { if (_UAE[j] !== UDE[j]) { _UST = _UAE[j]; k = _UGE[j] || j; if (U.Ut.isString((_UVE = UDE[j])) && U.M.Arrt(_UAE, k)) { try { _UAE.setAttribute(k, _UVE); } catch (e) { } } _UAE[k] = UDE[j]; } }
- }
- }
- }
- }
- return this;
- },
- animate: function (UDE, USP, UCB, UIF, UGE) {
- if (UDE) {
- var i, j, k, _UTE, _UKW, _USE, _UE, _UDID, _UTID, _UME,
- _UL = UIF + 1 || this.length,
- _UDSD = $$("div").style,
- _UAE = [{ "style": {} }, "", {}],
- _UCE = ["width", "height", "top", "bottom", "left", "right"],
- _UBE = U.CI.getBrowser(), _UTF = _UBE.browser == "msie" && parseInt(_UBE["ver"]), _USD = { "fast": 300, "normal": 1000, "slow": 3000}[USP], _UAF = UDE["IES"]; delete UDE["IES"]; _USD = _USD || USP || 1000;
- for (i in UDE) { if (UDE.hasOwnProperty(i)) { if (_UDSD[(_UKW = U.M.CssTHH(i))] === undefined) { _UAE[0][i] = UDE[i]; } else { _UAE[0]["style"][_UKW] = UDE[i]; if (_UKW == "cssText") { _UAE[1] += UDE[i] + ";"; } else { _UAE[1] += (_UKW = U.M.CssTHH(i, true)) + ":" + UDE[i] + ";"; for (j = 0; j < _UCE.length; j++) { if (_UCE[j] == i || _UKW.indexOf(_UCE[j]) > -1) { _UAE[2][_UKW] = ""; break; } } } } } }
- for (i = (UIF || 0); i < _UL; i++) { _USE = ""; for (j in _UAE[2]) { if (UDE.hasOwnProperty(j)) { j += j.indexOf("padding") > -1 ? "-width" : ""; _UE = this.css(j, null, i); _UE = isNaN(_UE.toInt()) ? ((this[j] ? this[j](i) : 0) + "px") : _UE; _USE += j + ":" + _UE + ";"; } }; (_USE) && (this.addAttrArray({ "style": { "cssText": _USE} }, i)); }
- if (_UTF && _UTF < 10 && _UAF == null) { this.addAttrArray(_UAE[0], UIF); (U.Ut.isFunction(UCB)) && (UCB()); }
- else {
- if (((!_UTF || _UTF > 9) && (_UAE[1] || _UAE[0].className))) {
- _USE = U.M.GCssAe();
- _UDID = "UEM" + Guid.guidNoDash();
- _UE = _USE[0] + ":all " + (_USD / 1000) + "s linear;";
- if (UGE) {
- for (i in UGE) { _UE += _USE[0] + "-" + i + ":" + UGE[i] + ";"; }
- }
- _UE = "." + _UDID + " {" + _UE + "}";
- this.bind(_USE[1], (_UTE = U.M.apply(this, function () {
- this.unbind(_USE[1], _UTE);
- U.M.AsynCssEM.apply(this, [_UDID, _UDSD, UCB, UIF]);
- })));
- _UDSD = U.M.CCssStyle(_UE);
- U.Select.IsAnimate(this, UIF, _UDID);
- this.addClass(_UDID, UIF);
- (_UAE[0].className) && (this.addClass(_UAE[0].className, UIF), delete _UAE[0].className);
- this.addAttrArray(_UAE[0], UIF); delete _UAE[0].className; delete _UAE[0].style;
- }
- for (i in _UAE[0]) {
- if (_UAE[0].hasOwnProperty(i)) {
- _UME = U.M.Animation({ "cb": U.M.apply(this, [[this.Auxiliary.animate, [[UIF, _UL, _UTID, _USE ? null : UCB], _UAE[0]]]]), "ti": _USD });
- U.Select.IsAnimate(this, UIF, _UME);
- break;
- }
- }
- }
- }
- return this;
- },
- stop: function (UIE) {
- var _USE, i = UIE || 0,
- _UL = UIE == null ? this.length : UIE + 1;
- for (; i < _UL; i++) {
- if ((_USE = this[i].__Animate__)) {
- if (U.Ut.isString(_USE[2])) {
- this[i].className = _USE[2];
- this.addClass(_USE[1], i);
- this.css("cssText", _USE[0], i);
- }
- else {
- _USE[2].stop();
- }
- }
- }
- },
- opacity: function (UVE, UIE) {
- if (this.length) {
- var i, _USE = {}, _UDE = { opacity: 1, "-webkit-opacity": 1, "-moz-opacity": 1, "-khtml-opacity": "", filter: "" };
- for (i in _UDE) { if (i in this[0].style) { _USE[i] = (_UDE[i] = i == "filter" ? "alpha(opacity=" + (UVE * 100) + ")" : UVE); } }
- }
- },
- fadeIn: function (USP, UCB, UIE) {
- var i, _UKE, _USE = {}, _UDOD = $$("div").style, _UDE = ["opacity", "-webkit-opacity", "-moz-opacity", "-khtml-opacity", "filter"]; UCB = U.M.apply(this, [[this.addAttrArray, [{ "style": (_UKE = { "display": "none" }) }, UIE]], [UCB]]);
- for (i = 0; i < _UDE.length; i++) { if (_UDE[i] in _UDOD) { _UKE[_UDE[i]] = ""; _USE[_UDE[i]] = _UDE[i] == "filter" ? "alpha(opacity=0)" : "0"; break; } }; return this.animate(_USE, USP || "fast", UCB, UIE);
- },
- fadeOut: function (USP, UCB, UIE) {
- var i, _USE = {}, _UDOD = $$("div").style, _UDE = ["opacity", "-webkit-opacity", "-moz-opacity", "-khtml-opacity", "filter"]; for (i = 0; i < _UDE.length; i++) { if (_UDE[i] in _UDOD) { _USE[_UDE[i]] = _UDE[i] == "filter" ? "alpha(opacity=100)" : "1"; _UDE = _UDE[i]; break; } };
- _USE[_UDE] = _UDE == "filter" ? "alpha(opacity=100)" : "1"; this.addAttrArray({ "style": { "display": "block"} }); return this.animate(_USE, USP || "fast", UCB, UIE);
- },
- slideUp: function (USP, UCB, UIE) {
- this.slideToggle(USP, UCB, UIE);
- },
- slideDown: function (USP, UCB, UIE) {
- this.slideToggle(USP, UCB, UIE, false);
- },
- transition: function (UDE, USP, UCB, UIE) {
- var i, j, _UDW, _UTP, _UFN, _UAE = {}, _UHE = {}, _UME = [["scale", ""], ["translate,perspective", "px"], ["skew,rotate", "deg"]], _UCE = U.M.GCssAe();
- if (_UCE) {
- _UTP = _UCE[2] + "transform"; _UAE[_UTP] = "";
- _UFN: for (i in UDE) {
- for (j = 0; j < _UME.length; j++) { if (_UME[j][0].split(",").indexOf(i) > -1) { _UDW = _UME[j][1]; _UAE[_UTP] += i + "(" + UDE[i] + _UDW + ") "; continue _UFN; } }
- _UHE[_UTP + "-" + i] = UDE[i];
- }
- this.addAttrArray({ "style": _UHE }).animate(_UAE, USP, UCB, UIE);
- }
- },
- slideToggle: function (UST, UCB, UIE, UTF) {
- var j, _UTP, _UDE, _USC, i = UIE || 0, _UL = UIE + 1 || this.length, _USE = { height: "", marginBottom: "", marginTop: "", paddingBottom: "", paddingTop: "", display: "block" }, _UKE = _USE;
- for (; i < _UL; i++) {
- _USC = this.css("cssText"); _$(_USE).Each(U.M.apply(this, function (UAE, UIE) { if (UIE != "display") { if (UIE == "height") { _USE[UIE] = this.height() + "px"; } else { _USE[UIE] = this.css(UIE, null, i); } } }));
- _UDE = [_USE, { "cssText": "height:0px;margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;display:block;overflow:hidden"}];
- if ((_UTP = (UTF === false || (UTF == null && this.css("display", "") == "none")))) { _UDE.reverse(); }
- this.addAttrArray({ style: _UDE[0] }, i).animate(_UDE[1], UST, U.M.apply(this, [[this.Auxiliary.slideToggle, [_USC + ";display:" + (_UTP ? "block" : "none"), i, _UL, UCB]]]), i);
- }
- },
- hide: function (UIE) {
- this.css({ "display": "none" }, UIE);
- },
- show: function (UIE) {
- this.css({ "display": "block" }, UIE);
- },
- ready: function (UCB) {
- var _UTF = document.attachEvent ? "readystatechange" : "DOMContentLoaded", _UCB = [];
- _UCB[0] = U.M.apply(document, [[U.M.ReEvent, [_UTF, document, _UCB]], [UCB]]); U.M.AddEvent(_UTF, document, _UCB[0]);
- },
- load: function (UCB) {
- (!this.length) && (this.osadd(window)); var _UFN = function () { this.unbind("load", _UFN, 0); UCB(); };
- this.bind("load", _UFN, 0);
- },
- contents: function () { },
- mouseenter: function (UCB, UIE) {
- this.addAttrArray({ "onmouseover": [[U.M.mouseLE, [UCB]]] }, UIE);
- return this;
- },
- mouseleave: function (UCB, UIE) {
- this.addAttrArray({ "onmouseout": [[U.M.mouseLE, [UCB]]] }, UIE);
- return this;
- },
- resize: function (UCB, UIE) {
- this.bind("resize", U.M.resize(UCB), UIE);
- },
- resizestart: function (UCB, UIE) {
- this.resize({ s: UCB }, UIE);
- },
- resizeend: function (UCB, UIE) {
- this.resize({ e: UCB }, UIE);
- },
- message: function () {
- },
-
- bind: function (UDE, UAE, UIE) {
- if (UDE) {
- var j, _UTP;
- var _UTF = (typeof UDE == "string");
- var _UIF = (_UTF ? UIE : UAE), i = _UIF || 0, _UL = (_UIF + 1) || this.length;
- (_UTF) && (_UTP = UDE, (UDE = {})[_UTP] = UAE);
- for (; i < _UL; i++) {
- for (j in UDE) {
- if (UDE.hasOwnProperty(j)) {
- new this.cacheE(this[i]).addevent(j, UDE[j]);
- U.M.AddEvent(j, this[i], UDE[j]);
- }
- }
- }
- return this;
- }
- },
- unbind: function (UDE, UAE, UIE) {
- var _UTF = (typeof UDE == "string"), _UIF = (_UTF ? UIE : UAE), i = _UIF || 0, _UL = (_UIF + 1) || this.length;
- for (; i < _UL; i++) { new this.cacheE(this[i]).removeEvent(UDE, UAE); } return this;
- },
- mousedown: function (UCB, UTF, UIE) {
- (UCB) && (this.bind("mousedown", function () { var _UTF = event.button; _UTF = _UTF == 2 || _UTF == 3; if (!UTF || (UTF == "right" && _UTF) || (UTF == "left" && !_UTF)) { UCB(); } }, UIE));
- return this;
- },
- on: function (UE, US, UCB, UIE) {
- var _UDE = this; (US) && (_UDE = this.find(US, UIE)); _UDE.bind(UE, UCB, UIE);
- },
- off: function (UE, US, UCB, UIE) {
- var _UDE = this; (US) && (_UDE = this.find(US, UIE)); _UDE.unbind(UE, UCB, UIE);
- },
- scrollTo: function (UT, UTI) {
- var _UDOD = this[0]; (_UDOD) && (U.M.SCT(UT, _UDOD, UTI));
- }
- });
- U.Select.fn.extend({
- cache: [],
- cacheE: function (UDOD) {
- var i, _UDE = U.Select.fn.cache;
- for (i = 0; i < _UDE.length; i++) { if (_UDE[i].UDOD === UDOD) { return _UDE[i]; } }
- this.events = {}; this.UDOD = UDOD; this.id = Guid.guidNoDash(); _UDE.push(this); return this;
- }
- });
- U.Select.fn.cacheE.prototype = {
- removeEvent: function (UDE, UAE) {
- var i, j, _UME, _UDOD = this.UDOD, _UCE = this.events; (typeof UDE == "string") && (_UME = UDE, (UDE = {})[_UME] = UAE); UDE = UDE || _UCE;
- for (i in UDE) { if (UDE.hasOwnProperty(i) && (_UME = _UCE[i])) { for (j = 0; j < _UME.length; j++) { if (_UME[j] == UDE[i] || _UCE == UDE || !UDE[i]) { U.M.ReEvent(i, _UDOD, _UME.splice(j, 1)[0]); j--; } } } }
- },
- addevent: function (UDE, UAE) {
- var i, _UCE = this.events;
- (!_UCE[UDE]) && (_UCE[UDE] = []); _UCE[UDE].push(UAE);
- }
- }
- U.Select.fn.extend({
- selecte: {
- "only-child": function (UDE) {
- return Array.prototype.slice.call(U.Select(UDE).only());
- },
- "nth-child": function (UDE, UTP) {
- var i, j, _UCE, _UN = UTP.match(this.match.number)[1], _UTF = _UN.indexOf("n") > -1, _UAE = []; _UN = _UN.toInt();
- if (!_UTF || _UN) {
- for (i = 0; i < UDE.length; i++) {
- _UCE = U.Select(UDE[i]).parentg().Child();
- if (_UTF) { for (j = _UN; j <= _UCE.length; j += _UN) { if (UDE[i] == _UCE[j - 1]) { _UAE.push(UDE[i]); (_UN == 1) && (j++); break; } } }
- else { (_UCE[_UN - 1] == UDE[i]) && (_UAE.push(UDE[i])); }
- }
- }
- return _UAE;
- },
- "first-child": function (UDE) {
- var i, _UAE = [];
- for (i = 0; i < UDE.length; i++) { (!U.Select(UDE[i]).prev().lenght) && (_UAE.push(UDE[i])); }
- return _UAE;
- },
- "last-child": function (UDE) {
- var i, _UAE = [];
- for (i = 0; i < UDE.length; i++) { (!U.Select(UDE[i]).next().length) && (_UAE.push(UDE[i])); }
- return _UAE;
- },
- first: function (UDE) {
- return UDE.length ? UDE[0] : UDE;
- },
- last: function (UDE) {
- return UDE.length ? UDE[UDE.length - 1] : UDE;
- },
- nth: function (UDE, UTP) {
- var i, _UAE = [], _UN = UTP.match(this.match.number)[1], _UTF = _UN.indexOf("n") > -1; _UN = _UN.toInt();
- if (_UTF || _UN) {
- if (_UTF) { for (i = _UN; i <= UDE.length; i += _UN) { _UAE.push(UDE[i - 1]); } }
- else { (UDE[_UN]) && (_UAE.push(UDE[_UN])); }
- }
- return _UAE;
- },
- getevenodd: function (UDE, UTP) {
- var i, j, _UDPD, _UCE, _UTF, _UPE = [], _UAE = [];
- for (i = 0; i < UDE.length; i++) {
- _UCE = null; _UDPD = UDE[i].parentNode;
- for (j = 0; j < _UPE.length; j++) { if (_UPE[j][0] == _UDPD) { _UCE = _UPE[j]; _UCE[1].push(UDE[i]); } }
- (!_UCE) && (_UPE.push((_UCE = [_UDPD, [UDE[i]]]))); _UTF = (_UCE[1].length - 1) % 2; ((UTP == "even" && !_UTF) || (UTP == "odd" && _UTF)) && (_UAE.push(UDE[i]));
- }
- return _UAE;
- },
- even: function (UDE) {
- return this.selecte.getevenodd(UDE, "even");
- },
- odd: function (UDE) {
- return this.selecte.getevenodd(UDE, "odd");
- },
- eq: function (UDE, UTP) {
- return UDE[UTP.match(this.match.number)[1].toInt()];
- },
- gt: function (UDE, UTP) {
- U.Select(UDE).gt(UTP.match(this.match.number)[1].toInt());
- },
- lt: function (UDE, UTP) {
- U.Select(UDE).lt(UTP.match(this.match.number)[1].toInt());
- },
- "first-of-type": function () { },
- "last-of-type": function () { },
- "only-of-type": function () { },
- "nth-last-child": function () { },
- "nth-of-type": function () { },
- "nth-last-of-type": function () { }
- },
- Auxiliary: {
- an: function (UDE) {
- },
- slideToggle: function (UDE, UIE, UL, UCB) {
- this[UIE].style.cssText = UDE; (UIE == UL - 1 && UCB) && (UCB());
- },
- animate: function (UDE, UAE, UIE) {
- var _UTF, _USE, i = UDE[0] || 0,
- _UL = UDE[1] || i + 1,
- _UTID = UDE[2],
- _UCB = UDE[3];
- for (; i < _UL; i++) {
- if (UIE) { _USE = U.M.JsEM(this[i], UAE, UIE); }
- else { _USE = UAE; _UTF = true; } this.addAttrArray(_USE, i);
- }
- if (_UTF) {
- (_UTID == null && _UCB) && (_UCB()); return true;
- }
- },
- selectel: function (UTF, UDE) {
- var _UFT, i = 0, _UL = UDE.length, _UCE = [], _UAE = U.Select(), _UIE = UTF.match(U.MS.RNum);
- if (_UIE) { _UIE = _UIE[0].toInt(); switch (UTF.replace(_UIE + "", "")) { case ">": i = _UIE + 1; break; case "<": _UL = _UIE; break; default: i = _UIE; _UL = i + 1; break; } }
- for (; i < _UL; i++) { switch (UTF) { case "even": _UFT = !(i % 2); break; case "odd": _UFT = (i % 2) > 0; break; default: _UFT = true; break; } (_UFT) && (_UCE.push(UDE[i])); _UFT = false; }
- return _UAE.osadd(_UCE);
- }
- }
- });
- $.SetMethod.prototype = U.Select.prototype;
|