// -----------------------------------------------------------------------------------
// http://wowslider.com/
// JavaScript Wow Slider is a free software that helps you easily generate delicious 
// slideshows with gorgeous transition effects, in a few clicks without writing a single line of code.
// Last updated: 2011-10-27
//
//***********************************************
// Obfuscated by Javascript Obfuscator
// http://javascript-source.com
//***********************************************
if (!jQuery.fn.wowSlider) { jQuery.fn.wowSlider = function(b) { var i = this; var g = jQuery; b = g.extend({ effect: function(f, d) { var t = jQuery; d.each(function(H) { if (!H) { t(this).show() } else { t(this).hide() } }); this.go = function(H, I) { t(d.get(H)).fadeIn(f.duration); t(d.get(I)).fadeOut(f.duration); return H } }, prev: "", next: "", duration: 1000, delay: 20 * 100, captionDuration: 1000, outWidth: 960, outHeight: 360, width: 960, height: 360, caption: true, controls: true, autoPlay: true, bullets: true, stopOnHover: 0, preventCopy: 1 }, b); b.loop = b.loop || Number.MAX_VALUE; var E = i.find(".ws_images>*"); var v = E.length; b.stopOn = ((b.stopOn || 0) + v) % v; var D; if (b.preventCopy) { D = g('<div><a href="#" style="display:none;position:absolute;left:0;top:0;width:100%;height:100%"></a></div>').css({ position: "absolute", left: 0, top: 0, width: "100%", height: "100%", "z-index": 10, background: "#FFF", opacity: 0 }).appendTo(i).find("A").get(0) } E.each(function(f) { var d = g(this).html() || ""; var t = d.indexOf(">", d); if (t >= 0) { g(this).data("descr", d.substr(t + 1)); if (t < d.length - 1) { g(this).html(d.substr(0, t + 1)) } } g(this).css({ "font-size": 0 }) }); var k = E.find("IMG"); var a = 0; function s(t, f, d) { t = ((t % v) + v) % v; if (a == t) { return } var t = o.go(t, a, f, d); if (t < 0) { return } r(t); if (b.caption) { j(E[t]) } a = t; if (b.onStep) { b.onStep(t) } } var C, A, e = 0; var u = i.get(0); if (u.addEventListener) { u.addEventListener("touchmove", function(t) { if (e) { var f = (C - t.touches[0].pageX) / 20; var d = (A - t.touches[0].pageY) / 20; if ((Math.abs(f) > 1) || (Math.abs(d) > 1)) { C = A = e = 0; y(t, a + ((f + d) > 0 ? 1 : -1), f, d) } } }, false); u.addEventListener("touchstart", function(d) { if (d.touches.length == 1) { C = d.touches[0].pageX; A = d.touches[0].pageY; e = 1 } else { e = 0 } }, false); u.addEventListener("touchend", function(d) { e = 0 }, false) } function r(f) { if (b.bullets) { n(f) } if (D) { var d = E.get(f).href; if (d) { D.setAttribute("href", d); D.setAttribute("target", E.get(f).target); D.style.display = "block" } else { D.style.display = "none" } } } var q; function z() { w(); if (b.autoPlay) { q = setTimeout(function() { s(a < v - 1 ? a + 1 : 0); if (a == b.stopOn && ! --b.loop) { b.autoPlay = 0 } z() }, b.delay + b.duration) } } function w() { if (q) { clearTimeout(q) } q = null } function y(H, t, f, d) { w(); H.preventDefault(); s(t, f, d); z() } g(k.get(0)).css("z-index", 1); k.css("position", "absolute"); if (typeof b.effect == "string") { b.effect = window["ws_" + b.effect] } var o = new b.effect(b, k, g(".ws_images", i)); E.find("IMG").css("visibility", "visible"); var p = c = g(".ws_images", i); var m = ""; c = m ? g("<div></div>") : 0; if (c) { c.css({ position: "absolute", right: "2px", bottom: "2px", padding: "0 0 0 0" }); p.append(c) } if (c && document.all) { var B = g('<iframe src="javascript:false"></iframe>'); B.css({ position: "absolute", left: 0, top: 0, width: "100%", height: "100%", filter: "alpha(opacity=0)" }); B.attr({ scrolling: "no", framespacing: 0, border: 0, frameBorder: "no" }); c.append(B) } var F = c ? g(document.createElement("A")) : c; if (F) { F.css({ position: "relative", display: "block", "background-color": "#E4EFEB", color: "#837F80", "font-family": "Lucida Grande,sans-serif", "font-size": "11px", "font-weight": "normal", "font-style": "normal", "-moz-border-radius": "5px", "border-radius": "5px", padding: "1px 5px", width: "auto", height: "auto", margin: "0 0 0 0", outline: "none" }); F.attr({ href: "http://" + m.toLowerCase() }); F.html(m); F.bind("contextmenu", function(d) { return false }); c.append(F) } if (b.controls) { var x = g('<a href="#" class="ws_next">' + b.next + "</a>"); var h = g('<a href="#" class="ws_prev">' + b.prev + "</a>"); i.append(x); i.append(h); x.bind("click", function(d) { y(d, a + 1) }); h.bind("click", function(d) { y(d, a - 1) }) } function G() { var t = i.find(".ws_bullets>div"); var L = g("a", t); L.click(function(M) { y(M, g(M.target).index()) }); var J = L.find("IMG"); if (J.length) { var I = g('<div class="ws_bulframe"/>').appendTo(t); var f = g("<div/>").css({ width: J.length + 1 + "00%" }).appendTo(g("<div/>").appendTo(I)); J.appendTo(f); g("<span/>").appendTo(I); var H = -1; function K(N) { if (N < 0) { N = 0 } g(L.get(H)).removeClass("ws_overbull"); g(L.get(N)).addClass("ws_overbull"); I.show(); var O = { left: L.get(N).offsetLeft - I.width() / 2 }; var M = { left: -J.get(N).offsetLeft }; if (H < 0) { I.css(O); f.css(M) } else { if (!document.all) { O.opacity = 1 } I.stop().animate(O, "fast"); f.stop().animate(M, "fast") } H = N } L.hover(function() { K(g(this).index()) }); var d; t.hover(function() { if (d) { clearTimeout(d); d = 0 } K(H) }, function() { L.removeClass("ws_overbull"); if (document.all) { if (!d) { d = setTimeout(function() { I.hide(); d = 0 }, 400) } } else { I.stop().animate({ opacity: 0 }, { duration: "fast", complete: function() { I.hide() } }) } }); t.click(function(M) { y(M, g(M.target).index()) }) } } function n(d) { g(".ws_bullets A", i).each(function(f) { if (f == d) { g(this).addClass("ws_selbull") } else { g(this).removeClass("ws_selbull") } }) } if (b.caption) { $caption = g("<div class='ws-title' style='display:none'></div>"); i.append($caption); $caption.bind("mouseover", function(d) { w() }); $caption.bind("mouseout", function(d) { z() }) } function j(d) { var H = g("img", d).attr("title"); var t = g(d).data("descr"); var f = g(".ws-title", i); f.stop(1, 1).stop(1, 1).fadeOut(b.captionDuration / 3, function() { if (H || t) { f.html((H ? "<span>" + H + "</span>" : "") + (t ? "<div>" + t + "</div>" : "")); l(f, { direction: "left", easing: "easeInOutExpo", complete: function() { if (g.browser.msie) { f.get(0).style.removeAttribute("filter") } }, duration: b.captionDuration }) } }) } if (b.bullets) { G() } r(0); if (b.caption) { j(E[0]) } if (b.stopOnHover) { this.bind("mouseover", function(d) { w() }); this.bind("mouseout", function(d) { z() }) } z(); function l(K, P) { var M = {}; var N = ["position", "top", "bottom", "left", "right"]; for (var L = 0; L < N.length; L++) { M[N[L]] = K[0].style[N[L]] } K.show(); var J = { width: K.outerWidth(true), height: K.outerHeight(true), "float": K.css("float"), overflow: "hidden", left: K.position().left, top: K.position().top, opacity: 0 }, f = g("<div></div>").css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }); K.wrap(f); f = K.parent(); if (K.css("position") == "static") { f.css({ position: "relative" }); K.css({ position: "relative" }) } else { g.extend(J, { position: K.css("position"), zIndex: K.css("z-index") }); K.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" }) } f.css(J).show(); var O = P.direction || "left"; var t = (O == "up" || O == "down") ? "top" : "left"; var H = (O == "up" || O == "left"); var d = P.distance || (t == "top" ? K.outerHeight({ margin: true }) : K.outerWidth({ margin: true })); K.css(t, H ? (isNaN(d) ? "-" + d : -d) : d); var I = {}; I[t] = (H ? "+=" : "-=") + d; f.animate({ opacity: 1 }, { duration: P.duration, easing: P.easing }); K.animate(I, { queue: false, duration: P.duration, easing: P.easing, complete: function() { for (var Q in M) { K[0].style[Q] = M[Q] } K.parent().replaceWith(K); if (P.complete) { P.complete() } } }) } return this } } jQuery.extend(jQuery.easing, { easeInOutExpo: function(e, f, a, h, g) { if (f == 0) { return a } if (f == g) { return a + h } if ((f /= g / 2) < 1) { return h / 2 * Math.pow(2, 10 * (f - 1)) + a } return h / 2 * (-Math.pow(2, -10 * --f) + 2) + a } });

function ws_basic(b, a, f) { var e = jQuery; var d = f.children(); var c = e('<div style="position:relative;"></div>'); f.append(c); c.append(d); f.css({ position: "relative", overflow: "hidden" }); c.css({ position: "relative", width: (b.outWidth * a.length) * 1.1 + "px", left: 0, top: 0 }); a.css({ position: "static" }); this.go = function(g) { c.stop(true).animate({ left: -e(a.get(g)).position().left }, b.duration, "easeInOutExpo"); return g } }; // -----------------------------------------------------------------------------------
function ws_basic_linear(c, a, b) { var d = jQuery; var e = d("<div></div>").css({ position: "absolute", display: "none", "z-index": 2, width: c.width * 2 + "px", height: c.height + "px" }).appendTo(b); a.each(function(f) { d(this).css({ "z-index": 0 }); if (!f) { d(this).show() } else { d(this).hide() } }); this.go = function(f, i) { e.stop(1, 1); var g = (((f - i + 1) % a.length) ? "left" : "right"); d(a[i]).clone().css({ position: "absolute", left: "auto", right: "auto", top: 0 }).appendTo(e).css(g, 0); d(a[f]).clone().css({ position: "absolute", left: "auto", right: "auto", top: 0 }).appendTo(e).css(g, c.width + "px").show(); e.css({ left: "auto", right: "auto", top: 0 }).css(g, 0).show(); d(a[i]).hide(); var h = {}; h[g] = -c.width + "px"; e.animate(h, c.duration, "easeInOutExpo", function() { d(a[f]).show(); d(this).hide().html("") }); return f } }; // -----------------------------------------------------------------------------------
function ws_blast(b, m, d) { var e = jQuery; var p = Math.min(b.width, b.height) / 3; var c = 1; var a = Math.round(b.width / p); var l = Math.round(b.height / p); var k = e("<div></div>"); d.css({ overflow: "visible" }).append(k); k.css({ position: "absolute", left: (b.outWidth - b.width) / 2 + "px", top: (b.outHeight - b.height) / 2 + "px", width: b.width + "px", height: b.height + "px" }); var u = []; var h = []; for (var g = 0; g < a * l; g++) { var s = g % a; var q = Math.floor(g / a); var o = Math.round(b.width * (s) / a); var t = Math.round(b.height * (q) / l); var n = Math.round(b.width * (s + 1) / a); var r = Math.round(b.height * (q + 1) / l); e([h[g] = document.createElement("div"), u[g] = document.createElement("div")]).css({ position: "absolute", width: n - o, height: r - t, "background-position": -o + "px -" + t + "px" }).appendTo(k) } u = e(u); h = e(h); function f(y, w, j) { var i = b.width / a; var x = b.width / l; var v = { left: e(window).scrollLeft(), top: e(window).scrollTop(), width: e(window).width(), height: e(window).height() }; e(y).each(function(z) { if (w) { var C = c * b.width * (2 * Math.random() - 1) + b.width / 2; var B = c * b.height * (2 * Math.random() - 1) + b.height / 2; var A = k.offset(); A.left += C; A.top += B; if (A.left < v.left) { C -= A.left + v.left } if (A.top < v.top) { B -= A.top + v.top } if (A.left > v.left + v.width - i) { C -= A.left - (v.left + v.width) + i } if (A.top > v.top + v.height - x) { B -= A.top - (v.top + v.height) + x } } else { var C = Math.round(b.width * (z % a) / a); var B = Math.round(b.height * (Math.floor(z / a)) / l) } if (j) { e(this).animate({ left: C, top: B }, { queue: false, duration: b.duration }) } else { e(this).css({ left: C, top: B }) } }) } f(u); f(h, true); this.go = function(i, v) { k.show(); e(u).stop(1).css({ opacity: 1, "z-index": 3, "background-image": 'url("' + m.get(v).src + '")' }); e(h).stop(1).css({ opacity: 0, "z-index": 2, "background-image": 'url("' + m.get(i).src + '")' }); f(h, false, true); e(h).animate({ opacity: 1 }, { queue: false, easing: "easeInOutExpo", duration: b.duration, complete: function() { e(m.get(v)).hide() } }); f(u, true, true); e(u).animate({ opacity: 0 }, { queue: false, easing: "easeInOutExpo", duration: b.duration, complete: function() { e(m.get(i)).show(); for (var w = 0; w < m.length; w++) { if (i != w) { e(m.get(w)).hide() } } k.hide() } }); var j = h; h = u; u = j; return i } }; // -----------------------------------------------------------------------------------
function ws_blur(n, k, c) { var f = jQuery; var b = document.createElement("canvas").getContext; var l = n.width, g = n.height; k.each(function(h) { if (h) { f(this).hide() } }); var j; this.go = function(h, o) { if (j) { return -1 } j = 1; var s = f(k.get(o)), q = f(k.get(h)); if (b) { var r = e(s, 30), p = e(q, 30); r.fadeIn(n.duration / 3, "linear", function() { s.hide(); r.fadeOut(n.duration / 6, "linear"); p.fadeIn(n.duration / 6, "linear", function() { r.hide(); q.show(); p.fadeOut(n.duration / 2, "linear", function() { r.remove(); p.remove(); j = 0 }) }) }) } else { var r = e(s, 5); r.fadeIn(n.duration / 3, "linear", function() { s.css("z-index", 1); q.css("z-index", 3).fadeIn(n.duration / 3, "linear", function() { s.hide(); q.css("z-index", 1); r.remove(); j = 0 }) }) } return h }; function e(t, s) { var w = (parseInt(t.css("z-index")) || 0) + 1; if (b) { var o = f('<canvas width="' + l + '" height="' + g + '"/>'); o.css({ "z-index": w, position: "absolute", left: 0, top: 0, display: "none" }).appendTo(c); var B = o.get(0).getContext("2d"); B.drawImage(t.get(0), 0, 0); i(B, 0, 0, l, g, s); return o } var C = f("<div></div>").css({ position: "absolute", "z-index": w, left: t.position().left, top: t.position().top, width: l + "px", height: g + "px", display: "none" }).appendTo(t.parent()); var A = (Math.sqrt(5) + 1) / 2; var p = 1 - A / 2; for (var q = 0; p * q < s; q++) { var u = Math.PI * A * q; var h = (p * q + 1); var z = h * Math.cos(u); var v = h * Math.sin(u); f("<div></div>").css({ opacity: 1 / (q + 1), position: "absolute", "z-index": w, left: 0, top: 0, background: 'url("' + t.attr("src") + '") no-repeat ' + Math.round(z) + "px " + Math.round(v) + "px", width: "100%", height: "100%" }).appendTo(C) } return C } var m = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259]; var a = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24]; function i(af, N, L, h, o, W) { if (isNaN(W) || W < 1) { return } W |= 0; var aa; try { try { aa = af.getImageData(N, L, h, o) } catch (ae) { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); aa = af.getImageData(N, L, h, o) } catch (ae) { alert("Cannot access local image"); throw new Error("unable to access local image data: " + ae); return } } } catch (ae) { alert("Cannot access image"); throw new Error("unable to access image data: " + ae) } var t = aa.data; var U, T, ac, Z, C, F, z, r, s, K, A, M, I, Q, V, D, w, E, G, P; var ad = W + W + 1; var R = h << 2; var B = h - 1; var Y = o - 1; var v = W + 1; var X = v * (v + 1) / 2; var O = new d(); var J = O; for (ac = 1; ac < ad; ac++) { J = J.next = new d(); if (ac == v) { var u = J } } J.next = O; var ab = null; var S = null; z = F = 0; var H = m[W]; var q = a[W]; for (T = 0; T < o; T++) { Q = V = D = r = s = K = 0; A = v * (w = t[F]); M = v * (E = t[F + 1]); I = v * (G = t[F + 2]); r += X * w; s += X * E; K += X * G; J = O; for (ac = 0; ac < v; ac++) { J.r = w; J.g = E; J.b = G; J = J.next } for (ac = 1; ac < v; ac++) { Z = F + ((B < ac ? B : ac) << 2); r += (J.r = (w = t[Z])) * (P = v - ac); s += (J.g = (E = t[Z + 1])) * P; K += (J.b = (G = t[Z + 2])) * P; Q += w; V += E; D += G; J = J.next } ab = O; S = u; for (U = 0; U < h; U++) { t[F] = (r * H) >> q; t[F + 1] = (s * H) >> q; t[F + 2] = (K * H) >> q; r -= A; s -= M; K -= I; A -= ab.r; M -= ab.g; I -= ab.b; Z = (z + ((Z = U + W + 1) < B ? Z : B)) << 2; Q += (ab.r = t[Z]); V += (ab.g = t[Z + 1]); D += (ab.b = t[Z + 2]); r += Q; s += V; K += D; ab = ab.next; A += (w = S.r); M += (E = S.g); I += (G = S.b); Q -= w; V -= E; D -= G; S = S.next; F += 4 } z += h } for (U = 0; U < h; U++) { V = D = Q = s = K = r = 0; F = U << 2; A = v * (w = t[F]); M = v * (E = t[F + 1]); I = v * (G = t[F + 2]); r += X * w; s += X * E; K += X * G; J = O; for (ac = 0; ac < v; ac++) { J.r = w; J.g = E; J.b = G; J = J.next } C = h; for (ac = 1; ac <= W; ac++) { F = (C + U) << 2; r += (J.r = (w = t[F])) * (P = v - ac); s += (J.g = (E = t[F + 1])) * P; K += (J.b = (G = t[F + 2])) * P; Q += w; V += E; D += G; J = J.next; if (ac < Y) { C += h } } F = U; ab = O; S = u; for (T = 0; T < o; T++) { Z = F << 2; t[Z] = (r * H) >> q; t[Z + 1] = (s * H) >> q; t[Z + 2] = (K * H) >> q; r -= A; s -= M; K -= I; A -= ab.r; M -= ab.g; I -= ab.b; Z = (U + (((Z = T + v) < Y ? Z : Y) * h)) << 2; r += (Q += (ab.r = t[Z])); s += (V += (ab.g = t[Z + 1])); K += (D += (ab.b = t[Z + 2])); ab = ab.next; A += (w = S.r); M += (E = S.g); I += (G = S.b); Q -= w; V -= E; D -= G; S = S.next; F += h } } af.putImageData(aa, N, L) } function d() { this.r = 0; this.g = 0; this.b = 0; this.a = 0; this.next = null } }; // -----------------------------------------------------------------------------------
function ws_fade(b, a) { var c = jQuery; a.each(function(d) { if (!d) { c(this).show() } else { c(this).hide() } }); this.go = function(d, e) { c(a.get(d)).fadeIn(b.duration); c(a.get(e)).fadeOut(b.duration); return d } }; // -----------------------------------------------------------------------------------
function ws_fly(c, a, b) { var d = jQuery; b.css("overflow", "visible"); a.each(function(e) { if (!e) { d(this).show() } else { d(this).hide() } }); this.go = function(e, i, f) { var g = 0; if (f) { if (f >= 1) { g = 1 } if (f <= -1) { g = 0 } } var k = (g ? 1 : -1) * c.width / 4; var j = d(a.get(e)); j.stop(1, 1); j.css({ opacity: "hide", left: k, "z-index": 3 }); j.animate({ opacity: "show" }, { duration: c.duration, queue: false }); j.animate({ left: 0 }, { duration: 2 * c.duration / 3, queue: false }); var h = d(a.get(i)); setTimeout(function() { h.animate({ left: -k, opacity: "hide" }, 2 * c.duration / 3, function() { h.css("left", 0); j.css({ "z-index": "", opacity: 1 }) }) }, c.duration / 3); return e } }; // -----------------------------------------------------------------------------------
function ws_kenburns(p, j, c) { var f = jQuery; var l = p.width, g = p.height; var a = document.createElement("canvas").getContext; var o = p.paths || [{ from: [0, 0, 1], to: [0, 0, 1.2] }, { from: [0, 0, 1.2], to: [0, 0, 1] }, { from: [1, 0, 1], to: [1, 0, 1.2] }, { from: [0, 1, 1.2], to: [0, 1, 1] }, { from: [1, 1, 1], to: [1, 1, 1.2] }, { from: [0, 0, 1.2], to: [1, 0, 1.2] }, { from: [0, 1, 1.2], to: [1, 1, 1.2] }, { from: [1, 0, 1.2], to: [1, 1, 1.2] }, { from: [0, 0, 1.2], to: [0, 1, 1.2] }, { from: [1, 0, 1.2], to: [0, 1, 1.2] }, { from: [0.5, 1, 1], to: [0.5, 1, 1.3] }, { from: [1, 0.5, 1.2], to: [1, 0.5, 1] }, { from: [1, 0.5, 1], to: [1, 0.5, 1.2] }, { from: [0, 0.5, 1.2], to: [0, 0.5, 1] }, { from: [1, 0.5, 1.2], to: [1, 0.5, 1] }, { from: [0.5, 0.5, 1], to: [0.5, 0.5, 1.2] }, { from: [0.5, 0.5, 1.3], to: [0.5, 0.5, 1] }, { from: [0.5, 1, 1], to: [0.5, 0, 1.15]}]; function n(h) { return o[h ? Math.floor(Math.random() * (a ? o.length : Math.min(10, o.length))) : 0] } function d(u, r) { var t, h = 0, q = 40 / r; var v = setInterval(function() { if (h < 1) { if (!t) { t = 1; u(h); t = 0 } h += q } else { s(1) } }, 40); function s(w) { clearInterval(v); if (w) { u(1) } } return { stop: s} } var m; var i; if (a) { var e = f('<canvas width="' + l + '" height="' + g + '"/>'); e.appendTo(c); e.css({ "z-index": 8, position: "absolute", left: 0, top: 0 }); m = e.get(0).getContext("2d") } function b(s, q, h) { var r = { width: l * s[2] + "px" }; r[q ? "right" : "left"] = -l * (s[2] - 1) * (q ? (1 - s[0]) : s[0]) + "px"; r[h ? "bottom" : "top"] = -g * (s[2] - 1) * (h ? (1 - s[1]) : s[1]) + "px"; return r } function k(h, r, q) { if (m) { if (i) { i.stop() } i = d(function(s) { var t = [r.from[0] * (1 - s) + s * r.to[0], r.from[1] * (1 - s) + s * r.to[1], r.from[2] * (1 - s) + s * r.to[2]]; m.globalAlpha = (q ? Math.min(s * (1 + p.delay / p.duration), 1) : 1); m.drawImage(h, -l * (t[2] - 1) * t[0], -g * (t[2] - 1) * t[1], l * t[2], g * t[2]) }, p.duration + p.delay) } else { h = f(h); h.css({ left: "auto", right: "auto", top: "auto", bottom: "auto" }).css(b(r.from, r.from[0] > 0.5, r.from[1] > 0.5)).stop(1, 1).animate(b(r.to, r.from[0] > 0.5, r.from[1] > 0.5), { easing: "linear", queue: false, duration: (p.duration + p.delay) }); if (q) { h.fadeIn(p.duration) } } } j.each(function(h) { f(this).css({ left: "auto", top: "auto", right: "auto", bottom: "auto" }); if (!h) { k(this, n(0), 0) } else { f(this).hide() } }); this.go = function(h, q) { k(j.get(h), n(h), 1); if (!m) { f(j.get(q)).fadeOut(p.duration) } return h } }; // -----------------------------------------------------------------------------------
function ws_squares(e, a, b) { var f = jQuery; var c; var d = b.children(); c = f('<div id="wowslider_tmp' + Math.round(Math.random() * 99999) + '"></div>'); b.append(c); c.css({ left: (e.outWidth - e.width) / 2 + "px", top: (e.outHeight - e.height) / 2 + "px", width: e.width + "px", height: e.height + "px", "background-color": "#FFF", "z-index": 2, position: "absolute" }); c.append(d); f(d.get(0)).clone().css({ position: "absolute", left: 0, top: 0 }).prependTo(b); c.coinslider({ hoverPause: false, navigation: 0, delay: -1, width: e.width, height: e.height }); this.go = function(g) { f.transition(c.get(0), g); return g } }; // -----------------------------------------------------------------------------------
function ws_stack(c, a, b) { var d = jQuery; this.go = function(j, h, m, l) { var g = a.length > 2 ? (j - h + 1) % a.length : 1; if (Math.abs(m) >= 1) { g = (m > 0) ? 0 : 1 } g = g ^ !!c.revers; var f = d(a.get(g ? h : j)); var e = d(a.get(g ? j : h)); a.each(function(n) { if (g && n != h) { this.style.zIndex = (Math.max(0, this.style.zIndex - 1)) } }); var i = (c.revers ? -1 : 1) * c.width; var k = g ? 0 : i; e.stop(1, 1).css({ "z-index": 4, left: (i - k + "px") }); if (!g) { f.stop(1, 1).css({ left: 0 }) } f.css({ "z-index": 3 }); e.animate({ left: (k + "px") }, c.duration, "easeInOutExpo"); return j } }; // -----------------------------------------------------------------------------------
function ws_stack_vertical(c, a, b) { var d = jQuery; this.go = function(e, k, h, f) { var i = (e - k + 1) % a.length; if (Math.abs(f) >= 1) { i = (f > 0) ? 0 : 1 } var j = d(a.get(i ? k : e)); var l = d(a.get(i ? e : k)); a.each(function(m) { if (i && m != k) { this.style.zIndex = (Math.max(0, this.style.zIndex - 1)) } }); var g = i ? 0 : -c.height; l.stop(1, 1).css({ "z-index": 4, top: (-c.height - g + "px") }); if (!i) { j.stop(1, 1).css({ top: 0 }) } j.css({ "z-index": 3 }); l.animate({ top: (g + "px") }, c.duration, "easeInOutExpo"); return e } }; // -----------------------------------------------------------------------------------

