1/* 2* Nano Scroller 3*/ 4 5 6 7(function(d, f, e) { 8 var g, h; 9 h = function() { 10 var c, a, b; 11 a = e.createElement("div"); 12 a.style.position = "absolute"; 13 a.style.width = "100px"; 14 a.style.height = "100px"; 15 a.style.overflow = "scroll"; 16 e.body.appendChild(a); 17 c = a.offsetWidth; 18 b = a.scrollWidth; 19 e.body.removeChild(a); 20 return c - b 21 }; 22 g = function() { 23 function c(a) { 24 this.el = a; 25 this.generate(); 26 this.createEvents(); 27 this.addEvents(); 28 this.reset() 29 } 30 c.prototype.createEvents = function() { 31 var a = this; 32 this.events = {down: function(b) { 33 a.isDrag = !0; 34 a.offsetY = b.clientY - a.slider.offset().top; 35 a.pane.addClass("active"); 36 d(e).bind("mousemove", a.events.drag); 37 d(e).bind("mouseup", a.events.up); 38 return!1 39 }, drag: function(b) { 40 a.sliderY = b.clientY - a.el.offset().top - a.offsetY; 41 a.scroll(); 42 return!1 43 }, up: function() { 44 a.isDrag = !1; 45 a.pane.removeClass("active"); 46 d(e).unbind("mousemove", a.events.drag); 47 d(e).unbind("mouseup", a.events.up); 48 return!1 49 }, resize: function() { 50 a.reset() 51 }, panedown: function(b) { 52 a.sliderY = b.clientY - a.el.offset().top - 0.5 * a.sliderH; 53 a.scroll(); 54 a.events.down(b) 55 }, scroll: function() { 56 var b; 57 b = a.content[0]; 58 !0 !== a.isDrag && a.slider.css({top: b.scrollTop / 59 (b.scrollHeight - b.clientHeight) * (a.paneH - a.sliderH) + "px"}) 60 }, wheel: function(b) { 61 a.sliderY += -b.wheelDeltaY || -b.delta; 62 a.scroll(); 63 return!1 64 }} 65 }; 66 c.prototype.addEvents = function() { 67 var a, b; 68 a = this.events; 69 b = this.pane; 70 d(f).bind("resize", a.resize); 71 this.slider.bind("mousedown", a.down); 72 b.bind("mousedown", a.panedown); 73 this.content.bind("scroll", a.scroll); 74 f.addEventListener && (b = b[0], b.addEventListener("mousewheel", a.wheel, !1), b.addEventListener("DOMMouseScroll", a.wheel, !1)) 75 }; 76 c.prototype.removeEvents = function() { 77 var a, 78 b; 79 a = this.events; 80 b = this.pane; 81 d(f).unbind("resize", a.resize); 82 this.slider.unbind("mousedown", a.down); 83 b.unbind("mousedown", a.panedown); 84 this.content.unbind("scroll", a.scroll); 85 f.addEventListener && (b = b[0], b.removeEventListener("mousewheel", a.wheel, !1), b.removeEventListener("DOMMouseScroll", a.wheel, !1)) 86 }; 87 c.prototype.generate = function() { 88 this.el.append('<div class="pane"><div class="slider"></div></div>'); 89 this.content = d(this.el.children()[0]); 90 this.slider = this.el.find(".slider"); 91 this.pane = this.el.find(".pane"); 92 this.scrollW = h(); 93 if (0 === this.scrollbarWidth) 94 this.scrollW = 0; 95 this.content.css({right: -this.scrollW + "px"}) 96 }; 97 c.prototype.reset = function() { 98 if (!0 === this.isDead) 99 this.isDead = !1, this.pane.show(), this.addEvents(); 100 this.contentH = this.content[0].scrollHeight + this.scrollW; 101 this.paneH = this.pane.outerHeight(); 102 this.sliderH = this.paneH / this.contentH * this.paneH; 103 this.sliderH = Math.round(this.sliderH); 104 this.scrollH = this.paneH - this.sliderH; 105 this.slider.height(this.sliderH); 106 this.pane.show(); 107 this.paneH >= this.content[0].scrollHeight && 108 this.pane.hide() 109 }; 110 c.prototype.scroll = function() { 111 var a; 112 this.sliderY = Math.max(0, this.sliderY); 113 this.sliderY = Math.min(this.scrollH, this.sliderY); 114 a = this.paneH - this.contentH + this.scrollW; 115 a = a * this.sliderY / this.scrollH; 116 this.content.scrollTop(-a); 117 return this.slider.css({top: this.sliderY}) 118 }; 119 c.prototype.scrollBottom = function(a) { 120 this.reset(); 121 this.content.scrollTop(this.contentH - this.content.height() - a) 122 }; 123 c.prototype.scrollTop = function(a) { 124 this.reset(); 125 this.content.scrollTop(a + 0) 126 }; 127 c.prototype.stop = function() { 128 this.isDead = 129 !0; 130 this.removeEvents(); 131 this.pane.hide() 132 }; 133 return c 134 }(); 135 d.fn.nanoScroller = function(c) { 136 var a; 137 c || (c = {}); 138 if (!(navigator.userAgent.indexOf("MSIE")>0 && (navigator.userAgent.indexOf("MSIE 6.0")<0 || d.navigator.userAgent.indexOf("MSIE 7.0")<0 || d.navigator.userAgent.indexOf("MSIE 8.0")<0 ) )) { 139 a = this.data("scrollbar"); 140 void 0 === a && (a = new g(this), this.data("scrollbar", a)); 141 if (c.scrollBottom) 142 return a.scrollBottom(c.scrollBottom); 143 if (c.scrollTop) 144 return a.scrollTop(c.scrollTop); 145 if ("bottom" === c.scroll) 146 return a.scrollBottom(0); 147 if ("top" === c.scroll) 148 return a.scrollTop(0); 149 if (c.stop) 150 return a.stop(); 151 a.reset() 152 } 153 } 154})(jQuery, window, document); 155/*! 156 * jQuery Form Plugin 157 * version: 2.83 (11-JUL-2011) 158 * @requires jQuery v1.3.2 or later 159 * 160 * Examples and documentation at: http://malsup.com/jquery/form/ 161 * Dual licensed under the MIT and GPL licenses: 162 * http://www.opensource.org/licenses/mit-license.php 163 * http://www.gnu.org/licenses/gpl.html 164 */ 165 166(function(a) { 167 function b() { 168 var a = "[jquery.form] " + Array.prototype.join.call(arguments, ""); 169 if (window.console && window.console.log) { 170 window.console.log(a) 171 } else if (window.opera && window.opera.postError) { 172 window.opera.postError(a) 173 } 174 } 175 a.fn.ajaxSubmit = function(c) { 176 function t(e) { 177 function C(c) { 178 if (o.aborted || B) { 179 return 180 } 181 try { 182 z = w(n) 183 } catch (d) { 184 b("cannot access response document: ", d); 185 c = v 186 } 187 if (c === u && o) { 188 o.abort("timeout"); 189 return 190 } else if (c == v && o) { 191 o.abort("server abort"); 192 return 193 } 194 if (!z || z.location.href == j.iframeSrc) { 195 if (!r) 196 return 197 } 198 n.detachEvent ? n.detachEvent("onload", C) : n.removeEventListener("load", C, false); 199 var e = "success", f; 200 try { 201 if (r) { 202 throw"timeout" 203 } 204 var g = j.dataType == "xml" || z.XMLDocument || a.isXMLDoc(z); 205 b("isXml=" + g); 206 if (!g && window.opera && (z.body == null || z.body.innerHTML == "")) { 207 if (--A) { 208 b("requeing onLoad callback, DOM not available"); 209 setTimeout(C, 250); 210 return 211 } 212 } 213 var h = z.body ? z.body : z.documentElement; 214 o.responseText = h ? h.innerHTML : null; 215 o.responseXML = z.XMLDocument ? z.XMLDocument : z; 216 if (g) 217 j.dataType = "xml"; 218 o.getResponseHeader = function(a) { 219 var b = {"content-type": j.dataType}; 220 return b[a] 221 }; 222 if (h) { 223 o.status = Number(h.getAttribute("status")) || o.status; 224 o.statusText = h.getAttribute("statusText") || o.statusText 225 } 226 var i = j.dataType || ""; 227 var l = /(json|script|text)/.test(i.toLowerCase()); 228 if (l || j.textarea) { 229 var p = z.getElementsByTagName("textarea")[0]; 230 if (p) { 231 o.responseText = p.value; 232 o.status = Number(p.getAttribute("status")) || o.status; 233 o.statusText = p.getAttribute("statusText") || o.statusText 234 } else if (l) { 235 var q = z.getElementsByTagName("pre")[0]; 236 var t = z.getElementsByTagName("body")[0]; 237 if (q) { 238 o.responseText = q.textContent ? q.textContent : q.innerHTML 239 } else if (t) { 240 o.responseText = t.innerHTML 241 } 242 } 243 }
243 else if (j.dataType == "xml" && !o.responseXML && o.responseText != null) { 244 o.responseXML = D(o.responseText) 245 } 246 try { 247 y = F(o, j.dataType, j) 248 } catch (c) { 249 e = "parsererror"; 250 o.error = f = c || e 251 } 252 } catch (c) { 253 b("error caught: ", c); 254 e = "error"; 255 o.error = f = c || e 256 } 257 if (o.aborted) { 258 b("upload aborted"); 259 e = null 260 } 261 if (o.status) { 262 e = o.status >= 200 && o.status < 300 || o.status === 304 ? "success" : "error" 263 } 264 if (e === "success") { 265 j.success && j.success.call(j.context, y, "success", o); 266 k && a.event.trigger("ajaxSuccess", [o, j]) 267 } else if (e) { 268 if (f == undefined) 269 f = o.statusText; 270 j.error && j.error.call(j.context, o, e, f); 271 k && a.event.trigger("ajaxError", [o, j, f]) 272 } 273 k && a.event.trigger("ajaxComplete", [o, j]); 274 if (k && !--a.active) { 275 a.event.trigger("ajaxStop") 276 } 277 j.complete && j.complete.call(j.context, o, e); 278 B = true; 279 if (j.timeout) 280 clearTimeout(s); 281 setTimeout(function() { 282 if (!j.iframeTarget) 283 m.remove(); 284 o.responseXML = null 285 }, 100) 286 } 287 function x() { 288 function h() { 289 try { 290 var a = w(n).readyState; 291 b("state = " + a); 292 if (a.toLowerCase() == "uninitialized") 293 setTimeout(h, 50) 294 } catch (c) { 295 b("Server abort: ", c, " (", c.name, ")"); 296 C(v); 297 s && clearTimeout(s); 298 s = undefined 299 } 300 } 301 var c = g.attr("target"), e = g.attr("action"); 302 f.setAttribute("target", l); 303 if (!d) { 304 f.setAttribute("method", "POST") 305 } 306 if (e != j.url) { 307 f.setAttribute("action", j.url) 308 } 309 if (!j.skipEncodingOverride && (!d || /post/i.test(d))) { 310 g.attr({encoding: "multipart/form-data", enctype: "multipart/form-data"}) 311 } 312 /*if (j.timeout) { 313 s = setTimeout(function() { 314 r = true; 315 C(u) 316 }, j.timeout) 317 }*/ 318 var i = []; 319 try { 320 if (j.extraData) { 321 for (var k in j.extraData) { 322 i.push(a('<input type="hidden" name="' + k + '" />').attr("value", j.extraData[k]).appendTo(f)[0]) 323 } 324 } 325 if (!j.iframeTarget) { 326 m.appendTo("body"); 327 n.attachEvent ? n.attachEvent("onload", C) : n.addEventListener("load", C, false) 328 } 329 setTimeout(h, 15); 330 f.submit() 331 } finally { 332 f.setAttribute("action", e); 333 if (c) { 334 f.setAttribute("target", c) 335 } else { 336 g.removeAttr("target") 337 } 338 a(i).remove() 339 } 340 } 341 function w(a) { 342 var b = a.contentWindow ? a.contentWindow.document : a.contentDocument ? a.contentDocument : a.document; 343 return b 344 } 345 var f = g[0], h, i, j, k, l, m, n, o, p, q, r, s; 346 var t = !!a.fn.prop; 347 if (e) { 348 for (i = 0; i < e.length; i++) { 349 h = a(f[e[i].name]); 350 h[t ? "prop" : "attr"]("disabled", false) 351 } 352 } 353 if (a(":input[name=submit],:input[id=submit]", f).length) { 354 alert('Error: Form elements must not have name or id of "submit".'); 355 return 356 } 357 j = a.extend(true, {}, a.ajaxSettings, c); 358 j.context = j.context || j; 359 l = "jqFormIO" + (new Date).getTime(); 360 if (j.iframeTarget) { 361 m = a(j.iframeTarget); 362 q = m.attr("name"); 363 if (q == null) 364 m.attr("name", l); 365 else 366 l = q 367 } else { 368 m = a('<iframe name="' + l + '" src="' + j.iframeSrc + '" />'); 369 m.css({position: "absolute", top: "-1000px", left: "-1000px"}) 370 } 371 n = m[0]; 372 o = {aborted: 0, responseText: null, responseXML: null, status: 0, statusText: "n/a", getAllResponseHeaders: function() { 373 }, getResponseHeader: function() { 374 }, setRequestHeader: function() { 375 }, abort: function(c) { 376 var d = c === "timeout" ? "timeout" : "aborted"; 377 b("aborting upload... " + d); 378 this.aborted = 1; 379 m.attr("src", j.iframeSrc); 380 o.error = d; 381 j.error && j.error.call(j.context, o, d, c); 382 k && a.event.trigger("ajaxError", [o, j, d]); 383 j.complete && j.complete.call(j.context, o, d) 384 }}; 385 k = j.global; 386 if (k && !(a.active++)) { 387 a.event.trigger("ajaxStart") 388 } 389 if (k) { 390 a.event.trigger("ajaxSend", [o, j]) 391 }
392 if (j.beforeSend && j.beforeSend.call(j.context, o, j) === false) { 393 if (j.global) { 394 a.active-- 395 } 396 return 397 } 398 if (o.aborted) { 399 return 400 } 401 p = f.clk; 402 if (p) { 403 q = p.name; 404 if (q && !p.disabled) { 405 j.extraData = j.extraData || {}; 406 j.extraData[q] = p.value; 407 if (p.type == "image") { 408 j.extraData[q + ".x"] = f.clk_x; 409 j.extraData[q + ".y"] = f.clk_y 410 } 411 } 412 } 413 var u = 1; 414 var v = 2; 415 if (j.forceSync) { 416 x() 417 } else { 418 setTimeout(x, 10) 419 } 420 var y, z, A = 50, B; 421 var D = a.parseXML || function(a, b) { 422 if (window.ActiveXObject) { 423 b = new ActiveXObject("Microsoft.XMLDOM"); 424 b.async = "false"; 425 b.loadXML(a) 426 } else { 427 b = (new DOMParser).parseFromString(a, "text/xml") 428 } 429 return b && b.documentElement && b.documentElement.nodeName != "parsererror" ? b : null 430 }; 431 var E = a.parseJSON || function(a) { 432 return window["eval"]("(" + a + ")") 433 }; 434 var F = function(b, c, d) { 435 var e = b.getResponseHeader("content-type") || "", f = c === "xml" || !c && e.indexOf("xml") >= 0, g = f ? b.responseXML : b.responseText; 436 if (f && g.documentElement.nodeName === "parsererror") { 437 a.error && a.error("parsererror") 438 } 439 if (d && d.dataFilter) { 440 g = d.dataFilter(g, c) 441 } 442 if (typeof g === "string") { 443 if (c === "json" || !c && e.indexOf("json") >= 0) { 444 g = E(g) 445 } else if (c === "script" || !c && e.indexOf("javascript") >= 0) { 446 a.globalEval(g) 447 } 448 } 449 return g 450 } 451 } 452 if (!this.length) { 453 b("ajaxSubmit: skipping submit process - no element selected"); 454 return this 455 } 456 var d, e, f, g = this; 457 if (typeof c == "function") { 458 c = {success: c} 459 } 460 d = this.attr("method"); 461 e = this.attr("action"); 462 f = typeof e === "string" ? a.trim(e) : ""; 463 f = f || window.location.href || ""; 464 if (f) { 465 f = (f.match(/^([^#]+)/) || [])[1] 466 } 467 c = a.extend(true, {url: f, success: a.ajaxSettings.success, type: d || "GET", iframeSrc: /^https/i.test(window.location.href || "") ? "javascript:false" : "about:blank"}, c); 468 var h = {}; 469 this.trigger("form-pre-serialize", [this, c, h]); 470 if (h.veto) { 471 b("ajaxSubmit: submit vetoed via form-pre-serialize trigger"); 472 return this 473 } 474 if (c.beforeSerialize && c.beforeSerialize(this, c) === false) { 475 b("ajaxSubmit: submit aborted via beforeSerialize callback"); 476 return this 477 } 478 var i, j, k = this.formToArray(c.semantic); 479 if (c.data) { 480 c.extraData = c.data; 481 for (i in c.data) { 482 if (c.data[i]instanceof Array) { 483 for (var l in c.data[i]) { 484 k.push({name: i, value: c.data[i][l]}) 485 } 486 } else { 487 j = c.data[i]; 488 j = a.isFunction(j) ? j() : j; 489 k.push({name: i, value: j}) 490 } 491 } 492 } 493 if (c.beforeSubmit && c.beforeSubmit(k, this, c) === false) { 494 b("ajaxSubmit: submit aborted via beforeSubmit callback"); 495 return this 496 } 497 this.trigger("form-submit-validate", [k, this, c, h]); 498 if (h.veto) { 499 b("ajaxSubmit: submit vetoed via form-submit-validate trigger"); 500 return this 501 } 502 var m = a.param(k);
503 if (c.type.toUpperCase() == "GET") { 504 c.url += (c.url.indexOf("?") >= 0 ? "&" : "?") + m; 505 c.data = null 506 } else { 507 c.data = m 508 } 509 var n = []; 510 if (c.resetForm) { 511 n.push(function() { 512 g.resetForm() 513 }) 514 } 515 if (c.clearForm) { 516 n.push(function() { 517 g.clearForm() 518 }) 519 } 520 if (!c.dataType && c.target) { 521 var o = c.success || function() { 522 }; 523 n.push(function(b) { 524 var d = c.replaceTarget ? "replaceWith" : "html"; 525 a(c.target)[d](b).each(o, arguments) 526 }) 527 } else if (c.success) { 528 n.push(c.success) 529 } 530 c.success = function(a, b, d) { 531 var e = c.context || c; 532 for (var f = 0, h = n.length; f < h; f++) { 533 n[f].apply(e, [a, b, d || g, g]) 534 } 535 }; 536 var p = a("input:file", this).length > 0; 537 var q = "multipart/form-data"; 538 var r = g.attr("enctype") == q || g.attr("encoding") == q; 539 if (c.iframe !== false && (p || c.iframe || r)) { 540 if (c.closeKeepAlive) { 541 a.get(c.closeKeepAlive, function() { 542 t(k) 543 }) 544 } else { 545 t(k) 546 } 547 } else { 548 if (a.browser.msie && d == "get") { 549 var s = g[0].getAttribute("method"); 550 if (typeof s === "string") 551 c.type = s 552 } 553 //a.ajax(c) 554 } 555 this.trigger("form-submit-notify", [this, c]); 556 return this 557 }; 558 a.fn.ajaxForm = function(c) { 559 if (this.length === 0) { 560 var d = {s: this.selector, c: this.context}; 561 if (!a.isReady && d.s) { 562 b("DOM not ready, queuing ajaxForm"); 563 a(function() { 564 a(d.s, d.c).ajaxForm(c) 565 }); 566 return this 567 } 568 b("terminating; zero elements found by selector" + (a.isReady ? "" : " (DOM not ready)")); 569 return this 570 } 571 return this.ajaxFormUnbind().bind("submit.form-plugin", function(b) { 572 if (!b.isDefaultPrevented()) { 573 b.preventDefault(); 574 a(this).ajaxSubmit(c) 575 } 576 }).bind("click.form-plugin", function(b) { 577 var c = b.target; 578 var d = a(c); 579 if (!d.is(":submit,input:image")) { 580 var e = d.closest(":submit"); 581 if (e.length == 0) { 582 return 583 } 584 c = e[0] 585 } 586 var f = this; 587 f.clk = c; 588 if (c.type == "image") { 589 if (b.offsetX != undefined) { 590 f.clk_x = b.offsetX; 591 f.clk_y = b.offsetY 592 } else if (typeof a.fn.offset == "function") { 593 var g = d.offset(); 594 f.clk_x = b.pageX - g.left; 595 f.clk_y = b.pageY - g.top 596 } else { 597 f.clk_x = b.pageX - c.offsetLeft; 598 f.clk_y = b.pageY - c.offsetTop 599 } 600 } 601 setTimeout(function() { 602 f.clk = f.clk_x = f.clk_y = null 603 }, 100) 604 }) 605 }; 606 a.fn.ajaxFormUnbind = function() { 607 return this.unbind("submit.form-plugin click.form-plugin") 608 }; 609 a.fn.formToArray = function(b) { 610 var c = []; 611 if (this.length === 0) { 612 return c 613 } 614 var d = this[0]; 615 var e = b ? d.getElementsByTagName("*") : d.elements; 616 if (!e) { 617 return c 618 } 619 var f, g, h, i, j, k, l; 620 for (f = 0, k = e.length; f < k; f++) { 621 j = e[f]; 622 h = j.name; 623 if (!h) { 624 continue 625 } 626 if (b && d.clk && j.type == "image") { 627 if (!j.disabled && d.clk == j) { 628 c.push({name: h, value: a(j).val()}); 629 c.push({name: h + ".x", value: d.clk_x}, {name: h + ".y", value: d.clk_y}) 630 } 631 continue 632 } 633 i = a.fieldValue(j, true); 634 if (i && i.constructor == Array) { 635 for (g = 0, l = i.length; g < l; g++) { 636 c.push({name: h, value: i[g]}) 637 } 638 } else if (i !== null && typeof i != "undefined") { 639 c.push({name: h, value: i}) 640 } 641 } 642 if (!b && d.clk) { 643 var m = a(d.clk), n = m[0]; 644 h = n.name; 645 if (h && !n.disabled && n.type == "image") { 646 c.push({name: h, value: m.val()}); 647 c.push({name: h + ".x", value: d.clk_x}, {name: h + ".y", value: d.clk_y}) 648 } 649 } 650 return c 651 };
652 a.fn.formSerialize = function(b) { 653 return a.param(this.formToArray(b)) 654 }; 655 a.fn.fieldSerialize = function(b) { 656 var c = []; 657 this.each(function() { 658 var d = this.name; 659 if (!d) { 660 return 661 } 662 var e = a.fieldValue(this, b); 663 if (e && e.constructor == Array) { 664 for (var f = 0, g = e.length; f < g; f++) { 665 c.push({name: d, value: e[f]}) 666 } 667 } else if (e !== null && typeof e != "undefined") { 668 c.push({name: this.name, value: e}) 669 } 670 }); 671 return a.param(c) 672 }; 673 a.fn.fieldValue = function(b) { 674 for (var c = [], d = 0, e = this.length; d < e; d++) { 675 var f = this[d]; 676 var g = a.fieldValue(f, b); 677 if (g === null || typeof g == "undefined" || g.constructor == Array && !g.length) { 678 continue 679 } 680 g.constructor == Array ? a.merge(c, g) : c.push(g) 681 } 682 return c 683 }; 684 a.fieldValue = function(b, c) { 685 var d = b.name, e = b.type, f = b.tagName.toLowerCase(); 686 if (c === undefined) { 687 c = true 688 } 689 if (c && (!d || b.disabled || e == "reset" || e == "button" || (e == "checkbox" || e == "radio") && !b.checked || (e == "submit" || e == "image") && b.form && b.form.clk != b || f == "select" && b.selectedIndex == -1)) { 690 return null 691 } 692 if (f == "select") { 693 var g = b.selectedIndex; 694 if (g < 0) { 695 return null 696 } 697 var h = [], i = b.options; 698 var j = e == "select-one"; 699 var k = j ? g + 1 : i.length; 700 for (var l = j ? g : 0; l < k; l++) { 701 var m = i[l]; 702 if (m.selected) { 703 var n = m.value; 704 if (!n) { 705 n = m.attributes && m.attributes["value"] && !m.attributes["value"].specified ? m.text : m.value 706 } 707 if (j) { 708 return n 709 } 710 h.push(n) 711 } 712 } 713 return h 714 } 715 return a(b).val() 716 }; 717 a.fn.clearForm = function() { 718 return this.each(function() { 719 a("input,select,textarea", this).clearFields() 720 }) 721 }; 722 a.fn.clearFields = a.fn.clearInputs = function() { 723 var a = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; 724 return this.each(function() { 725 var b = this.type, c = this.tagName.toLowerCase(); 726 if (a.test(b) || c == "textarea") { 727 this.value = "" 728 } else if (b == "checkbox" || b == "radio") { 729 this.checked = false 730 } else if (c == "select") { 731 this.selectedIndex = -1 732 } 733 }) 734 }; 735 a.fn.resetForm = function() { 736 return this.each(function() { 737 if (typeof this.reset == "function" || typeof this.reset == "object" && !this.reset.nodeType) { 738 this.reset() 739 } 740 }) 741 }; 742 a.fn.enable = function(a) { 743 if (a === undefined) { 744 a = true 745 } 746 return this.each(function() { 747 this.disabled = !a 748 }) 749 }; 750 a.fn.selected = function(b) { 751 if (b === undefined) { 752 b = true 753 } 754 return this.each(function() { 755 var c = this.type; 756 if (c == "checkbox" || c == "radio") { 757 this.checked = b 758 } else if (this.tagName.toLowerCase() == "option") { 759 var d = a(this).parent("select"); 760 if (b && d[0] && d[0].type == "select-one") { 761 d.find("option").selected(false) 762 } 763 this.selected = b 764 } 765 }) 766 }; 767})(jQuery) 768$.fn.clearForm = function() { 769 return this.each(function() { 770 var type = this.type, tag = this.tagName.toLowerCase(); 771 if (tag == 'form') 772 return $(':input', this).clearForm(); 773 if (type == 'text' || type == 'password' || tag == 'textarea') 774 this.value = ''; 775 else if (type == 'checkbox' || type == 'radio') 776 this.checked = false;
777 else if (tag == 'select') 778 this.selectedIndex = -1 779 }) 780}; 781 782 783(function(a) { 784 function c() { 785 a(document).mouseout(function() { 786 a(".megamenu").children("li").removeClass("active"); 787 a(".megamenu_fullwidth").hide(0) 788 }); 789 a(".megamenu").mouseout(function(a) { 790 a.stopPropagation() 791 //by david 792 //©îªOÁôÂÃstru_templates_23(); 793 }) 794 } 795 function b() { 796 a(".megamenu_fixed").after('<a id="megamenu_trigger" href="#"></a>'); 797 a("#megamenu_trigger").click(function() { 798 a(".megamenu_fixed").slideToggle(300); 799 a(this).toggleClass("active"); 800 return false 801 }) 802 } 803 a.fn.megaMenuReloaded = function(d) { 804 var d = a.extend({menu_speed_show: 300, menu_speed_hide: 200, menu_speed_delay: 1, menu_effect: "open_close_fade", menu_click_outside: 1, menu_show_onload: 1, menubar_trigger: 1}, a); 805 return this.each(function() { 806 var e = a(this), f = a(e).children("li"), g = a(f).children(".megamenu_fullwidth"); 807 menuDropDownScroller = a(".megamenu_scroller_container"); 808 a(menuDropDownScroller).nanoScroller(); 809 a(g).css("left", "0").hide(); 810 if (d.menubar_trigger === 1) { 811 b() 812 } 813 if (d.menu_click_outside === 1) { 814 c() 815 } 816 if (d.menu_effect == "open_close_fade") { 817 a(f).children(".megamenu_fullwidth").hide().parent(f)/*.toggleClass("active")*/; 818 a(f).unbind("mouseenter mouseleave"); 819 a(f).hover(function() { 820 var b = a(this); 821 b.siblings().removeClass("active").end().toggleClass("active"); 822 b.siblings().find(g).fadeOut(d.menu_speed_hide); 823 b.find(g).delay(d.menu_speed_delay).fadeToggle(d.menu_speed_show).hover(function(a) { 824 a.stopPropagation() 825 }) 826 }) 827 } else if (d.menu_effect === "open_close_slide") { 828 a(f).children(".megamenu_fullwidth").show().parent(f).toggleClass("active"); 829 a(f).unbind("mouseenter mouseleave"); 830 a(f).hover(function() { 831 var b = a(this); 832 b.siblings().removeClass("active").end().toggleClass("active"); 833 b.siblings().find(g).slideUp(d.menu_speed_hide); 834 b.find(g).delay(d.menu_speed_delay).slideToggle(d.menu_speed_show).hover(function(a) { 835 a.stopPropagation() 836 }) 837 }) 838 } 839 }) 840 }; 841 a.fn.megaMenuTabs = function(b) { 842 return this.each(function() { 843 var b = a(this); 844 menuTabsNav = b.find(".megamenu_tabs_nav"); 845 menuTabsNav.delegate("li > a", "click", function() { 846 var c = b.find("a.current").attr("href").substring(1), d = a(this), e = d.attr("href").substring(1); 847 if (e != c && b.find(":animated").length == 0) { 848 b.find(".megamenu_tabs_nav li a").removeClass("current"); 849 d.addClass("current"); 850 b.find("#" + c).fadeOut(300, function() { 851 b.find("#" + e).fadeIn(300); 852 var a = b.find("#" + e).height() 853 }) 854 } 855 return false 856 }) 857 }) 858 }; 859 a.fn.simplecarousel = function(b) 860 { 861 //a(".megamenu").append('<span class="megamenu_carousel_prev"></span><span class="megamenu_carousel_next"></span>'); 862 //tabindex="48" 863 //a(".megamenu").append('<span class="megamenu_carousel_prev"><a tabindex="51" onclick="xxx2(610)">11</a></span><span class="megamenu_carousel_next"><a tabindex="99">22</a></span>'); 864 865 var c = {width: "auto", visible: 1, next: a(".megamenu_carousel_next"), prev: a(".megamenu_carousel_prev"), current: 0, items: 2, slidespeed: 600};//defult 610 866 var d = a.extend(c, b); 867 var e = a(this); 868 var f = d.width;
869 e.wrap('<div class="carousel-frame" style="width:' + 'auto;overflow:hidden;"></div>');//defult 610 870 var g = e.parent(".carousel-frame"); 871 e.width(d.items * d.width); 872 e.css("overflow", "hidden"); 873 var h = function(a, b) 874 { 875 for(ii=0;ii<50;ii++){ 876 if(document.getElementById('mega_item_'+ii)){ 877 $('#mega_item_' + ii).css('display','inline'); 878 $('#mega_item_' + ii).css('float','left'); 879 $('#mega_item_' + ii).find('span').css('float','left'); 880 $('#mega_item_' + ii).find('a').css('float','left'); 881 } 882 } 883 var loc = e.css('margin-left').replace('px',''); 884 885 var T1 = parseInt(document.getElementById('T1').value); 886 var T2 = parseInt(document.getElementById('T2').value); 887 var T3 = parseInt(document.getElementById('T3').value); 888 var T4 = parseInt(document.getElementById('T4').value); 889 var marginLeft_b_111 = parseInt(document.getElementById('T5').value); 890 891 var this_page = Math.floor( parseInt(loc) / (-610)); 892 893 894 d.current = this_page; 895 896 if (a == "next") { 897 d.current += d.visible; 898 899 if (d.current >= d.items || T1 == "15"){ 900 //¬°¤F½Õ¾ã¦¨²Å¦X²{¦bªº°t¸m ¯S§O³B²z 901 d.current = 0; 902 document.getElementById('T1').value=-1; 903 document.getElementById('T2').value=610; 904 document.getElementById('T3').value=-5; 905 document.getElementById('T4').value=-610; 906 document.getElementById('T5').value=610; 907 } 908 } else if (a == "prev") { 909 d.current -= d.visible; 910 911 if (d.current < 0){ 912 //d.current = d.visible == 1 ? d.items - 1 : d.items - d.visible + (d.visible - d.items % d.visible) 913 //¬°¤F½Õ¾ã¦¨²Å¦X²{¦bªº°t¸m ¯S§O³B²z 914 d.current = 3; 915 document.getElementById('T1').value=19; 916 document.getElementById('T2').value=3050; 917 document.getElementById('T3').value=15; 918 document.getElementById('T4').value=1830; 919 marginLeft_b_111 = 590; 920 document.getElementById('T5').value=610; 921 }else if(T1=="15"){ 922 d.current = 2; 923 } 924 } else { 925 d.current = a; 926 } 927 928 //e.animate({marginLeft: -1 * d.current * 610}, d.slidespeed); 929 e.animate({marginLeft: -1 * d.current * marginLeft_b_111}, d.slidespeed); 930 for(ii=(d.current+1)*4;ii<50;ii++){ 931 if(document.getElementById('mega_item_'+ii)){ 932 $('#mega_item_'+ii).css('display','none'); 933 } 934 } 935 }; 936 if (d.next != false){ 937 d.next.click(function() { 938 h("next", true) 939 //alert('go1'); 940 941 942 943 var last_count = parseInt(document.getElementById('T1').value); 944 var marginLeft_n = parseInt(document.getElementById('T2').value); 945 var f_count = parseInt(document.getElementById('T3').value); 946 var marginLeft_b = parseInt(document.getElementById('T4').value); 947 948 //¬°¤F½Õ¾ã¦¨²Å¦X²{¦bªº°t¸m ¯S§O³B²z 949 var newl = "610"; 950 951 if(last_count==7){ 952 //alert('go4'); 953 last_count+=4; 954 marginLeft_n+=610; 955 marginLeft_b+=610; 956 f_count+=4; 957 958 newl = "590"; 959 960 }else{ 961 962 last_count+=4; 963 marginLeft_n+=610; 964 marginLeft_b+=610; 965 f_count+=4; 966 967 newl = "610"; 968 } 969 970 document.getElementById('T1').value=last_count; 971 document.getElementById('T2').value=marginLeft_n; 972 document.getElementById('T3').value=f_count; 973 document.getElementById('T4').value=marginLeft_b; 974 document.getElementById('T5').value=newl; 975 976 977 last_count=last_count-3; 978 979 //if(document.getElementById('mega_item_a_'+last_count)) 980 // document.getElementById('mega_item_a_'+last_count).focus(); 981 982 }); 983 d.next.keypress(function() { 984 h("next", true) 985 //alert('go2'); 986 987 var last_count = parseInt(document.getElementById('T1').value); 988 var marginLeft_n = parseInt(document.getElementById('T2').value); 989 var f_count = parseInt(document.getElementById('T3').value); 990 var marginLeft_b = parseInt(document.getElementById('T4').value); 991 992 //¬°¤F½Õ¾ã¦¨²Å¦X²{¦bªº°t¸m ¯S§O³B²z 993 var newl = "610"; 994 995 if(last_count==7){ 996 //alert('go4'); 997 last_count+=4; 998 marginLeft_n+=610; 999 marginLeft_b+=610; 1000 f_count+=4; 1001 1002 newl = "590"; 1003 1004 }else{ 1005 1006 last_count+=4; 1007 marginLeft_n+=610; 1008 marginLeft_b+=610; 1009 f_count+=4; 1010 1011 newl = "610"; 1012 } 1013 1014 document.getElementById('T1').value=last_count; 1015 document.getElementById('T2').value=marginLeft_n; 1016 document.getElementById('T3').value=f_count; 1017 document.getElementById('T4').value=marginLeft_b; 1018 document.getElementById('T5').value=newl; 1019 1020 1021 last_count=last_count-3; 1022 1023 //if(document.getElementById('mega_item_a_'+last_count)) 1024 // document.getElementById('mega_item_a_'+last_count).focus(); 1025 1026 }); 1027 } 1028 if (d.prev != false){ 1029 d.prev.click(function() { 1030 h("prev", true) 1031 //alert('b'); 1032 1033 var last_count = parseInt(document.getElementById('T1').value); 1034 var marginLeft_n = parseInt(document.getElementById('T2').value); 1035 var f_count = parseInt(document.getElementById('T3').value); 1036 var marginLeft_b = parseInt(document.getElementById('T4').value); 1037 1038 1039 last_count -= 4; 1040 marginLeft_n-=610; 1041 marginLeft_b-=610; 1042 f_count -= 4; 1043 1044 document.getElementById('T1').value=last_count; 1045 document.getElementById('T2').value=marginLeft_n; 1046 document.getElementById('T3').value=f_count; 1047 document.getElementById('T4').value=marginLeft_b; 1048 1049 1050 var newl = "610"; 1051 /* 1052 if(last_count==7){ 1053 //alert('go4'); 1054 last_count-=4; 1055 marginLeft_n-=610; 1056 marginLeft_b-=610; 1057 f_count-=4; 1058 1059 newl = "590"; 1060 1061 }else{ 1062 1063 last_count-=4; 1064 marginLeft_n-=610; 1065 marginLeft_b-=610; 1066 f_count-=4; 1067 1068 newl = "610"; 1069 } 1070 */ 1071 document.getElementById('T1').value=last_count; 1072 document.getElementById('T2').value=marginLeft_n; 1073 document.getElementById('T3').value=f_count; 1074 document.getElementById('T4').value=marginLeft_b; 1075 //document.getElementById('T5').value=newl; 1076 1077 last_count=last_count-3; 1078 //if(document.getElementById('mega_item_a_'+last_count)) 1079 // document.getElementById('mega_item_a_'+last_count).focus(); 1080 1081 }); 1082 d.prev.keypress(function() { 1083 h("prev", true) 1084 //alert('b'); 1085 1086 var last_count = parseInt(document.getElementById('T1').value); 1087 var marginLeft_n = parseInt(document.getElementById('T2').value); 1088 var f_count = parseInt(document.getElementById('T3').value); 1089 var marginLeft_b = parseInt(document.getElementById('T4').value); 1090 1091 last_count -= 4; 1092 marginLeft_n-=610; 1093 marginLeft_b-=610; 1094 f_count -= 4; 1095 1096 document.getElementById('T1').value=last_count; 1097 document.getElementById('T2').value=marginLeft_n; 1098 document.getElementById('T3').value=f_count; 1099 document.getElementById('T4').value=marginLeft_b; 1100 1101 last_count=last_count-3; 1102 //if(document.getElementById('mega_item_a_'+last_count)) 1103 // document.getElementById('mega_item_a_'+last_count).focus(); 1104 1105 }); 1106 //tab¨ì¤U¤@Ó n¦Û°Ê§â¨÷¶bÂà¦^²Ä¤@Ó ¤£µMfocus·|¦³°ÝÃD 1107 d.next.on('keydown',function(e){ 1108 if(e.keyCode=='9' && !e.shiftKey){ 1109 h("0", true); 1110 var last_count = parseInt(document.getElementById('T1').value); 1111 var marginLeft_n = parseInt(document.getElementById('T2').value); 1112 var f_count = parseInt(document.getElementById('T3').value); 1113 var marginLeft_b = parseInt(document.getElementById('T4').value); 1114 1115 last_count =3; 1116 marginLeft_n =610; 1117 marginLeft_b =-610; 1118 f_count = -1; 1119 1120 document.getElementById('T1').value=last_count; 1121 document.getElementById('T2').value=marginLeft_n; 1122 document.getElementById('T3').value=f_count; 1123 document.getElementById('T4').value=marginLeft_b; 1124 1125 } 1126 }); 1127 } 1128 } 1129})(jQuery) 1130 1131$(document).ready(function(){ 1132 $(".megamenu > li > span > a").focus(function(){ 1133 $(".megamenu_fullwidth").fadeOut(300); 1134 $(".megamenu > li").removeClass("active"); 1135 $(this).parents("li").addClass("active"); 1136 $(this).parent(".drop").next(".megamenu_fullwidth").css({"left":"0", "display":"block"}); 1137 1138 $(".megamenu_fullwidth > div > div > ul > li > a").focus(function(){ 1139 var lastNavSub = $(this).parent("li").nextAll().size(); 1140 1141 if(lastNavSub == 0) { 1142 $(this).blur(function(){ 1143 //$(".megamenu_fullwidth").fadeOut(300); 1144 }); 1145 } 1146 }); 1147 }); 1148});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.