(function (j) { function Ja(oa, U) { function I() { u.addClass("jquery-slider"); c.settings.skin != "" && u.addClass(c.settings.skin); A = j('
').appendTo(u).css({ width: c.settings.width, height: c.settings.height }).hover(function () { if (c.settings.timerAnimation && c.settings.fadeTimer && C != "stop" && !E) { var g = u.find(".timer-animation"); j.browser.msie ? g.css("filter", "") : g.stop().animate({ opacity: 1 }, c.settings.timerFadeDuration) } V = true; c.settings.slideshow && c.settings.pauseSlideshowOnHover && C != "stop" && !E && ea(); Z && c.settings.hideCaption && Aa() }, function () { if (c.settings.timerAnimation && c.settings.fadeTimer && C != "stop" && !E) { var g = u.find(".timer-animation"); j.browser.msie ? g.css("opacity", 0) : g.stop().animate({ opacity: 0 }, c.settings.timerFadeDuration) } V = false; c.settings.slideshow && c.settings.pauseSlideshowOnHover && C != "stop" && !E && pa(); Z && c.settings.hideCaption && Ba() }); u.css({ width: A.outerWidth(true), height: A.outerHeight(true) }); c.settings.shuffle && w.sort(function () { return 0.5 - Math.random() }); c.settings.lightbox && j.fn.prettyPhoto({ default_width: c.settings.lightboxDefaultWidth, default_height: c.settings.lightboxDefaultHeight, theme: c.settings.lightboxTheme, opacity: c.settings.lightboxOpacity, horizontal_padding: c.settings.lightboxHorizontalPadding, callback: function () { qa = false; c.settings.slideshow && C != "stop" && pa() } }); c.settings.navigationArrows && Ka(); c.settings.navigationButtons && La(); c.settings.thumbnailsType == "navigation" && Ma(); c.settings.slideshowControls && Na(); if (c.settings.slidesPreloaded) { Ca(); for (var a = 0, b = c.settings.slidesPreloaded == -1 ? w.length : c.settings.slidesPreloaded, d = 0; d < b; d++) j("").load(function () { a++; if (a == b) { ra(); Q(c.settings.slideStart) } }).error(function () { a++ }).attr("src", w[d].path) } else Q(c.settings.slideStart) } function Ka() { var a = c.settings.fadeNavigationArrows == true ? 0 : 1, b = j('').appendTo(A), d = j('').css({ opacity: a }).mouseover(function () { j(this).stop().css("opacity", 1) }).click(function () { $() }).appendTo(b); a = j('').css({ opacity: a }).mouseover(function () { j(this).stop().css("opacity", 1) }).click(function () { aa() }).appendTo(b); if (c.settings.navigationArrowsCenter) { b = (c.settings.height - d.outerHeight()) / 2; d.css("top", b); a.css("top", b) } } function Na() { var a = j('
').appendTo(A), b = c.settings.fadeSlideshowControls == true ? 0 : 1; a.addClass(c.settings.slideshow ? "pause" : "play").css("opacity", b).mouseover(function () { j(this).stop().css("opacity", 1) }).click(function () { if (j(this).hasClass("pause")) { j(this).removeClass("pause").addClass("play"); C = "stop"; fa() } else if (j(this).hasClass("play")) { if (!c.settings.slideshow) c.settings.slideshow = true; j(this).removeClass("play").addClass("pause"); C = "play"; sa() } }); if (c.settings.slideshowControlsCenter) { b = (c.settings.height - a.outerHeight()) / 2; var d = (c.settings.width - a.outerWidth()) / 2; a.css({ top: b, left: d }) } } function La() { for (var a = w.length, b = j('').appendTo(u), d = 0; d < a; d++) j('').appendTo(b).bind({ mouseover: function () { var g = j(this).attr("rel"); j(this).hasClass("select") || j(this).addClass("over"); c.settings.thumbnailsType == "tooltip" && Oa(g) }, mouseout: function () { j(this).hasClass("select") || j(this).removeClass("over"); c.settings.thumbnailsType == "tooltip" && Pa() }, click: function () { Q(parseInt(j(this).attr("rel"))) } }); if (c.settings.navigationButtonsCenter) { a = (A.outerWidth(true) - b.outerWidth()) / 2; b.css("left", a) } b.css("top", A.outerHeight(true) + c.settings.navigationButtonsDistance); b = parseInt(b.css("top")) + b.outerHeight(); b = u.outerHeight() < b ? b - u.outerHeight() : 0; u.css("height", u.outerHeight() + b) } function Oa(a) { if (w[a].thumbnail) { var b = u.find(".navigation-buttons a").eq(a), d = w[a].thumbnail, g = j('
').css({ width: c.settings.thumbnailWidth, height: c.settings.thumbnailHeight }).appendTo(u.find(".navigation-buttons")); a = parseInt(b.position().left) - (parseInt(g.outerWidth(true)) - parseInt(b.css("width"))) / 2; b = parseInt(b.position().top) - parseInt(g.outerHeight(true)); g.css({ left: a, top: b - c.settings.thumbnailSlideAmount, opacity: 0 }); j("").load(function () { g.css("background-image", "url(" + d + ")") }).attr("src", d); g.animate({ top: b, opacity: 1 }, c.settings.thumbnailSlideDuration, c.settings.thumbnailSlideEasing) } } function Pa() { var a = u.find(".navigation-buttons .thumbnail"); a && a.animate({ top: parseInt(a.css("top")) - c.settings.thumbnailSlideAmount, opacity: 0 }, c.settings.thumbnailSlideDuration, c.settings.thumbnailSlideEasing, function () { a.remove() }) } function Q(a) { if (a != y) { if (E) if (c.settings.overrideTransition) { fa(); ta() } else return; c.settings.slideshow && fa(); if (Z) { Z = false; Ba(true) } E = true; L = y; y = a; var b = w[y]; if (b.path) { Ca(); j("").load(function () { b.width = j(this).attr("width"); b.height = j(this).attr("height"); ra(); Da() }).error(function () { ra(); E = false; y > L ? aa() : $() }).attr("src", b.path) } else { b.width = c.settings.width; b.height = c.settings.height; Da() } if (c.settings.navigationButtons) { var d = u.find(".navigation-buttons"); d.find(".select").removeClass("select"); d.find("a").eq(a).attr("class", "select") } if (c.settings.thumbnailsType == "navigation") { p.find(".thumbnail.select").removeClass("select"); p.find("a").eq(a).removeClass("over").addClass("select"); if (c.settings.thumbnailSync) { a = Math.floor(a / c.settings.visibleThumbnails); a != J && W(a) } } a = { type: "slideOpen", index: y, data: w[y] }; j.isFunction(c.settings.slideOpen) && c.settings.slideOpen.call(this, a) } } function aa() { Q(y == w.length - 1 ? 0 : y + 1) } function $() { Q(y == 0 ? w.length - 1 : y - 1) } function Ca() { var a = j('
').hide().fadeIn(300).appendTo(u), b = (A.outerWidth(true) - a.outerWidth(true)) * 0.5, d = (A.outerHeight(true) - a.outerHeight(true)) * 0.5; a.css({ left: b, top: d }) } function ra() { u.find(".preloader").remove() } function Da() { var a = w[y], b = a.properties, d = b.alignType, g = b.htmlDuringTransition, h = parseInt(b.horizontalSlices), e = parseInt(b.verticalSlices), f = b.slicePattern, i = b.effectType, m = b.slicePoint, n = b.slideStartPosition, s = parseFloat(b.slideStartRatio), o = parseInt(b.sliceDuration), k = b.sliceEasing, q = parseInt(b.sliceDelay), v = b.sliceFade == true || i == "fade" ? 0 : 1, t = b.simpleSlideDirection, r = b.simpleSlideDuration, x = b.simpleSlideEasing; if (B && i == "simpleSlide") if (B.is(":animated")) { B.appendTo(A); B.stop().css({ top: 0, left: 0 }); A.find(".simple-slide-container").remove() } if (L != -1) { var M = u.find(".slide").css("z-index"); N = u.find(".slide").css("z-index", M - 1); M = w[L].width; var X = w[L].height, ga = a.width, R = a.height; if (i != "simpleSlide" && (ga < c.settings.width && ga < M || R < c.settings.height && R < X)) N.fadeOut(300) } B = j('
').appendTo(A); B.hover(function () { c.settings.navigationArrows && c.settings.fadeNavigationArrows && u.find(".navigation-arrows a").stop().animate({ opacity: 1 }, 500); c.settings.slideshowControls && c.settings.fadeSlideshowControls && u.find(".slideshow-controls").stop().animate({ opacity: 1 }, 500); var S = { type: "slideMouseOver", index: y, data: a }; j.isFunction(c.settings.slideMouseOver) && c.settings.slideMouseOver.call(this, S) }, function () { c.settings.navigationArrows && c.settings.fadeNavigationArrows && u.find(".navigation-arrows a").stop().animate({ opacity: 0 }, 500); c.settings.slideshowControls && c.settings.fadeSlideshowControls && u.find(".slideshow-controls").stop().animate({ opacity: 0 }, 500); var S = { type: "slideMouseOut", index: y, data: a }; j.isFunction(c.settings.slideMouseOut) && c.settings.slideMouseOut.call(this, S) }); B.click(function () { var S = { type: "slideClick", index: y, data: a }; j.isFunction(c.settings.slideClick) && c.settings.slideClick.call(this, S) }); M = Math.floor(Math.min(a.width, c.settings.width) / h); X = Math.floor(Math.min(a.height, c.settings.height) / e); ga = a.width > c.settings.width ? Ea(d, a.width, c.settings.width) : 0; d = a.height > c.settings.height ? Fa(d, a.height, c.settings.height) : 0; R = a.width < c.settings.width ? Math.floor((c.settings.width - a.width) / 2) : 0; var ha = a.height < c.settings.height ? Math.floor((c.settings.height - a.height) / 2) : 0, Ga = []; b.slideMask && B.css("overflow", "hidden"); if (i == "random") i = ba(["scale", "width", "height", "slide", "fade", "simpleSlide"]); if (i == "simpleSlide") { var ia = j('
').css({ overflow: "hidden", position: "absolute", width: "100%", height: "100%" }).appendTo(A); a.path && B.css({ "background-image": "url(" + a.path + ")", "background-position": R + "px " + ha + "px", "background-repeat": "no-repeat" }).appendTo(ia); if (a.html && g) { b = a.html.clone(); b.css({ left: R, top: ha, width: a.width, height: a.height, overflow: "hidden", position: "absolute" }); B.html(b).appendTo(ia) } N && N.appendTo(ia); if (t == "random") t = ba(["autoHorizontal", "autoVertical", "rightToLeft", "leftToRight", "topToBottom", "bottomToTop"]); i = {}; var F, K; switch (t) { case "autoHorizontal": F = "left"; K = y > L ? c.settings.width : -c.settings.width; break; case "autoVertical": F = "top"; K = y > L ? c.settings.height : -c.settings.height; break; case "rightToLeft": F = "left"; K = c.settings.width; break; case "leftToRight": F = "left"; K = -c.settings.width; break; case "topToBottom": F = "top"; K = -c.settings.height; break; case "bottomToTop": F = "top"; K = c.settings.height; break; default: F = "left"; K = y > L ? c.settings.width : -c.settings.width } B.css(F, K); i[F] = 0; B.animate(i, { duration: r, easing: x, complete: function () { B.appendTo(A); ia.remove(); ta() }, step: function (S) { N && N.css(F, S - K) } }) } else { for (t = 0; t < h; t++) for (r = 0; r < e; r++) { x = j('
').css({ left: t * M + R, top: r * X + ha, width: M, height: X, opacity: v, visibility: "hidden" }).data({ hPos: t, vPos: r }).appendTo(B); a.path && x.css({ "background-image": "url(" + a.path + ")", "background-position": -(t * M + ga) + "px " + -(r * X + d) + "px", "background-repeat": "no-repeat" }); if (a.html && g) { b = a.html.clone().css({ left: -t * M + R, top: -r * X + ha, width: a.width, height: a.height, overflow: "hidden", position: "absolute" }); x.html(b).css("overflow", "hidden") } Ga.push(x) } if (f == "random") f = ba(["randomPattern", "topToBottom", "bottomToTop", "leftToRight", "rightToLeft", "topLeftToBottomRight", "topRightToBottomLeft", "bottomLeftToTopRight", "bottomRightToTopLeft", "horizontalMarginToCenter", "horizontalCenterToMargin", "marginToCenter", "verticalCenterToMargin", "skipOneTopToBottom", "skipOneBottomToTop", "skipOneLeftToRight", "skipOneRightToLeft", "skipOneHorizontal", "skipOneVertical", "spiralMarginToCenterCW", "spiralMarginToCenterCCW", "spiralCenterToMarginCW", "spiralCenterToMarginCCW"]); if (h == 1 && e == 1) f = "topToBottom"; if (m == "random") m = ba(["leftTop", "leftCenter", "leftBottom", "centerTop", "centerCenter", "centerBottom", "rightTop", "rightCenter", "rightBottom"]); if (n == "random") n = ba(["left", "right", "top", "bottom", "leftTop", "rightTop", "leftBottom", "horizontalAlternative", "verticalAlternative"]); g = Qa(Ga, f, h, e); h = g.length; for (t = 0; t < h; t++) Ra(g[t], t, h, i, m, n, s, o, k, q) } i = { type: "transitionStart", index: y, data: a }; j.isFunction(c.settings.transitionStart) && c.settings.transitionStart.call(this, i) } function ta() { var a = w[y], b = a.properties.alignType, d = Ea(b, a.width, c.settings.width); b = Fa(b, a.height, c.settings.height); var g = a.properties.effectType, h = a.properties.htmlDuringTransition; E = false; if (g != "simpleSlide") { B.find(".slice").each(function () { clearTimeout(j(this).data("timer")); j(this).remove() }); a.path && B.css({ "background-image": "url(" + a.path + ")", "background-position": -d + "px " + -b + "px", "background-repeat": "no-repeat" }); if (a.html) { d = a.html.css({ width: "100%", height: "100%" }); B.html(d) } } else if (a.html && !h) { d = a.html.css({ width: "100%", height: "100%" }); B.html(d) } if (a.link) { B.css("cursor", "pointer"); B.click(function () { window.open(a.link, a.properties.linkTarget) }) } if (c.settings.lightbox && a.lightboxContent) { B.css("cursor", "pointer"); B.click(function () { c.settings.slideshow && C != "stop" && ea(); qa = true; j.prettyPhoto.changeSettings({ default_width: a.properties.lightboxDefaultWidth, default_height: a.properties.lightboxDefaultHeight, theme: a.properties.lightboxTheme, opacity: a.properties.lightboxOpacity, horizontal_padding: a.properties.lightboxHorizontalPadding }); j.prettyPhoto.open(a.lightboxContent, a.lightboxTitle, a.lightboxDescription) }) } N && N.remove(); c.settings.slideshow && C != "stop" && sa(); c.settings.slideshow && c.settings.pauseSlideshowOnHover && V && ea(); a.caption && Sa(); d = { type: "transitionComplete", index: y, data: a }; j.isFunction(c.settings.transitionComplete) && c.settings.transitionComplete.call(this, d) } function ba(a) { return a[Math.floor(Math.random() * a.length)] } function Ra(a, b, d, g, h, e, f, i, m, n) { var s = {}, o = {}, k = parseInt(a.css("width")), q = parseInt(a.css("height")), v = parseInt(a.css("left")), t = parseInt(a.css("top")), r, x; if (g == "scale" || g == "width" || g == "height") switch (h) { case "centerCenter": x = t + q * 0.5; r = v + k * 0.5; break; case "rightCenter": x = t + q * 0.5; r = v + k; break; case "leftCenter": x = t + q * 0.5; r = v; break; case "centerTop": x = t; r = v + k * 0.5; break; case "rightTop": x = t; r = v + k; break; case "leftTop": x = t; r = v; break; case "centerBottom": x = t + q; r = v + k * 0.5; break; case "rightBottom": x = t + q; r = v + k; break; case "leftBottom": x = t + q; r = v; break; default: x = t + q * 0.5; r = v + k * 0.5 } else if (g == "slide") switch (e) { case "left": x = t; r = v - k * f; break; case "right": x = t; r = v + k * f; break; case "top": x = t - q * f; r = v; break; case "bottom": x = t + q * f; r = v; break; case "leftTop": x = t - q * f; r = v - k * f; break; case "rightTop": x = t - q * f; r = v + k * f; break; case "leftBottom": x = t + q * f; r = v - k * f; break; case "rightBottom": x = t + q * f; r = v + k * f; break; case "horizontalAlternative": x = t; r = v + k * f * (b % 2 == 0 ? 1 : -1); break; case "verticalAlternative": x = t + q * f * (b % 2 == 0 ? 1 : -1); r = v; break; default: x = t; r = v - k * f } switch (g) { case "fade": o = { opacity: 1 }; break; case "scale": s = { width: 0, height: 0, left: r, top: x }; o = { width: k, height: q, left: v, top: t, opacity: 1 }; break; case "width": s = { width: 0, left: r }; o = { width: k, left: v, opacity: 1 }; break; case "height": s = { height: 0, top: x }; o = { height: q, top: t, opacity: 1 }; break; case "slide": s = { left: r, top: x }; o = { left: v, top: t, opacity: 1 }; break; default: o = { opacity: 1 } } a.css(s); g = setTimeout(function () { a.css("visibility", "visible"); a.animate(o, i, m, function () { b == d - 1 && ta() }) }, b * n); a.data("timer", g) } function Sa() { Z = true; var a = w[y], b = a.properties, d = b.captionBackgroundOpacity; b = b.captionBackgroundColor; var g = j('
').appendTo(A); g = j('
').appendTo(g); j('
').css({ opacity: d, "background-color": b }).appendTo(g); j('
').html(a.caption).appendTo(g); if (!c.settings.hideCaption || c.settings.hideCaption && V) Aa() } function Aa() { var a = w[y], b = a.properties, d = b.captionPosition, g = parseInt(b.captionSize), h = parseInt(b.captionWidth), e = parseInt(b.captionHeight), f = parseInt(b.captionLeft), i = parseInt(b.captionTop), m = b.captionShowEffect, n = parseInt(b.captionShowEffectDuration), s = b.captionShowEffectEasing; b = b.captionShowSlideDirection; var o = Math.min(a.width, c.settings.width); a = Math.min(a.height, c.settings.height); h = d == "custom" ? h : o; e = d == "custom" ? e : a; f = d == "custom" ? f : (c.settings.width - h) / 2; i = d == "custom" ? i : (c.settings.height - e) / 2; a = A.find(".caption"); o = a.find(".wrapper"); var k = o.find(".background"), q = o.find(".content"), v = m == "fade" ? 0 : g; switch (d) { case "left": a.css({ width: g, height: e, left: f, top: i }); b == "auto" && o.css({ width: g, height: e, left: -v, top: 0 }); break; case "right": a.css({ width: g, height: e, right: f, top: i }); b == "auto" && o.css({ width: g, height: e, left: v, top: 0 }); break; case "top": a.css({ width: h, height: g, left: f, top: i }); b == "auto" && o.css({ width: h, height: g, left: 0, top: -v }); break; case "bottom": a.css({ width: h, height: g, left: f, bottom: i }); b == "auto" && o.css({ width: h, height: g, left: 0, top: v }); break; case "custom": a.css({ width: h, height: e, left: f, top: i }); o.css({ width: h, height: e, left: 0, top: 0 }); break; case "default": a.css({ width: h, height: g, left: f, bottom: i }); b == "auto" && o.css({ width: h, height: g, left: 0, top: v }) } if (m == "fade") if (j.browser.msie) if (j.browser.version != "6.0") { q.css({ opacity: 0 }); q.animate({ opacity: 1 }, n, s); k.css({ opacity: 0 }); k.animate({ opacity: c.settings.captionBackgroundOpacity }, n, s) } else { o.css("opacity", 1); q.css("opacity", 1); k.css("opacity", 1); o.css("background-color", c.settings.captionBackgroundColor) } else { o.css({ opacity: 0 }); o.animate({ opacity: 1 }, n, s) } else { o.css({ opacity: 1 }); q.css("opacity", 1); k.css("opacity", c.settings.captionBackgroundOpacity); d == "custom" && a.css({ width: h, height: e, left: f, top: i }); if (b == "topToBottom") o.css({ width: h, height: e, left: 0, top: -e }); else if (b == "bottomToTop") o.css({ width: h, height: e, left: 0, top: e }); else if (b == "leftToRight") o.css({ width: h, height: e, left: -h, top: 0 }); else b == "rightToLeft" && o.css({ width: h, height: e, left: h, top: 0 }); j.browser.msie && j.browser.version == "6.0" && o.css("background-color", c.settings.captionBackgroundColor); o.animate({ top: 0, left: 0 }, n, s) } } function Ba(a) { var b = A.find(".caption"), d = b.find(".wrapper"), g = d.find(".background"), h = d.find(".content"), e = w[y].properties, f = e.captionPosition, i = e.captionHideEffect, m = parseInt(e.captionHideEffectDuration), n = e.captionHideEffectEasing; e = e.captionHideSlideDirection; if (i == "fade") if (j.browser.msie) if (j.browser.version != "6.0") { h.animate({ opacity: 0 }, m, n, function () { a && b.remove() }); g.animate({ opacity: 0 }, m, n) } else { h.css("opacity", 0); g.css("opacity", 0); d.css("opacity", 0); a && b.remove() } else d.animate({ opacity: 0 }, m, n, function () { a && b.remove() }); else if (e == "topToBottom") d.animate({ top: parseInt(d.css("height")) }, m, function () { a && b.remove() }); else if (e == "bottomToTop") d.animate({ top: -parseInt(d.css("height")) }, m, function () { a && b.remove() }); else if (e == "leftToRight") d.animate({ left: parseInt(d.css("width")) }, m, function () { a && b.remove() }); else if (e == "rightToLeft") d.animate({ left: -parseInt(d.css("width")) }, m, function () { a && b.remove() }); else if (e == "auto") switch (f) { case "left": d.animate({ left: -parseInt(d.css("width")) }, m, function () { a && b.remove() }); break; case "right": d.animate({ left: parseInt(d.css("width")) }, m, function () { a && b.remove() }); break; case "top": d.animate({ top: -parseInt(d.css("height")) }, m, function () { a && b.remove() }); break; case "bottom": d.animate({ top: parseInt(d.css("height")) }, m, function () { a && b.remove() }); break; case "custom": d.animate({ top: parseInt(d.css("height")) }, m, function () { a && b.remove() }); break; case "default": d.animate({ top: parseInt(d.css("height")) }, m, function () { a && b.remove() }) } } function sa() { var a = w[y].properties.slideshowDelay || c.settings.slideshowDelay; c.settings.timerAnimation && Ta(a); ja = 0; ka = (new Date).getTime(); G && clearTimeout(G); G = setTimeout(function () { if (c.settings.slideshowDirection == "next") aa(); else c.settings.slideshowDirection == "previous" && $() }, a) } function fa() { G && clearTimeout(G); c.settings.timerAnimation && Ua() } function ea() { G && clearTimeout(G); ja += (new Date).getTime() - ka } function pa() { var a = w[y].properties.slideshowDelay || c.settings.slideshowDelay; ka = (new Date).getTime(); G && clearTimeout(G); G = setTimeout(function () { if (c.settings.slideshowDirection == "next") aa(); else c.settings.slideshowDirection == "previous" && $() }, a - ja) } function Ta(a) { var b = document.createElement("canvas"), d = Math.max(c.settings.timerStrokeWidth1, c.settings.timerStrokeWidth2) + c.settings.timerRadius * 2, g = d / 2, h = Math.PI / 180, e = 0, f, i, m = c.settings.timerStrokeOpacity1, n = c.settings.timerStrokeOpacity2, s = Y(c.settings.timerStrokeColor1).red, o = Y(c.settings.timerStrokeColor1).green, k = Y(c.settings.timerStrokeColor1).blue, q = Y(c.settings.timerStrokeColor2).red, v = Y(c.settings.timerStrokeColor2).green, t = Y(c.settings.timerStrokeColor2).blue; b.width = b.height = d; j(b).attr("class", "timer-animation").appendTo(A); if (c.settings.fadeTimer && !V) j(b).css("opacity", 0); else j.browser.msie || j(b).css({ opacity: 0 }).stop().animate({ opacity: 1 }, c.settings.timerFadeDuration); if (j.browser.msie && parseInt(j.browser.version) < 9) b = G_vmlCanvasManager.initElement(b); var r = b.getContext("2d"); r.beginPath(); r.lineWidth = c.settings.timerStrokeWidth1; r.strokeStyle = "rgba(" + s + ", " + o + ", " + k + ", " + m + ")"; r.arc(g, g, c.settings.timerRadius, 0, 2 * Math.PI, false); r.stroke(); ua = setInterval(function () { if (e <= 360 && !(c.settings.pauseSlideshowOnHover && V || qa)) { f = (new Date).getTime(); i = f - ka; e = (ja + i) / a * 360 + 1; if (e > 360) e = 360; b.width = b.width; r.beginPath(); r.lineWidth = c.settings.timerStrokeWidth1; r.strokeStyle = "rgba(" + s + ", " + o + ", " + k + ", " + m + ")"; r.arc(g, g, c.settings.timerRadius, 0, 2 * Math.PI, false); r.stroke(); r.beginPath(); r.lineWidth = c.settings.timerStrokeWidth2; r.strokeStyle = "rgba(" + q + ", " + v + ", " + t + ", " + n + ")"; r.arc(g, g, c.settings.timerRadius, 0, e * h, false); r.stroke() } }, 20) } function Ua() { ua && clearInterval(ua); var a = u.find(".timer-animation"); if (a) j.browser.msie ? a.remove() : a.stop().animate({ opacity: 0 }, c.settings.timerFadeDuration, function () { a.remove() }) } function Ea(a, b, d) { var g = 0; if (a == "centerTop" || a == "centerCenter" || a == "centerBottom" || b < d) g = Math.floor((b - d) / 2); else if (a == "rightTop" || a == "rightCenter" || a == "rightBottom") g = b - d; return g } function Fa(a, b, d) { var g = 0; if (a == "leftCenter" || a == "centerCenter" || a == "rightCenter" || b < d) g = Math.floor((b - d) / 2); else if (a == "leftBottom" || a == "centerBottom" || a == "rightBottom") g = b - d; return g } function Ma() { var a = w.length; p = j('').appendTo(u); z = j('
').appendTo(p); D = j('
').appendTo(z); T = Math.ceil(w.length / c.settings.visibleThumbnails); for (var b = 0; b < a; b++) { var d = j('').css({ "background-image": "url(" + w[b].thumbnail + ")", width: c.settings.thumbnailWidth, height: c.settings.thumbnailHeight }).appendTo(D); c.settings.thumbnailOrientation == "horizontal" ? d.css("left", b * d.outerWidth(true)) : d.css("top", b * d.outerHeight(true)); if (w[b].thumbnailCaption) { var g = j('
').appendTo(d); j('
').appendTo(g); var h = j('
' + w[b].thumbnailCaption + "
").appendTo(g); g.css("height", h.outerHeight(true)); c.settings.thumbnailCaptionPosition == "top" ? g.css({ top: 0 }) : g.css({ bottom: 0 }); if (c.settings.hideThumbnailCaption) if (c.settings.thumbnailCaptionEffect == "slide") c.settings.thumbnailCaptionPosition == "top" ? g.css({ top: -g.outerHeight(true) }) : g.css({ bottom: -g.outerHeight(true) }); else g.hide() } d.hover(function () { j(this).hasClass("select") || j(this).addClass("over"); var m = j(this).find(".caption"); if (m) if (c.settings.hideThumbnailCaption) if (c.settings.thumbnailCaptionEffect == "slide") c.settings.thumbnailCaptionPosition == "top" ? m.stop().animate({ top: 0 }, c.settings.thumbnailCaptionShowDuration) : m.stop().animate({ bottom: 0 }, c.settings.thumbnailCaptionShowDuration); else m.stop(false, true).fadeIn(c.settings.thumbnailCaptionShowDuration, c.settings.thumbnailCaptionEasing); c.settings.thumbnailTooltip && Va(parseInt(j(this).attr("rel"))) }, function () { j(this).hasClass("select") || j(this).removeClass("over"); var m = j(this).find(".caption"); if (m) if (c.settings.hideThumbnailCaption) if (c.settings.thumbnailCaptionEffect == "slide") c.settings.thumbnailCaptionPosition == "top" ? m.stop().animate({ top: -m.outerHeight(true) }, c.settings.thumbnailCaptionHideDuration, c.settings.thumbnailCaptionEasing) : m.stop().animate({ bottom: -m.outerHeight(true) }, c.settings.thumbnailCaptionHideDuration, c.settings.thumbnailCaptionEasing); else m.stop(false, true).fadeOut(c.settings.thumbnailCaptionHideDuration, c.settings.thumbnailCaptionEasing); c.settings.thumbnailTooltip && Wa() }); d.click(function () { Q(parseInt(j(this).attr("rel"))) }) } d = p.find(".thumbnail").outerWidth(true); g = p.find(".thumbnail").outerHeight(true); if (c.settings.thumbnailOrientation == "horizontal") { p.css({ width: d * Math.min(a, c.settings.visibleThumbnails), height: g, top: A.outerHeight(true) + c.settings.navigationThumbnailsDistance }); z.css({ width: d * Math.min(a, c.settings.visibleThumbnails), height: g }); H = w.length * d } else { p.css({ width: d, height: g * Math.min(a, c.settings.visibleThumbnails), left: A.outerWidth(true) + c.settings.navigationThumbnailsDistance }); z.css({ width: d, height: g * Math.min(a, c.settings.visibleThumbnails) }); H = w.length * g } if (c.settings.fadeNavigationThumbnails) { p.css({ opacity: 0 }); p.hover(function () { j.browser.msie ? p.css("filter", "") : p.stop(false, true).animate({ opacity: 1 }, c.settings.navigationThumbnailsShowDuration) }, function () { j.browser.msie ? p.css("opacity", 0) : p.stop(false, true).animate({ opacity: 0 }, c.settings.navigationThumbnailsHideDuration) }) } if (c.settings.visibleThumbnails < a) { if (c.settings.thumbnailArrows) { var e = j('
').appendTo(p); b = j('').click(function () { if (J > 0) { J--; W(J) } else W(T - 1) }).appendTo(e); h = j('').click(function () { if (J < T - 1) { J++; W(J) } else W(0) }).appendTo(e); if (c.settings.thumbnailOrientation == "horizontal") { p.css("width", d * Math.min(a, c.settings.visibleThumbnails) + 2 * (b.outerWidth() + c.settings.thumbnailArrowsDistance)); z.css("left", Math.round((p.outerWidth() - z.outerWidth()) / 2)); b.css({ left: 0, top: Math.round((p.outerHeight() - b.outerHeight()) / 2) }); h.css({ right: 0, top: Math.round((p.outerHeight() - h.outerHeight()) / 2) }) } else { p.css("height", g * Math.min(a, c.settings.visibleThumbnails) + 2 * (b.outerHeight() + c.settings.thumbnailArrowsDistance)); z.css("top", Math.round((p.outerHeight() - z.outerHeight()) / 2)); b.css({ top: 0, left: Math.round((p.outerWidth() - b.outerWidth()) / 2) }); h.css({ bottom: 0, left: Math.round((p.outerWidth() - h.outerWidth()) / 2) }); b.addClass("vertical"); h.addClass("vertical") } if (c.settings.fadeThumbnailArrows) { e.hide(); p.hover(function () { e.stop(false, true).fadeIn(c.settings.thumbnailArrowsShowDuration) }, function () { e.stop(false, true).fadeOut(c.settings.thumbnailArrowsHideDuration) }) } } if (c.settings.thumbnailButtons) { var f = j('
').appendTo(p), i; for (b = 0; b < T; b++) { a = j('').appendTo(f); if (c.settings.thumbnailOrientation == "horizontal") { i = a.outerWidth(true); a.css({ left: b * i }) } else { i = a.outerHeight(true); a.css({ top: b * i }) } a.bind({ mouseover: function () { j(this).hasClass("select") || j(this).addClass("over") }, mouseout: function () { j(this).hasClass("select") || j(this).removeClass("over") }, click: function () { var m = parseInt(j(this).attr("rel")); W(m) } }) } a = {}; b = {}; if (c.settings.thumbnailOrientation == "horizontal") { b.width = i * T; b.height = i } else { b.height = i * T; b.width = i } f.css(b); if (c.settings.thumbnailOrientation == "horizontal") { p.css("height", g + f.outerHeight(true) + c.settings.thumbnailButtonsDistance); a.left = (p.outerWidth() - f.outerWidth()) / 2; a.top = z.outerHeight() + c.settings.thumbnailButtonsDistance } else { p.css("width", d + f.outerWidth(true) + c.settings.thumbnailButtonsDistance); a.top = (p.outerHeight() - f.outerHeight()) / 2; a.left = z.outerWidth() + c.settings.thumbnailButtonsDistance } f.css(a); if (c.settings.fadeThumbnailButtons) { f.hide(); p.hover(function () { f.stop(false, true).fadeIn(c.settings.thumbnailButtonsShowDuration) }, function () { f.stop(false, true).fadeOut(c.settings.thumbnailButtonsHideDuration) }) } f.find("a").eq(0).addClass("select") } } if (c.settings.navigationThumbnailsCenter) { i = {}; if (c.settings.thumbnailOrientation == "horizontal") i.left = (A.outerWidth(true) - p.outerWidth(true)) / 2; else i.top = (A.outerHeight(true) - p.outerHeight(true)) / 2; p.css(i) } c.settings.thumbnailTooltip && j('
').hide().appendTo(p); if (c.settings.thumbnailMouseScroll || c.settings.thumbnailTooltip || c.settings.thumbnailScrollbar) j(document).bind("mousemove", function (m) { O = m.pageX; P = m.pageY }); c.settings.thumbnailScrollbar && Xa(); c.settings.thumbnailMouseScroll && Ha(); c.settings.thumbnailMouseWheel && Ya(); if (c.settings.thumbnailOrientation == "horizontal") { i = parseInt(p.css("top")) + p.outerHeight(); i = u.outerHeight() < i ? i - u.outerHeight() : 0; u.css("height", u.outerHeight() + i) } else { i = parseInt(p.css("left")) + p.outerWidth(); i = u.outerWidth() < i ? i - u.outerWidth() : 0; u.css("width", u.outerWidth() + i) } } function Va(a) { if (a = w[a].thumbnailTooltip) { var b = u.find(".tooltip"); b.find(".content").html(a); b.stop(false, true).fadeIn(c.settings.tooltipShowDuration); var d = -b.outerWidth() / 2, g = 0 - b.outerHeight() - parseInt(b.css("marginBottom")); b.css({ left: O - p.offset().left + d, top: P - p.offset().top + g }); j(document).bind("mousemove.tooltip", function () { b.css({ left: O - p.offset().left + d, top: P - p.offset().top + g }) }) } } function Wa() { var a = u.find(".tooltip"); a && a.stop(false, true).fadeOut(c.settings.tooltipHideDuration, function () { j(document).unbind("mousemove.tooltip"); a.css("left", -9999) }) } function W(a) { var b = c.settings.thumbnailOrientation == "horizontal" ? z.outerWidth() : z.outerHeight(), d = a * b; J = a; if (J == T - 1) d = H - b; ca(); D.animate(c.settings.thumbnailOrientation == "horizontal" ? { left: -d } : { top: -d }, { duration: c.settings.thumbnailScrollDuration, easing: c.settings.thumbnailScrollEasing, step: function () { la() }, complete: function () { va() } }); if (c.settings.thumbnailButtons) { b = p.find(".buttons"); b.find(".select").removeClass("select"); b.find("a").eq(a).removeClass("over").addClass("select") } } function Ha() { c.settings.thumbnailMouseScroll = true; var a = 0, b = false, d = z.offset().top, g = z.offset().left, h = z.outerWidth(true), e = z.outerHeight(true), f = c.settings.thumbnailOrientation == "horizontal" ? h : e, i = c.settings.thumbnailOrientation == "horizontal" ? g : d, m = c.settings.thumbnailOrientation == "horizontal" ? "left" : "top", n = parseInt(D.css(m)); wa = setInterval(function () { if (!b) { b = true; d = z.offset().top; g = z.offset().left; h = z.outerWidth(true); e = z.outerHeight(true) } if (O > g && O < g + h && P > d && P < d + e) { a = Math.round((-((H - f + 200) * (((c.settings.thumbnailOrientation == "horizontal" ? O : P) - i) / f)) + 100 - n) * c.settings.thumbnailMouseScrollSpeed / 100); n += a } else if (Math.abs(a) > 0.1) { a *= c.settings.thumbnailMouseScrollEase / 100; n += a } else a = 0; if (Math.abs(a) > 0) { if (n >= 0) n = 0; else if (n <= f - H) n = f - H; la(); D.css(m, n) } }, 30) } function Ya() { c.settings.thumbnailMouseWheel = true; var a = 0, b = c.settings.thumbnailMouseWheelReverse ? -1 : 1, d, g = c.settings.thumbnailOrientation == "horizontal" ? "left" : "top", h = c.settings.thumbnailOrientation == "horizontal" ? z.outerWidth(true) : z.outerHeight(true); z.bind("mousewheel", function (e, f) { e.preventDefault(); if (!xa) { ca(); xa = true; a = d = parseInt(D.css(g)); ya = setInterval(function () { if (Math.abs(a - d) > 0.5) { d += (a - d) * (c.settings.thumbnailMouseWheelSpeed / 100); la(); D.css(g, d) } else va() }, 30) } a += b * f * 10; if (a >= 0) a = 0; else if (a <= h - H) a = h - H }) } function Xa() { function a() { i = (c.settings.thumbnailOrientation == "horizontal" ? O : P) - g.offset()[k] - m; b() } function b() { if (i < 0) i = 0; else if (i > parseInt(g.css(o)) - parseInt(h.css(o))) i = parseInt(g.css(o)) - parseInt(h.css(o)); da && h.css(k, i); n = i / (parseInt(g.css(o)) - parseInt(h.css(o))); if (!ma) { ca(); ma = true; s = parseInt(D.css(k)); za = setInterval(function () { if (Math.abs(Ia() + n) > 0.0010) { var q = (-n * (H - parseInt(z.css(o))) - s) * c.settings.thumbnailScrollbarEase / 100; s += q; la(); D.css(k, s) } else ma && va() }, 30) } } var d = j("
").appendTo(p), g = j('
').appendTo(d), h = j('
').appendTo(g), e = j('
').appendTo(d), f = j('
').appendTo(d), i = 0, m, n = 0, s = 0, o = c.settings.thumbnailOrientation == "horizontal" ? "width" : "height", k = c.settings.thumbnailOrientation == "horizontal" ? "left" : "top"; if (c.settings.thumbnailOrientation == "horizontal") { d.addClass("scrollbar"); d.css({ top: z.outerHeight() + c.settings.thumbnailScrollbarDistance, left: (p.outerWidth() - parseInt(d.css("width"))) / 2 }); p.css("height", p.outerHeight() + c.settings.thumbnailScrollbarDistance + d.outerHeight()) } else { d.addClass("scrollbar-vertical"); d.css({ left: z.outerWidth() + c.settings.thumbnailScrollbarDistance, top: (p.outerHeight() - parseInt(d.css("height"))) / 2 }); p.css("width", p.outerWidth() + c.settings.thumbnailScrollbarDistance + d.outerWidth()) } if (c.settings.fadeThumbnailScrollbar) { d.hide(); p.hover(function () { d.stop(false, true).fadeIn(c.settings.thumbnailScrollbarShowDuration) }, function () { d.stop(false, true).fadeOut(c.settings.thumbnailScrollbarHideDuration) }) } h.bind("mousedown", function (q) { q.preventDefault(); m = (c.settings.thumbnailOrientation == "horizontal" ? O : P) - h.offset()[k]; da = true; j(document).bind("mousemove", a) }); j(document).bind("mouseup", function () { if (da) { da = false; j(document).unbind("mousemove", a) } }); e.bind("click", function () { i = parseInt(h.css(k)) - c.settings.scrollbarArrowScrollAmount; b() }); f.bind("click", function () { i = parseInt(h.css(k)) + c.settings.scrollbarArrowScrollAmount; b() }) } function Ia() { var a = c.settings.thumbnailOrientation == "horizontal" ? "width" : "height"; return parseFloat(D.css(c.settings.thumbnailOrientation == "horizontal" ? "left" : "top")) / (H - parseInt(z.css(a))) } function ca() { wa && clearInterval(wa); if (ya) { xa = false; clearInterval(ya) } if (za) { ma = false; clearInterval(za) } D && D.is(":animated") && D.stop() } function va() { ca(); c.settings.thumbnailMouseScroll && Ha() } function la() { if (c.settings.thumbnailScrollbar && !da) { var a = u.find(".track"), b = a.find(".thumb"); positionProp = c.settings.thumbnailOrientation == "horizontal" ? "left" : "top"; sizeProp = c.settings.thumbnailOrientation == "horizontal" ? "width" : "height"; value = -Ia() * (parseInt(a.css(sizeProp)) - parseInt(b.css(sizeProp))); value > 0 && b.css(positionProp, value) } } function Qa(a, b, d, g) { var h = [], e, f, i = 0; switch (b) { case "randomPattern": for (d = []; a.length;) { i = Math.floor(Math.random() * a.length); d.push(a[i]); a.splice(i, 1) } var m = d.length; for (b = 0; b < m; b++) h[b] = d[b]; break; case "topToBottom": for (f = 0; f < g; f++) for (e = 0; e < d; e++) h.push(l(a, e, f)); break; case "bottomToTop": for (f = g - 1; f >= 0; f--) for (e = d - 1; e >= 0; e--) h.push(l(a, e, f)); break; case "rightToLeft": for (e = d - 1; e >= 0; e--) for (f = g - 1; f >= 0; f--) h.push(l(a, e, f)); break; case "leftToRight": for (e = 0; e < d; e++) for (f = 0; f < g; f++) h.push(l(a, e, f)); break; case "topLeftToBottomRight": for (b = 0; b < d + g - 1; b++) { f = 0; for (e = b; e >= 0; e--) { l(a, e, f) != undefined && h.push(l(a, e, f)); f++ } } break; case "bottomLeftToTopRight": i = d > g ? d : g; for (b = d - 1; b >= 1 - i; b--) { e = 0; for (f = b; f <= d - 1; f++) { l(a, e, f) != undefined && h.push(l(a, e, f)); e++ } } break; case "topRightToBottomLeft": i = d > g ? d : g; for (b = d - 1; b >= 1 - i; b--) { e = b; for (f = 0; f <= g - 1; f++) { l(a, e, f) != undefined && h.push(l(a, e, f)); e++ } } break; case "bottomRightToTopLeft": for (b = g + d - 2; b >= 0; b--) { f = 0; for (e = b; e >= 0; e--) { l(a, e, f) != undefined && h.push(l(a, e, f)); f++ } } break; case "horizontalMarginToCenter": if (d % 2) { for (e = 0; e < Math.floor(d / 2); e++) for (f = 0; f < g; f++) { h.push(l(a, e, f)); h.push(l(a, d - 1 - e, f)) } for (b = 0; b < g; b++) h.push(l(a, Math.floor(d / 2), b)) } else for (e = 0; e < Math.floor(d / 2); e++) for (f = 0; f < g; f++) { h.push(l(a, e, f)); h.push(l(a, d - 1 - e, f)) } break; case "horizontalCenterToMargin": if (d % 2) for (b = 0; b < g; b++) h.push(l(a, Math.floor(d / 2), b)); for (e = Math.floor(d / 2) - 1; e >= 0; e--) for (f = 0; f < g; f++) { h.push(l(a, e, f)); h.push(l(a, d - 1 - e, f)) } break; case "verticalMarginToCenter": if (g % 2) { for (f = 0; f < Math.floor(g / 2); f++) for (e = 0; e < d; e++) { h.push(l(a, e, f)); h.push(l(a, e, g - 1 - f)) } for (b = 0; b < d; b++) h.push(l(a, b, Math.floor(g / 2))) } else for (f = 0; f < Math.floor(g / 2); f++) for (e = 0; e < d; e++) { h.push(l(a, e, f)); h.push(l(a, e, g - 1 - f)) } break; case "verticalCenterToMargin": if (g % 2) for (b = 0; b < d; b++) h.push(l(a, b, Math.floor(g / 2))); for (f = Math.floor(g / 2) - 1; f >= 0; f--) for (e = 0; e < d; e++) { h.push(l(a, e, f)); h.push(l(a, e, g - 1 - f)) } break; case "skipOneTopToBottom": for (f = 0; f < g; f++) { for (e = i; e < d; e += 2) h.push(l(a, e, f)); i == 0 ? i = 1 : i = 0 } i = 1; for (f = 0; f < g; f++) { for (e = i; e < d; e += 2) h.push(l(a, e, f)); i == 0 ? i = 1 : i = 0 } break; case "skipOneBottomToTop": for (f = g - 1; f >= 0; f--) { for (e = i; e < d; e += 2) h.push(l(a, e, f)); i == 0 ? i = 1 : i = 0 } i = 1; for (f = g - 1; f >= 0; f--) { for (e = i; e < d; e += 2) h.push(l(a, e, f)); i == 0 ? i = 1 : i = 0 } break; case "skipOneLeftToRight": for (e = 0; e < d; e++) { for (f = i; f < g; f += 2) h.push(l(a, e, f)); i == 0 ? i = 1 : i = 0 } i = 1; for (e = 0; e < d; e++) { for (f = i; f < g; f += 2) h.push(l(a, e, f)); i == 0 ? i = 1 : i = 0 } break; case "skipOneRightToLeft": for (e = d - 1; e >= 0; e--) { for (f = i; f < g; f += 2) h.push(l(a, e, f)); i == 0 ? i = 1 : i = 0 } i = 1; for (e = d - 1; e >= 0; e--) { for (f = i; f < g; f += 2) h.push(l(a, e, f)); i == 0 ? i = 1 : i = 0 } break; case "skipOneVertical": if (g % 2) for (f = 0; f < g; f++) { for (e = i; e < d; e += 2) { if (f == Math.floor(g / 2)) { f++; for (b = 1 - d % 2; b < d; b += 2) { h.push(l(a, b, Math.floor(g / 2))); l(a, b - 1, Math.floor(g / 2)) != undefined && h.push(l(a, b - 1, Math.floor(g / 2))) } } h.push(l(a, e, f)); h.push(l(a, e, g - f - 1)) } i == 0 ? i = 1 : i = 0 } else for (f = 0; f < g; f++) { for (e = i; e < d; e += 2) { h.push(l(a, e, f)); h.push(l(a, e, g - f - 1)) } i == 0 ? i = 1 : i = 0 } break; case "skipOneHorizontal": if (d % 2) for (e = 0; e < d; e++) { for (f = i; f < g; f += 2) { if (e == Math.floor(d / 2)) { e++; for (b = 1 - g % 2; b < g; b += 2) { h.push(l(a, Math.floor(d / 2), b)); l(a, Math.floor(d / 2), b - 1) != undefined && h.push(l(a, Math.floor(d / 2), b - 1)) } } h.push(l(a, e, f)); h.push(l(a, d - 1 - e, f)) } i == 0 ? i = 1 : i = 0 } else for (e = 0; e < d; e++) { for (f = i; f < g; f += 2) { h.push(l(a, e, f)); h.push(l(a, d - 1 - e, f)) } i == 0 ? i = 1 : i = 0 } break; case "spiralMarginToCenterCW": var n = d, s = g, o, k = 0, q = g < d ? g : d; m = Math.floor(q / 2); for (o = 0; o < m; o++) { for (e = k++; e < n; e++) h.push(l(a, e, k - 1)); n--; for (f = k; f < s; f++) h.push(l(a, d - k, f)); s--; for (b = n; b >= d - n; b--) h.push(l(a, b - 1, s)); for (i = s - 1; i >= g - s; i--) h.push(l(a, k - 1, i)) } if (q % 2) { if (q == g) for (e = k++; e < n; e++) h.push(l(a, e, k - 1)); if (q == d) for (f = k++; f < s; f++) h.push(l(a, d - k, f)) } break; case "spiralMarginToCenterCCW": n = d; s = g; k = 0; q = g < d ? g : d; m = Math.floor(q / 2); for (o = 0; o < m; o++) { for (f = k++; f < s; f++) h.push(l(a, k - 1, f)); s--; for (e = k; e < n; e++) h.push(l(a, e, g - k)); n--; for (b = s; b >= g - s; b--) h.push(l(a, n, b - 1)); for (i = n - 1; i >= d - n; i--) h.push(l(a, i, k - 1)) } if (q % 2) { if (q == g) for (e = k++; e < n; e++) h.push(l(a, e, g - k)); if (q == d) for (f = k++; f < s; f++) h.push(l(a, k - 1, f)) } break; case "spiralCenterToMarginCCW": n = d; s = g; k = 0; q = g < d ? g : d; m = Math.floor(q / 2); for (o = 0; o < m; o++) { for (e = k++; e < n; e++) h.push(l(a, e, k - 1)); n--; for (f = k; f < s; f++) h.push(l(a, d - k, f)); s--; for (b = n; b >= d - n; b--) h.push(l(a, b - 1, s)); for (i = s - 1; i >= g - s; i--) h.push(l(a, k - 1, i)) } if (q % 2) { if (q == g) for (e = k++; e < n; e++) h.push(l(a, e, k - 1)); if (q == d) for (f = k++; f < s; f++) h.push(l(a, d - k, f)) } h.reverse(); break; case "spiralCenterToMarginCW": n = d; s = g; k = 0; q = g < d ? g : d; m = Math.floor(q / 2); for (o = 0; o < m; o++) { for (f = k++; f < s; f++) h.push(l(a, k - 1, f)); s--; for (e = k; e < n; e++) h.push(l(a, e, g - k)); n--; for (b = s; b >= g - s; b--) h.push(l(a, n, b - 1)); for (i = n - 1; i >= d - n; i--) h.push(l(a, i, k - 1)) } if (q % 2) { if (q == g) for (e = k++; e < n; e++) h.push(l(a, e, g - k)); if (q == d) for (f = k++; f < s; f++) h.push(l(a, k - 1, f)) } h.reverse(); break; default: for (d = []; a.length;) { i = Math.floor(Math.random() * a.length); d.push(a[i]); a.splice(i, 1) } m = d.length; for (b = 0; b < m; b++) h[b] = d[b] } return h } function l(a, b, d) { return j.grep(a, function (g) { return g.data("hPos") == b && g.data("vPos") == d })[0] } function Y(a) { var b = parseInt(a.substring(1, 3), 16), d = parseInt(a.substring(3, 5), 16); a = parseInt(a.substring(5, 7), 16); return { red: b, green: d, blue: a } } var u = j(oa), c = this, y = -1, L = -1, w = [], B = null, N = null, E = false, V = false, qa = false, Z = false, G = 0, ua = 0, J = 0, T = 0, C = "", ja = 0, ka = 0, wa, ya, xa = false, za, da = false, ma = false, O, P, H, p, z, D, A, na = ["htmlDuringTransition", "alignType", "effectType", "sliceDelay", "sliceDuration", "sliceEasing", "horizontalSlices", "verticalSlices", "slicePattern", "slicePoint", "slideStartPosition", "slideStartRatio", "sliceFade", "captionSize", "captionPosition", "captionShowEffectDuration", "captionShowEffectEasing", "captionHideEffectDuration", "captionHideEffectEasing", "captionShowEffect", "captionHideEffect", "captionLeft", "captionTop", "captionWidth", "captionHeight", "captionShowSlideDirection", "captionHideSlideDirection", "captionBackgroundColor", "captionBackgroundOpacity", "slideshowDelay", "slideMask", "linkTarget", "simpleSlideDirection", "simpleSlideDuration", "simpleSlideEasing", "lightboxDefaultWidth", "lightboxDefaultHeight", "lightboxTheme", "lightboxOpacity"]; this.settings = j.extend({}, j.fn.jquerySlider.defaults, U); (function () { if (c.settings.xmlSource) { u.empty(); j.ajax({ type: "GET", url: c.settings.xmlSource, dataType: j.browser.msie ? "text" : "xml", success: function (a) { var b; if (j.browser.msie) { b = new ActiveXObject("Microsoft.XMLDOM"); b.async = false; b.loadXML(a) } else b = a; j(b).find("slide").each(function () { var d = {}; d.properties = {}; for (var g = 0; g < j(this).children().length; g++) { var h = j(this).children()[g]; d[h.nodeName] = j(this).find(h.nodeName).text() } for (g = 0; g < na.length; g++) { h = na[g]; var e = j(this).attr(h); d.properties[h] = e == undefined ? c.settings[h] : e } w.push(d) }); I() } }) } else { u.children().each(function (a) { var b = {}; b.properties = {}; for (var d = 0; d < j(this).children().length; d++) { var g = j(this).children()[d]; if (j(g).is("a")) { b.path = j(g).find("img").attr("src"); b.link = j(g).attr("href"); if (j(g).attr("target")) b.properties.linkTarget = j(g).attr("target") } else if (j(g).is("img")) if (j(g).hasClass("thumbnail")) b.thumbnail = j(g).attr("src"); else b.path = j(g).attr("src"); else if (j(g).hasClass("html")) b.html = j(g); else b[j(g).attr("class")] = j(g).html() } for (d = 0; d < na.length; d++) { g = na[d]; var h; if (c.settings.slideProperties) if (c.settings.slideProperties[a]) h = c.settings.slideProperties[a][g]; b.properties[g] || (b.properties[g] = h == undefined ? c.settings[g] : h) } w.push(b) }); u.empty(); I() } })(); this.nextSlide = aa; this.previousSlide = $; this.gotoSlide = Q; this.startSlideshow = function () { u.find(".slideshow-controls").removeClass("play").addClass("pause"); C = "play"; sa() }; this.stopSlideshow = function () { u.find(".slideshow-controls").removeClass("pause").addClass("play"); C = "stop"; fa() }; this.getSlideshowState = function () { return C }; this.pauseSlideshow = function () { c.settings.slideshow && C != "stop" && !E && ea() }; this.resumeSlideshow = function () { c.settings.slideshow && C != "stop" && !E && pa() }; this.getCurrentIndex = function () { return y }; this.getSlideAt = function (a) { return w[a] }; this.isTransition = function () { return E }; this.destroy = function () { this.stopSlideshow(); ca(); j(document).unbind("mousemove"); j(document).unbind("mousemove.tooltip") } } j.fn.jquerySlider = function (oa) { for (var U = [], I = 0; I < this.length; I++) { if (!this[I].slider) this[I].slider = new Ja(this[I], oa); U.push(this[I].slider) } return U.length > 1 ? U : U[0] }; j.fn.jquerySlider.defaults = { xmlSource: null, width: 500, height: 300, skin: "default", alignType: "leftTop", skipBroken: true, slideshow: true, slideshowDelay: 5E3, slideshowDirection: "next", slideshowControls: true, slideshowControlsCenter: true, fadeSlideshowControls: true, pauseSlideshowOnHover: false, lightbox: false, lightboxDefaultWidth: 500, lightboxDefaultHeight: 300, lightboxTheme: "pp_default", lightboxOpacity: 0.8, overrideTransition: false, timerAnimation: true, timerFadeDuration: 500, fadeTimer: false, timerRadius: 18, timerStrokeColor1: "#000000", timerStrokeColor2: "#FFFFFF", timerStrokeOpacity1: 0.5, timerStrokeOpacity2: 0.7, timerStrokeWidth1: 8, timerStrokeWidth2: 4, slideStart: 0, slidesPreloaded: 0, shuffle: false, htmlDuringTransition: true, effectType: "random", simpleSlideDirection: "autoHorizontal", simpleSlideDuration: 700, simpleSlideEasing: "swing", sliceDelay: 50, sliceDuration: 1E3, sliceEasing: "swing", horizontalSlices: 5, verticalSlices: 3, slicePattern: "random", slicePoint: "centerCenter", slideStartPosition: "left", slideStartRatio: 1, sliceFade: true, navigationArrows: true, navigationArrowsCenter: true, fadeNavigationArrows: true, navigationButtons: true, navigationButtonsDistance: 10, navigationButtonsCenter: true, thumbnailsType: "tooltip", thumbnailWidth: 80, thumbnailHeight: 50, thumbnailSlideAmount: 10, thumbnailSlideDuration: 300, thumbnailSlideEasing: "swing", fadeNavigationThumbnails: false, navigationThumbnailsCenter: true, navigationThumbnailsDistance: 30, thumbnailScrollDuration: 1E3, thumbnailScrollEasing: "swing", visibleThumbnails: 5, thumbnailOrientation: "horizontal", thumbnailTooltip: false, tooltipShowDuration: 300, tooltipHideDuration: 300, thumbnailCaptionPosition: "bottom", hideThumbnailCaption: true, thumbnailCaptionEffect: "slide", thumbnailCaptionShowDuration: 500, thumbnailCaptionHideDuration: 500, thumbnailCaptionEasing: "swing", thumbnailScrollbar: false, thumbnailButtons: false, thumbnailArrows: true, thumbnailArrowsDistance: 10, thumbnailButtonsDistance: 0, thumbnailScrollbarDistance: 15, fadeThumbnailButtons: false, fadeThumbnailArrows: false, fadeThumbnailScrollbar: false, scrollbarArrowScrollAmount: 100, navigationThumbnailsHideDuration: 700, navigationThumbnailsShowDuration: 700, thumbnailArrowsHideDuration: 700, thumbnailArrowsShowDuration: 700, thumbnailButtonsHideDuration: 700, thumbnailButtonsShowDuration: 700, thumbnailScrollbarHideDuration: 700, thumbnailScrollbarShowDuration: 700, thumbnailSync: false, thumbnailMouseScroll: false, thumbnailMouseScrollEase: 90, thumbnailMouseScrollSpeed: 10, thumbnailMouseWheel: false, thumbnailMouseWheelSpeed: 20, thumbnailMouseWheelReverse: false, thumbnailScrollbarEase: 10, hideCaption: false, captionSize: 70, captionBackgroundOpacity: 0.5, captionBackgroundColor: "#000000", captionShowEffect: "slide", captionShowEffectDuration: 500, captionShowEffectEasing: "swing", captionShowSlideDirection: "auto", captionHideEffect: "fade", captionHideEffectDuration: 300, captionHideEffectEasing: "swing", captionHideSlideDirection: "auto", captionPosition: "bottom", captionLeft: 50, captionTop: 50, captionWidth: 300, captionHeight: 100, slideProperties: null, slideMask: false, linkTarget: "_blank", slideOpen: null, slideClick: null, slideMouseOver: null, slideMouseOut: null, transitionStart: null, transitionComplete: null } })(jQuery);