// slices
var ws_slices = function(e, a, g) { var f = jQuery; var c; var d; var b = g.children(); c = f("<div></div>"); g.append(c); c.css({ left: (e.outWidth - e.width) / 2 + "px", top: (e.outHeight - e.height) / 2 + "px", width: e.width + "px", height: e.height + "px", "background-color": "#FFF", position: "absolute" }); c.append(b); slider = c.nivoSlider({ directionNav: false, keyboardNav: false, controlNav: false, manualAdvance: true, caption: 0, effect: "sliceDownRight,sliceDownLeft,sliceUpRight,sliceUpLeft,sliceUpDownRight,sliceUpDownLeft,sliceUpDownRight,sliceUpDownLeft,fold,fold,fold", animSpeed: e.duration }); a.css({ border: "none" }); a.show(); b.css({ "z-index": 3, position: "absolute", left: 0, top: 0 }); this.go = function(i, h) { var j = c.data("nivoslider").nivoRun(i); if (j) { f(a.get(h)).hide(); f(a.get(i)).show(); return i } else { return -1 } } }; // -----------------------------------------------------------------------------------
eval((function(x) { var d = ""; var p = 0; while (p < x.length) { if (x.charAt(p) != "`") d += x.charAt(p++); else { var l = x.charCodeAt(p + 3) - 28; if (l > 4) d += d.substr(d.length - x.charCodeAt(p + 1) * 96 - x.charCodeAt(p + 2) + 3104 - l, l); else d += "`"; p += 4 } } return d })("(function ($) {var NivoSlider = ` 5&element, options` G#settings = $.extend({}, $.fn.n` b%.defaults` V&;var vars = {current` H!:0, ` )#Image:\"\", total` :!s:0, randAnim` 7!running:false, paused` &$stop` &\"}`!-!s`\"3$$`\"+$);` .\".data(\"nivo:vars\",`!Z!` 6%css(\"position\", \"relative\"` :%addClass` `\"`\"U\"\"`\"D\"kids =`!8#.children();kids.each`$!'`#V#` A!`!f!thi`#+#link = \"\";if (!` >!.is(\"img\")) {if (` ,&a` /!` *\"`!P*-imageLink\");` o#` C!;}`!0$` Q\"find` z!:first\");}`!T%Width` A%width()`!U!` 3(= 0`!=$` C*attr(\"` R!` j)Height` >%h` *!` m(` 9$` o'` E+` u\"` T\"\");}`!E+>`$\"$`!m#) {` $)` A&` P(` }#` T%`!Q$` T&` +#` C');}`$Y#`%|\"display\", \"none\");`!k\"` &3vars.`'s'++;}`\"c\"`)3$.star`(U\" >`\"k!` %5=`'M!` c() {` 60` 7. - 1`$=!s.`)a( =`*Z%` U'`#-\"$(kids[` C-])`'$)` 4(`*L!`'m!` C4;} else` 'L`'20`!A?`(Y\"` *7`$F,block\");}`+)(background\", \"url(\" +`#\\\"`!u(`'-#src\") + \") no-repeat\");for (var i = 0; i <`#p'lices; i++`.q$lice`)&$Math.`!<!(`'i* /` T,`&6\"i =`$m(` 5! - 1`'_&append($(\"<div class=\\`+T\"` K!\\\"></div>\"`# \"{left:`!L'* i + \"px\", `!J!:`!M+-`!y(` B(`.]$:\"absolute\"})`%P&` dz` 5$`!-<`&:!`#:%ca`2R!`\"zB` F#\\\"><p></p`!X+`&H#:`*}\", opacity:` },O` 2\"})`$n\"`&84title\") != \"\"`%w#` /!`*^$` :6` s!` '!.substr(0, 1) == \"#\") {` `$$` @\").html(`-N!\".`\"@( p\",`./#` >#` K\";` 9,` <'fadeIn`#Z&animSpeed);}`0g!timer`(I!`3'!` @%manualAdvance &&`48!.leng`05!1`!t!` U\"setInterval`42*nivoRun`(i#,` ^!,`(J%, false);}` *&.pauseTime`+u#` 0%dire` u!Nav`%Q-`%M/` D(\\\"><a` 1*prev` 4\"Prev</a` 1-next` <\"Next` =!`&;#`0l*` }(Hide`-G!`$)#` 0(`$P(ide();`2g$over`#+*` A<show(`#4!` *I`!1#}`&6\"a` F\"`\"c#` <'live(\"click\"` s+`(;%running) {return`$f\";}clear`%E%`%]!);`%a$\"\"`4E\"`2p)-= 2;`%J<\"prev\"`!v!`!p&`$;#` x~`!u!`!B=nex`3.!`'*,control`'2\"var nivoC` /\"`*R!`,j0` K%`.V'`%i$`'n#` \\'`2D2`)g'`2N$`!B3Thumbs`!X#child =` Y\"eq(i`'k\"!` 3!.is(\"img\")) {` B$` 4\"find` 7!:firs`\"f!` r9FromRel`+!#`\"##`*(&`)@+` W#\\\" rel=\\\"\" +`14\"\\\"><img src` 0#`!I\"`._\"rel\")` A\" alt=\\\"\\\" /></a>\"`2d&` Fwsrc\").replace`\"S6Search`->'` 1,R` \\\"`!q7`!Ed\" + (i + 1`!(!` v%`0|&`!R% a:eq(\" +`2X)`*2\"+ \")`)P'addClass(\"active\"`1k(` f'`)Gcif ($(this).has`!,+`*,M`)3#css(\"background\", \"url(`#:\"`\"W(Image`%6(`#V\") no-repeat\")`-9/= `!l$`'2(- 1`+\\>`#=#`+m0keyboard`+|\"$(window).keypress`11'event`#Y#` '!.keyCode == \"37\"`/\"~`/b>`!F39` xa`/>E`#V-pauseOnHover) {`%l#hover`#W'`.?\"` G#d = true;`!6<}`'q+` U*`\"5\"if ` T\"`\"j!\" && !`!T%manualAdvance) {` t$set`!.%` u)`\"H<`!/!);}`,H'`!K!Time`\"w#`\"[#b`03!nivo:animFinished`*#,`$J(`\"+%$(kids).each`!R*`1N!`(F$`1I(` ,$`)g!display\", \"none`$Q#` U#kids[`&\\-]` _,` .5` r,block`&y$`#z,`$F(`#8~`#7` ,%afterChange.call`#2\";});this`.u!Run =`$<'index, effec`*$`(q9`!$%` M\" =` U# ||`!T&` -\"`-:1`!,!`,|A`\"O#`!8#`(p!};var `!t0` M4nudge`&f\"`/J! =`1F#.data`'>#vars\"`%\"` ?!&&`2K/==` /\"total` .!s - 1) {`\"N%las` G\"`#q)if ((`%i! ||` ^\"stop)`%p!`!X$`#N3before`$a.`'k!` T$`1m:`1dA`1y*} else`%G\"`! !`'q!`/'\"` ;p` z*`.i\"` 4p}`$e-++`%-%`$m=`,j$`'B+0;`$E%`!m!showEnd`%2-` J.< 0` ]3`&50` `\"`,]C`\"i- = ` A6`%(%` )J.f`0#!img:firs`$b%`\"g%controlNav`.R!\"`+}!-` ,& a\",`)H#).removeClass(\"active\");` A1:eq`%/-`#5\"+ \")` i'add` a,`!S+aption`--(`%}/title\") != \"\"`+F#` /!`$C$` :6`4]#tle.substr(0, 1)`'d!#\"`08!` b\"$` @\").html(`!a#`\"T&`!b\"`\"0'`1^)` j\"`1g#`#_(` Q\" p` N'fadeOut`\"Z&animSpeed`4P+`3o$`!L!`!W\";` ,$fadeIn` Q/`1)!`&'$`!+9` k(}`\".7` o8` q3`\")A`*i# i`)!` Z%slice` V'each`4@*var ` A!Width = Math.`,8!`1@#.width() /`2i&` M!s`#8&css({height:\"0px\", opacity:\"0\", `-(&:`,[Q -\" +`2s!`!a$+ i *`!n(-` \"'` Z!px 0%\"});i++;}`'6\"`!x%effect`&D!random`(\"$anims = new Array(\"` s!DownRight\", ` (&Lef` '&Up` 3*Up` 0+` R.` .\"` ?$fol`0-!fade\");`\"|!randAnim =`!U\"[`$;!floor(`$E\"`!z!() * (` =!.leng`\"}!1))]`0(&` `&= undefined`.6$` |'`!9\";}`+N*`#+\".indexOf(\",`+<\"-1`#)+` A,split` J!`!-$.trim`!o\"`!{8`\"*()]);`2S\"running = true`$e5`$B%\" ||`!N,` 4*`$5\" ||`&u\"`#$(` 10` O9`$n!` L;` ?!`.X%meBuff`)z!`)&`)U%s`.0!`* 2`\":>`!\"H` n=._reverse();}` H\"`+<8`0(\"his);` +!`+&\"top:0, bottom:\"`)b!f (i =`%x'`!D#- 1) {setTimeout` {*` o\"animate`+{&100%`+z(1.0\"},` r&`0='\"\"`0=+`-1#trigger(\"nivo:animFinished\"`03\", 100 +`$T%`/:&` ut` 2`%t%+= 50`-($`!E#`%@9Up`'-:`,k$`%a7` 7(` M7`&C<` ;#`'.}` ~H`')~`(#$\"\"`(#%0`')~`')~`')~`'8o`0$>`4W(`%e9`0#C` C\"`&O>`0#Gv`'_f`!*N`'Vw`(*%0`%s%`0P5++`&T&`(j:`#(!}if (v`(-~`(-~`(-~`(q:v`(jAfold`%}3` 6!`'G:`&\"5`%bBvar origWidth =` :\".width(`.e.0px\", `\"~+` H!` 6\"`.Ce` n\"`!P%`$}~`%AZ`!<O`.Egfade`%i4ade`%y$`%?M`%]#`%;!\"`%/\"\", `%1\"`$h=` U$`\"{%`\"Q> * 2`$+W`$L#` bS);}`#f$}`(1!tra`(E!`!B&msg) {if ` }!.console && typeof ` +#.log != \"undefine`)!` 2'` e!;}};` c!stop` {)` ~#!$(element).data`\"S#vars\")` Q!`#b!` %; = true;`\"*!(\"Stop S`#M!\"`!7(art`!00` [dfals`!9'art`!8)`$)&fterLoad.call`,=#};$.fn`'1!` O\"`!])options) {return `\"-!`-(2`!b#`39+` /#`!s'`&M\"\")` l%;}var ` 1& = new N`!J%` j!, `!E$;` [5,` ['`'2\"`\".,.defaults = {`*A\":\"random`)i\"ces:15, `'7%:500, pauseTime:3000, `$p!` n!:0, dire`\"h!Nav:true` %*Hide` 0#ca`\" !` &$ontrol` L&` '&Thumbs:`$w!` &.FromRel` '4Search:\".jpg\"` -.Replace:\"_thumb` ?#keyboard`!D&`\"P!OnHover` ,#manualAdvance`!6%`\"/\"O`*e#0.8, beforeChange:`%_)}, `&e!` %3`$Y!showEnd` ,-las`#o#` ^1Loa` D,`%;#_reverse = [].` &#;})(jQuery);"))// -----------------------------------------------------------------------------------

