﻿/*
AnythingSlider v1.7.12 minified using Google Closure Compiler
Original by Chris Coyier: http://css-tricks.com
Get the latest version: https://github.com/ProLoser/AnythingSlider
*/

(function (d) { d.anythingSlider = function (h, i) { var a = this, b; a.el = h; a.$el = d(h).addClass("anythingBase").wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>'); a.$el.data("AnythingSlider", a); a.init = function () { a.options = b = d.extend({}, d.anythingSlider.defaults, i); a.initialized = !1; d.isFunction(b.onBeforeInitialize) && a.$el.bind("before_initialize", b.onBeforeInitialize); a.$el.trigger("before_initialize", a); a.$wrapper = a.$el.parent().closest("div.anythingSlider").addClass("anythingSlider-" + b.theme); a.$window = a.$el.closest("div.anythingWindow"); a.win = window; a.$win = d(a.win); a.$controls = d('<div class="anythingControls"></div>').appendTo(b.appendControlsTo !== null && d(b.appendControlsTo).length ? d(b.appendControlsTo) : a.$wrapper); a.$startStop = d('<a href="#" class="start-stop"></a>'); b.buildStartStop && a.$startStop.appendTo(b.appendStartStopTo !== null && d(b.appendStartStopTo).length ? d(b.appendStartStopTo) : a.$controls); a.$nav = d('<ul class="thumbNav" />').appendTo(b.appendNavigationTo !== null && d(b.appendNavigationTo).length ? d(b.appendNavigationTo) : a.$controls); a.flag = !1; a.playing = b.autoPlay; a.slideshow = !1; a.hovered = !1; a.panelSize = []; a.currentPage = b.startPanel = parseInt(b.startPanel, 10) || 1; b.changeBy = parseInt(b.changeBy, 10) || 1; a.adj = b.infiniteSlides ? 0 : 1; a.width = a.$el.width(); a.height = a.$el.height(); a.outerPad = [a.$wrapper.innerWidth() - a.$wrapper.width(), a.$wrapper.innerHeight() - a.$wrapper.height()]; b.playRtl && a.$wrapper.addClass("rtl"); if (b.expand) a.$outer = a.$wrapper.parent(), a.$window.css({ width: "100%", height: "100%" }), a.checkResize(); b.buildStartStop && a.buildAutoPlay(); b.buildArrows && a.buildNextBackButtons(); if (!b.autoPlay) b.autoPlayLocked = !1; a.updateSlider(); a.$lastPage = a.$currentPage; a.runTimes = d("div.anythingSlider").index(a.$wrapper) + 1; a.regex = RegExp("panel" + a.runTimes + "-(\\d+)", "i"); a.runTimes === 1 && a.makeActive(); if (!d.isFunction(d.easing[b.easing])) b.easing = "swing"; b.pauseOnHover && a.$wrapper.hover(function () { a.playing && (a.$el.trigger("slideshow_paused", a), a.clearTimer(!0)) }, function () { a.playing && (a.$el.trigger("slideshow_unpaused", a), a.startStop(a.playing, !0)) }); a.setCurrentPage(a.gotoHash() || b.startPage, !1); a.slideControls(!1); a.$wrapper.bind("mouseenter mouseleave", function (b) { a.hovered = b.type === "mouseenter" ? !0 : !1; a.slideControls(a.hovered, !1) }); d(document).keyup(function (c) { if (b.enableKeyboard && a.$wrapper.is(".activeSlider") && !c.target.tagName.match("TEXTAREA|INPUT|SELECT") && (b.vertical || !(c.which === 38 || c.which === 40))) switch (c.which) { case 39: case 40: a.goForward(); break; case 37: case 38: a.goBack() } }); a.$items.delegate("a", "focus.AnythingSlider", function (c) { var e = d(this).closest(".panel"), e = a.$items.index(e) + a.adj; a.$items.find(".focusedLink").removeClass("focusedLink"); d(this).addClass("focusedLink"); a.$window.scrollLeft(0); if (e >= a.currentPage + b.showMultiple || e < a.currentPage) a.gotoPage(e), c.preventDefault() }); var c = "slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" "); d.each("onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "), function (g, e) { d.isFunction(b[e]) && a.$el.bind(c[g], b[e]) }); d.isFunction(b.onSlideComplete) && a.$el.bind("slide_complete", function () { setTimeout(function () { b.onSlideComplete(a) }, 0) }); a.initialized = !0; a.$el.trigger("initialized", a); a.startStop(a.playing) }; a.updateSlider = function () { a.$el.children(".cloned").remove(); a.$nav.empty(); a.currentPage = a.currentPage || 1; a.$items = a.$el.children(); a.pages = a.$items.length; a.dir = b.vertical ? "top" : "left"; b.showMultiple = b.vertical ? 1 : parseInt(b.showMultiple, 10) || 1; if (b.showMultiple > 1) { if (b.showMultiple > a.pages) b.showMultiple = a.pages; a.adjustMultiple = b.infiniteSlides && a.pages > 1 ? 0 : b.showMultiple - 1; a.pages = a.$items.length - a.adjustMultiple } a.$controls.add(a.$nav).add(a.$startStop).add(a.$forward).add(a.$back)[a.pages <= 1 ? "hide" : "show"](); a.pages > 1 && a.buildNavigation(); b.infiniteSlides && a.pages > 1 && (a.$el.prepend(a.$items.filter(":last").clone().removeAttr("id").addClass("cloned")), b.showMultiple > 1 ? a.$el.append(a.$items.filter(":lt(" + b.showMultiple + ")").clone().removeAttr("id").addClass("cloned").addClass("multiple")) : a.$el.append(a.$items.filter(":first").clone().removeAttr("id").addClass("cloned")), a.$el.find(".cloned").each(function () { d(this).find("a,input,textarea,select,button,area").attr("disabled", "disabled"); d(this).find("[id]").removeAttr("id") })); a.$items = a.$el.children().addClass("panel" + (b.vertical ? " vertical" : "")); a.setDimensions(); b.resizeContents ? (a.$items.css("width", a.width), a.$wrapper.css("width", a.getDim(a.currentPage)[0]), a.$wrapper.add(a.$items).css("height", a.height)) : a.$win.load(function () { a.setDimensions() }); if (a.currentPage > a.pages) a.currentPage = a.pages; a.setCurrentPage(a.currentPage, !1); a.$nav.find("a").eq(a.currentPage - 1).addClass("cur") }; a.buildNavigation = function () { if (b.buildNavigation && a.pages > 1) { var c, g; a.$items.filter(":not(.cloned)").each(function (e) { var f = e + 1; c = (f === 1 ? "first" : "") + (f === a.pages ? "last" : ""); g = d('<a href="#"></a>').addClass("panel" + f).wrap('<li class="' + c + '" />'); a.$nav.append(g.parent()); d.isFunction(b.navigationFormatter) ? (c = b.navigationFormatter(f, d(this)), g.html("<span>" + c + "</span>"), parseInt(g.find("span").css("text-indent"), 10) < 0 && g.addClass(b.tooltipClass).attr("title", c)) : g.html("<span>" + f + "</span>"); g.bind(b.clickControls, function (c) { if (!a.flag && b.enableNavigation) a.flag = !0, setTimeout(function () { a.flag = !1 }, 100), a.gotoPage(f), b.hashTags && a.setHash(f); c.preventDefault() }) }); if (b.navigationSize !== !1 && parseInt(b.navigationSize, 10) < a.pages) a.$controls.find(".anythingNavWindow").length || a.$nav.before('<ul><li class="prev"><a href="#"><span>' + b.backText + "</span></a></li></ul>").after('<ul><li class="next"><a href="#"><span>' + b.forwardText + "</span></a></li></ul>").wrap('<div class="anythingNavWindow"></div>'), a.navWidths = a.$nav.find("li").map(function () { return d(this).innerWidth() + Math.ceil(parseInt(d(this).find("span").css("left"), 10) / 2 || 0) }).get(), a.navLeft = 1, a.$nav.width(a.navWidth(1, a.pages + 1) + 5), a.$controls.find(".anythingNavWindow").width(a.navWidth(1, b.navigationSize + 1)).end().find(".prev,.next").bind(b.clickControls, function (c) { if (!a.flag) a.flag = !0, setTimeout(function () { a.flag = !1 }, 200), a.navWindow(a.navLeft + b.navigationSize * (d(this).is(".prev") ? -1 : 1)); c.preventDefault() }) } }; a.navWidth = function (b, d) { for (var e = Math.min(b, d), f = Math.max(b, d), j = 0; e < f; e++) j += a.navWidths[e - 1] || 0; return j }; a.navWindow = function (c) { var d = a.pages - b.navigationSize + 1, c = c <= 1 ? 1 : c > 1 && c < d ? c : d; if (c !== a.navLeft) a.$controls.find(".anythingNavWindow").animate({ scrollLeft: a.navWidth(1, c), width: a.navWidth(c, c + b.navigationSize) }, { queue: !1, duration: b.animationTime }), a.navLeft = c }; a.buildNextBackButtons = function () { a.$forward = d('<span class="arrow forward"><a href="#"><span>' + b.forwardText + "</span></a></span>"); a.$back = d('<span class="arrow back"><a href="#"><span>' + b.backText + "</span></a></span>"); a.$back.bind(b.clickBackArrow, function (c) { if (b.enableArrows && !a.flag) a.flag = !0, setTimeout(function () { a.flag = !1 }, 100), a.goBack(); c.preventDefault() }); a.$forward.bind(b.clickForwardArrow, function (c) { if (b.enableArrows && !a.flag) a.flag = !0, setTimeout(function () { a.flag = !1 }, 100), a.goForward(); c.preventDefault() }); a.$back.add(a.$forward).find("a").bind("focusin focusout", function () { d(this).toggleClass("hover") }); a.$back.appendTo(b.appendBackTo !== null && d(b.appendBackTo).length ? d(b.appendBackTo) : a.$wrapper); a.$forward.appendTo(b.appendForwardTo !== null && d(b.appendForwardTo).length ? d(b.appendForwardTo) : a.$wrapper); a.$arrowWidth = a.$forward.width() }; a.buildAutoPlay = function () { a.$startStop.html("<span>" + (a.playing ? b.stopText : b.startText) + "</span>").bind(b.clickSlideshow, function (c) { b.enableStartStop && (a.startStop(!a.playing), a.makeActive(), a.playing && !b.autoPlayDelayed && a.goForward(!0)); c.preventDefault() }).bind("focusin focusout", function () { d(this).toggleClass("hover") }) }; a.checkResize = function (c) { clearTimeout(a.resizeTimer); a.resizeTimer = setTimeout(function () { var d = a.$outer.width() - a.outerPad[0], e = (a.$outer[0].tagName === "BODY" ? a.$win.height() : a.$outer.height()) - a.outerPad[1]; if (a.width * b.showMultiple !== d || a.height !== e) a.setDimensions(), a.gotoPage(a.currentPage, a.playing, null, -1); typeof c === "undefined" && a.checkResize() }, 500) }; a.setDimensions = function () { var c, g, e, f = 0, j = b.showMultiple > 1 ? a.width || a.$window.width() / b.showMultiple : a.$window.width(), h = a.$win.width(); if (b.expand) c = a.$outer.width() - a.outerPad[0], a.height = g = a.$outer.height() - a.outerPad[1], a.$wrapper.add(a.$window).add(a.$items).css({ width: c, height: g }), a.width = j = b.showMultiple > 1 ? c / b.showMultiple : c; a.$items.each(function (i) { e = d(this).children(); b.resizeContents ? (c = a.width, g = a.height, d(this).css({ width: c, height: g }), e.length && e[0].tagName === "EMBED" && e.attr({ width: "100%", height: "100%" }), e.length === 1 && e.css({ width: "100%", height: "100%" })) : (c = d(this).width(), e.length === 1 && c >= h && (c = e.width() >= h ? j : e.width(), e.css("max-width", c)), d(this).css("width", c), g = e.length === 1 ? e.outerHeight(!0) : d(this).height(), d(this).css("height", g)); a.panelSize[i] = [c, g, f]; f += b.vertical ? g : c }); a.$el.css(b.vertical ? "height" : "width", f) }; a.getDim = function (c) { if (a.pages < 1 || isNaN(c)) return [a.width, a.height]; var c = b.infiniteSlides && a.pages > 1 ? c : c - 1, d, e = a.panelSize[c][0], f = a.panelSize[c][1]; if (b.showMultiple > 1) for (d = 1; d < b.showMultiple; d++) e += a.panelSize[(c + d) % b.showMultiple][0], f = Math.max(f, a.panelSize[c + d][1]); return [e, f] }; a.goForward = function (c) { a.gotoPage(a.currentPage + b.changeBy * (b.playRtl ? -1 : 1), c) }; a.goBack = function (c) { a.gotoPage(a.currentPage + b.changeBy * (b.playRtl ? 1 : -1), c) }; a.gotoPage = function (c, g, e, f) { g !== !0 && (g = !1, a.startStop(!1), a.makeActive()); /^[#|.]/.test(c) && d(c).length && (c = d(c).closest(".panel").index() + a.adj); b.changeBy !== 1 && (c < 0 && (c += a.pages), c > a.pages && (c -= a.pages)); if (!(a.pages <= 1)) { a.$lastPage = a.$currentPage; if (typeof c !== "number") c = b.startPanel, a.setCurrentPage(c); if (!g || !b.isVideoPlaying(a)) c > a.pages + 1 - a.adj && (c = !b.infiniteSlides && !b.stopAtEnd ? 1 : a.pages), c < a.adj && (c = !b.infiniteSlides && !b.stopAtEnd ? a.pages : 1), a.currentPage = c > a.pages ? a.pages : c < 1 ? 1 : a.currentPage, a.$currentPage = a.$items.eq(a.currentPage - a.adj), a.exactPage = c, a.$targetPage = a.$items.eq(c === 0 ? a.pages - a.adj : c > a.pages ? 1 - a.adj : c - a.adj), f = f || b.animationTime, f >= 0 && a.$el.trigger("slide_init", a), a.slideControls(!0, !1), g !== !0 && (g = !1), (!g || b.stopAtEnd && c === a.pages) && a.startStop(!1), f >= 0 && a.$el.trigger("slide_begin", a), setTimeout(function (d) { b.resizeContents || (d = a.getDim(c), a.$wrapper.filter(":not(:animated)").animate({ width: d[0] || a.width, height: d[1] || a.height }, { queue: !1, duration: f < 0 ? 0 : f, easing: b.easing })); d = {}; d[a.dir] = -a.panelSize[b.infiniteSlides && a.pages > 1 ? c : c - 1][2]; a.$el.filter(":not(:animated)").animate(d, { queue: !1, duration: f, easing: b.easing, complete: function () { a.endAnimation(c, e, f) } }) }, parseInt(b.delayBeforeAnimate, 10) || 0) } }; a.endAnimation = function (c, d, e) { c === 0 ? (a.$el.css(a.dir, -a.panelSize[a.pages][2]), c = a.pages) : c > a.pages && (a.$el.css(a.dir, -a.panelSize[1][2]), c = 1); a.exactPage = c; a.setCurrentPage(c, !1); a.$items.removeClass("activePage").eq(c - a.adj).addClass("activePage"); a.hovered || a.slideControls(!1); e >= 0 && a.$el.trigger("slide_complete", a); typeof d === "function" && d(a); b.autoPlayLocked && !a.playing && setTimeout(function () { a.startStop(!0) }, b.resumeDelay - (b.autoPlayDelayed ? b.delay : 0)) }; a.setCurrentPage = function (c, d) { c = parseInt(c, 10); if (!(a.pages < 1 || c === 0 || isNaN(c))) { c > a.pages + 1 - a.adj && (c = a.pages - a.adj); c < a.adj && (c = 1); b.buildNavigation && a.$nav.find(".cur").removeClass("cur").end().find("a").eq(c - 1).addClass("cur"); !b.infiniteSlides && b.stopAtEnd && (a.$wrapper.find("span.forward")[c === a.pages ? "addClass" : "removeClass"]("disabled").end().find("span.back")[c === 1 ? "addClass" : "removeClass"]("disabled"), c === a.pages && a.playing && a.startStop()); if (!d) { var e = a.getDim(c); a.$wrapper.css({ width: e[0], height: e[1] }).add(a.$window).scrollLeft(0); a.$el.css(a.dir, -a.panelSize[b.infiniteSlides && a.pages > 1 ? c : c - 1][2]) } a.currentPage = c; a.$currentPage = a.$items.removeClass("activePage").eq(c - a.adj).addClass("activePage") } }; a.makeActive = function () { a.$wrapper.is(".activeSlider") || (d(".activeSlider").removeClass("activeSlider"), a.$wrapper.addClass("activeSlider")) }; a.gotoHash = function () { var c = a.win.location.hash, g = c.indexOf("&"), e = c.match(a.regex); e === null && !/^#&/.test(c) ? (c = c.substring(0, g >= 0 ? g : c.length), e = d(c).closest(".anythingBase")[0] === a.el ? d(c).closest(".panel").index() : null) : e !== null && (e = b.hashTags ? parseInt(e[1], 10) : null); return e }; a.setHash = function (b) { var d = "panel" + a.runTimes + "-", e = a.win.location.hash; if (typeof e !== "undefined") a.win.location.hash = e.indexOf(d) > 0 ? e.replace(a.regex, d + b) : e + "&" + d + b }; a.slideControls = function (c) { var d = c ? 0 : b.animationTime, e = c ? b.animationTime : 0, f = c ? 1 : 0, h = c ? 0 : 1; b.toggleControls && a.$controls.stop(!0, !0).delay(d)[c ? "slideDown" : "slideUp"](b.animationTime / 2).delay(e); b.buildArrows && b.toggleArrows && (!a.hovered && a.playing && (h = 1, f = 0), a.$forward.stop(!0, !0).delay(d).animate({ right: h * a.$arrowWidth, opacity: f }, b.animationTime / 2), a.$back.stop(!0, !0).delay(d).animate({ left: h * a.$arrowWidth, opacity: f }, b.animationTime / 2)) }; a.clearTimer = function (b) { if (a.timer && (a.win.clearInterval(a.timer), !b && a.slideshow)) a.$el.trigger("slideshow_stop", a), a.slideshow = !1 }; a.startStop = function (c, d) { c !== !0 && (c = !1); if ((a.playing = c) && !d) a.$el.trigger("slideshow_start", a), a.slideshow = !0; b.buildStartStop && (a.$startStop.toggleClass("playing", c).find("span").html(c ? b.stopText : b.startText), parseInt(a.$startStop.find("span").css("text-indent"), 10) < 0 && a.$startStop.addClass(b.tooltipClass).attr("title", c ? b.stopText : b.startText)); c ? (a.clearTimer(!0), a.timer = a.win.setInterval(function () { b.isVideoPlaying(a) ? b.resumeOnVideoEnd || a.startStop() : a.goForward(!0) }, b.delay)) : a.clearTimer() }; a.init() }; d.anythingSlider.defaults = { theme: "default", expand: !1, resizeContents: !0, vertical: !1, showMultiple: !1, easing: "swing", buildArrows: !0, buildNavigation: !0, buildStartStop: !0, appendForwardTo: null, appendBackTo: null, appendControlsTo: null, appendNavigationTo: null, appendStartStopTo: null, toggleArrows: !1, toggleControls: !1, startText: "Start", stopText: "Stop", forwardText: "&raquo;", backText: "&laquo;", tooltipClass: "tooltip", enableArrows: !0, enableNavigation: !0, enableStartStop: !0, enableKeyboard: !0, startPanel: 1, changeBy: 1, hashTags: !0, infiniteSlides: !0, navigationFormatter: null, navigationSize: !1, autoPlay: !1, autoPlayLocked: !1, autoPlayDelayed: !1, pauseOnHover: !0, stopAtEnd: !1, playRtl: !1, delay: 3E3, resumeDelay: 15E3, animationTime: 600, delayBeforeAnimate: 0, clickForwardArrow: "click", clickBackArrow: "click", clickControls: "click focusin", clickSlideshow: "click", resumeOnVideoEnd: !0, addWmodeToObject: "opaque", isVideoPlaying: function () { return !1 } }; d.fn.anythingSlider = function (h, i) { return this.each(function () { var a, b = d(this).data("AnythingSlider"); (typeof h).match("object|undefined") ? b ? b.updateSlider() : new d.anythingSlider(this, h) : /\d/.test(h) && !isNaN(h) && b ? (a = typeof h === "number" ? h : parseInt(d.trim(h), 10), a >= 1 && a <= b.pages && b.gotoPage(a, !1, i)) : /^[#|.]/.test(h) && d(h).length && b.gotoPage(h, !1, i) }) } })(jQuery);

/*
* jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php
*
* Uses the built In easIng capabilities added In jQuery 1.1
* to offer multiple easIng options
*
* Copyright (c) 2007 George Smith
* Licensed under the MIT License:
*   http://www.opensource.org/licenses/mit-license.php
*/

// t: current time, b: begInnIng value, c: change In value, d: duration

jQuery.extend(jQuery.easing,
{
    easeInQuad: function (x, t, b, c, d) {
        return c * (t /= d) * t + b;
    },
    easeOutQuad: function (x, t, b, c, d) {
        return -c * (t /= d) * (t - 2) + b;
    },
    easeInOutQuad: function (x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t + b;
        return -c / 2 * ((--t) * (t - 2) - 1) + b;
    },
    easeInCubic: function (x, t, b, c, d) {
        return c * (t /= d) * t * t + b;
    },
    easeOutCubic: function (x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t + 1) + b;
    },
    easeInOutCubic: function (x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t + 2) + b;
    },
    easeInQuart: function (x, t, b, c, d) {
        return c * (t /= d) * t * t * t + b;
    },
    easeOutQuart: function (x, t, b, c, d) {
        return -c * ((t = t / d - 1) * t * t * t - 1) + b;
    },
    easeInOutQuart: function (x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;
        return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
    },
    easeInQuint: function (x, t, b, c, d) {
        return c * (t /= d) * t * t * t * t + b;
    },
    easeOutQuint: function (x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
    },
    easeInOutQuint: function (x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
    },
    easeInSine: function (x, t, b, c, d) {
        return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
    },
    easeOutSine: function (x, t, b, c, d) {
        return c * Math.sin(t / d * (Math.PI / 2)) + b;
    },
    easeInOutSine: function (x, t, b, c, d) {
        return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
    },
    easeInExpo: function (x, t, b, c, d) {
        return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
    },
    easeOutExpo: function (x, t, b, c, d) {
        return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
    },
    easeInOutExpo: function (x, t, b, c, d) {
        if (t == 0) return b;
        if (t == d) return b + c;
        if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
        return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
    },
    easeInCirc: function (x, t, b, c, d) {
        return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
    },
    easeOutCirc: function (x, t, b, c, d) {
        return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
    },
    easeInOutCirc: function (x, t, b, c, d) {
        if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
        return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
    },
    easeInElastic: function (x, t, b, c, d) {
        var s = 1.70158; var p = 0; var a = c;
        if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3;
        if (a < Math.abs(c)) { a = c; var s = p / 4; }
        else var s = p / (2 * Math.PI) * Math.asin(c / a);
        return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
    },
    easeOutElastic: function (x, t, b, c, d) {
        var s = 1.70158; var p = 0; var a = c;
        if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3;
        if (a < Math.abs(c)) { a = c; var s = p / 4; }
        else var s = p / (2 * Math.PI) * Math.asin(c / a);
        return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
    },
    easeInOutElastic: function (x, t, b, c, d) {
        var s = 1.70158; var p = 0; var a = c;
        if (t == 0) return b; if ((t /= d / 2) == 2) return b + c; if (!p) p = d * (.3 * 1.5);
        if (a < Math.abs(c)) { a = c; var s = p / 4; }
        else var s = p / (2 * Math.PI) * Math.asin(c / a);
        if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
        return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
    },
    easeInBack: function (x, t, b, c, d, s) {
        if (s == undefined) s = 1.70158;
        return c * (t /= d) * t * ((s + 1) * t - s) + b;
    },
    easeOutBack: function (x, t, b, c, d, s) {
        if (s == undefined) s = 1.70158;
        return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
    },
    easeInOutBack: function (x, t, b, c, d, s) {
        if (s == undefined) s = 1.70158;
        if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
        return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
    },
    easeInBounce: function (x, t, b, c, d) {
        return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b;
    },
    easeOutBounce: function (x, t, b, c, d) {
        if ((t /= d) < (1 / 2.75)) {
            return c * (7.5625 * t * t) + b;
        } else if (t < (2 / 2.75)) {
            return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
        } else if (t < (2.5 / 2.75)) {
            return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
        } else {
            return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
        }
    },
    easeInOutBounce: function (x, t, b, c, d) {
        if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b;
        return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b;
    }
});

// ColorBox v1.3.17.2 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
// Copyright (c) 2011 Jack Moore - jack@colorpowered.com
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
(function (a, b, c) { function bc(b) { if (!U) { P = b, _(), y = a(P), Q = 0, K.rel !== "nofollow" && (y = a("." + g).filter(function () { var b = a.data(this, e).rel || this.rel; return b === K.rel }), Q = y.index(P), Q === -1 && (y = y.add(P), Q = y.length - 1)); if (!S) { S = T = !0, r.show(); if (K.returnFocus) try { P.blur(), a(P).one(l, function () { try { this.focus() } catch (a) { } }) } catch (c) { } q.css({ opacity: +K.opacity, cursor: K.overlayClose ? "pointer" : "auto" }).show(), K.w = Z(K.initialWidth, "x"), K.h = Z(K.initialHeight, "y"), X.position(), o && z.bind("resize." + p + " scroll." + p, function () { q.css({ width: z.width(), height: z.height(), top: z.scrollTop(), left: z.scrollLeft() }) }).trigger("resize." + p), ba(h, K.onOpen), J.add(D).hide(), I.html(K.close).show() } X.load(!0) } } function bb() { var a, b = f + "Slideshow_", c = "click." + f, d, e, g; K.slideshow && y[1] ? (d = function () { F.text(K.slideshowStop).unbind(c).bind(j, function () { if (Q < y.length - 1 || K.loop) a = setTimeout(X.next, K.slideshowSpeed) }).bind(i, function () { clearTimeout(a) }).one(c + " " + k, e), r.removeClass(b + "off").addClass(b + "on"), a = setTimeout(X.next, K.slideshowSpeed) }, e = function () { clearTimeout(a), F.text(K.slideshowStart).unbind([j, i, k, c].join(" ")).one(c, d), r.removeClass(b + "on").addClass(b + "off") }, K.slideshowAuto ? d() : e()) : r.removeClass(b + "off " + b + "on") } function ba(b, c) { c && c.call(P), a.event.trigger(b) } function _(b) { K = a.extend({}, a.data(P, e)); for (b in K) a.isFunction(K[b]) && b.substring(0, 2) !== "on" && (K[b] = K[b].call(P)); K.rel = K.rel || P.rel || "nofollow", K.href = K.href || a(P).attr("href"), K.title = K.title || P.title, typeof K.href == "string" && (K.href = a.trim(K.href)) } function $(a) { return K.photo || /\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a) } function Z(a, b) { return Math.round((/%/.test(a) ? (b === "x" ? z.width() : z.height()) / 100 : 1) * parseInt(a, 10)) } function Y(c, d, e) { e = b.createElement("div"), c && (e.id = f + c), e.style.cssText = d || ""; return a(e) } var d = { transition: "elastic", speed: 300, width: !1, initialWidth: "600", innerWidth: !1, maxWidth: !1, height: !1, initialHeight: "450", innerHeight: !1, maxHeight: !1, scalePhotos: !0, scrolling: !0, inline: !1, html: !1, iframe: !1, fastIframe: !0, photo: !1, href: !1, title: !1, rel: !1, opacity: .9, preloading: !0, current: "image {current} of {total}", previous: "previous", next: "next", close: "close", open: !1, returnFocus: !0, loop: !0, slideshow: !1, slideshowAuto: !0, slideshowSpeed: 2500, slideshowStart: "start slideshow", slideshowStop: "stop slideshow", onOpen: !1, onLoad: !1, onComplete: !1, onCleanup: !1, onClosed: !1, overlayClose: !0, escKey: !0, arrowKey: !0, top: !1, bottom: !1, left: !1, right: !1, fixed: !1, data: !1 }, e = "colorbox", f = "cbox", g = f + "Element", h = f + "_open", i = f + "_load", j = f + "_complete", k = f + "_cleanup", l = f + "_closed", m = f + "_purge", n = a.browser.msie && !a.support.opacity, o = n && a.browser.version < 7, p = f + "_IE6", q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X; X = a.fn[e] = a[e] = function (b, c) { var f = this; b = b || {}; if (!f[0]) { if (f.selector) return f; f = a("<a/>"), b.open = !0 } c && (b.onComplete = c), f.each(function () { a.data(this, e, a.extend({}, a.data(this, e) || d, b)), a(this).addClass(g) }), (a.isFunction(b.open) && b.open.call(f) || b.open) && bc(f[0]); return f }, X.init = function () { z = a(c), r = Y().attr({ id: e, "class": n ? f + (o ? "IE6" : "IE") : "" }), q = Y("Overlay", o ? "position:absolute" : "").hide(), s = Y("Wrapper"), t = Y("Content").append(A = Y("LoadedContent", "width:0; height:0; overflow:hidden"), C = Y("LoadingOverlay").add(Y("LoadingGraphic")), D = Y("Title"), E = Y("Current"), G = Y("Next"), H = Y("Previous"), F = Y("Slideshow").bind(h, bb), I = Y("Close")), s.append(Y().append(Y("TopLeft"), u = Y("TopCenter"), Y("TopRight")), Y(!1, "clear:left").append(v = Y("MiddleLeft"), t, w = Y("MiddleRight")), Y(!1, "clear:left").append(Y("BottomLeft"), x = Y("BottomCenter"), Y("BottomRight"))).children().children().css({ "float": "left" }), B = Y(!1, "position:absolute; width:9999px; visibility:hidden; display:none"), a("body").prepend(q, r.append(s, B)), t.children().hover(function () { a(this).addClass("hover") }, function () { a(this).removeClass("hover") }).addClass("hover"), L = u.height() + x.height() + t.outerHeight(!0) - t.height(), M = v.width() + w.width() + t.outerWidth(!0) - t.width(), N = A.outerHeight(!0), O = A.outerWidth(!0), r.css({ "padding-bottom": L, "padding-right": M }).hide(), G.click(function () { X.next() }), H.click(function () { X.prev() }), I.click(function () { X.close() }), J = G.add(H).add(E).add(F), t.children().removeClass("hover"), q.click(function () { K.overlayClose && X.close() }), a(b).bind("keydown." + f, function (a) { var b = a.keyCode; S && K.escKey && b === 27 && (a.preventDefault(), X.close()), S && K.arrowKey && y[1] && (b === 37 ? (a.preventDefault(), H.click()) : b === 39 && (a.preventDefault(), G.click())) }) }, X.remove = function () { r.add(q).remove(), a("." + g).removeData(e).removeClass(g) }, X.position = function (a, c) { function g(a) { u[0].style.width = x[0].style.width = t[0].style.width = a.style.width, C[0].style.height = C[1].style.height = t[0].style.height = v[0].style.height = w[0].style.height = a.style.height } var d = 0, e = 0; z.unbind("resize." + f), r.hide(), K.fixed && !o ? r.css({ position: "fixed" }) : (d = z.scrollTop(), e = z.scrollLeft(), r.css({ position: "absolute" })), K.right !== !1 ? e += Math.max(z.width() - K.w - O - M - Z(K.right, "x"), 0) : K.left !== !1 ? e += Z(K.left, "x") : e += Math.round(Math.max(z.width() - K.w - O - M, 0) / 2), K.bottom !== !1 ? d += Math.max(b.documentElement.clientHeight - K.h - N - L - Z(K.bottom, "y"), 0) : K.top !== !1 ? d += Z(K.top, "y") : d += Math.round(Math.max(b.documentElement.clientHeight - K.h - N - L, 0) / 2), r.show(), a = r.width() === K.w + O && r.height() === K.h + N ? 0 : a || 0, s[0].style.width = s[0].style.height = "9999px", r.dequeue().animate({ width: K.w + O, height: K.h + N, top: d, left: e }, { duration: a, complete: function () { g(this), T = !1, s[0].style.width = K.w + O + M + "px", s[0].style.height = K.h + N + L + "px", c && c(), setTimeout(function () { z.bind("resize." + f, X.position) }, 1) }, step: function () { g(this) } }) }, X.resize = function (a) { if (S) { a = a || {}, a.width && (K.w = Z(a.width, "x") - O - M), a.innerWidth && (K.w = Z(a.innerWidth, "x")), A.css({ width: K.w }), a.height && (K.h = Z(a.height, "y") - N - L), a.innerHeight && (K.h = Z(a.innerHeight, "y")); if (!a.innerHeight && !a.height) { var b = A.wrapInner("<div style='overflow:auto'></div>").children(); K.h = b.height(), b.replaceWith(b.children()) } A.css({ height: K.h }), X.position(K.transition === "none" ? 0 : K.speed) } }, X.prep = function (b) { function h() { K.h = K.h || A.height(), K.h = K.mh && K.mh < K.h ? K.mh : K.h; return K.h } function g() { K.w = K.w || A.width(), K.w = K.mw && K.mw < K.w ? K.mw : K.w; return K.w } if (!!S) { var c, d = K.transition === "none" ? 0 : K.speed; A.remove(), A = Y("LoadedContent").append(b), A.hide().appendTo(B.show()).css({ width: g(), overflow: K.scrolling ? "auto" : "hidden" }).css({ height: h() }).prependTo(t), B.hide(), a(R).css({ "float": "none" }), o && a("select").not(r.find("select")).filter(function () { return this.style.visibility !== "hidden" }).css({ visibility: "hidden" }).one(k, function () { this.style.visibility = "inherit" }), c = function () { function o() { n && r[0].style.removeAttribute("filter") } var b, c, g, h, i = y.length, k, l; !S || (l = function () { clearTimeout(W), C.hide(), ba(j, K.onComplete) }, n && R && A.fadeIn(100), D.html(K.title).add(A).show(), i > 1 ? (typeof K.current == "string" && E.html(K.current.replace("{current}", Q + 1).replace("{total}", i)).show(), G[K.loop || Q < i - 1 ? "show" : "hide"]().html(K.next), H[K.loop || Q ? "show" : "hide"]().html(K.previous), b = Q ? y[Q - 1] : y[i - 1], g = Q < i - 1 ? y[Q + 1] : y[0], K.slideshow && F.show(), K.preloading && (h = a.data(g, e).href || g.href, c = a.data(b, e).href || b.href, h = a.isFunction(h) ? h.call(g) : h, c = a.isFunction(c) ? c.call(b) : c, $(h) && (a("<img/>")[0].src = h), $(c) && (a("<img/>")[0].src = c))) : J.hide(), K.iframe ? (k = a("<iframe/>").addClass(f + "Iframe")[0], K.fastIframe ? l() : a(k).one("load", l), k.name = f + +(new Date), k.src = K.href, K.scrolling || (k.scrolling = "no"), n && (k.frameBorder = 0, k.allowTransparency = "true"), a(k).appendTo(A).one(m, function () { k.src = "//about:blank" })) : l(), K.transition === "fade" ? r.fadeTo(d, 1, o) : o()) }, K.transition === "fade" ? r.fadeTo(d, 0, function () { X.position(0, c) }) : X.position(d, c) } }, X.load = function (b) { var c, d, e = X.prep; T = !0, R = !1, P = y[Q], b || _(), ba(m), ba(i, K.onLoad), K.h = K.height ? Z(K.height, "y") - N - L : K.innerHeight && Z(K.innerHeight, "y"), K.w = K.width ? Z(K.width, "x") - O - M : K.innerWidth && Z(K.innerWidth, "x"), K.mw = K.w, K.mh = K.h, K.maxWidth && (K.mw = Z(K.maxWidth, "x") - O - M, K.mw = K.w && K.w < K.mw ? K.w : K.mw), K.maxHeight && (K.mh = Z(K.maxHeight, "y") - N - L, K.mh = K.h && K.h < K.mh ? K.h : K.mh), c = K.href, W = setTimeout(function () { C.show() }, 100), K.inline ? (Y().hide().insertBefore(a(c)[0]).one(m, function () { a(this).replaceWith(A.children()) }), e(a(c))) : K.iframe ? e(" ") : K.html ? e(K.html) : $(c) ? (a(R = new Image).addClass(f + "Photo").error(function () { K.title = !1, e(Y("Error").text("This image could not be loaded")) }).load(function () { var a; R.onload = null, K.scalePhotos && (d = function () { R.height -= R.height * a, R.width -= R.width * a }, K.mw && R.width > K.mw && (a = (R.width - K.mw) / R.width, d()), K.mh && R.height > K.mh && (a = (R.height - K.mh) / R.height, d())), K.h && (R.style.marginTop = Math.max(K.h - R.height, 0) / 2 + "px"), y[1] && (Q < y.length - 1 || K.loop) && (R.style.cursor = "pointer", R.onclick = function () { X.next() }), n && (R.style.msInterpolationMode = "bicubic"), setTimeout(function () { e(R) }, 1) }), setTimeout(function () { R.src = c }, 1)) : c && B.load(c, K.data, function (b, c, d) { e(c === "error" ? Y("Error").text("Request unsuccessful: " + d.statusText) : a(this).contents()) }) }, X.next = function () { !T && y[1] && (Q < y.length - 1 || K.loop) && (Q = Q < y.length - 1 ? Q + 1 : 0, X.load()) }, X.prev = function () { !T && y[1] && (Q || K.loop) && (Q = Q ? Q - 1 : y.length - 1, X.load()) }, X.close = function () { S && !U && (U = !0, S = !1, ba(k, K.onCleanup), z.unbind("." + f + " ." + p), q.fadeTo(200, 0), r.stop().fadeTo(300, 0, function () { r.add(q).css({ opacity: 1, cursor: "auto" }).hide(), ba(m), A.remove(), setTimeout(function () { U = !1, ba(l, K.onClosed) }, 1) })) }, X.element = function () { return a(P) }, X.settings = d, V = function (a) { a.button !== 0 && typeof a.button != "undefined" || a.ctrlKey || a.shiftKey || a.altKey || (a.preventDefault(), bc(this)) }, a.fn.delegate ? a(b).delegate("." + g, "click", V) : a("." + g).live("click", V), a(X.init) })(jQuery, document, this);

jQuery(document).ready(function ($) {
    $("a[rel='lightbox'],a[rel='colorbox']").colorbox({ opacity: "0.8" });
});

