Guest User

Untitled

a guest
Aug 31st, 2012
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.35 KB | None | 0 0
  1. // -----------------------------------------------------------------------------------
  2. // http://wowslider.com/
  3. // JavaScript Wow Slider is a free software that helps you easily generate delicious
  4. // slideshows with gorgeous transition effects, in a few clicks without writing a single line of code.
  5. // Generated by WOW Slider 2.5
  6. //
  7. //***********************************************
  8. // Obfuscated by Javascript Obfuscator
  9. // http://javascript-source.com
  10. //***********************************************
  11. jQuery.fn.wowSlider = function (A) {
  12. var F = jQuery;
  13. var l = this;
  14. var h = l.get(0);
  15. A = F.extend({
  16. effect: function () {
  17. this.go = function (d, f) {
  18. b(d);
  19. return d
  20. }
  21. },
  22. prev: "",
  23. next: "",
  24. duration: 1000,
  25. delay: 20 * 100,
  26. captionDuration: 1000,
  27. captionEffect: 0,
  28. width: 960,
  29. height: 360,
  30. caption: true,
  31. controls: true,
  32. autoPlay: true,
  33. bullets: true,
  34. onBeforeStep: function (d) {
  35. return d + 1
  36. },
  37. stopOnHover: 0,
  38. preventCopy: 1
  39. }, A);
  40. var a = F(".ws_images", l);
  41. var I = a.find("ul");
  42.  
  43. function b(d) {
  44. I.css({
  45. left: -d + "00%"
  46. })
  47. }
  48. F("<div>").css({
  49. width: "100%",
  50. visibility: "hidden",
  51. "font-size": 0,
  52. "line-height": 0
  53. }).append(a.find("li:first img:first").clone().css({
  54. width: "100%"
  55. })).prependTo(a);
  56. I.css({
  57. position: "absolute",
  58. top: 0,
  59. animation: "none",
  60. "-moz-animation": "none",
  61. "-webkit-animation": "none"
  62. });
  63. var q = A.images && (new wowsliderPreloader(this, A));
  64. A.loop = A.loop || Number.MAX_VALUE;
  65. var i = a.find("li");
  66. var D = i.length;
  67.  
  68. function z(d) {
  69. return ((d || 0) + D) % D
  70. }
  71. A.stopOn = z(A.stopOn);
  72. A.startSlide = z(A.startSlide);
  73. var u = navigator.userAgent;
  74. if ((F.browser.msie && parseInt(F.browser.version, 10) < 8) || (/Safari/.test(u))) {
  75. var O = Math.pow(10, Math.ceil(Math.LOG10E * Math.log(D)));
  76. I.css({
  77. width: O + "00%"
  78. });
  79. i.css({
  80. width: 100 / O + "%"
  81. })
  82. } else {
  83. I.css({
  84. width: D + "00%",
  85. display: "table"
  86. });
  87. i.css({
  88. display: "table-cell",
  89. "float": "none",
  90. width: "auto"
  91. })
  92. }
  93. b(A.startSlide);
  94. var G;
  95. if (A.preventCopy && !/iPhone/.test(navigator.platform)) {
  96. G = F('<div><a href="#" style="display:none;position:absolute;left:0;top:0;width:100%;height:100%"></a></div>').css({
  97. position: "absolute",
  98. left: 0,
  99. top: 0,
  100. width: "100%",
  101. height: "100%",
  102. "z-index": 10,
  103. background: "#FFF",
  104. opacity: 0
  105. }).appendTo(l).find("A").get(0)
  106. }
  107. var g = [];
  108. i.each(function (d) {
  109. var t = F(">img:first,>a:first,>div:first", this).get(0);
  110. var V = F("<div></div>");
  111. for (var f = 0; f < this.childNodes.length;) {
  112. if (this.childNodes[f] != t) {
  113. V.append(this.childNodes[f])
  114. } else {
  115. f++
  116. }
  117. }
  118. if (!F(this).data("descr")) {
  119. F(this).data("descr", V.html().replace(/^\s+|\s+$/g, ""))
  120. }
  121. F(this).css({
  122. "font-size": 0
  123. });
  124. g[g.length] = F(">a>img", this).get(0) || F(">*", this).get(0)
  125. });
  126. g = F(g);
  127. g.css("visibility", "visible");
  128. if (typeof A.effect == "string") {
  129. A.effect = window["ws_" + A.effect]
  130. }
  131. var N = new A.effect(A, g, a);
  132. var C = A.startSlide;
  133.  
  134. function k(t, f, d) {
  135. if (isNaN(t)) {
  136. t = A.onBeforeStep(C, D)
  137. }
  138. t = z(t);
  139. if (C == t) {
  140. return
  141. }
  142. if (q) {
  143. q.load(t, function () {
  144. r(t, f, d)
  145. })
  146. } else {
  147. r(t, f, d)
  148. }
  149. }
  150. function r(t, f, d) {
  151. var t = N.go(t, C, f, d);
  152. if (t < 0) {
  153. return
  154. }
  155. p(t);
  156. if (A.caption) {
  157. B(i[t])
  158. }
  159. C = t;
  160. if (C == A.stopOn && !--A.loop) {
  161. A.autoPlay = 0
  162. }
  163. E();
  164. if (A.onStep) {
  165. A.onStep(t)
  166. }
  167. }
  168. var w, v, j = 0;
  169. if (h.addEventListener) {
  170. h.addEventListener("touchmove", function (t) {
  171. if (j) {
  172. var f = (w - t.touches[0].pageX) / 20;
  173. var d = (v - t.touches[0].pageY) / 20;
  174. if ((Math.abs(f) > 1) || (Math.abs(d) > 1)) {
  175. w = v = j = 0;
  176. U(t, C + ((f + d) > 0 ? 1 : -1), f, d)
  177. }
  178. }
  179. }, false);
  180. h.addEventListener("touchstart", function (d) {
  181. if (d.touches.length == 1) {
  182. w = d.touches[0].pageX;
  183. v = d.touches[0].pageY;
  184. j = 1
  185. } else {
  186. j = 0
  187. }
  188. }, false);
  189. h.addEventListener("touchend", function (d) {
  190. j = 0
  191. }, false)
  192. }
  193. function R(t) {
  194. var f = "";
  195. for (var d = 0; d < t.length; d++) {
  196. f += String.fromCharCode(t.charCodeAt(d) ^ (1 + (t.length - d) % 32))
  197. }
  198. return f
  199. }
  200. function p(f) {
  201. if (A.bullets) {
  202. P(f)
  203. }
  204. if (G) {
  205. var d = F("A", i.get(f)).get(0);
  206. if (d) {
  207. G.setAttribute("href", d.href);
  208. G.setAttribute("target", d.target);
  209. G.style.display = "block"
  210. } else {
  211. G.style.display = "none"
  212. }
  213. }
  214. }
  215. var n;
  216.  
  217. function E(d) {
  218. o();
  219. if (A.autoPlay) {
  220. n = setTimeout(function () {
  221. k()
  222. }, A.delay + (d ? 0 : A.duration))
  223. }
  224. }
  225. function o() {
  226. if (n) {
  227. clearTimeout(n)
  228. }
  229. n = null
  230. }
  231. function U(V, t, f, d) {
  232. o();
  233. V.preventDefault();
  234. k(t, f, d);
  235. E()
  236. }
  237. var J = c = a;
  238. var L = "YB[Xf`lbt+glo";
  239. if (!L) {
  240. return
  241. }
  242. L = R(L);
  243. if (!L) {
  244. return
  245. }
  246. L = L.replace(/^\s+|\s+$/g, "");
  247. c = L ? F("<div></div>") : 0;
  248. if (c) {
  249. c.css({
  250. position: "absolute",
  251. right: "2px",
  252. bottom: "2px",
  253. padding: "0 0 0 0",
  254. "z-index": 10
  255. });
  256. J.append(c)
  257. }
  258. if (c && document.all) {
  259. var Q = F('<iframe src="javascript:false"></iframe>');
  260. Q.css({
  261. position: "absolute",
  262. left: 0,
  263. top: 0,
  264. width: "100%",
  265. height: "100%",
  266. filter: "alpha(opacity=0)"
  267. });
  268. Q.attr({
  269. scrolling: "no",
  270. framespacing: 0,
  271. border: 0,
  272. frameBorder: "no"
  273. });
  274. c.append(Q)
  275. }
  276. var T = c ? F(document.createElement("A")) : c;
  277. if (T) {
  278. T.css({
  279. position: "relative",
  280. display: "block",
  281. "background-color": "#E4EFEB",
  282. color: "#837F80",
  283. "font-family": "Lucida Grande,sans-serif",
  284. "font-size": "11px",
  285. "font-weight": "normal",
  286. "font-style": "normal",
  287. "-moz-border-radius": "5px",
  288. "border-radius": "5px",
  289. padding: "1px 5px",
  290. width: "auto",
  291. height: "auto",
  292. margin: "0 0 0 0",
  293. outline: "none"
  294. });
  295. T.attr({
  296. href: "http://" + L.toLowerCase()
  297. });
  298. T.html(L);
  299. T.bind("contextmenu", function (d) {
  300. return false
  301. });
  302. c.append(T)
  303. }
  304. if (A.controls) {
  305. var x = F('<a href="#" class="ws_next">' + A.next + "</a>");
  306. var S = F('<a href="#" class="ws_prev">' + A.prev + "</a>");
  307. l.append(x);
  308. l.append(S);
  309. x.bind("click", function (d) {
  310. U(d, C + 1)
  311. });
  312. S.bind("click", function (d) {
  313. U(d, C - 1)
  314. });
  315. if (/iPhone/.test(navigator.platform)) {
  316. S.get(0).addEventListener("touchend", function (d) {
  317. U(d, C - 1)
  318. }, false);
  319. x.get(0).addEventListener("touchend", function (d) {
  320. U(d, C + 1)
  321. }, false)
  322. }
  323. }
  324. function e() {
  325. var t = l.find(".ws_bullets>div");
  326. var Z = F("a", t);
  327. Z.click(function (aa) {
  328. U(aa, F(aa.target).index())
  329. });
  330. var X = Z.find("IMG");
  331. if (X.length) {
  332. var W = F('<div class="ws_bulframe"/>').appendTo(t);
  333. var f = F("<div/>").css({
  334. width: X.length + 1 + "00%"
  335. }).appendTo(F("<div/>").appendTo(W));
  336. X.appendTo(f);
  337. F("<span/>").appendTo(W);
  338. var V = -1;
  339.  
  340. function Y(ac) {
  341. if (ac < 0) {
  342. ac = 0
  343. }
  344. if (q) {
  345. q.loadTtip(ac)
  346. }
  347. F(Z.get(V)).removeClass("ws_overbull");
  348. F(Z.get(ac)).addClass("ws_overbull");
  349. W.show();
  350. var ad = {
  351. left: Z.get(ac).offsetLeft - W.width() / 2,
  352. "margin-top": Z.get(ac).offsetTop - Z.get(0).offsetTop + "px",
  353. "margin-bottom": -Z.get(ac).offsetTop + Z.get(Z.length - 1).offsetTop + "px"
  354. };
  355. var ab = X.get(ac);
  356. var aa = {
  357. left: -ab.offsetLeft + (F(ab).outerWidth(true) - F(ab).outerWidth()) / 2
  358. };
  359. if (V < 0) {
  360. W.css(ad);
  361. f.css(aa)
  362. } else {
  363. if (!document.all) {
  364. ad.opacity = 1
  365. }
  366. W.stop().animate(ad, "fast");
  367. f.stop().animate(aa, "fast")
  368. }
  369. V = ac
  370. }
  371. Z.hover(function () {
  372. Y(F(this).index())
  373. });
  374. var d;
  375. t.hover(function () {
  376. if (d) {
  377. clearTimeout(d);
  378. d = 0
  379. }
  380. Y(V)
  381. }, function () {
  382. Z.removeClass("ws_overbull");
  383. if (document.all) {
  384. if (!d) {
  385. d = setTimeout(function () {
  386. W.hide();
  387. d = 0
  388. }, 400)
  389. }
  390. } else {
  391. W.stop().animate({
  392. opacity: 0
  393. }, {
  394. duration: "fast",
  395. complete: function () {
  396. W.hide()
  397. }
  398. })
  399. }
  400. });
  401. t.click(function (aa) {
  402. U(aa, F(aa.target).index())
  403. })
  404. }
  405. }
  406. function P(d) {
  407. F(".ws_bullets A", l).each(function (f) {
  408. if (f == d) {
  409. F(this).addClass("ws_selbull")
  410. } else {
  411. F(this).removeClass("ws_selbull")
  412. }
  413. })
  414. }
  415. if (A.caption) {
  416. $caption = F("<div class='ws-title' style='display:none'></div>");
  417. l.append($caption);
  418. $caption.bind("mouseover", function (d) {
  419. o()
  420. });
  421. $caption.bind("mouseout", function (d) {
  422. E()
  423. })
  424. }
  425. var K = A.captionEffect || "slide";
  426. if (K == "move") {
  427. K = [{
  428. left1: "100%",
  429. top2: "100%"
  430. }, {
  431. left1: "80%",
  432. left2: "-50%"
  433. }, {
  434. top1: "-100%",
  435. top2: "100%",
  436. distance: 0.7,
  437. easing: "easeOutBack"
  438. }, {
  439. top1: "-80%",
  440. top2: "-80%",
  441. distance: 0.3,
  442. easing: "easeOutBack"
  443. }, {
  444. top1: "-80%",
  445. left2: "80%"
  446. }, {
  447. left1: "80%",
  448. left2: "80%"
  449. }]
  450. }
  451. function B(f) {
  452. var V = F("img", f).attr("title");
  453. var t = F(f).data("descr");
  454. var d = F(".ws-title", l);
  455. d.stop(1, 1).stop(1, 1).fadeOut(A.captionDuration / 3, function () {
  456. if (V || t) {
  457. d.html((V ? "<span>" + V + "</span>" : "") + (t ? "<div>" + t + "</div>" : ""));
  458. if (K == "slide") {
  459. M(d, {
  460. direction: "left",
  461. easing: "easeInOutExpo",
  462. complete: function () {
  463. if (F.browser.msie) {
  464. d.get(0).style.removeAttribute("filter")
  465. }
  466. },
  467. duration: A.captionDuration
  468. })
  469. } else {
  470. m(d, K[Math.floor(Math.random() * K.length)], 0.5, "easeOutElastic1", A.captionDuration)
  471. }
  472. }
  473. })
  474. }
  475. if (A.bullets) {
  476. e()
  477. }
  478. p(C);
  479. if (A.caption) {
  480. B(i[C])
  481. }
  482. if (A.stopOnHover) {
  483. this.bind("mouseover", function (d) {
  484. o()
  485. });
  486. this.bind("mouseout", function (d) {
  487. E()
  488. })
  489. }
  490. E(1);
  491.  
  492. function H(W, f) {
  493. var X, t = document.defaultView;
  494. if (t && t.getComputedStyle) {
  495. var V = t.getComputedStyle(W, "");
  496. if (V) {
  497. X = V.getPropertyValue(f)
  498. }
  499. } else {
  500. var d = f.replace(/\-\w/g, function (Y) {
  501. return Y.charAt(1).toUpperCase()
  502. });
  503. if (W.currentStyle) {
  504. X = W.currentStyle[d]
  505. } else {
  506. X = W.style[d]
  507. }
  508. }
  509. return X
  510. }
  511. function y(V, t, Y) {
  512. var X = "padding-left|padding-right|border-left-width|border-right-width".split("|");
  513. var W = 0;
  514. for (var f = 0; f < X.length; f++) {
  515. W += parseFloat(H(V, X[f])) || 0
  516. }
  517. var d = parseFloat(H(V, "width")) || ((V.offsetWidth || 0) - W);
  518. if (t) {
  519. d += W
  520. }
  521. if (Y) {
  522. d += (parseFloat(H(V, "margin-left")) || 0) + (parseFloat(H(V, "margin-right")) || 0)
  523. }
  524. return d
  525. }
  526. function s(V, t, Y) {
  527. var X = "padding-top|padding-bottom|border-top-width|border-bottom-width".split("|");
  528. var W = 0;
  529. for (var f = 0; f < X.length; f++) {
  530. W += parseFloat(H(V, X[f])) || 0
  531. }
  532. var d = parseFloat(H(V, "height")) || ((V.offsetHeight || 0) - W);
  533. if (t) {
  534. d += W
  535. }
  536. if (Y) {
  537. d += (parseFloat(H(V, "margin-top")) || 0) + (parseFloat(H(V, "margin-bottom")) || 0)
  538. }
  539. return d
  540. }
  541. function m(W, aa, d, Y, t) {
  542. var V = W.find(">span,>div").get();
  543. F(V).css({
  544. position: "relative",
  545. visibility: "hidden"
  546. });
  547. W.show();
  548. for (var f in aa) {
  549. if (/\%/.test(aa[f])) {
  550. aa[f] = parseInt(aa[f]) / 100;
  551. var Z = W.offset()[/left/.test(f) ? "left" : "top"];
  552. var ab = /left/.test(f) ? "width" : "height";
  553. if (aa[f] < 0) {
  554. aa[f] *= Z
  555. } else {
  556. aa[f] *= l[ab]() - W[ab]() - Z
  557. }
  558. }
  559. }
  560. F(V[0]).css({
  561. left: (aa.left1 || 0) + "px",
  562. top: (aa.top1 || 0) + "px"
  563. });
  564. F(V[1]).css({
  565. left: (aa.left2 || 0) + "px",
  566. top: (aa.top2 || 0) + "px"
  567. });
  568. var t = aa.duration || t;
  569.  
  570. function X(ac) {
  571. var ad = F(V[ac]).css("opacity");
  572. F(V[ac]).css({
  573. opacity: 0,
  574. visibility: "visible"
  575. }).animate({
  576. opacity: ad
  577. }, t, "easeOutCirc").animate({
  578. top: 0,
  579. left: 0
  580. }, {
  581. duration: t,
  582. easing: (aa.easing || Y),
  583. queue: false
  584. })
  585. }
  586. X(0);
  587. setTimeout(function () {
  588. X(1)
  589. }, t * (aa.distance || d))
  590. }
  591. function M(Z, ac) {
  592. var ab = {
  593. position: 0,
  594. top: 0,
  595. left: 0,
  596. bottom: 0,
  597. right: 0
  598. };
  599. for (var t in ab) {
  600. ab[t] = Z.get(0).style[t] || H(Z.get(0), t)
  601. }
  602. Z.show();
  603. var Y = {
  604. width: y(Z.get(0), 1, 1),
  605. height: s(Z.get(0), 1, 1),
  606. "float": Z.css("float"),
  607. overflow: "hidden",
  608. opacity: 0
  609. };
  610. for (var t in ab) {
  611. Y[t] = ab[t]
  612. }
  613. var f = F("<div></div>").css({
  614. fontSize: "100%",
  615. background: "transparent",
  616. border: "none",
  617. margin: 0,
  618. padding: 0
  619. });
  620. Z.wrap(f);
  621. f = Z.parent();
  622. if (Z.css("position") == "static") {
  623. f.css({
  624. position: "relative"
  625. });
  626. Z.css({
  627. position: "relative"
  628. })
  629. } else {
  630. F.extend(Y, {
  631. position: Z.css("position"),
  632. zIndex: Z.css("z-index")
  633. });
  634. Z.css({
  635. position: "absolute",
  636. top: 0,
  637. left: 0,
  638. right: "auto",
  639. bottom: "auto"
  640. })
  641. }
  642. f.css(Y).show();
  643. var aa = ac.direction || "left";
  644. var V = (aa == "up" || aa == "down") ? "top" : "left";
  645. var W = (aa == "up" || aa == "left");
  646. var d = ac.distance || (V == "top" ? Z.outerHeight({
  647. margin: true
  648. }) : Z.outerWidth({
  649. margin: true
  650. }));
  651. Z.css(V, W ? (isNaN(d) ? "-" + d : -d) : d);
  652. var X = {};
  653. X[V] = (W ? "+=" : "-=") + d;
  654. f.animate({
  655. opacity: 1
  656. }, {
  657. duration: ac.duration,
  658. easing: ac.easing
  659. });
  660. Z.animate(X, {
  661. queue: false,
  662. duration: ac.duration,
  663. easing: ac.easing,
  664. complete: function () {
  665. Z.css(ab);
  666. Z.parent().replaceWith(Z);
  667. if (ac.complete) {
  668. ac.complete()
  669. }
  670. }
  671. })
  672. }
  673. h.wsStart = k;
  674. h.wsStop = o;
  675. return this
  676. };
  677. jQuery.extend(jQuery.easing, {
  678. easeInOutExpo: function (e, f, a, h, g) {
  679. if (f == 0) {
  680. return a
  681. }
  682. if (f == g) {
  683. return a + h
  684. }
  685. if ((f /= g / 2) < 1) {
  686. return h / 2 * Math.pow(2, 10 * (f - 1)) + a
  687. }
  688. return h / 2 * (-Math.pow(2, - 10 * --f) + 2) + a
  689. },
  690. easeOutCirc: function (e, f, a, h, g) {
  691. return h * Math.sqrt(1 - (f = f / g - 1) * f) + a
  692. },
  693. easeOutElastic1: function (k, l, i, h, g) {
  694. var f = Math.PI / 2;
  695. var m = 1.70158;
  696. var e = 0;
  697. var j = h;
  698. if (l == 0) {
  699. return i
  700. }
  701. if ((l /= g) == 1) {
  702. return i + h
  703. }
  704. if (!e) {
  705. e = g * 0.3
  706. }
  707. if (j < Math.abs(h)) {
  708. j = h;
  709. var m = e / 4
  710. } else {
  711. var m = e / f * Math.asin(h / j)
  712. }
  713. return j * Math.pow(2, - 10 * l) * Math.sin((l * g - m) * f / e) + h + i
  714. },
  715. easeOutBack: function (e, f, a, i, h, g) {
  716. if (g == undefined) {
  717. g = 1.70158
  718. }
  719. return i * ((f = f / h - 1) * f * ((g + 1) * f + g) + 1) + a
  720. }
  721. });
Advertisement
Add Comment
Please, Sign In to add comment