// blinds
function ws_blinds(c, b, h) { var f = jQuery; var e = 3; b.each(function(i) { if (i) { f(this).hide() } }); var a = f("<div></div>"); a.css({ position: "absolute", width: c.width + "px", height: c.height + "px", left: (c.outWidth - c.width) / 2 + "px", top: (c.outHeight - c.height) / 2 + "px" }); h.append(a); var g = []; for (var d = 0; d < e; d++) { g[d] = f("<div></div>") } f(g).each(function(i) { f(this).css({ position: "absolute", "z-index": 2, "background-repeat": "no-repeat", height: "100%", border: "none", margin: 0, top: 0, left: Math.round(100 / e) * i + "%", width: ((i < e - 1) ? Math.round(100 / e) : 100 - Math.round(100 / e) * (e - 1)) + "%" }); a.append(this); a.hide() }); this.go = function(m, o, k) { var l = o > m ? 1 : 0; if (k) { if (k <= -1) { m = (o + 1) % b.length; l = 0 } else { if (k >= 1) { m = (o - 1 + b.length) % b.length; l = 1 } else { return -1 } } } for (var n = 0; n < g.length; n++) { g[n].stop(true, true) } function j(r, s) { var t = g[r]; var i = t.width(); var q = b.get(m); t.css({ "background-position": (!l ? (-f(q).width()) : (f(q).width() - t.position().left)) + "px 0", "background-image": "url(" + q.src + ")" }); t.animate({ "background-position": -t.position().left + "px 0" }, (c.duration / (g.length + 1)) * (l ? (g.length - r + 1) : (r + 2)), s) } function p() { b.hide(); f(b.get(m)).show(); a.hide(); f(g).each(function() { f(this).css({ "background-image": "none" }) }) } a.show(); for (var n = 0; n < g.length; n++) { j(n, (!l && n == g.length - 1 || l && !n) ? p : null) } return m } } (function(b) { if (!document.defaultView || !document.defaultView.getComputedStyle) { var d = b.curCSS; b.curCSS = function(g, e, h) { if (e === "background-position") { e = "backgroundPosition" } if (e !== "backgroundPosition" || !g.currentStyle || g.currentStyle[e]) { return d.apply(this, arguments) } var f = g.style; if (!h && f && f[e]) { return f[e] } return d(g, "backgroundPositionX", h) + " " + d(g, "backgroundPositionY", h) } } var c = b.fn.animate; b.fn.animate = function(e) { if ("background-position" in e) { e.backgroundPosition = e["background-position"]; delete e["background-position"] } if ("backgroundPosition" in e) { e.backgroundPosition = "(" + e.backgroundPosition } return c.apply(this, arguments) }; function a(f) { f = f.replace(/left|top/g, "0px"); f = f.replace(/right|bottom/g, "100%"); f = f.replace(/([0-9\.]+)(\s|\)|$)/g, "$1px$2"); var e = f.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/); return [parseFloat(e[1], 10), e[2], parseFloat(e[3], 10), e[4]] } b.fx.step.backgroundPosition = function(f) { if (!f.bgPosReady) { var h = b.curCSS(f.elem, "backgroundPosition"); if (!h) { h = "0px 0px" } h = a(h); f.start = [h[0], h[2]]; var e = a(f.end); f.end = [e[0], e[2]]; f.unit = [e[1], e[3]]; f.bgPosReady = true } var g = []; g[0] = ((f.end[0] - f.start[0]) * f.pos) + f.start[0] + f.unit[0]; g[1] = ((f.end[1] - f.start[1]) * f.pos) + f.start[1] + f.unit[1]; f.elem.style.backgroundPosition = g[0] + " " + g[1] } })(jQuery); // -----------------------------------------------------------------------------------
if (!jQuery.fn.coinslider) (function($) { var params = new Array; var order = new Array; var images = new Array; var links = new Array; var linksTarget = new Array; var titles = new Array; var interval = new Array; var imagePos = new Array; var appInterval = new Array; var squarePos = new Array; var reverse = new Array; $.fn.coinslider = $.fn.CoinSlider = function(options) { init = function(el) { order[el.id] = new Array; images[el.id] = new Array; links[el.id] = new Array; linksTarget[el.id] = new Array; titles[el.id] = new Array; imagePos[el.id] = 0; squarePos[el.id] = 0; reverse[el.id] = 1; params[el.id] = $.extend({}, $.fn.coinslider.defaults, options); $.each($("#" + el.id + " img"), function(i, item) { images[el.id][i] = $(item).attr("src"); links[el.id][i] = $(item).parent().is("a") ? $(item).parent().attr("href") : ""; linksTarget[el.id][i] = $(item).parent().is("a") ? $(item).parent().attr("target") : ""; titles[el.id][i] = $(item).next().is("span") ? $(item).next().html() : ""; $(item).hide(); $(item).next().hide(); }); $(el).css({ 'background-image': "url(" + images[el.id][0] + ")", width: params[el.id].width, height: params[el.id].height, position: "relative", 'background-position': "top left" }).wrap("<div class='coin-slider' id='coin-slider-" + el.id + "' />"); $("#" + el.id).append("<div class='cs-title' id='cs-title-" + el.id + "' style='position: absolute; bottom:0; left: 0; z-index: 1000;'></div>"); $.setFields(el); if (params[el.id].navigation) { $.setNavigation(el); } $.transition(el, 0); $.transitionCall(el); }; $.setFields = function(el) { tWidth = sWidth = parseInt(params[el.id].width / params[el.id].spw); tHeight = sHeight = parseInt(params[el.id].height / params[el.id].sph); counter = sLeft = sTop = 0; tgapx = gapx = params[el.id].width - params[el.id].spw * sWidth; tgapy = gapy = params[el.id].height - params[el.id].sph * sHeight; for (i = 1; i <= params[el.id].sph; i++) { gapx = tgapx; if (gapy > 0) { gapy--; sHeight = tHeight + 1; } else { sHeight = tHeight; } for (j = 1; j <= params[el.id].spw; j++) { if (gapx > 0) { gapx--; sWidth = tWidth + 1; } else { sWidth = tWidth; } order[el.id][counter] = i + "" + j; counter++; if (params[el.id].links) { $("#" + el.id).append("<a href='" + links[el.id][0] + "' class='cs-" + el.id + "' id='cs-" + el.id + i + j + "' style='width:" + sWidth + "px; height:" + sHeight + "px; float: left; position: absolute;'></a>"); } else { $("#" + el.id).append("<div class='cs-" + el.id + "' id='cs-" + el.id + i + j + "' style='width:" + sWidth + "px; height:" + sHeight + "px; float: left; position: absolute;'></div>"); } $("#cs-" + el.id + i + j).css({ 'background-position': -sLeft + "px " + (-sTop + "px"), left: sLeft, top: sTop }); sLeft += sWidth; } sTop += sHeight; sLeft = 0; } $(".cs-" + el.id).mouseover(function() { $("#cs-navigation-" + el.id).show(); }); $(".cs-" + el.id).mouseout(function() { $("#cs-navigation-" + el.id).hide(); }); $("#cs-title-" + el.id).mouseover(function() { $("#cs-navigation-" + el.id).show(); }); $("#cs-title-" + el.id).mouseout(function() { $("#cs-navigation-" + el.id).hide(); }); if (params[el.id].hoverPause) { $(".cs-" + el.id).mouseover(function() { params[el.id].pause = true; }); $(".cs-" + el.id).mouseout(function() { params[el.id].pause = false; }); $("#cs-title-" + el.id).mouseover(function() { params[el.id].pause = true; }); $("#cs-title-" + el.id).mouseout(function() { params[el.id].pause = false; }); } }; $.transitionCall = function(el) { if (params[el.id].delay < 0) { return; } clearInterval(interval[el.id]); delay = params[el.id].delay + params[el.id].spw * params[el.id].sph * params[el.id].sDelay; interval[el.id] = setInterval(function() { $.transition(el); }, delay); }; $.transition = function(el, direction) { if (params[el.id].pause == true) { return; } $.effect(el); squarePos[el.id] = 0; appInterval[el.id] = setInterval(function() { $.appereance(el, order[el.id][squarePos[el.id]]); }, params[el.id].sDelay); $(el).css({ 'background-image': "url(" + images[el.id][imagePos[el.id]] + ")" }); if (typeof direction == "undefined") { imagePos[el.id]++; } else if (direction == "prev") { imagePos[el.id]--; } else { imagePos[el.id] = direction; } if (imagePos[el.id] == images[el.id].length) { imagePos[el.id] = 0; } if (imagePos[el.id] == -1) { imagePos[el.id] = images[el.id].length - 1; } $(".cs-button-" + el.id).removeClass("cs-active"); $("#cs-button-" + el.id + "-" + (imagePos[el.id] + 1)).addClass("cs-active"); if (titles[el.id][imagePos[el.id]]) { $("#cs-title-" + el.id).css({ opacity: 0 }).animate({ opacity: params[el.id].opacity }, params[el.id].titleSpeed); $("#cs-title-" + el.id).html(titles[el.id][imagePos[el.id]]); } else { $("#cs-title-" + el.id).css("opacity", 0); } }; $.appereance = function(el, sid) { $(".cs-" + el.id).attr("href", links[el.id][imagePos[el.id]]).attr("target", linksTarget[el.id][imagePos[el.id]]); if (squarePos[el.id] == params[el.id].spw * params[el.id].sph) { clearInterval(appInterval[el.id]); return; } $("#cs-" + el.id + sid).css({ opacity: 0, 'background-image': "url(" + images[el.id][imagePos[el.id]] + ")" }); $("#cs-" + el.id + sid).animate({ opacity: 1 }, 300); squarePos[el.id]++; }; $.setNavigation = function(el) { $(el).append("<div id='cs-navigation-" + el.id + "'></div>"); $("#cs-navigation-" + el.id).hide(); $("#cs-navigation-" + el.id).append("<a href='#' id='cs-prev-" + el.id + "' class='cs-prev'>prev</a>"); $("#cs-navigation-" + el.id).append("<a href='#' id='cs-next-" + el.id + "' class='cs-next'>next</a>"); $("#cs-prev-" + el.id).css({ position: "absolute", top: params[el.id].height / 2 - 15, left: 0, 'z-index': 1001, 'line-height': "30px", opacity: params[el.id].opacity }).click(function(e) { e.preventDefault(); $.transition(el, "prev"); $.transitionCall(el); }).mouseover(function() { $("#cs-navigation-" + el.id).show(); }); $("#cs-next-" + el.id).css({ position: "absolute", top: params[el.id].height / 2 - 15, right: 0, 'z-index': 1001, 'line-height': "30px", opacity: params[el.id].opacity }).click(function(e) { e.preventDefault(); $.transition(el); $.transitionCall(el); }).mouseover(function() { $("#cs-navigation-" + el.id).show(); }); $("<div id='cs-buttons-" + el.id + "' class='cs-buttons'></div>").appendTo($("#coin-slider-" + el.id)); for (k = 1; k < images[el.id].length + 1; k++) { $("#cs-buttons-" + el.id).append("<a href='#' class='cs-button-" + el.id + "' id='cs-button-" + el.id + "-" + k + "'>" + k + "</a>"); } $.each($(".cs-button-" + el.id), function(i, item) { $(item).click(function(e) { $(".cs-button-" + el.id).removeClass("cs-active"); $(this).addClass("cs-active"); e.preventDefault(); $.transition(el, i); $.transitionCall(el); }); }); $("#cs-navigation-" + el.id + " a").mouseout(function() { $("#cs-navigation-" + el.id).hide(); params[el.id].pause = false; }); $("#cs-buttons-" + el.id).css({ left: "50%", 'margin-left': -images[el.id].length * 15 / 2 - 5, position: "relative" }); }; $.effect = function(el) { effA = ["random", "swirl", "rain", "straight"]; if (params[el.id].effect == "") { eff = effA[Math.floor(Math.random() * effA.length)]; } else { eff = params[el.id].effect; } order[el.id] = new Array; if (eff == "random") { counter = 0; for (i = 1; i <= params[el.id].sph; i++) { for (j = 1; j <= params[el.id].spw; j++) { order[el.id][counter] = i + "" + j; counter++; } } $.random(order[el.id]); } if (eff == "rain") { $.rain(el); } if (eff == "swirl") { $.swirl(el); } if (eff == "straight") { $.straight(el); } reverse[el.id] *= -1; if (reverse[el.id] > 0) { order[el.id].reverse(); } }; $.random = function(arr) { var i = arr.length; if (i == 0) { return false; } while (--i) { var j = Math.floor(Math.random() * (i + 1)); var tempi = arr[i]; var tempj = arr[j]; arr[i] = tempj; arr[j] = tempi; } }; $.swirl = function(el) { var n = params[el.id].sph; var m = params[el.id].spw; var x = 1; var y = 1; var going = 0; var num = 0; var c = 0; var dowhile = true; while (dowhile) { num = going == 0 || going == 2 ? m : n; for (i = 1; i <= num; i++) { order[el.id][c] = x + "" + y; c++; if (i != num) { switch (going) { case 0: y++; break; case 1: x++; break; case 2: y--; break; case 3: x--; break; default: ; } } } going = (going + 1) % 4; switch (going) { case 0: m--; y++; break; case 1: n--; x++; break; case 2: m--; y--; break; case 3: n--; x--; break; default: ; } check = $.max(n, m) - $.min(n, m); if (m <= check && n <= check) { dowhile = false; } } }; $.rain = function(el) { var n = params[el.id].sph; var m = params[el.id].spw; var c = 0; var to = to2 = from = 1; var dowhile = true; while (dowhile) { for (i = from; i <= to; i++) { order[el.id][c] = i + "" + parseInt(to2 - i + 1); c++; } to2++; if (to < n && to2 < m && n < m) { to++; } if (to < n && n >= m) { to++; } if (to2 > m) { from++; } if (from > to) { dowhile = false; } } }; $.straight = function(el) { counter = 0; for (i = 1; i <= params[el.id].sph; i++) { for (j = 1; j <= params[el.id].spw; j++) { order[el.id][counter] = i + "" + j; counter++; } } }; $.min = function(n, m) { if (n > m) { return m; } else { return n; } }; $.max = function(n, m) { if (n < m) { return m; } else { return n; } }; this.each(function() { init(this); }); }; $.fn.coinslider.defaults = { width: 565, height: 290, spw: 7, sph: 5, delay: 3000, sDelay: 30, opacity: 0.7, titleSpeed: 500, effect: "", navigation: true, links: true, hoverPause: true }; })(jQuery); // -----------------------------------------------------------------------------------
