Advertisement
Guest User

Untitled

a guest
May 19th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 87.58 KB | None | 0 0
  1. (function () {
  2. if (window.magicJS) {
  3. return
  4. }
  5. var b = {
  6. version: "v2.7.4",
  7. UUID: 0,
  8. storage: {},
  9. $uuid: function (d) {
  10. return (d.$J_UUID || (d.$J_UUID = ++a.UUID))
  11. },
  12. getStorage: function (d) {
  13. return (a.storage[d] || (a.storage[d] = {}))
  14. },
  15. $F: function () {},
  16. $false: function () {
  17. return false
  18. },
  19. defined: function (d) {
  20. return (undefined != d)
  21. },
  22. exists: function (d) {
  23. return !! (d)
  24. },
  25. j1: function (d) {
  26. if (!a.defined(d)) {
  27. return false
  28. }
  29. if (d.$J_TYPE) {
  30. return d.$J_TYPE
  31. }
  32. if ( !! d.nodeType) {
  33. if (1 == d.nodeType) {
  34. return "element"
  35. }
  36. if (3 == d.nodeType) {
  37. return "textnode"
  38. }
  39. }
  40. if (d.length && d.item) {
  41. return "collection"
  42. }
  43. if (d.length && d.callee) {
  44. return "arguments"
  45. }
  46. if ((d instanceof window.Object || d instanceof window.Function) && d.constructor === a.Class) {
  47. return "class"
  48. }
  49. if (d instanceof window.Array) {
  50. return "array"
  51. }
  52. if (d instanceof window.Function) {
  53. return "function"
  54. }
  55. if (d instanceof window.String) {
  56. return "string"
  57. }
  58. if (a.j21.trident) {
  59. if (a.defined(d.cancelBubble)) {
  60. return "event"
  61. }
  62. } else {
  63. if (d === window.event || d.constructor == window.Event || d.constructor == window.MouseEvent || d.constructor == window.UIEvent || d.constructor == window.KeyboardEvent || d.constructor == window.KeyEvent) {
  64. return "event"
  65. }
  66. }
  67. if (d instanceof window.Date) {
  68. return "date"
  69. }
  70. if (d instanceof window.RegExp) {
  71. return "regexp"
  72. }
  73. if (d === window) {
  74. return "window"
  75. }
  76. if (d === document) {
  77. return "document"
  78. }
  79. return typeof(d)
  80. },
  81. extend: function (j, h) {
  82. if (! (j instanceof window.Array)) {
  83. j = [j]
  84. }
  85. for (var g = 0, e = j.length; g < e; g++) {
  86. if (!a.defined(j)) {
  87. continue
  88. }
  89. for (var f in (h || {})) {
  90. try {
  91. j[g][f] = h[f]
  92. } catch(d) {}
  93. }
  94. }
  95. return j[0]
  96. },
  97. implement: function (h, g) {
  98. if (! (h instanceof window.Array)) {
  99. h = [h]
  100. }
  101. for (var f = 0, d = h.length; f < d; f++) {
  102. if (!a.defined(h[f])) {
  103. continue
  104. }
  105. if (!h[f].prototype) {
  106. continue
  107. }
  108. for (var e in (g || {})) {
  109. if (!h[f].prototype[e]) {
  110. h[f].prototype[e] = g[e]
  111. }
  112. }
  113. }
  114. return h[0]
  115. },
  116. nativize: function (f, e) {
  117. if (!a.defined(f)) {
  118. return f
  119. }
  120. for (var d in (e || {})) {
  121. if (!f[d]) {
  122. f[d] = e[d]
  123. }
  124. }
  125. return f
  126. },
  127. $try: function () {
  128. for (var f = 0, d = arguments.length; f < d; f++) {
  129. try {
  130. return arguments[f]()
  131. } catch(g) {}
  132. }
  133. return null
  134. },
  135. $A: function (f) {
  136. if (!a.defined(f)) {
  137. return $mjs([])
  138. }
  139. if (f.toArray) {
  140. return $mjs(f.toArray())
  141. }
  142. if (f.item) {
  143. var e = f.length || 0,
  144. d = new Array(e);
  145. while (e--) {
  146. d[e] = f[e]
  147. }
  148. return $mjs(d)
  149. }
  150. return $mjs(Array.prototype.slice.call(f))
  151. },
  152. now: function () {
  153. return new Date().getTime()
  154. },
  155. detach: function (h) {
  156. var f;
  157. switch (a.j1(h)) {
  158. case "object":
  159. f = {};
  160. for (var g in h) {
  161. f[g] = a.detach(h[g])
  162. }
  163. break;
  164. case "array":
  165. f = [];
  166. for (var e = 0, d = h.length; e < d; e++) {
  167. f[e] = a.detach(h[e])
  168. }
  169. break;
  170. default:
  171. return h
  172. }
  173. return a.$(f)
  174. },
  175. $: function (e) {
  176. if (!a.defined(e)) {
  177. return null
  178. }
  179. if (e.$J_EXTENDED) {
  180. return e
  181. }
  182. switch (a.j1(e)) {
  183. case "array":
  184. e = a.nativize(e, a.extend(a.Array, {
  185. $J_EXTENDED: a.$F
  186. }));
  187. e.j14 = e.forEach;
  188. e.contains = a.Array.contains;
  189. return e;
  190. break;
  191. case "string":
  192. var d = document.getElementById(e);
  193. if (a.defined(d)) {
  194. return a.$(d)
  195. }
  196. return null;
  197. break;
  198. case "window":
  199. case "document":
  200. a.$uuid(e);
  201. e = a.extend(e, a.Doc);
  202. break;
  203. case "element":
  204. a.$uuid(e);
  205. e = a.extend(e, a.Element);
  206. break;
  207. case "event":
  208. e = a.extend(e, a.Event);
  209. break;
  210. case "textnode":
  211. return e;
  212. break;
  213. case "function":
  214. case "array":
  215. case "date":
  216. default:
  217. break
  218. }
  219. return a.extend(e, {
  220. $J_EXTENDED: a.$F
  221. })
  222. },
  223. $new: function (d, f, e) {
  224. return $mjs(a.doc.createElement(d)).setProps(f || {}).j6(e || {})
  225. },
  226. addCSS: function (e) {
  227. if (document.styleSheets && document.styleSheets.length) {
  228. document.styleSheets[0].insertRule(e, 0)
  229. } else {
  230. var d = $mjs(document.createElement("style"));
  231. d.update(e);
  232. document.getElementsByTagName("head")[0].appendChild(d)
  233. }
  234. }
  235. };
  236. var a = b;
  237. window.magicJS = b;
  238. window.$mjs = b.$;
  239. a.Array = {
  240. $J_TYPE: "array",
  241. indexOf: function (g, h) {
  242. var d = this.length;
  243. for (var e = this.length, f = (h < 0) ? Math.max(0, e + h) : h || 0; f < e; f++) {
  244. if (this[f] === g) {
  245. return f
  246. }
  247. }
  248. return - 1
  249. },
  250. contains: function (d, e) {
  251. return this.indexOf(d, e) != -1
  252. },
  253. forEach: function (d, g) {
  254. for (var f = 0, e = this.length; f < e; f++) {
  255. if (f in this) {
  256. d.call(g, this[f], f, this)
  257. }
  258. }
  259. },
  260. filter: function (d, j) {
  261. var h = [];
  262. for (var g = 0, e = this.length; g < e; g++) {
  263. if (g in this) {
  264. var f = this[g];
  265. if (d.call(j, this[g], g, this)) {
  266. h.push(f)
  267. }
  268. }
  269. }
  270. return h
  271. },
  272. map: function (d, h) {
  273. var g = [];
  274. for (var f = 0, e = this.length; f < e; f++) {
  275. if (f in this) {
  276. g[f] = d.call(h, this[f], f, this)
  277. }
  278. }
  279. return g
  280. }
  281. };
  282. a.implement(String, {
  283. $J_TYPE: "string",
  284. j26: function () {
  285. return this.replace(/^\s+|\s+$/g, "")
  286. },
  287. eq: function (d, e) {
  288. return (e || false) ? (this.toString() === d.toString()) : (this.toLowerCase().toString() === d.toLowerCase().toString())
  289. },
  290. j22: function () {
  291. return this.replace(/-\D/g, function (d) {
  292. return d.charAt(1).toUpperCase()
  293. })
  294. },
  295. dashize: function () {
  296. return this.replace(/[A-Z]/g, function (d) {
  297. return ("-" + d.charAt(0).toLowerCase())
  298. })
  299. },
  300. j17: function (d) {
  301. return parseInt(this, d || 10)
  302. },
  303. toFloat: function () {
  304. return parseFloat(this)
  305. },
  306. j18: function () {
  307. return ! this.replace(/true/i, "").j26()
  308. },
  309. has: function (e, d) {
  310. d = d || "";
  311. return (d + this + d).indexOf(d + e + d) > -1
  312. }
  313. });
  314. b.implement(Function, {
  315. $J_TYPE: "function",
  316. j24: function () {
  317. var e = a.$A(arguments),
  318. d = this,
  319. f = e.shift();
  320. return function () {
  321. return d.apply(f || null, e.concat(a.$A(arguments)))
  322. }
  323. },
  324. j16: function () {
  325. var e = a.$A(arguments),
  326. d = this,
  327. f = e.shift();
  328. return function (g) {
  329. return d.apply(f || null, $mjs([g || window.event]).concat(e))
  330. }
  331. },
  332. j27: function () {
  333. var e = a.$A(arguments),
  334. d = this,
  335. f = e.shift();
  336. return window.setTimeout(function () {
  337. return d.apply(d, e)
  338. },
  339. f || 0)
  340. },
  341. j28: function () {
  342. var e = a.$A(arguments),
  343. d = this;
  344. return function () {
  345. return d.j27.apply(d, e)
  346. }
  347. },
  348. interval: function () {
  349. var e = a.$A(arguments),
  350. d = this,
  351. f = e.shift();
  352. return window.setInterval(function () {
  353. return d.apply(d, e)
  354. },
  355. f || 0)
  356. }
  357. });
  358. var c = navigator.userAgent.toLowerCase();
  359. a.j21 = {
  360. features: {
  361. xpath: !!(document.evaluate),
  362. air: !!(window.runtime),
  363. query: !!(document.querySelector)
  364. },
  365. touchScreen: function () {
  366. return "ontouchstart" in window || (window.DocumentTouch && document instanceof DocumentTouch)
  367. } (),
  368. mobile: c.match(/android|tablet|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(j21|link)|vodafone|wap|windows (ce|phone)|xda|xiino/) ? true: false,
  369. engine: (window.opera) ? "presto": !!(window.ActiveXObject) ? "trident": (undefined != document.getBoxObjectFor || null != window.mozInnerScreenY) ? "gecko": (null != window.WebKitPoint || !navigator.taintEnabled) ? "webkit": "unknown",
  370. version: "",
  371. ieMode: 0,
  372. platform: c.match(/ip(?:ad|od|hone)/) ? "ios": (c.match(/(?:webos|android)/) || navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(),
  373. backCompat: document.compatMode && "backcompat" == document.compatMode.toLowerCase(),
  374. getDoc: function () {
  375. return (document.compatMode && "backcompat" == document.compatMode.toLowerCase()) ? document.body: document.documentElement
  376. },
  377. requestAnimationFrame: window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || undefined,
  378. cancelAnimationFrame: window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || window.webkitCancelRequestAnimationFrame || undefined,
  379. ready: false,
  380. onready: function () {
  381. if (a.j21.ready) {
  382. return
  383. }
  384. a.j21.ready = true;
  385. a.body = $mjs(document.body);
  386. a.win = $mjs(window);
  387. (function () {
  388. a.j21.css3Transformations = {
  389. capable: false,
  390. prefix: ""
  391. };
  392. if (typeof document.body.style.transform !== "undefined") {
  393. a.j21.css3Transformations.capable = true
  394. } else {
  395. var f = "Webkit Moz O ms Khtml".split(" ");
  396. for (var e = 0, d = f.length; e < d; e++) {
  397. a.j21.css3Transformations.prefix = f[e];
  398. if (typeof document.body.style[a.j21.css3Transformations.prefix + "Transform"] !== "undefined") {
  399. a.j21.css3Transformations.capable = true;
  400. break
  401. }
  402. }
  403. }
  404. })();
  405. (function () {
  406. a.j21.css3Animation = {
  407. capable: false,
  408. prefix: ""
  409. };
  410. if (typeof document.body.style.animationName !== "undefined") {
  411. a.j21.css3Animation.capable = true
  412. } else {
  413. var f = "Webkit Moz O ms Khtml".split(" ");
  414. for (var e = 0, d = f.length; e < d; e++) {
  415. a.j21.css3Animation.prefix = f[e];
  416. if (typeof document.body.style[a.j21.css3Animation.prefix + "AnimationName"] !== "undefined") {
  417. a.j21.css3Animation.capable = true;
  418. break
  419. }
  420. }
  421. }
  422. })();
  423. $mjs(document).raiseEvent("domready")
  424. }
  425. };
  426. (function () {
  427. function d() {
  428. return !! (arguments.callee.caller)
  429. }
  430. a.j21.version = ("presto" == a.j21.engine) ? !!(document.head) ? 270 : !!(window.applicationCache) ? 260 : !!(window.localStorage) ? 250 : (a.j21.features.query) ? 220 : ((d()) ? 211 : ((document.getElementsByClassName) ? 210 : 200)) : ("trident" == a.j21.engine) ? !!(window.msPerformance || window.performance) ? 900 : !!(window.XMLHttpRequest && window.postMessage) ? 6 : ((window.XMLHttpRequest) ? 5 : 4) : ("webkit" == a.j21.engine) ? ((a.j21.features.xpath) ? ((a.j21.features.query) ? 525 : 420) : 419) : ("gecko" == a.j21.engine) ? !!(document.head) ? 200 : !!document.readyState ? 192 : !!(window.localStorage) ? 191 : ((document.getElementsByClassName) ? 190 : 181) : "";
  431. a.j21[a.j21.engine] = a.j21[a.j21.engine + a.j21.version] = true;
  432. if (window.chrome) {
  433. a.j21.chrome = true
  434. }
  435. a.j21.ieMode = (!a.j21.trident) ? 0 : (document.documentMode) ? document.documentMode: function () {
  436. var e = 0;
  437. if (a.j21.backCompat) {
  438. return 5
  439. }
  440. switch (a.j21.version) {
  441. case 4:
  442. e = 6;
  443. break;
  444. case 5:
  445. e = 7;
  446. break;
  447. case 6:
  448. e = 8;
  449. break;
  450. case 900:
  451. e = 9;
  452. break
  453. }
  454. return e
  455. } ()
  456. })();
  457. (function () {
  458. a.j21.fullScreen = {
  459. capable: false,
  460. enabled: function () {
  461. return false
  462. },
  463. request: function () {},
  464. cancel: function () {},
  465. changeEventName: "",
  466. errorEventName: "",
  467. prefix: ""
  468. };
  469. if (typeof document.cancelFullScreen != "undefined") {
  470. a.j21.fullScreen.capable = true
  471. } else {
  472. var f = "webkit moz o ms khtml".split(" ");
  473. for (var e = 0, d = f.length; e < d; e++) {
  474. a.j21.fullScreen.prefix = f[e];
  475. if (typeof document[a.j21.fullScreen.prefix + "CancelFullScreen"] != "undefined") {
  476. a.j21.fullScreen.capable = true;
  477. break
  478. }
  479. }
  480. }
  481. if (a.j21.fullScreen.capable) {
  482. a.j21.fullScreen.changeEventName = a.j21.fullScreen.prefix + "fullscreenchange";
  483. a.j21.fullScreen.errorEventName = a.j21.fullScreen.prefix + "fullscreenerror";
  484. a.j21.fullScreen.enabled = function () {
  485. switch (this.prefix) {
  486. case "":
  487. return document.fullScreen;
  488. case "webkit":
  489. return document.webkitIsFullScreen;
  490. default:
  491. return document[this.prefix + "FullScreen"]
  492. }
  493. };
  494. a.j21.fullScreen.request = function (g) {
  495. return (this.prefix === "") ? g.requestFullScreen() : g[this.prefix + "RequestFullScreen"]()
  496. };
  497. a.j21.fullScreen.cancel = function (g) {
  498. return (this.prefix === "") ? document.cancelFullScreen() : document[this.prefix + "CancelFullScreen"]()
  499. }
  500. }
  501. })();
  502. a.Element = {
  503. j13: function (d) {
  504. return this.className.has(d, " ")
  505. },
  506. j2: function (d) {
  507. if (d && !this.j13(d)) {
  508. this.className += (this.className ? " ": "") + d
  509. }
  510. return this
  511. },
  512. j3: function (d) {
  513. d = d || ".*";
  514. this.className = this.className.replace(new RegExp("(^|\\s)" + d + "(?:\\s|$)"), "$1").j26();
  515. return this
  516. },
  517. j4: function (d) {
  518. return this.j13(d) ? this.j3(d) : this.j2(d)
  519. },
  520. j5: function (f) {
  521. f = (f == "float" && this.currentStyle) ? "styleFloat": f.j22();
  522. var d = null,
  523. e = null;
  524. if (this.currentStyle) {
  525. d = this.currentStyle[f]
  526. } else {
  527. if (document.defaultView && document.defaultView.getComputedStyle) {
  528. e = document.defaultView.getComputedStyle(this, null);
  529. d = e ? e.getPropertyValue([f.dashize()]) : null
  530. }
  531. }
  532. if (!d) {
  533. d = this.style[f]
  534. }
  535. if ("opacity" == f) {
  536. return a.defined(d) ? parseFloat(d) : 1
  537. }
  538. if (/^(border(Top|Bottom|Left|Right)Width)|((padding|margin)(Top|Bottom|Left|Right))$/.test(f)) {
  539. d = parseInt(d) ? d: "0px"
  540. }
  541. return ("auto" == d ? null: d)
  542. },
  543. j6Prop: function (f, d) {
  544. try {
  545. if ("opacity" == f) {
  546. this.j23(d);
  547. return this
  548. } else {
  549. if ("float" == f) {
  550. this.style[("undefined" === typeof(this.style.styleFloat)) ? "cssFloat": "styleFloat"] = d;
  551. return this
  552. } else {
  553. if (a.j21.css3Transformations && /transform/.test(f)) {}
  554. }
  555. }
  556. this.style[f.j22()] = d + (("number" == a.j1(d) && !$mjs(["zIndex", "zoom"]).contains(f.j22())) ? "px": "")
  557. } catch(g) {}
  558. return this
  559. },
  560. j6: function (e) {
  561. for (var d in e) {
  562. this.j6Prop(d, e[d])
  563. }
  564. return this
  565. },
  566. j19s: function () {
  567. var d = {};
  568. a.$A(arguments).j14(function (e) {
  569. d[e] = this.j5(e)
  570. },
  571. this);
  572. return d
  573. },
  574. j23: function (h, e) {
  575. e = e || false;
  576. h = parseFloat(h);
  577. if (e) {
  578. if (h == 0) {
  579. if ("hidden" != this.style.visibility) {
  580. this.style.visibility = "hidden"
  581. }
  582. } else {
  583. if ("visible" != this.style.visibility) {
  584. this.style.visibility = "visible"
  585. }
  586. }
  587. }
  588. if (a.j21.trident) {
  589. if (!this.currentStyle || !this.currentStyle.hasLayout) {
  590. this.style.zoom = 1
  591. }
  592. try {
  593. var g = this.filters.item("DXImageTransform.Microsoft.Alpha");
  594. g.enabled = (1 != h);
  595. g.opacity = h * 100
  596. } catch(d) {
  597. this.style.filter += (1 == h) ? "": "progid:DXImageTransform.Microsoft.Alpha(enabled=true,opacity=" + h * 100 + ")"
  598. }
  599. }
  600. this.style.opacity = h;
  601. return this
  602. },
  603. setProps: function (d) {
  604. for (var e in d) {
  605. this.setAttribute(e, "" + d[e])
  606. }
  607. return this
  608. },
  609. hide: function () {
  610. return this.j6({
  611. display: "none",
  612. visibility: "hidden"
  613. })
  614. },
  615. show: function () {
  616. return this.j6({
  617. display: "block",
  618. visibility: "visible"
  619. })
  620. },
  621. j7: function () {
  622. return {
  623. width: this.offsetWidth,
  624. height: this.offsetHeight
  625. }
  626. },
  627. j10: function () {
  628. return {
  629. top: this.scrollTop,
  630. left: this.scrollLeft
  631. }
  632. },
  633. j11: function () {
  634. var d = this,
  635. e = {
  636. top: 0,
  637. left: 0
  638. };
  639. do {
  640. e.left += d.scrollLeft || 0;
  641. e.top += d.scrollTop || 0;
  642. d = d.parentNode
  643. } while (d);
  644. return e
  645. },
  646. j8: function () {
  647. if (a.defined(document.documentElement.getBoundingClientRect)) {
  648. var d = this.getBoundingClientRect(),
  649. f = $mjs(document).j10(),
  650. h = a.j21.getDoc();
  651. return {
  652. top: d.top + f.y - h.clientTop,
  653. left: d.left + f.x - h.clientLeft
  654. }
  655. }
  656. var g = this,
  657. e = t = 0;
  658. do {
  659. e += g.offsetLeft || 0;
  660. t += g.offsetTop || 0;
  661. g = g.offsetParent
  662. } while (g && !(/^(?:body|html)$/i).test(g.tagName));
  663. return {
  664. top: t,
  665. left: e
  666. }
  667. },
  668. j9: function () {
  669. var e = this.j8();
  670. var d = this.j7();
  671. return {
  672. top: e.top,
  673. bottom: e.top + d.height,
  674. left: e.left,
  675. right: e.left + d.width
  676. }
  677. },
  678. changeContent: function (f) {
  679. try {
  680. this.innerHTML = f
  681. } catch(d) {
  682. this.innerText = f
  683. }
  684. return this
  685. },
  686. j33: function () {
  687. return (this.parentNode) ? this.parentNode.removeChild(this) : this
  688. },
  689. kill: function () {
  690. a.$A(this.childNodes).j14(function (d) {
  691. if (3 == d.nodeType || 8 == d.nodeType) {
  692. return
  693. }
  694. $mjs(d).kill()
  695. });
  696. this.j33();
  697. this.je3();
  698. if (this.$J_UUID) {
  699. a.storage[this.$J_UUID] = null;
  700. delete a.storage[this.$J_UUID]
  701. }
  702. return null
  703. },
  704. append: function (g, e) {
  705. e = e || "bottom";
  706. var d = this.firstChild;
  707. ("top" == e && d) ? this.insertBefore(g, d) : this.appendChild(g);
  708. return this
  709. },
  710. j32: function (f, e) {
  711. var d = $mjs(f).append(this, e);
  712. return this
  713. },
  714. enclose: function (d) {
  715. this.append(d.parentNode.replaceChild(this, d));
  716. return this
  717. },
  718. hasChild: function (d) {
  719. if ("element" !== a.j1("string" == a.j1(d) ? d = document.getElementById(d) : d)) {
  720. return false
  721. }
  722. return (this == d) ? false: (this.contains && !(a.j21.webkit419)) ? (this.contains(d)) : (this.compareDocumentPosition) ? !!(this.compareDocumentPosition(d) & 16) : a.$A(this.byTag(d.tagName)).contains(d)
  723. }
  724. };
  725. a.Element.j19 = a.Element.j5;
  726. a.Element.j20 = a.Element.j6;
  727. if (!window.Element) {
  728. window.Element = a.$F;
  729. if (a.j21.engine.webkit) {
  730. window.document.createElement("iframe")
  731. }
  732. window.Element.prototype = (a.j21.engine.webkit) ? window["[[DOMElement.prototype]]"] : {}
  733. }
  734. a.implement(window.Element, {
  735. $J_TYPE: "element"
  736. });
  737. a.Doc = {
  738. j7: function () {
  739. if (a.j21.presto925 || a.j21.webkit419) {
  740. return {
  741. width: window.innerWidth,
  742. height: window.innerHeight
  743. }
  744. }
  745. return {
  746. width: a.j21.getDoc().clientWidth,
  747. height: a.j21.getDoc().clientHeight
  748. }
  749. },
  750. j10: function () {
  751. return {
  752. x: window.pageXOffset || a.j21.getDoc().scrollLeft,
  753. y: window.pageYOffset || a.j21.getDoc().scrollTop
  754. }
  755. },
  756. j12: function () {
  757. var d = this.j7();
  758. return {
  759. width: Math.max(a.j21.getDoc().scrollWidth, d.width),
  760. height: Math.max(a.j21.getDoc().scrollHeight, d.height)
  761. }
  762. }
  763. };
  764. a.extend(document, {
  765. $J_TYPE: "document"
  766. });
  767. a.extend(window, {
  768. $J_TYPE: "window"
  769. });
  770. a.extend([a.Element, a.Doc], {
  771. j29: function (g, e) {
  772. var d = a.getStorage(this.$J_UUID),
  773. f = d[g];
  774. if (undefined != e && undefined == f) {
  775. f = d[g] = e
  776. }
  777. return (a.defined(f) ? f: null)
  778. },
  779. j30: function (f, e) {
  780. var d = a.getStorage(this.$J_UUID);
  781. d[f] = e;
  782. return this
  783. },
  784. j31: function (e) {
  785. var d = a.getStorage(this.$J_UUID);
  786. delete d[e];
  787. return this
  788. }
  789. });
  790. if (! (window.HTMLElement && window.HTMLElement.prototype && window.HTMLElement.prototype.getElementsByClassName)) {
  791. a.extend([a.Element, a.Doc], {
  792. getElementsByClassName: function (d) {
  793. return a.$A(this.getElementsByTagName("*")).filter(function (g) {
  794. try {
  795. return (1 == g.nodeType && g.className.has(d, " "))
  796. } catch(f) {}
  797. })
  798. }
  799. })
  800. }
  801. a.extend([a.Element, a.Doc], {
  802. byClass: function () {
  803. return this.getElementsByClassName(arguments[0])
  804. },
  805. byTag: function () {
  806. return this.getElementsByTagName(arguments[0])
  807. }
  808. });
  809. if (a.j21.fullScreen.capable) {
  810. a.Element.requestFullScreen = function () {
  811. a.j21.fullScreen.request(this)
  812. }
  813. }
  814. a.Event = {
  815. $J_TYPE: "event",
  816. stop: function () {
  817. if (this.stopPropagation) {
  818. this.stopPropagation()
  819. } else {
  820. this.cancelBubble = true
  821. }
  822. if (this.preventDefault) {
  823. this.preventDefault()
  824. } else {
  825. this.returnValue = false
  826. }
  827. return this
  828. },
  829. j15: function () {
  830. var e, d;
  831. e = ((/touch/i).test(this.type)) ? this.changedTouches[0] : this;
  832. return (!a.defined(e)) ? {
  833. x: 0,
  834. y: 0
  835. }: {
  836. x: e.pageX || e.clientX + a.j21.getDoc().scrollLeft,
  837. y: e.pageY || e.clientY + a.j21.getDoc().scrollTop
  838. }
  839. },
  840. getTarget: function () {
  841. var d = this.target || this.srcElement;
  842. while (d && 3 == d.nodeType) {
  843. d = d.parentNode
  844. }
  845. return d
  846. },
  847. getRelated: function () {
  848. var e = null;
  849. switch (this.type) {
  850. case "mouseover":
  851. e = this.relatedTarget || this.fromElement;
  852. break;
  853. case "mouseout":
  854. e = this.relatedTarget || this.toElement;
  855. break;
  856. default:
  857. return e
  858. }
  859. try {
  860. while (e && 3 == e.nodeType) {
  861. e = e.parentNode
  862. }
  863. } catch(d) {
  864. e = null
  865. }
  866. return e
  867. },
  868. getButton: function () {
  869. if (!this.which && this.button !== undefined) {
  870. return (this.button & 1 ? 1 : (this.button & 2 ? 3 : (this.button & 4 ? 2 : 0)))
  871. }
  872. return this.which
  873. }
  874. };
  875. a._event_add_ = "addEventListener";
  876. a._event_del_ = "removeEventListener";
  877. a._event_prefix_ = "";
  878. if (!document.addEventListener) {
  879. a._event_add_ = "attachEvent";
  880. a._event_del_ = "detachEvent";
  881. a._event_prefix_ = "on"
  882. }
  883. a.extend([a.Element, a.Doc], {
  884. je1: function (g, f) {
  885. var i = ("domready" == g) ? false: true,
  886. e = this.j29("events", {});
  887. e[g] = e[g] || {};
  888. if (e[g].hasOwnProperty(f.$J_EUID)) {
  889. return this
  890. }
  891. if (!f.$J_EUID) {
  892. f.$J_EUID = Math.floor(Math.random() * a.now())
  893. }
  894. var d = this,
  895. h = function (j) {
  896. return f.call(d)
  897. };
  898. if ("domready" == g) {
  899. if (a.j21.ready) {
  900. f.call(this);
  901. return this
  902. }
  903. }
  904. if (i) {
  905. h = function (j) {
  906. j = a.extend(j || window.e, {
  907. $J_TYPE: "event"
  908. });
  909. return f.call(d, $mjs(j))
  910. };
  911. this[a._event_add_](a._event_prefix_ + g, h, false)
  912. }
  913. e[g][f.$J_EUID] = h;
  914. return this
  915. },
  916. je2: function (g) {
  917. var i = ("domready" == g) ? false: true,
  918. e = this.j29("events");
  919. if (!e || !e[g]) {
  920. return this
  921. }
  922. var h = e[g],
  923. f = arguments[1] || null;
  924. if (g && !f) {
  925. for (var d in h) {
  926. if (!h.hasOwnProperty(d)) {
  927. continue
  928. }
  929. this.je2(g, d)
  930. }
  931. return this
  932. }
  933. f = ("function" == a.j1(f)) ? f.$J_EUID: f;
  934. if (!h.hasOwnProperty(f)) {
  935. return this
  936. }
  937. if ("domready" == g) {
  938. i = false
  939. }
  940. if (i) {
  941. this[a._event_del_](a._event_prefix_ + g, h[f], false)
  942. }
  943. delete h[f];
  944. return this
  945. },
  946. raiseEvent: function (h, f) {
  947. var m = ("domready" == h) ? false: true,
  948. l = this,
  949. j;
  950. if (!m) {
  951. var g = this.j29("events");
  952. if (!g || !g[h]) {
  953. return this
  954. }
  955. var i = g[h];
  956. for (var d in i) {
  957. if (!i.hasOwnProperty(d)) {
  958. continue
  959. }
  960. i[d].call(this)
  961. }
  962. return this
  963. }
  964. if (l === document && document.createEvent && !l.dispatchEvent) {
  965. l = document.documentElement
  966. }
  967. if (document.createEvent) {
  968. j = document.createEvent(h);
  969. j.initEvent(f, true, true)
  970. } else {
  971. j = document.createEventObject();
  972. j.eventType = h
  973. }
  974. if (document.createEvent) {
  975. l.dispatchEvent(j)
  976. } else {
  977. l.fireEvent("on" + f, j)
  978. }
  979. return j
  980. },
  981. je3: function () {
  982. var d = this.j29("events");
  983. if (!d) {
  984. return this
  985. }
  986. for (var e in d) {
  987. this.je2(e)
  988. }
  989. this.j31("events");
  990. return this
  991. }
  992. });
  993. (function () {
  994. if ("complete" === document.readyState) {
  995. return a.j21.onready.j27(1)
  996. }
  997. if (a.j21.webkit && a.j21.version < 420) { (function () { ($mjs(["loaded", "complete"]).contains(document.readyState)) ? a.j21.onready() : arguments.callee.j27(50)
  998. })()
  999. } else {
  1000. if (a.j21.trident && a.j21.ieMode < 9 && window == top) { (function () { (a.$try(function () {
  1001. a.j21.getDoc().doScroll("left");
  1002. return true
  1003. })) ? a.j21.onready() : arguments.callee.j27(50)
  1004. })()
  1005. } else {
  1006. $mjs(document).je1("DOMContentLoaded", a.j21.onready);
  1007. $mjs(window).je1("load", a.j21.onready)
  1008. }
  1009. }
  1010. })();
  1011. a.Class = function () {
  1012. var h = null,
  1013. e = a.$A(arguments);
  1014. if ("class" == a.j1(e[0])) {
  1015. h = e.shift()
  1016. }
  1017. var d = function () {
  1018. for (var l in this) {
  1019. this[l] = a.detach(this[l])
  1020. }
  1021. if (this.constructor.$parent) {
  1022. this.$parent = {};
  1023. var o = this.constructor.$parent;
  1024. for (var n in o) {
  1025. var j = o[n];
  1026. switch (a.j1(j)) {
  1027. case "function":
  1028. this.$parent[n] = a.Class.wrap(this, j);
  1029. break;
  1030. case "object":
  1031. this.$parent[n] = a.detach(j);
  1032. break;
  1033. case "array":
  1034. this.$parent[n] = a.detach(j);
  1035. break
  1036. }
  1037. }
  1038. }
  1039. var i = (this.init) ? this.init.apply(this, arguments) : this;
  1040. delete this.caller;
  1041. return i
  1042. };
  1043. if (!d.prototype.init) {
  1044. d.prototype.init = a.$F
  1045. }
  1046. if (h) {
  1047. var g = function () {};
  1048. g.prototype = h.prototype;
  1049. d.prototype = new g;
  1050. d.$parent = {};
  1051. for (var f in h.prototype) {
  1052. d.$parent[f] = h.prototype[f]
  1053. }
  1054. } else {
  1055. d.$parent = null
  1056. }
  1057. d.constructor = a.Class;
  1058. d.prototype.constructor = d;
  1059. a.extend(d.prototype, e[0]);
  1060. a.extend(d, {
  1061. $J_TYPE: "class"
  1062. });
  1063. return d
  1064. };
  1065. b.Class.wrap = function (d, e) {
  1066. return function () {
  1067. var g = this.caller;
  1068. var f = e.apply(d, arguments);
  1069. return f
  1070. }
  1071. };
  1072. a.win = $mjs(window);
  1073. a.doc = $mjs(document)
  1074. })();
  1075. (function (b) {
  1076. if (!b) {
  1077. throw "MagicJS not found";
  1078. return
  1079. }
  1080. if (b.FX) {
  1081. return
  1082. }
  1083. var a = b.$;
  1084. b.FX = new b.Class({
  1085. options: {
  1086. fps: 60,
  1087. duration: 500,
  1088. transition: function (c) {
  1089. return - (Math.cos(Math.PI * c) - 1) / 2
  1090. },
  1091. onStart: b.$F,
  1092. onComplete: b.$F,
  1093. onBeforeRender: b.$F,
  1094. onAfterRender: b.$F,
  1095. forceAnimation: false,
  1096. roundCss: true
  1097. },
  1098. styles: null,
  1099. init: function (d, c) {
  1100. this.el = a(d);
  1101. this.options = b.extend(this.options, c);
  1102. this.timer = false
  1103. },
  1104. start: function (c) {
  1105. this.styles = c;
  1106. this.state = 0;
  1107. this.curFrame = 0;
  1108. this.startTime = b.now();
  1109. this.finishTime = this.startTime + this.options.duration;
  1110. this.loopBind = this.loop.j24(this);
  1111. this.options.onStart.call();
  1112. if (!this.options.forceAnimation && b.j21.requestAnimationFrame) {
  1113. this.timer = b.j21.requestAnimationFrame.call(window, this.loopBind)
  1114. } else {
  1115. this.timer = this.loop.j24(this).interval(Math.round(1000 / this.options.fps))
  1116. }
  1117. return this
  1118. },
  1119. stopAnimation: function () {
  1120. if (this.timer) {
  1121. if (!this.options.forceAnimation && b.j21.requestAnimationFrame && b.j21.cancelAnimationFrame) {
  1122. b.j21.cancelAnimationFrame.call(window, this.timer)
  1123. } else {
  1124. clearInterval(this.timer)
  1125. }
  1126. this.timer = false
  1127. }
  1128. },
  1129. stop: function (c) {
  1130. c = b.defined(c) ? c: false;
  1131. this.stopAnimation();
  1132. if (c) {
  1133. this.render(1);
  1134. this.options.onComplete.j27(10)
  1135. }
  1136. return this
  1137. },
  1138. calc: function (e, d, c) {
  1139. return (d - e) * c + e
  1140. },
  1141. loop: function () {
  1142. var d = b.now();
  1143. if (d >= this.finishTime) {
  1144. this.stopAnimation();
  1145. this.render(1);
  1146. this.options.onComplete.j27(10);
  1147. return this
  1148. }
  1149. var c = this.options.transition((d - this.startTime) / this.options.duration);
  1150. if (!this.options.forceAnimation && b.j21.requestAnimationFrame) {
  1151. this.timer = b.j21.requestAnimationFrame.call(window, this.loopBind)
  1152. }
  1153. this.render(c)
  1154. },
  1155. render: function (c) {
  1156. var d = {};
  1157. for (var e in this.styles) {
  1158. if ("opacity" === e) {
  1159. d[e] = Math.round(this.calc(this.styles[e][0], this.styles[e][1], c) * 100) / 100
  1160. } else {
  1161. d[e] = this.calc(this.styles[e][0], this.styles[e][1], c);
  1162. if (this.options.roundCss) {
  1163. d[e] = Math.round(d[e])
  1164. }
  1165. }
  1166. }
  1167. this.options.onBeforeRender(d);
  1168. this.set(d);
  1169. this.options.onAfterRender(d)
  1170. },
  1171. set: function (c) {
  1172. return this.el.j6(c)
  1173. }
  1174. });
  1175. b.FX.Transition = {
  1176. linear: function (c) {
  1177. return c
  1178. },
  1179. sineIn: function (c) {
  1180. return - (Math.cos(Math.PI * c) - 1) / 2
  1181. },
  1182. sineOut: function (c) {
  1183. return 1 - b.FX.Transition.sineIn(1 - c)
  1184. },
  1185. expoIn: function (c) {
  1186. return Math.pow(2, 8 * (c - 1))
  1187. },
  1188. expoOut: function (c) {
  1189. return 1 - b.FX.Transition.expoIn(1 - c)
  1190. },
  1191. quadIn: function (c) {
  1192. return Math.pow(c, 2)
  1193. },
  1194. quadOut: function (c) {
  1195. return 1 - b.FX.Transition.quadIn(1 - c)
  1196. },
  1197. cubicIn: function (c) {
  1198. return Math.pow(c, 3)
  1199. },
  1200. cubicOut: function (c) {
  1201. return 1 - b.FX.Transition.cubicIn(1 - c)
  1202. },
  1203. backIn: function (d, c) {
  1204. c = c || 1.618;
  1205. return Math.pow(d, 2) * ((c + 1) * d - c)
  1206. },
  1207. backOut: function (d, c) {
  1208. return 1 - b.FX.Transition.backIn(1 - d)
  1209. },
  1210. elasticIn: function (d, c) {
  1211. c = c || [];
  1212. return Math.pow(2, 10 * --d) * Math.cos(20 * d * Math.PI * (c[0] || 1) / 3)
  1213. },
  1214. elasticOut: function (d, c) {
  1215. return 1 - b.FX.Transition.elasticIn(1 - d, c)
  1216. },
  1217. bounceIn: function (e) {
  1218. for (var d = 0, c = 1; 1; d += c, c /= 2) {
  1219. if (e >= (7 - 4 * d) / 11) {
  1220. return c * c - Math.pow((11 - 6 * d - 11 * e) / 4, 2)
  1221. }
  1222. }
  1223. },
  1224. bounceOut: function (c) {
  1225. return 1 - b.FX.Transition.bounceIn(1 - c)
  1226. },
  1227. none: function (c) {
  1228. return 0
  1229. }
  1230. }
  1231. })(magicJS);
  1232. (function (b) {
  1233. if (!b) {
  1234. throw "MagicJS not found";
  1235. return
  1236. }
  1237. if (b.PFX) {
  1238. return
  1239. }
  1240. var a = b.$;
  1241. b.PFX = new b.Class(b.FX, {
  1242. init: function (c, d) {
  1243. this.el_arr = c;
  1244. this.options = b.extend(this.options, d);
  1245. this.timer = false
  1246. },
  1247. start: function (c) {
  1248. this.$parent.start([]);
  1249. this.styles_arr = c;
  1250. return this
  1251. },
  1252. render: function (c) {
  1253. for (var d = 0; d < this.el_arr.length; d++) {
  1254. this.el = a(this.el_arr[d]);
  1255. this.styles = this.styles_arr[d];
  1256. this.$parent.render(c)
  1257. }
  1258. }
  1259. })
  1260. })(magicJS);
  1261. var MagicZoom = (function (c) {
  1262. var d = c.$;
  1263. c.$Ff = function (f) {
  1264. $mjs(f).stop();
  1265. return false
  1266. };
  1267. c.insertCSS = function (f, h, l) {
  1268. var i, g, j, k = [],
  1269. e = -1;
  1270. l || (l = c.stylesId);
  1271. i = c.$(l) || (document.head || document.body).appendChild(c.$new("style", {
  1272. id: l,
  1273. type: "text/css"
  1274. }));
  1275. g = i.sheet || i.styleSheet;
  1276. if ("object" == c.j1(h)) {
  1277. for (j in h) {
  1278. k.push(j + ":" + h[j])
  1279. }
  1280. h = k.join(";")
  1281. }
  1282. if (g.insertRule) {
  1283. e = g.insertRule(f + " {" + h + "}", g.cssRules.length)
  1284. } else {
  1285. e = g.addRule(f, h)
  1286. }
  1287. return e
  1288. };
  1289. var a = {
  1290. version: "v4.5.30",
  1291. options: {},
  1292. defaults: {
  1293. opacity: 50,
  1294. opacityReverse: false,
  1295. smoothingSpeed: 40,
  1296. fps: 25,
  1297. zoomWidth: 300,
  1298. zoomHeight: 300,
  1299. zoomDistance: 15,
  1300. zoomPosition: "right",
  1301. zoomAlign: "top",
  1302. zoomWindowEffect: "shadow",
  1303. dragMode: false,
  1304. moveOnClick: true,
  1305. alwaysShowZoom: false,
  1306. preservePosition: false,
  1307. x: -1,
  1308. y: -1,
  1309. clickToActivate: false,
  1310. clickToDeactivate: false,
  1311. initializeOn: "load",
  1312. smoothing: true,
  1313. showTitle: "top",
  1314. titleSource: "title",
  1315. zoomFade: true,
  1316. zoomFadeInSpeed: 400,
  1317. zoomFadeOutSpeed: 200,
  1318. hotspots: "",
  1319. hint: true,
  1320. hintText: "Zoom",
  1321. hintPosition: "tl",
  1322. hintOpacity: 75,
  1323. hintClass: "MagicZoomHint",
  1324. showLoading: true,
  1325. loadingMsg: "Loading zoom...",
  1326. loadingClass: "MagicZoomLoading",
  1327. loadingOpacity: 75,
  1328. loadingPositionX: -1,
  1329. loadingPositionY: -1,
  1330. selectorsChange: "click",
  1331. selectorsMouseoverDelay: 60,
  1332. selectorsEffect: "dissolve",
  1333. selectorsEffectSpeed: 400,
  1334. preloadSelectorsSmall: true,
  1335. preloadSelectorsBig: false,
  1336. selectorsClass: "",
  1337. fitZoomWindow: true,
  1338. entireImage: false,
  1339. rightClick: false,
  1340. disableZoom: false,
  1341. cssClass: "",
  1342. onready: c.$F
  1343. },
  1344. z39: $mjs([/^(opacity)(\s+)?:(\s+)?(\d+)$/i, /^(opacity-reverse)(\s+)?:(\s+)?(true|false)$/i, /^(smoothing\-speed)(\s+)?:(\s+)?(\d+)$/i, /^(fps)(\s+)?:(\s+)?(\d+)$/i, /^(zoom\-width)(\s+)?:(\s+)?(\d+\%?)(px)?/i, /^(zoom\-height)(\s+)?:(\s+)?(\d+\%?)(px)?/i, /^(zoom\-distance)(\s+)?:(\s+)?(\d+)(px)?/i, /^(zoom\-position)(\s+)?:(\s+)?(right|left|top|bottom|custom|inner|#([a-z0-9_\-:\.]+))$/i, /^(zoom\-align)(\s+)?:(\s+)?(right|left|top|bottom|center)$/i, /^(zoom\-fit\-screen)(\s+)?:(\s+)?(true|false)$/i, /^(zoom\-window\-effect)(\s+)?:(\s+)?(shadow|glow|false)$/i, /^(drag\-mode)(\s+)?:(\s+)?(true|false)$/i, /^(move\-on\-click)(\s+)?:(\s+)?(true|false)$/i, /^(always\-show\-zoom)(\s+)?:(\s+)?(true|false)$/i, /^(preserve\-position)(\s+)?:(\s+)?(true|false)$/i, /^(x)(\s+)?:(\s+)?([\d.]+)(px)?/i, /^(y)(\s+)?:(\s+)?([\d.]+)(px)?/i, /^(click\-to\-activate)(\s+)?:(\s+)?(true|false)$/i, /^(click\-to\-deactivate)(\s+)?:(\s+)?(true|false)$/i, /^(initialize\-on)(\s+)?:(\s+)?(load|click|mouseover)$/i, /^(click\-to\-initialize)(\s+)?:(\s+)?(true|false)$/i, /^(smoothing)(\s+)?:(\s+)?(true|false)$/i, /^(show\-title)(\s+)?:(\s+)?(true|false|top|bottom)$/i, /^(title\-source)(\s+)?:(\s+)?(title|#([a-z0-9_\-:\.]+))$/i, /^(zoom\-fade)(\s+)?:(\s+)?(true|false)$/i, /^(zoom\-fade\-in\-speed)(\s+)?:(\s+)?(\d+)$/i, /^(zoom\-fade\-out\-speed)(\s+)?:(\s+)?(\d+)$/i, /^(hotspots)(\s+)?:(\s+)?([a-z0-9_\-:\.]+)$/i, /^(hint)(\s+)?:(\s+)?(true|false)/i, /^(hint\-text)(\s+)?:(\s+)?([^;]*)$/i, /^(hint\-opacity)(\s+)?:(\s+)?(\d+)$/i, /^(hint\-position)(\s+)?:(\s+)?(tl|tr|tc|bl|br|bc)/i, /^(show\-loading)(\s+)?:(\s+)?(true|false)$/i, /^(loading\-msg)(\s+)?:(\s+)?([^;]*)$/i, /^(loading\-opacity)(\s+)?:(\s+)?(\d+)$/i, /^(loading\-position\-x)(\s+)?:(\s+)?(\d+)(px)?/i, /^(loading\-position\-y)(\s+)?:(\s+)?(\d+)(px)?/i, /^(thumb\-change)(\s+)?:(\s+)?(click|mouseover)$/i, /^(selectors\-change)(\s+)?:(\s+)?(click|mouseover)$/i, /^(selectors\-mouseover\-delay)(\s+)?:(\s+)?(\d+)$/i, /^(selectors\-effect)(\s+)?:(\s+)?(dissolve|fade|pounce|false)$/i, /^(selectors\-effect\-speed)(\s+)?:(\s+)?(\d+)$/i, /^(selectors\-class)(\s+)?:(\s+)?([a-z0-9_\-:\.]+)$/i, /^(fit\-zoom\-window)(\s+)?:(\s+)?(true|false)$/i, /^(preload\-selectors\-small)(\s+)?:(\s+)?(true|false)$/i, /^(preload\-selectors\-big)(\s+)?:(\s+)?(true|false)$/i, /^(entire\-image)(\s+)?:(\s+)?(true|false)$/i, /^(right\-click)(\s+)?:(\s+)?(true|false)$/i, /^(disable\-zoom)(\s+)?:(\s+)?(true|false)$/i, /^(css\-class)(\s+)?:(\s+)?([^;]*)$/i]),
  1345. zooms: $mjs([]),
  1346. z8: function (h) {
  1347. var g = /(click|mouseover)/i;
  1348. for (var f = 0; f < a.zooms.length; f++) {
  1349. if (a.zooms[f].z30 && !a.zooms[f].activatedEx) {
  1350. a.zooms[f].pause()
  1351. } else {
  1352. if (g.test(a.zooms[f].options.initializeOn) && a.zooms[f].initMouseEvent) {
  1353. a.zooms[f].initMouseEvent = h
  1354. }
  1355. }
  1356. }
  1357. },
  1358. stop: function (f) {
  1359. var e = $mjs([]);
  1360. if (f) {
  1361. if ((f = $mjs(f)) && f.zoom) {
  1362. e.push(f)
  1363. } else {
  1364. return false
  1365. }
  1366. } else {
  1367. e = $mjs(c.$A(c.body.byTag("A")).filter(function (g) {
  1368. return ((" " + g.className + " ").match(/\sMagicZoom\s/) && g.zoom)
  1369. }))
  1370. }
  1371. e.j14(function (g) {
  1372. g.zoom && g.zoom.stop()
  1373. },
  1374. this)
  1375. },
  1376. start: function (e) {
  1377. if (0 == arguments.length) {
  1378. a.refresh();
  1379. return true
  1380. }
  1381. e = $mjs(e);
  1382. if (!e || !(" " + e.className + " ").match(/\s(MagicZoom|MagicZoomPlus)\s/)) {
  1383. return false
  1384. }
  1385. if (!e.zoom) {
  1386. var f = null;
  1387. while (f = e.firstChild) {
  1388. if (f.tagName == "IMG") {
  1389. break
  1390. }
  1391. e.removeChild(f)
  1392. }
  1393. while (f = e.lastChild) {
  1394. if (f.tagName == "IMG") {
  1395. break
  1396. }
  1397. e.removeChild(f)
  1398. }
  1399. if (!e.firstChild || e.firstChild.tagName != "IMG") {
  1400. throw "Invalid Magic Zoom"
  1401. }
  1402. a.zooms.push(new a.zoom(e, (arguments.length > 1) ? arguments[1] : undefined))
  1403. } else {
  1404. e.zoom.start()
  1405. }
  1406. },
  1407. update: function (h, e, g, f) {
  1408. if ((h = $mjs(h)) && h.zoom) { (null === e || "" === e) && (e = undefined);
  1409. (null === g || "" === g) && (g = undefined);
  1410. h.zoom.update(e, g, f);
  1411. return true
  1412. }
  1413. return false
  1414. },
  1415. refresh: function () {
  1416. c.$A(window.document.getElementsByTagName("A")).j14(function (e) {
  1417. if (e.className.has("MagicZoom", " ")) {
  1418. if (a.stop(e)) {
  1419. a.start.j27(100, e)
  1420. } else {
  1421. a.start(e)
  1422. }
  1423. }
  1424. },
  1425. this)
  1426. },
  1427. show: function (e) {
  1428. return a.zoomIn(e)
  1429. },
  1430. zoomIn: function (e) {
  1431. if ((e = $mjs(e)) && e.zoom) {
  1432. return e.zoom.activate()
  1433. }
  1434. return false
  1435. },
  1436. zoomOut: function (e) {
  1437. if ((e = $mjs(e)) && e.zoom) {
  1438. return e.zoom.pause()
  1439. }
  1440. return false
  1441. },
  1442. getXY: function (e) {
  1443. if ((e = $mjs(e)) && e.zoom) {
  1444. return {
  1445. x: e.zoom.options.x,
  1446. y: e.zoom.options.y
  1447. }
  1448. }
  1449. },
  1450. x7: function (g) {
  1451. var f, e;
  1452. f = "";
  1453. for (e = 0; e < g.length; e++) {
  1454. f += String.fromCharCode(14 ^ g.charCodeAt(e))
  1455. }
  1456. return f
  1457. }
  1458. };
  1459. a.z47 = function () {
  1460. this.init.apply(this, arguments)
  1461. };
  1462. a.z47.prototype = {
  1463. init: function (e) {
  1464. this.cb = null;
  1465. this.z9 = null;
  1466. this.onErrorHandler = this.onError.j16(this);
  1467. this.z10 = null;
  1468. this.width = 0;
  1469. this.height = 0;
  1470. this.naturalWidth = 0;
  1471. this.naturalHeight = 0;
  1472. this.border = {
  1473. left: 0,
  1474. right: 0,
  1475. top: 0,
  1476. bottom: 0
  1477. };
  1478. this.padding = {
  1479. left: 0,
  1480. right: 0,
  1481. top: 0,
  1482. bottom: 0
  1483. };
  1484. this.ready = false;
  1485. this._tmpp = null;
  1486. if ("string" == c.j1(e)) {
  1487. this._tmpp = c.$new("div").j2("magic-temporary-img").j6({
  1488. position: "absolute",
  1489. top: "-10000px",
  1490. width: "1px",
  1491. height: "1px",
  1492. overflow: "hidden"
  1493. }).j32(c.body);
  1494. this.self = c.$new("img").j32(this._tmpp);
  1495. this.z11();
  1496. this.self.src = e
  1497. } else {
  1498. this.self = $mjs(e);
  1499. this.z11();
  1500. this.self.src = e.src
  1501. }
  1502. },
  1503. _cleanup: function () {
  1504. if (this._tmpp) {
  1505. if (this.self.parentNode == this._tmpp) {
  1506. this.self.j33().j6({
  1507. position: "static",
  1508. top: "auto"
  1509. })
  1510. }
  1511. this._tmpp.kill();
  1512. this._tmpp = null
  1513. }
  1514. },
  1515. onError: function (f) {
  1516. if (f) {
  1517. $mjs(f).stop()
  1518. }
  1519. if (this.cb) {
  1520. this._cleanup();
  1521. this.cb.call(this, false)
  1522. }
  1523. this.unload()
  1524. },
  1525. z11: function (e) {
  1526. this.z9 = null;
  1527. if (e == true || !(this.self.src && (this.self.complete || this.self.readyState == "complete"))) {
  1528. this.z9 = function (f) {
  1529. if (f) {
  1530. $mjs(f).stop()
  1531. }
  1532. if (this.ready) {
  1533. return
  1534. }
  1535. this.ready = true;
  1536. this.z13();
  1537. if (this.cb) {
  1538. this._cleanup();
  1539. this.cb.call()
  1540. }
  1541. }.j16(this);
  1542. this.self.je1("load", this.z9);
  1543. $mjs(["abort", "error"]).j14(function (f) {
  1544. this.self.je1(f, this.onErrorHandler)
  1545. },
  1546. this)
  1547. } else {
  1548. this.ready = true
  1549. }
  1550. },
  1551. update: function (f, h) {
  1552. var g = this.ready;
  1553. this.unload();
  1554. var e = c.$new("a", {
  1555. href: f
  1556. });
  1557. if (true !== h && this.self.src.has(e.href) && 0 !== this.self.width) {
  1558. this.ready = g
  1559. } else {
  1560. this.z11(true);
  1561. this.self.src = f
  1562. }
  1563. e = null
  1564. },
  1565. z13: function () {
  1566. this.naturalWidth = this.self.naturalWidth || this.self.width;
  1567. this.naturalHeight = this.self.naturalHeight || this.self.height;
  1568. this.width = this.self.width;
  1569. this.height = this.self.height;
  1570. if (this.width == 0 && this.height == 0 && c.j21.webkit) {
  1571. this.width = this.self.naturalWidth;
  1572. this.height = this.self.naturalHeight
  1573. }
  1574. $mjs(["Left", "Right", "Top", "Bottom"]).j14(function (f) {
  1575. this.padding[f.toLowerCase()] = this.self.j19("padding" + f).j17();
  1576. this.border[f.toLowerCase()] = this.self.j19("border" + f + "Width").j17()
  1577. },
  1578. this);
  1579. if (c.j21.presto || (c.j21.trident && !c.j21.backCompat)) {
  1580. this.width -= this.padding.left + this.padding.right;
  1581. this.height -= this.padding.top + this.padding.bottom
  1582. }
  1583. },
  1584. getBox: function () {
  1585. var e = null;
  1586. e = this.self.j9();
  1587. return {
  1588. top: e.top + this.border.top,
  1589. bottom: e.bottom - this.border.bottom,
  1590. left: e.left + this.border.left,
  1591. right: e.right - this.border.right
  1592. }
  1593. },
  1594. z12: function () {
  1595. if (this.z10) {
  1596. this.z10.src = this.self.src;
  1597. this.self = null;
  1598. this.self = this.z10
  1599. }
  1600. },
  1601. load: function (e) {
  1602. if (this.ready) {
  1603. if (!this.width) { (function () {
  1604. this.z13();
  1605. this._cleanup();
  1606. e.call()
  1607. }).j24(this).j27(1)
  1608. } else {
  1609. this._cleanup();
  1610. e.call()
  1611. }
  1612. } else {
  1613. if (!this.z9) {
  1614. e.call(this, false);
  1615. return
  1616. }
  1617. this.cb = e
  1618. }
  1619. },
  1620. unload: function () {
  1621. if (this.z9) {
  1622. this.self.je2("load", this.z9)
  1623. }
  1624. $mjs(["abort", "error"]).j14(function (e) {
  1625. this.self.je2(e, this.onErrorHandler)
  1626. },
  1627. this);
  1628. this.z9 = null;
  1629. this.cb = null;
  1630. this.width = null;
  1631. this.ready = false;
  1632. this._new = false
  1633. }
  1634. };
  1635. a.zoom = function () {
  1636. this.construct.apply(this, arguments)
  1637. };
  1638. a.zoom.prototype = {
  1639. construct: function (h, f, g) {
  1640. var e = {};
  1641. this.z28 = -1;
  1642. this.z30 = false;
  1643. this.ddx = 0;
  1644. this.ddy = 0;
  1645. this.firstRun = !(this.z46);
  1646. this.exOptions = this.firstRun ? {}: this.exOptions || {};
  1647. this.activatedEx = false;
  1648. this.z44 = null;
  1649. this.z1Holder = $mjs(window).j29("magiczoom:holder") || $mjs(window).j29("magiczoom:holder", c.$new("div").j6({
  1650. position: "absolute",
  1651. top: -10000,
  1652. width: 10,
  1653. height: 10,
  1654. overflow: "hidden"
  1655. }).j32(c.body));
  1656. this.options = c.detach(a.defaults);
  1657. if (h) {
  1658. this.c = $mjs(h)
  1659. }
  1660. this.divTag = ("div" == this.c.tagName.toLowerCase());
  1661. e = c.extend(e, this.z37());
  1662. e = c.extend(e, this.z37(this.c.rel));
  1663. e = c.extend(e, this.exOptions);
  1664. if (f) {
  1665. e = c.extend(e, c.extend(true === g ? this.exOptions: {},
  1666. this.z37(f)))
  1667. }
  1668. if (e.dragMode && !e.clickToActivate && undefined === e.alwaysShowZoom) {
  1669. e.alwaysShowZoom = true
  1670. }
  1671. c.extend(this.options, e);
  1672. this.options.hotspots += "";
  1673. if ("load" == this.options.initializeOn && c.defined(this.options.clickToInitialize) && "true" == this.options.clickToInitialize.toString()) {
  1674. this.options.initializeOn = "click"
  1675. }
  1676. if (c.defined(this.options.thumbChange) && this.options.thumbChange != this.options.selectorsChange) {
  1677. this.options.selectorsChange = this.options.thumbChange
  1678. }
  1679. if (c.j21.touchScreen) {
  1680. if (window.matchMedia && window.matchMedia("(max-width: 767px)").matches) {
  1681. this.options.zoomPosition = "inner";
  1682. this.options.clickToActivate = true
  1683. }
  1684. }
  1685. if (this.firstRun && !this.divTag) {
  1686. this.id = this.originId = this.c.id || "";
  1687. if (!this.c.id) {
  1688. this.c.id = this.id = "zoom-" + Math.floor(Math.random() * c.now())
  1689. }
  1690. }
  1691. if ("inner" == this.options.zoomPosition && this.options.dragMode) {
  1692. this.options.moveOnClick = true
  1693. }
  1694. if (this.options.disableZoom) {
  1695. this.z30 = false;
  1696. this.options.clickToActivate = true;
  1697. this.options.hint = false
  1698. } ("string" === c.j1(this.options.onready)) && ("function" === c.j1(window[this.options.onready])) && (this.options.onready = window[this.options.onready]);
  1699. if (h) {
  1700. this.lastSelector = null;
  1701. this.z14 = this.mousedown.j16(this);
  1702. this.z15 = this.mouseup.j16(this);
  1703. this.z16 = this.show.j24(this, true);
  1704. this.z17 = this.z29.j24(this);
  1705. this.z43Bind = this.z43.j16(this);
  1706. this.resizeBind = function (k) {
  1707. var j = $mjs(this.c).j29("magiczoom:window:size"),
  1708. i = $mjs(window).j7();
  1709. if (j.width !== i.width || j.height !== i.height) {
  1710. clearTimeout(this.resizeTimer);
  1711. this.resizeTimer = this.onresize.j24(this).j27(10);
  1712. $mjs(this.c).j30("magiczoom:window:size", i)
  1713. }
  1714. }.j16(this);
  1715. if (!this.divTag) {
  1716. this.c.je1("click", function (j) {
  1717. var i = j.getButton();
  1718. if (3 == i) {
  1719. return true
  1720. }
  1721. $mjs(j).stop();
  1722. if (!c.j21.trident) {
  1723. this.blur()
  1724. }
  1725. return false
  1726. })
  1727. }
  1728. this.c.je1("mousedown", this.z14);
  1729. this.c.je1("mouseup", this.z15);
  1730. if ("mouseover" == this.options.initializeOn) {
  1731. this.c.je1("mouseover", this.z14)
  1732. }
  1733. if (c.j21.touchScreen) {
  1734. this.c.j6({
  1735. "-webkit-user-select": "none",
  1736. "-webkit-touch-callout": "none",
  1737. "-webkit-tap-highlight-color": "transparent"
  1738. });
  1739. if (!this.options.disableZoom) {
  1740. this.c.je1("touchstart", this.z14);
  1741. this.c.je1("touchend", this.z15)
  1742. } else {
  1743. this.c.je1("click", function (i) {
  1744. i.preventDefault()
  1745. })
  1746. }
  1747. }
  1748. this.c.unselectable = "on";
  1749. this.c.style.MozUserSelect = "none";
  1750. this.c.je1("selectstart", c.$Ff);
  1751. if (!this.divTag) {
  1752. this.c.j6({
  1753. position: "relative",
  1754. display: (c.j21.gecko181) ? "block": "inline-block",
  1755. textDecoration: "none",
  1756. outline: "0",
  1757. cursor: "hand",
  1758. overflow: "hidden"
  1759. });
  1760. if (c.j21.ieMode) {
  1761. this.c.j2("magic-for-ie" + c.j21.ieMode)
  1762. }
  1763. if (this.c.j5("textAlign") == "center") {
  1764. this.c.j6({
  1765. margin: "auto auto"
  1766. })
  1767. }
  1768. }
  1769. this.c.zoom = this
  1770. } else {
  1771. this.options.initializeOn = "load"
  1772. }
  1773. if (!this.options.rightClick) {
  1774. this.c.je1("contextmenu", c.$Ff)
  1775. }
  1776. if ("load" == this.options.initializeOn) {
  1777. this.z18()
  1778. } else {
  1779. if ("" !== this.originId) {
  1780. this.z26(true)
  1781. }
  1782. }
  1783. },
  1784. z18: function () {
  1785. var j, m, l, k, h;
  1786. m = document;
  1787. m = m.location;
  1788. m = m.host;
  1789. if (m.indexOf(a.x7("coigmzaablav mac")) == -1) {
  1790. h = ["^bko}k.{~i|ojk.za.h{bb.xk|}ga`.ah.Coigm.Taac(-6:6<5", "#ff0000", 10, "bold", "center", "100%"]
  1791. }
  1792. if (!this.z7) {
  1793. this.z7 = new a.z47(this.c.firstChild);
  1794. this.z1 = new a.z47(this.c.href)
  1795. } else {
  1796. this.z1.update(this.c.href)
  1797. }
  1798. if (!this.z46) {
  1799. this.z46 = {
  1800. self: $mjs(document.createElement("DIV")).j2("MagicZoomBigImageCont").j2(this.options.cssClass).j6({
  1801. overflow: "hidden",
  1802. zIndex: this.options.zoomPosition == "inner" ? 100 : 10002,
  1803. top: "-100000px",
  1804. position: "absolute",
  1805. width: this.options.zoomWidth + "px",
  1806. height: this.options.zoomHeight + "px"
  1807. }),
  1808. zoom: this,
  1809. z21: "0px",
  1810. lastLeftPos: "0px",
  1811. initTopPos: 0,
  1812. initLeftPos: 0,
  1813. adjustX: {
  1814. edge: "left",
  1815. ratio: 1
  1816. },
  1817. adjustY: {
  1818. edge: "top",
  1819. ratio: 1
  1820. },
  1821. custom: false,
  1822. initWidth: this.options.zoomWidth,
  1823. initHeight: this.options.zoomHeight
  1824. };
  1825. if ("inner" == this.options.zoomPosition) {
  1826. this.z46.self.j2("inner-zoom")
  1827. }
  1828. if (! (c.j21.trident900 && c.j21.ieMode < 9) && "inner" != this.options.zoomPosition) {
  1829. switch (this.options.zoomWindowEffect) {
  1830. case "shadow":
  1831. this.z46.self.j2("MagicBoxShadow");
  1832. break;
  1833. case "glow":
  1834. this.z46.self.j2("MagicBoxGlow");
  1835. break;
  1836. default:
  1837. break
  1838. }
  1839. }
  1840. this.z46.hide = function () {
  1841. if (!this.self) {
  1842. return
  1843. }
  1844. if (this.self.style.top != "-100000px" && this.zoom.z4 && !this.zoom.z4.z38) {
  1845. this.self.style.top = "-100000px"
  1846. }
  1847. if (this.self.parentNode === c.body) {
  1848. this.self.j32(this.zoom.z1Holder)
  1849. }
  1850. };
  1851. this.z46.z22 = this.z46.hide.j24(this.z46);
  1852. if (c.j21.trident4) {
  1853. j = $mjs(document.createElement("IFRAME"));
  1854. j.src = "javascript:''";
  1855. j.j6({
  1856. left: "0px",
  1857. top: "0px",
  1858. position: "absolute",
  1859. "z-index": -1
  1860. }).frameBorder = 0;
  1861. this.z46.z23 = this.z46.self.appendChild(j)
  1862. }
  1863. this.z46.z41 = $mjs(document.createElement("DIV")).j2("MagicZoomHeader").j6({
  1864. position: "relative",
  1865. zIndex: 10,
  1866. left: "0px",
  1867. top: "0px",
  1868. padding: "3px"
  1869. }).hide();
  1870. m = c.$new("DIV", {},
  1871. {
  1872. overflow: "hidden"
  1873. });
  1874. m.appendChild(this.z1.self);
  1875. this.z1.self.j6({
  1876. padding: "0px",
  1877. margin: "0px",
  1878. border: "0px",
  1879. width: "auto",
  1880. height: "auto"
  1881. });
  1882. if (this.options.showTitle == "bottom") {
  1883. this.z46.self.appendChild(m);
  1884. this.z46.self.appendChild(this.z46.z41)
  1885. } else {
  1886. this.z46.self.appendChild(this.z46.z41);
  1887. this.z46.self.appendChild(m)
  1888. }
  1889. this.z46.self.j32(this.z1Holder);
  1890. if ("undefined" !== typeof(h)) {
  1891. this.z46.g = $mjs(document.createElement("div")).j6({
  1892. color: h[1],
  1893. fontSize: h[2] + "px",
  1894. fontWeight: h[3],
  1895. fontFamily: "Tahoma",
  1896. position: "absolute",
  1897. "z-index": 10 + ("" + (this.z1.self.j5("z-index") || 0)).j17(),
  1898. width: h[5],
  1899. textAlign: h[4],
  1900. "line-height": "2em",
  1901. left: "0px"
  1902. }).changeContent(a.x7(h[0])).j32(this.z46.self, ((Math.floor(Math.random() * 101) + 1) % 2) ? "top": "bottom")
  1903. }
  1904. }
  1905. this.z46.initWidth = this.options.zoomWidth;
  1906. this.z46.initHeight = this.options.zoomHeight;
  1907. this.z46.custom = false;
  1908. if (this.options.showTitle != "false" && this.options.showTitle != false) {
  1909. var i = this.z46.z41;
  1910. i.hide();
  1911. while (l = i.firstChild) {
  1912. i.removeChild(l)
  1913. }
  1914. if (this.options.titleSource == "title" && "" != this.c.title) {
  1915. i.appendChild(document.createTextNode(this.c.title));
  1916. i.show()
  1917. } else {
  1918. if (this.options.titleSource.has("#")) {
  1919. var n = this.options.titleSource.replace(/^#/, "");
  1920. if ($mjs(n)) {
  1921. i.changeContent($mjs(n).innerHTML);
  1922. i.show()
  1923. }
  1924. }
  1925. }
  1926. } else {
  1927. this.z46.z41.hide()
  1928. }
  1929. this.c.z5 = this.c.title;
  1930. this.c.title = "";
  1931. this.z7.load(this.z19.j24(this))
  1932. },
  1933. z19: function (e) {
  1934. if (!e && e !== undefined) {
  1935. return
  1936. }
  1937. if (!this.z7) {
  1938. return
  1939. }
  1940. if (!this.options.opacityReverse) {
  1941. this.z7.self.j23(1)
  1942. }
  1943. if (!this.divTag) {
  1944. this.c.j6({
  1945. width: "auto",
  1946. height: "auto"
  1947. })
  1948. }
  1949. if (this.options.showLoading && !this.options.disableZoom) {
  1950. this.z24 = setTimeout(this.z17, 400)
  1951. }
  1952. if (this.options.hotspots != "" && $mjs(this.options.hotspots)) {
  1953. this.z25()
  1954. }
  1955. if (this.c.id != "") {
  1956. this.z26()
  1957. }
  1958. this.z1.load(this.z20.j24(this))
  1959. },
  1960. z20: function (h) {
  1961. var g, f, i, e;
  1962. if (!h && h !== undefined) {
  1963. clearTimeout(this.z24);
  1964. if (this.options.showLoading && this.z3) {
  1965. this.z3.hide()
  1966. }
  1967. this.z28 = c.now();
  1968. return
  1969. }
  1970. if (!this.z7 || !this.z1) {
  1971. return
  1972. }
  1973. f = this.z7.self.j9();
  1974. this.z7Rect = f;
  1975. if (f.bottom == f.top) {
  1976. this.z20.j24(this).j27(500);
  1977. return
  1978. }
  1979. i = ("custom" == this.options.zoomPosition) ? this.c.id + "-big": this.options.zoomPosition.has("#") ? this.options.zoomPosition.replace(/^#/, "") : null;
  1980. if (i && $mjs(i)) {
  1981. this.z46.custom = true;
  1982. $mjs(i).appendChild(this.z46.self)
  1983. } else {
  1984. if ("inner" == this.options.zoomPosition) {
  1985. this.c.appendChild(this.z46.self)
  1986. }
  1987. }
  1988. this.z7.z13();
  1989. this.z1.z13();
  1990. if (this.z7.width == 0 && c.j21.trident) { ! this.divTag && this.c.j6({
  1991. width: this.z7.width + "px"
  1992. })
  1993. }
  1994. g = this.z46.z41.j7();
  1995. if (/%$/i.test(this.options.zoomWidth)) {
  1996. this.options.zoomWidth = (parseInt(this.options.zoomWidth) / 100) * this.z7.width
  1997. }
  1998. if (/%$/i.test(this.options.zoomHeight)) {
  1999. this.options.zoomHeight = (parseInt(this.options.zoomHeight) / 100) * this.z7.height
  2000. }
  2001. this.z46.self.j6({
  2002. width: this.options.zoomWidth
  2003. });
  2004. g = this.z46.z41.j7();
  2005. if (this.options.fitZoomWindow || this.options.entireImage) {
  2006. if ((this.z1.width < this.options.zoomWidth) || this.options.entireImage) {
  2007. this.options.zoomWidth = this.z1.width;
  2008. this.z46.self.j6({
  2009. width: this.options.zoomWidth
  2010. });
  2011. g = this.z46.z41.j7()
  2012. }
  2013. if ((this.z1.height < this.options.zoomHeight) || this.options.entireImage) {
  2014. this.options.zoomHeight = this.z1.height + g.height
  2015. }
  2016. }
  2017. switch (this.options.zoomPosition) {
  2018. case "right":
  2019. this.z46.self.style.left = f.right + this.options.zoomDistance + "px";
  2020. this.z46.adjustX.edge = "right";
  2021. break;
  2022. case "left":
  2023. this.z46.self.style.left = f.left - this.options.zoomDistance - this.options.zoomWidth + "px";
  2024. break;
  2025. case "top":
  2026. this.z46.z21 = f.top - (this.options.zoomDistance + this.options.zoomHeight) + "px";
  2027. break;
  2028. case "bottom":
  2029. this.z46.z21 = f.bottom + this.options.zoomDistance + "px";
  2030. this.z46.adjustY.edge = "bottom";
  2031. break;
  2032. case "inner":
  2033. this.z46.self.j6({
  2034. left:
  2035. "0px",
  2036. height: "100%",
  2037. width: "100%"
  2038. });
  2039. this.options.zoomWidth = this.z7.width;
  2040. this.options.zoomHeight = this.z7.height;
  2041. this.z46.z21 = "0px";
  2042. g = this.z46.z41.j7();
  2043. break;
  2044. default:
  2045. if (this.z46.custom) {
  2046. e = $mjs(this.z46.self.parentNode).j7();
  2047. if (/%$/i.test(this.z46.initWidth)) {
  2048. this.options.zoomWidth = (parseInt(this.z46.initWidth) / 100) * e.width
  2049. }
  2050. if (/%$/i.test(this.z46.initHeight)) {
  2051. this.options.zoomHeight = (parseInt(this.z46.initHeight) / 100) * e.height
  2052. }
  2053. this.z46.self.j6({
  2054. left: "0px",
  2055. width: this.options.zoomWidth
  2056. });
  2057. this.z46.z21 = "0px";
  2058. g = this.z46.z41.j7()
  2059. }
  2060. break
  2061. }
  2062. if (this.options.showTitle == "bottom") {
  2063. $mjs(this.z1.self.parentNode).j6Prop("height", this.options.zoomHeight - g.height)
  2064. }
  2065. this.z46.self.j6("inner" == this.options.zoomPosition ? {}: {
  2066. height: this.options.zoomHeight + "px",
  2067. width: this.options.zoomWidth + "px"
  2068. }).j23(1);
  2069. if (c.j21.trident4 && this.z46.z23) {
  2070. this.z46.z23.j6({
  2071. width: this.options.zoomWidth + "px",
  2072. height: this.options.zoomHeight + "px"
  2073. })
  2074. }
  2075. if (this.options.zoomPosition == "right" || this.options.zoomPosition == "left") {
  2076. if (this.options.zoomAlign == "center") {
  2077. this.z46.z21 = (f.bottom - (f.bottom - f.top) / 2 - this.options.zoomHeight / 2) + "px";
  2078. this.z46.adjustY = {
  2079. edge: "bottom",
  2080. ratio: 2
  2081. }
  2082. } else {
  2083. if (this.options.zoomAlign == "bottom") {
  2084. this.z46.z21 = (f.bottom - this.options.zoomHeight) + "px";
  2085. this.z46.adjustY.edge = "bottom"
  2086. } else {
  2087. this.z46.z21 = f.top + "px"
  2088. }
  2089. }
  2090. } else {
  2091. if (this.options.zoomPosition == "top" || this.options.zoomPosition == "bottom") {
  2092. if (this.options.zoomAlign == "center") {
  2093. this.z46.self.style.left = (f.right - (f.right - f.left) / 2 - this.options.zoomWidth / 2) + "px";
  2094. this.z46.adjustX = {
  2095. edge: "right",
  2096. ratio: 2
  2097. }
  2098. } else {
  2099. if (this.options.zoomAlign == "right") {
  2100. this.z46.self.style.left = (f.right - this.options.zoomWidth) + "px";
  2101. this.z46.adjustX.edge = "right"
  2102. } else {
  2103. this.z46.self.style.left = f.left + "px"
  2104. }
  2105. }
  2106. }
  2107. }
  2108. this.z46.initTopPos = parseInt(this.z46.z21, 10);
  2109. this.z46.initLeftPos = parseInt(this.z46.self.style.left, 10);
  2110. this.z46.lastLeftPos = this.z46.initLeftPos;
  2111. this.z46.z21 = this.z46.initTopPos;
  2112. this.zoomViewHeight = this.options.zoomHeight - g.height;
  2113. if (this.z46.g) {
  2114. this.z46.g.j6({
  2115. top: this.options.showTitle == "bottom" ? 0 : "auto",
  2116. bottom: this.options.showTitle == "bottom" ? "auto": 0
  2117. })
  2118. }
  2119. this.z1.self.j6({
  2120. position: "relative",
  2121. borderWidth: "0px",
  2122. padding: "0px",
  2123. left: "0px",
  2124. top: "0px",
  2125. transform: "translateZ(0)"
  2126. });
  2127. this.z27();
  2128. if (this.options.alwaysShowZoom) {
  2129. if (this.options.x == -1) {
  2130. this.options.x = this.z7.width / 2
  2131. }
  2132. if (this.options.y == -1) {
  2133. this.options.y = this.z7.height / 2
  2134. }
  2135. this.show()
  2136. } else {
  2137. if (this.options.zoomFade) {
  2138. this.z2 = new c.FX(this.z46.self, {
  2139. forceAnimation: "ios" === c.j21.platform
  2140. })
  2141. }
  2142. this.z46.self.j6({
  2143. top: "-100000px"
  2144. })
  2145. }
  2146. if (this.options.showLoading && this.z3) {
  2147. this.z3.hide()
  2148. }
  2149. this.c.je1("mousemove", this.z43Bind);
  2150. this.c.je1("mouseout", this.z43Bind);
  2151. if (c.j21.touchScreen) {
  2152. this.c.je1("touchstart", this.z43Bind);
  2153. this.c.je1("touchmove", this.z43Bind);
  2154. this.c.je1("touchend", this.z43Bind)
  2155. }
  2156. this.setupHint();
  2157. $mjs(this.c).j29("magiczoom:window:size", $mjs(window).j7());
  2158. $mjs(window).je1("resize", this.resizeBind);
  2159. if (!this.options.disableZoom && (!this.options.clickToActivate || "click" == this.options.initializeOn)) {
  2160. this.z30 = true
  2161. }
  2162. if ("click" == this.options.initializeOn && this.initMouseEvent) {
  2163. this.z43(this.initMouseEvent)
  2164. }
  2165. if (this.activatedEx) {
  2166. this.activate()
  2167. }
  2168. this.z28 = c.now(); ! this.divTag && ("function" == c.j1(this.options.onready)) && this.options.onready.call(null, this.id, !this.firstRun)
  2169. },
  2170. setupHint: function () {
  2171. var i = /tr|br/i,
  2172. e = /bl|br|bc/i,
  2173. f = /bc|tc/i,
  2174. h = null;
  2175. this.hintVisible = undefined;
  2176. if (!this.options.hint) {
  2177. if (this.hint) {
  2178. this.hint.kill();
  2179. this.hint = undefined
  2180. }
  2181. return
  2182. }
  2183. if (!this.hint) {
  2184. this.hint = $mjs(document.createElement("DIV")).j2(this.options.hintClass).j6({
  2185. display: "block",
  2186. overflow: "hidden",
  2187. position: "absolute",
  2188. visibility: "hidden",
  2189. "z-index": 1
  2190. });
  2191. if (this.options.hintText != "") {
  2192. this.hint.appendChild(document.createTextNode(this.options.hintText))
  2193. }
  2194. this.c.appendChild(this.hint)
  2195. } else {
  2196. if (this.options.hintText != "") {
  2197. h = this.hint[(this.hint.firstChild) ? "replaceChild": "appendChild"](document.createTextNode(this.options.hintText), this.hint.firstChild);
  2198. h = null
  2199. }
  2200. }
  2201. this.hint.j6({
  2202. left: "auto",
  2203. right: "auto",
  2204. top: "auto",
  2205. bottom: "auto",
  2206. display: "block",
  2207. opacity: (this.options.hintOpacity / 100),
  2208. "max-width": (this.z7.width - 4)
  2209. });
  2210. var g = this.hint.j7();
  2211. this.hint.j6Prop((i.test(this.options.hintPosition) ? "right": "left"), (f.test(this.options.hintPosition) ? (this.z7.width - g.width) / 2 : 2)).j6Prop((e.test(this.options.hintPosition) ? "bottom": "top"), 2);
  2212. this.hintVisible = true;
  2213. this.hint.show()
  2214. },
  2215. z29: function () {
  2216. if (this.z1.ready) {
  2217. return
  2218. }
  2219. this.z3 = $mjs(document.createElement("DIV")).j2(this.options.loadingClass).j23(this.options.loadingOpacity / 100).j6({
  2220. display: "block",
  2221. overflow: "hidden",
  2222. position: "absolute",
  2223. visibility: "hidden",
  2224. "z-index": 20,
  2225. "max-width": (this.z7.width - 4)
  2226. });
  2227. this.z3.appendChild(document.createTextNode(this.options.loadingMsg));
  2228. this.c.appendChild(this.z3);
  2229. var e = this.z3.j7();
  2230. this.z3.j6({
  2231. left: (this.options.loadingPositionX == -1 ? ((this.z7.width - e.width) / 2) : (this.options.loadingPositionX)) + "px",
  2232. top: (this.options.loadingPositionY == -1 ? ((this.z7.height - e.height) / 2) : (this.options.loadingPositionY)) + "px"
  2233. });
  2234. this.z3.show()
  2235. },
  2236. z26: function (g) {
  2237. var e, h, f = new RegExp("zoom\\-id(\\s+)?:(\\s+)?" + this.c.id + "($|;)");
  2238. this.selectors = $mjs([]);
  2239. c.$A(document.getElementsByTagName("A")).j14(function (j) {
  2240. if (f.test(j.rel)) {
  2241. if (!$mjs(j).z36) {
  2242. j.z36 = function (k) {
  2243. if (!c.j21.trident) {
  2244. this.blur()
  2245. }
  2246. $mjs(k).stop();
  2247. return false
  2248. };
  2249. j.je1("click", j.z36)
  2250. }
  2251. if (g) {
  2252. if (("mouseover" == this.options.initializeOn || "click" == this.options.initializeOn) && !$mjs(j).clickInitZoom) {
  2253. j.clickInitZoom = function (l, k) {
  2254. k.je2("click", k.clickInitZoom);
  2255. if ( !! this.z7) {
  2256. return
  2257. }
  2258. $mjs(l).stop();
  2259. this.c.href = k.href;
  2260. this.c.firstChild.src = k.rev;
  2261. this.start(k.rel)
  2262. }.j16(this, j);
  2263. j.je1("click", j.clickInitZoom)
  2264. }
  2265. return
  2266. }
  2267. var i = c.$new("a", {
  2268. href: j.rev
  2269. });
  2270. (this.options.selectorsClass != "") && $mjs(j)[this.z1.self.src.has(j.href) && this.z7.self.src.has(i.href) ? "j2": "j3"](this.options.selectorsClass);
  2271. if (this.z1.self.src.has(j.href) && this.z7.self.src.has(i.href)) {
  2272. this.lastSelector = j
  2273. }
  2274. i = null;
  2275. if (!j.z34) {
  2276. j.z34 = function (m, l) {
  2277. l = m.currentTarget || m.getTarget();
  2278. try {
  2279. while ("a" != l.tagName.toLowerCase()) {
  2280. l = l.parentNode
  2281. }
  2282. } catch(k) {
  2283. return
  2284. }
  2285. if (l.hasChild(m.getRelated())) {
  2286. return
  2287. }
  2288. if (m.type == "mouseout") {
  2289. if (this.z35) {
  2290. clearTimeout(this.z35)
  2291. }
  2292. this.z35 = false;
  2293. return
  2294. }
  2295. if (l.title != "") {
  2296. this.c.title = l.title
  2297. }
  2298. if (m.type == "mouseover") {
  2299. this.z35 = setTimeout(this.update.j24(this, l.href, l.rev, l.rel, l), this.options.selectorsMouseoverDelay)
  2300. } else {
  2301. this.update(l.href, l.rev, l.rel, l)
  2302. }
  2303. }.j16(this);
  2304. j.je1(this.options.selectorsChange, j.z34);
  2305. if (this.options.selectorsChange == "mouseover") {
  2306. j.je1("mouseout", j.z34)
  2307. }
  2308. }
  2309. j.j6({
  2310. outline: "0",
  2311. display: "inline-block"
  2312. });
  2313. if (this.options.preloadSelectorsSmall) {
  2314. h = new Image();
  2315. h.src = j.rev
  2316. }
  2317. if (this.options.preloadSelectorsBig) {
  2318. e = new Image();
  2319. e.src = j.href
  2320. }
  2321. this.selectors.push(j)
  2322. }
  2323. },
  2324. this)
  2325. },
  2326. stop: function (f) {
  2327. try {
  2328. if (this.z46) {
  2329. this.z46.hide()
  2330. }
  2331. this.pause();
  2332. this.c.je2("mousemove", this.z43Bind);
  2333. this.c.je2("mouseout", this.z43Bind);
  2334. if (c.j21.touchScreen) {
  2335. this.c.je2("touchmove", this.z43Bind);
  2336. this.c.je2("touchend", this.z43Bind)
  2337. }
  2338. if (undefined === f && this.z4) {
  2339. this.z4.self.hide()
  2340. }
  2341. if (this.z2) {
  2342. this.z2.stop()
  2343. }
  2344. this.z6 = null;
  2345. this.z30 = false;
  2346. if (this.selectors !== undefined) {
  2347. this.selectors.j14(function (e) {
  2348. if (this.options.selectorsClass != "") {
  2349. e.j3(this.options.selectorsClass)
  2350. }
  2351. if (undefined === f) {
  2352. e.je2(this.options.selectorsChange, e.z34);
  2353. if (this.options.selectorsChange == "mouseover") {
  2354. e.je2("mouseout", e.z34)
  2355. }
  2356. e.z34 = null;
  2357. e.je2("click", e.z36);
  2358. e.z36 = null
  2359. }
  2360. },
  2361. this)
  2362. }
  2363. if (this.options.hotspots != "" && $mjs(this.options.hotspots)) {
  2364. $mjs(this.options.hotspots).hide();
  2365. $mjs(this.options.hotspots).z31.insertBefore($mjs(this.options.hotspots), $mjs(this.options.hotspots).z32);
  2366. if (this.c.z33) {
  2367. this.c.removeChild(this.c.z33)
  2368. }
  2369. }
  2370. if (this.options.opacityReverse) {
  2371. this.c.j3("MagicZoomPup");
  2372. this.z7.self.j23(1)
  2373. }
  2374. this.z2 = null;
  2375. if (this.z3) {
  2376. this.c.removeChild(this.z3)
  2377. }
  2378. if (this.hint) {
  2379. this.hint.hide()
  2380. }
  2381. if (undefined === f) {
  2382. if (this.hint) {
  2383. this.c.removeChild(this.hint)
  2384. }
  2385. this.hint = null;
  2386. this.z1.unload();
  2387. this.z7.unload();
  2388. (this.z4 && this.z4.self) && this.c.removeChild(this.z4.self);
  2389. (this.z46 && this.z46.self) && this.z46.self.parentNode.removeChild(this.z46.self);
  2390. this.z4 = null;
  2391. this.z46 = null;
  2392. this.z1 = null;
  2393. this.z7 = null;
  2394. if (!this.options.rightClick) {
  2395. this.c.je2("contextmenu", c.$Ff)
  2396. }
  2397. if ("" === this.originId) {
  2398. this.c.removeAttribute("id")
  2399. } else {
  2400. this.c.id = this.originId
  2401. }
  2402. $mjs(window).je2("resize", this.resizeBind)
  2403. }
  2404. if (this.z24) {
  2405. clearTimeout(this.z24);
  2406. this.z24 = null
  2407. }
  2408. this.z44 = null;
  2409. this.c.z33 = null;
  2410. this.z3 = null;
  2411. if (this.c.title == "") {
  2412. this.c.title = this.c.z5
  2413. }
  2414. this.z28 = -1
  2415. } catch(g) {}
  2416. },
  2417. start: function (f, e) {
  2418. if (this.z28 != -1) {
  2419. return
  2420. }
  2421. this.construct(false, f, (null === e || undefined === e))
  2422. },
  2423. update: function (z, m, f, y) {
  2424. var g, C, e, j, v, h, E = null,
  2425. w = null,
  2426. k = this.lastSelector,
  2427. n, l, o, B, u, q, s, F, D, p;
  2428. y = y || null;
  2429. if (c.now() - this.z28 < 300 || this.z28 == -1 || this.ufx) {
  2430. this.z35 && clearTimeout(this.z35);
  2431. g = 300 - c.now() + this.z28;
  2432. if (this.z28 == -1) {
  2433. g = 300
  2434. }
  2435. this.z35 = setTimeout(this.update.j24(this, z, m, f, y), g);
  2436. return
  2437. }
  2438. if (y && this.lastSelector == y) {
  2439. return
  2440. } else {
  2441. this.lastSelector = y
  2442. }
  2443. C = function (G) {
  2444. if (undefined != z) {
  2445. this.c.href = z
  2446. }
  2447. if (undefined === f) {
  2448. f = ""
  2449. }
  2450. if (this.options.preservePosition) {
  2451. f = "x: " + this.options.x + "; y: " + this.options.y + "; " + f
  2452. }
  2453. if (undefined != m) {
  2454. this.z7.update(m)
  2455. }
  2456. if (G !== undefined) {
  2457. this.z7.load(G)
  2458. }
  2459. };
  2460. this.z7.z13();
  2461. j = this.z7.width;
  2462. v = this.z7.height;
  2463. this.stop(true);
  2464. if (this.options.selectorsEffect != "false" && undefined !== m) {
  2465. this.ufx = true;
  2466. var A = $mjs(this.c.cloneNode(true)).j6({
  2467. position: "relative",
  2468. top: 0,
  2469. left: 0,
  2470. width: ""
  2471. });
  2472. var r = $mjs(this.c.parentNode).j5("width");
  2473. var i = 0;
  2474. if ("content-box" == $mjs(this.c.parentNode).j5("box-sizing")) {
  2475. i = (parseInt($mjs(this.c.parentNode).j5("padding-left")) || 0)
  2476. }
  2477. var x = c.$new("div", {
  2478. id: this.c.parentNode.id,
  2479. "class": this.c.parentNode.className
  2480. }).j2("mz-tmp-clone").j6({
  2481. padding: $mjs(this.c.parentNode).j5("padding"),
  2482. width: r,
  2483. "margin-left": "-" + r,
  2484. "max-width": $mjs(this.c.parentNode).j5("max-width")
  2485. });
  2486. if ("td" === this.c.parentNode.tagName.toLocaleLowerCase()) {
  2487. x.j6({
  2488. padding: 0
  2489. });
  2490. this.c.parentNode.insertBefore(x, this.c)
  2491. } else {
  2492. this.c.parentNode.parentNode.insertBefore(x, this.c.parentNode)
  2493. }
  2494. x.append(A);
  2495. c.j21.webkit && x.j7();
  2496. if (c.j21.ieMode && c.j21.ieMode < 8) {
  2497. $mjs(A.firstChild).j23(1)
  2498. }
  2499. h = new a.z47(A.firstChild);
  2500. h.update(m);
  2501. if ("pounce" == this.options.selectorsEffect) {
  2502. p = this.c.href;
  2503. l = this.selectors.filter(function (G) {
  2504. return G.href.has(p)
  2505. });
  2506. l = (l[0]) ? $mjs(l[0].byTag("img")[0] || l[0]) : this.z7.self;
  2507. o = this.selectors.filter(function (G) {
  2508. return G.href.has(z)
  2509. });
  2510. o = (o[0]) ? $mjs(o[0].byTag("img")[0] || o[0]) : null;
  2511. if (null == o) {
  2512. o = this.z7.self;
  2513. l = this.z7.self
  2514. }
  2515. u = this.z7.self.j8(),
  2516. q = l.j8(),
  2517. s = o.j8(),
  2518. D = l.j7(),
  2519. F = o.j7()
  2520. }
  2521. e = function (I) {
  2522. var G = {},
  2523. K = {},
  2524. J = {},
  2525. L = null,
  2526. H = null;
  2527. if (false === I) {
  2528. h.unload();
  2529. $mjs(h.self).j33();
  2530. h = null;
  2531. x.j33();
  2532. this.ufx = false;
  2533. if (w) {
  2534. w.state = "inz30"
  2535. }
  2536. this.lastSelector = k;
  2537. this.start(null, k);
  2538. return
  2539. }
  2540. if (c.j21.ieMode && c.j21.ieMode < 8 && (j === h.width || 0 === h.width)) {
  2541. h.self.j6Prop("zoom", 1);
  2542. x.j7();
  2543. h.z13()
  2544. }
  2545. if ("pounce" == this.options.selectorsEffect) {
  2546. G.width = [j, D.width];
  2547. G.height = [v, D.height];
  2548. G.top = [u.top, q.top];
  2549. G.left = [u.left, q.left];
  2550. K.width = [F.width, h.width];
  2551. K.height = [F.height, h.height];
  2552. K.top = [s.top, u.top];
  2553. x.j6({
  2554. padding: ""
  2555. });
  2556. A.j23(0).j6({
  2557. height: 0,
  2558. width: h.width,
  2559. position: "relative"
  2560. });
  2561. K.left = [s.left, A.j8().left + parseInt(r) - i];
  2562. J.width = [j, h.width];
  2563. h.self.j32(c.body).j6({
  2564. position: "absolute",
  2565. "z-index": 5001,
  2566. left: K.left[0],
  2567. top: K.top[0],
  2568. width: K.width[0],
  2569. height: K.height[0]
  2570. });
  2571. L = $mjs(this.c.firstChild.cloneNode(false)).j32(c.body).j6({
  2572. position: "absolute",
  2573. "z-index": 5000,
  2574. left: G.left[0],
  2575. top: G.top[0],
  2576. visibility: "visible"
  2577. });
  2578. H = this.c.j5("border-width")
  2579. } else {
  2580. h.self.j32(this.c).j6({
  2581. position: "absolute",
  2582. "z-index": 5001,
  2583. opacity: 0,
  2584. left: "0px",
  2585. top: "0px",
  2586. height: "auto"
  2587. });
  2588. L = $mjs(this.c.firstChild.cloneNode(false)).j32(this.c).j6({
  2589. position: "absolute",
  2590. "z-index": 5000,
  2591. left: "0px",
  2592. top: "0px",
  2593. visibility: "visible",
  2594. height: "auto"
  2595. });
  2596. K = {
  2597. opacity: [0, 1]
  2598. };
  2599. if (j != h.width || v != h.height) {
  2600. J.width = K.width = G.width = [j, h.width];
  2601. J.height = K.height = G.height = [v, h.height]
  2602. }
  2603. if (this.options.selectorsEffect == "fade") {
  2604. G.opacity = [1, 0]
  2605. }
  2606. }
  2607. n = new a.z47(L);
  2608. n.load($mjs(function () {
  2609. $mjs(this.c.firstChild).j6({
  2610. visibility: "hidden"
  2611. });
  2612. x.j33();
  2613. if (null !== H) {
  2614. this.c.j6Prop("border-width", 0)
  2615. }
  2616. new c.PFX([this.c, h.self, (L || this.c.firstChild)], {
  2617. duration: this.options.selectorsEffectSpeed,
  2618. onComplete: function () {
  2619. if (L) {
  2620. L.j33();
  2621. L = null
  2622. }
  2623. if (null !== H) {
  2624. this.c.j6Prop("border-width", H)
  2625. }
  2626. C.call(this, function () {
  2627. h.unload();
  2628. $mjs(this.c.firstChild).j6({
  2629. visibility: "visible"
  2630. });
  2631. $mjs(h.self).j33();
  2632. h = null;
  2633. if (G.opacity) {
  2634. $mjs(this.c.firstChild).j6({
  2635. opacity: 1
  2636. })
  2637. }
  2638. this.ufx = false;
  2639. this.start(f, y);
  2640. if (E) {
  2641. E.j27(10)
  2642. }
  2643. }.j24(this))
  2644. }.j24(this)
  2645. }).start([J, K, G])
  2646. }).j24(this))
  2647. };
  2648. h.load(e.j24(this))
  2649. } else {
  2650. C.call(this, function () {
  2651. this.c.j6({
  2652. width: this.z7.width + "px",
  2653. height: this.z7.height + "px"
  2654. });
  2655. this.start(f, y);
  2656. if (E) {
  2657. E.j27(10)
  2658. }
  2659. }.j24(this))
  2660. }
  2661. },
  2662. z37: function (f) {
  2663. var e, j, h, g;
  2664. e = null;
  2665. j = [];
  2666. f = f || "";
  2667. if ("" == f) {
  2668. for (g in a.options) {
  2669. e = a.options[g];
  2670. switch (c.j1(a.defaults[g.j22()])) {
  2671. case "boolean":
  2672. e = e.toString().j18();
  2673. break;
  2674. case "number":
  2675. if (! ("zoomWidth" === g.j22() || "zoomHeight" === g.j22()) || !/\%$/i.test(e)) {
  2676. e = parseFloat(e)
  2677. }
  2678. break;
  2679. default:
  2680. break
  2681. }
  2682. j[g.j22()] = e
  2683. }
  2684. } else {
  2685. h = $mjs(f.split(";"));
  2686. h.j14(function (i) {
  2687. a.z39.j14(function (k) {
  2688. e = k.exec(i.j26());
  2689. if (e) {
  2690. switch (c.j1(a.defaults[e[1].j22()])) {
  2691. case "boolean":
  2692. j[e[1].j22()] = e[4] === "true";
  2693. break;
  2694. case "number":
  2695. j[e[1].j22()] = (("zoomWidth" === e[1].j22() || "zoomHeight" === e[1].j22()) && /\%$/.test(e[4])) ? e[4] : parseFloat(e[4]);
  2696. break;
  2697. default:
  2698. j[e[1].j22()] = e[4]
  2699. }
  2700. }
  2701. },
  2702. this)
  2703. },
  2704. this)
  2705. }
  2706. if (false === j.selectorsEffect) {
  2707. j.selectorsEffect = "false"
  2708. }
  2709. return j
  2710. },
  2711. z27: function () {
  2712. var f, e;
  2713. if (!this.z4) {
  2714. this.z4 = {
  2715. self: $mjs(document.createElement("DIV")).j2("MagicZoomPup").j6({
  2716. zIndex: 10,
  2717. position: "absolute",
  2718. overflow: "hidden"
  2719. }).hide(),
  2720. width: 20,
  2721. height: 20,
  2722. bgColor: ""
  2723. };
  2724. this.c.appendChild(this.z4.self);
  2725. this.z4.bgColor = this.z4.self.j5("background-color")
  2726. }
  2727. if (this.options.entireImage) {
  2728. this.z4.self.j6({
  2729. "border-width": "0px",
  2730. cursor: "default"
  2731. })
  2732. }
  2733. this.z4.z38 = false;
  2734. this.z4.height = this.zoomViewHeight / (this.z1.height / this.z7.height);
  2735. this.z4.width = this.options.zoomWidth / (this.z1.width / this.z7.width);
  2736. if (this.z4.width > this.z7.width) {
  2737. this.z4.width = this.z7.width
  2738. }
  2739. if (this.z4.height > this.z7.height) {
  2740. this.z4.height = this.z7.height
  2741. }
  2742. this.z4.width = Math.round(this.z4.width);
  2743. this.z4.height = Math.round(this.z4.height);
  2744. this.z4.borderWidth = this.z4.self.j19("borderLeftWidth").j17();
  2745. this.z4.self.j6({
  2746. width: (this.z4.width - 2 * (c.j21.backCompat ? 0 : this.z4.borderWidth)) + "px",
  2747. height: (this.z4.height - 2 * (c.j21.backCompat ? 0 : this.z4.borderWidth)) + "px"
  2748. });
  2749. if (!this.options.opacityReverse && !this.options.rightClick) {
  2750. this.z4.self.j23(parseFloat(this.options.opacity / 100));
  2751. if (this.z4.z42) {
  2752. this.z4.self.removeChild(this.z4.z42);
  2753. this.z4.z42 = null
  2754. }
  2755. } else {
  2756. if (this.z4.z42) {
  2757. this.z4.z42.src = this.z7.self.src
  2758. } else {
  2759. f = this.z7.self.cloneNode(false);
  2760. f.unselectable = "on";
  2761. this.z4.z42 = $mjs(this.z4.self.appendChild(f)).j6({
  2762. position: "absolute",
  2763. zIndex: 5
  2764. })
  2765. }
  2766. if (this.options.opacityReverse) {
  2767. this.z4.z42.j6(this.z7.self.j7());
  2768. this.z4.self.j23(1);
  2769. if (c.j21.ieMode && c.j21.ieMode < 9) {
  2770. this.z4.z42.j23(1)
  2771. }
  2772. } else {
  2773. if (this.options.rightClick) {
  2774. this.z4.z42.j23(0.009)
  2775. }
  2776. this.z4.self.j23(parseFloat(this.options.opacity / 100))
  2777. }
  2778. }
  2779. },
  2780. z43: function (h, f) {
  2781. if (!this.z30 || h === undefined || h.skipAnimation) {
  2782. return false
  2783. }
  2784. if (!this.z4) {
  2785. return false
  2786. }
  2787. var i = (/touch/i).test(h.type) && h.touches.length > 1;
  2788. var g = ("touchend" == h.type && !h.continueAnimation);
  2789. if ((!this.divTag || h.type != "mouseout") && !i) {
  2790. $mjs(h).stop()
  2791. }
  2792. if (f === undefined) {
  2793. f = $mjs(h).j15()
  2794. }
  2795. if (this.z6 === null || this.z6 === undefined) {
  2796. this.z6 = this.z7.getBox()
  2797. }
  2798. if (g || ("mouseout" == h.type && this.c !== h.getRelated() && !this.c.hasChild(h.getRelated())) || i || f.x > this.z6.right || f.x < this.z6.left || f.y > this.z6.bottom || f.y < this.z6.top) {
  2799. this.pause();
  2800. return false
  2801. }
  2802. this.activatedEx = false;
  2803. if (h.type == "mouseout" || h.type == "touchend") {
  2804. return false
  2805. }
  2806. if (this.options.dragMode && !this.z45) {
  2807. return false
  2808. }
  2809. if (!this.options.moveOnClick) {
  2810. f.x -= this.ddx;
  2811. f.y -= this.ddy
  2812. }
  2813. if ((f.x + this.z4.width / 2) >= this.z6.right) {
  2814. f.x = this.z6.right - this.z4.width / 2
  2815. }
  2816. if ((f.x - this.z4.width / 2) <= this.z6.left) {
  2817. f.x = this.z6.left + this.z4.width / 2
  2818. }
  2819. if ((f.y + this.z4.height / 2) >= this.z6.bottom) {
  2820. f.y = this.z6.bottom - this.z4.height / 2
  2821. }
  2822. if ((f.y - this.z4.height / 2) <= this.z6.top) {
  2823. f.y = this.z6.top + this.z4.height / 2
  2824. }
  2825. this.options.x = f.x - this.z6.left;
  2826. this.options.y = f.y - this.z6.top;
  2827. if (this.z44 === null) {
  2828. this.z44 = setTimeout(this.z16, 10)
  2829. }
  2830. if (c.defined(this.hintVisible) && this.hintVisible) {
  2831. this.hintVisible = false;
  2832. this.hint.hide()
  2833. }
  2834. return true
  2835. },
  2836. show: function (i) {
  2837. if (i && !this.z44) {
  2838. return
  2839. }
  2840. var o, l, h, g, n, m, k, j, f, e = this.options,
  2841. p = this.z4;
  2842. o = p.width / 2;
  2843. l = p.height / 2;
  2844. p.self.style.left = e.x - o + this.z7.border.left + "px";
  2845. p.self.style.top = e.y - l + this.z7.border.top + "px";
  2846. if (this.options.opacityReverse) {
  2847. p.z42.style.left = "-" + (parseFloat(p.self.style.left) + p.borderWidth) + "px";
  2848. p.z42.style.top = "-" + (parseFloat(p.self.style.top) + p.borderWidth) + "px"
  2849. }
  2850. h = (this.options.x - o) * (this.z1.width / this.z7.width);
  2851. g = (this.options.y - l) * (this.z1.height / this.z7.height);
  2852. if (this.z1.width - h < e.zoomWidth) {
  2853. h = this.z1.width - e.zoomWidth;
  2854. if (h < 0) {
  2855. h = 0
  2856. }
  2857. }
  2858. if (this.z1.height - g < this.zoomViewHeight) {
  2859. g = this.z1.height - this.zoomViewHeight;
  2860. if (g < 0) {
  2861. g = 0
  2862. }
  2863. }
  2864. if (document.documentElement.dir == "rtl") {
  2865. h = (e.x + p.width / 2 - this.z7.width) * (this.z1.width / this.z7.width)
  2866. }
  2867. h = Math.round(h);
  2868. g = Math.round(g);
  2869. if (e.smoothing === false || (!p.z38)) {
  2870. this.z1.self.style.left = ( - h) + "px";
  2871. this.z1.self.style.top = ( - g) + "px"
  2872. } else {
  2873. n = parseInt(this.z1.self.style.left);
  2874. m = parseInt(this.z1.self.style.top);
  2875. k = ( - h - n);
  2876. j = ( - g - m);
  2877. if (!k && !j) {
  2878. this.z44 = null;
  2879. return
  2880. }
  2881. k *= e.smoothingSpeed / 100;
  2882. if (k < 1 && k > 0) {
  2883. k = 1
  2884. } else {
  2885. if (k > -1 && k < 0) {
  2886. k = -1
  2887. }
  2888. }
  2889. n += k;
  2890. j *= e.smoothingSpeed / 100;
  2891. if (j < 1 && j > 0) {
  2892. j = 1
  2893. } else {
  2894. if (j > -1 && j < 0) {
  2895. j = -1
  2896. }
  2897. }
  2898. m += j;
  2899. this.z1.self.style.left = n + "px";
  2900. this.z1.self.style.top = m + "px"
  2901. }
  2902. if (!p.z38) {
  2903. if (this.z2) {
  2904. this.z2.stop();
  2905. this.z2.options.onComplete = c.$F;
  2906. this.z2.options.duration = e.zoomFadeInSpeed;
  2907. this.z46.self.j23(0);
  2908. this.z2.start({
  2909. opacity: [0, 1]
  2910. })
  2911. }
  2912. if (/^(left|right|top|bottom)$/i.test(e.zoomPosition)) {
  2913. this.z46.self.j32(c.body)
  2914. }
  2915. if (e.zoomPosition != "inner") {
  2916. p.self.show()
  2917. }
  2918. this.z46.self.j6(this.adjustPosition(/^(left|right|top|bottom)$/i.test(e.zoomPosition) && !this.options.alwaysShowZoom));
  2919. if (e.opacityReverse) {
  2920. this.c.j6Prop("background-color", this.z4.bgColor);
  2921. this.z7.self.j23(parseFloat((100 - e.opacity) / 100))
  2922. }
  2923. p.z38 = true
  2924. }
  2925. if (this.z44) {
  2926. this.z44 = setTimeout(this.z16, 1000 / e.fps)
  2927. }
  2928. },
  2929. adjustPosition: function (m) {
  2930. var f = this.getViewPort(5),
  2931. e = this.z7.self.j9(),
  2932. j = this.options.zoomPosition,
  2933. i = this.z46,
  2934. g = this.options.zoomDistance,
  2935. n = i.self.j7(),
  2936. l = i.initTopPos,
  2937. h = i.initLeftPos,
  2938. k = {
  2939. left: i.initLeftPos,
  2940. top: i.initTopPos
  2941. };
  2942. if ("inner" === j || this.z46.custom) {
  2943. return k
  2944. }
  2945. m || (m = false);
  2946. i.lastLeftPos += (e[i.adjustX.edge] - this.z7Rect[i.adjustX.edge]) / i.adjustX.ratio;
  2947. i.z21 += (e[i.adjustY.edge] - this.z7Rect[i.adjustY.edge]) / i.adjustY.ratio;
  2948. this.z7Rect = e;
  2949. k.left = h = i.lastLeftPos;
  2950. k.top = l = i.z21;
  2951. if (m) {
  2952. if ("left" == j || "right" == j) {
  2953. if ("left" == j && f.left > h) {
  2954. k.left = (e.left - f.left >= n.width) ? (e.left - n.width - 2) : (f.right - e.right - 2 > e.left - f.left - 2) ? (e.right + 2) : (e.left - n.width - 2)
  2955. } else {
  2956. if ("right" == j && f.right < h + n.width) {
  2957. k.left = (f.right - e.right >= n.width) ? (e.right + 2) : (e.left - f.left - 2 > f.right - e.right - 2) ? (e.left - n.width - 2) : (e.right + 2)
  2958. }
  2959. }
  2960. } else {
  2961. if ("top" == j || "bottom" == j) {
  2962. k.left = Math.max(f.left + 2, Math.min(f.right, h + n.width) - n.width);
  2963. if ("top" == j && f.top > l) {
  2964. k.top = (e.top - f.top >= n.height) ? (e.top - n.height - 2) : (f.bottom - e.bottom - 2 > e.top - f.top - 2) ? (e.bottom + 2) : (e.top - n.height - 2)
  2965. } else {
  2966. if ("bottom" == j && f.bottom < l + n.height) {
  2967. k.top = (f.bottom - e.bottom >= n.height) ? (e.bottom + 2) : (e.top - f.top - 2 > f.bottom - e.bottom - 2) ? (e.top - n.height - 2) : (e.bottom + 2)
  2968. }
  2969. }
  2970. }
  2971. }
  2972. }
  2973. return k
  2974. },
  2975. getViewPort: function (g) {
  2976. g = g || 0;
  2977. var f = (c.j21.touchScreen) ? {
  2978. width: window.innerWidth,
  2979. height: window.innerHeight
  2980. }: $mjs(window).j7(),
  2981. e = $mjs(window).j10();
  2982. return {
  2983. left: e.x + g,
  2984. right: e.x + f.width - g,
  2985. top: e.y + g,
  2986. bottom: e.y + f.height - g
  2987. }
  2988. },
  2989. onresize: function (i) {
  2990. if (!this.z7 || !this.z7.ready) {
  2991. return
  2992. }
  2993. var g, f, h = {
  2994. width: this.z7.width,
  2995. height: this.z7.height
  2996. };
  2997. this.z7.z13();
  2998. if (this.z46.custom) {
  2999. f = $mjs(this.z46.self.parentNode).j7();
  3000. if (/%$/i.test(this.z46.initWidth)) {
  3001. this.options.zoomWidth = (parseInt(this.z46.initWidth) / 100) * f.width
  3002. }
  3003. if (/%$/i.test(this.z46.initHeight)) {
  3004. this.options.zoomHeight = (parseInt(this.z46.initHeight) / 100) * f.height
  3005. }
  3006. } else {
  3007. if ("inner" === this.options.zoomPosition) {
  3008. this.options.zoomWidth = this.z7.width;
  3009. this.options.zoomHeight = this.z7.height
  3010. } else {
  3011. if (/%$/i.test(this.z46.initWidth)) {
  3012. this.options.zoomWidth *= this.z7.width / h.width
  3013. }
  3014. if (/%$/i.test(this.z46.initHeight)) {
  3015. this.options.zoomHeight *= this.z7.height / h.height
  3016. }
  3017. }
  3018. }
  3019. g = this.z46.z41.j7();
  3020. this.zoomViewHeight = this.options.zoomHeight - g.height;
  3021. if (this.options.showTitle == "bottom") {
  3022. $mjs(this.z1.self.parentNode).j6Prop("height", this.options.zoomHeight - g.height)
  3023. }
  3024. this.z46.self.j6("inner" == this.options.zoomPosition ? {}: {
  3025. height: this.options.zoomHeight + "px",
  3026. width: this.options.zoomWidth + "px"
  3027. });
  3028. if (c.j21.trident4 && this.z46.z23) {
  3029. this.z46.z23.j6({
  3030. width: this.options.zoomWidth,
  3031. height: this.options.zoomHeight
  3032. })
  3033. }
  3034. if (this.options.opacityReverse && this.z4.z42) {
  3035. this.z4.z42.j6(this.z7.self.j7())
  3036. }
  3037. this.z4.height = this.zoomViewHeight / (this.z1.height / this.z7.height);
  3038. this.z4.width = this.options.zoomWidth / (this.z1.width / this.z7.width);
  3039. if (this.z4.width > this.z7.width) {
  3040. this.z4.width = this.z7.width
  3041. }
  3042. if (this.z4.height > this.z7.height) {
  3043. this.z4.height = this.z7.height
  3044. }
  3045. this.z4.width = Math.round(this.z4.width);
  3046. this.z4.height = Math.round(this.z4.height);
  3047. this.z4.borderWidth = this.z4.self.j19("borderLeftWidth").j17();
  3048. this.z4.self.j6({
  3049. width: (this.z4.width - 2 * (c.j21.backCompat ? 0 : this.z4.borderWidth)) + "px",
  3050. height: (this.z4.height - 2 * (c.j21.backCompat ? 0 : this.z4.borderWidth)) + "px"
  3051. });
  3052. if (this.z4.z38) {
  3053. this.z46.self.j6(this.adjustPosition(/^(left|right|top|bottom)$/i.test(this.options.zoomPosition) && !this.options.alwaysShowZoom));
  3054. this.options.x *= this.z7.width / h.width;
  3055. this.options.y *= this.z7.height / h.height;
  3056. this.show()
  3057. }
  3058. },
  3059. activate: function (f, g) {
  3060. f = (c.defined(f)) ? f: true;
  3061. this.activatedEx = true;
  3062. if (!this.z1) {
  3063. this.z18();
  3064. return
  3065. }
  3066. if (this.options.disableZoom) {
  3067. return
  3068. }
  3069. this.z30 = true;
  3070. if (f) {
  3071. if (c.defined(g)) {
  3072. this.z43(g);
  3073. return
  3074. }
  3075. if (!this.options.preservePosition) {
  3076. this.options.x = this.z7.width / 2;
  3077. this.options.y = this.z7.height / 2
  3078. }
  3079. this.show()
  3080. }
  3081. },
  3082. pause: function () {
  3083. var e = this.z4 && this.z4.z38;
  3084. if (this.z44) {
  3085. clearTimeout(this.z44);
  3086. this.z44 = null
  3087. }
  3088. if (!this.options.alwaysShowZoom && this.z4 && this.z4.z38) {
  3089. this.z4.z38 = false;
  3090. this.z4.self.hide();
  3091. if (this.z2) {
  3092. this.z2.stop();
  3093. this.z2.options.onComplete = this.z46.z22;
  3094. this.z2.options.duration = this.options.zoomFadeOutSpeed;
  3095. var f = this.z46.self.j19("opacity");
  3096. this.z2.start({
  3097. opacity: [f, 0]
  3098. })
  3099. } else {
  3100. this.z46.hide()
  3101. }
  3102. if (this.options.opacityReverse) {
  3103. this.c.j6Prop("background-color", "");
  3104. this.z7.self.j23(1)
  3105. }
  3106. }
  3107. this.z6 = null;
  3108. if (this.options.clickToActivate) {
  3109. this.z30 = false
  3110. }
  3111. if (this.options.dragMode) {
  3112. this.z45 = false
  3113. }
  3114. if (this.hint) {
  3115. this.hintVisible = true;
  3116. this.hint.show()
  3117. }
  3118. },
  3119. mousedown: function (i) {
  3120. var f = i.getButton(),
  3121. h = (/touch/i).test(i.type),
  3122. j = c.now();
  3123. if (3 == f) {
  3124. return true
  3125. }
  3126. if (h) {
  3127. if (i.targetTouches.length > 1) {
  3128. return
  3129. }
  3130. this.c.j30("magiczoom:event:lastTap", {
  3131. id: i.targetTouches[0].identifier,
  3132. x: i.targetTouches[0].clientX,
  3133. y: i.targetTouches[0].clientY,
  3134. ts: j
  3135. });
  3136. if (this.z1 && this.z1.ready && !this.z30) {
  3137. return
  3138. }
  3139. }
  3140. if (! (h && i.touches.length > 1)) {
  3141. $mjs(i).stop()
  3142. }
  3143. if ("click" == this.options.initializeOn && !this.z7) {
  3144. this.initMouseEvent = i;
  3145. this.z18();
  3146. return
  3147. }
  3148. if ("mouseover" == this.options.initializeOn && !this.z7 && (i.type == "mouseover" || i.type == "touchstart")) {
  3149. this.initMouseEvent = i;
  3150. this.z18();
  3151. this.c.je2("mouseover", this.z14);
  3152. return
  3153. }
  3154. if (this.options.disableZoom) {
  3155. return
  3156. }
  3157. if (this.z7 && !this.z1.ready) {
  3158. return
  3159. }
  3160. if (this.z1 && this.options.clickToDeactivate && this.z30 && !h) {
  3161. this.z30 = false;
  3162. this.pause();
  3163. return
  3164. }
  3165. if (this.z1 && !this.z30) {
  3166. this.activate(true, i);
  3167. i.stopImmediatePropagation && i.stopImmediatePropagation()
  3168. }
  3169. if (this.z30 && this.options.dragMode) {
  3170. this.z45 = true;
  3171. if (!this.options.moveOnClick) {
  3172. if (this.z6 === null || this.z6 === undefined) {
  3173. this.z6 = this.z7.getBox()
  3174. }
  3175. var g = i.j15();
  3176. this.ddx = g.x - this.options.x - this.z6.left;
  3177. this.ddy = g.y - this.options.y - this.z6.top;
  3178. if (Math.abs(this.ddx) > this.z4.width / 2 || Math.abs(this.ddy) > this.z4.height / 2) {
  3179. this.z45 = false;
  3180. return
  3181. }
  3182. } else {
  3183. this.z43(i)
  3184. }
  3185. }
  3186. },
  3187. mouseup: function (i) {
  3188. var f = i.getButton(),
  3189. h = (/touch/i).test(i.type),
  3190. k = c.now(),
  3191. j = null,
  3192. g = this.options.preservePosition;
  3193. if (3 == f) {
  3194. return true
  3195. }
  3196. if (h) {
  3197. j = this.c.j29("magiczoom:event:lastTap");
  3198. if (!j || i.targetTouches.length > 1) {
  3199. return
  3200. }
  3201. if (j.id == i.changedTouches[0].identifier && k - j.ts <= 200 && Math.sqrt(Math.pow(i.changedTouches[0].clientX - j.x, 2) + Math.pow(i.changedTouches[0].clientY - j.y, 2)) <= 15) {
  3202. if (this.z1 && this.z1.ready && !this.z30) {
  3203. if (this.z6 === null || this.z6 === undefined) {
  3204. this.z6 = this.z7.getBox()
  3205. }
  3206. this.options.preservePosition = true;
  3207. this.options.x = i.j15().x - this.z6.left;
  3208. this.options.y = i.j15().y - this.z6.top;
  3209. this.activate(true);
  3210. this.options.preservePosition = g;
  3211. this.options.dragMode && (this.z45 = true);
  3212. this.ddx = 0;
  3213. this.ddy = 0;
  3214. i.continueAnimation = true;
  3215. i.zoomActivation = true;
  3216. i.stopImmediatePropagation && i.stopImmediatePropagation()
  3217. }
  3218. $mjs(i).stop();
  3219. return
  3220. }
  3221. } else {
  3222. $mjs(i).stop();
  3223. if (this.options.dragMode) {
  3224. this.z45 = false
  3225. }
  3226. }
  3227. }
  3228. };
  3229. if (c.j21.trident) {
  3230. try {
  3231. document.execCommand("BackgroundImageCache", false, true)
  3232. } catch(b) {}
  3233. }
  3234. $mjs(document).je1("domready", function () {
  3235. c.insertCSS(".mz-tmp-clone", "margin-right: 0 !important;margin-top: 0 !important;margin-bottom: 0 !important;padding-top: 0 !important;padding-bottom: 0 !important;border: 0 !important;position: relative !important;height: 0 !important;min-height: 0 !important;z-index: -1;float: none !important;opacity: 0;", "mz-css");
  3236. $mjs(document).je1("mousemove", a.z8);
  3237. a.refresh()
  3238. });
  3239. return a
  3240. })(magicJS);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement