﻿///* hoverIntent by Brian Cherne */
(function(a) { a.fn.hoverIntent = function(b, c) { var d = { sensitivity: 7, interval: 100, timeout: 0 }; d = a.extend(d, c ? { over: b, out: c} : b); var e, f, g, h; var i = function(a) { e = a.pageX; f = a.pageY }; var j = function(b, c) { c.hoverIntent_t = clearTimeout(c.hoverIntent_t); if (Math.abs(g - e) + Math.abs(h - f) < d.sensitivity) { a(c).unbind("mousemove", i); c.hoverIntent_s = 1; return d.over.apply(c, [b]) } else { g = e; h = f; c.hoverIntent_t = setTimeout(function() { j(b, c) }, d.interval) } }; var k = function(a, b) { b.hoverIntent_t = clearTimeout(b.hoverIntent_t); b.hoverIntent_s = 0; return d.out.apply(b, [a]) }; var l = function(b) { var c = (b.type == "mouseover" ? b.fromElement : b.toElement) || b.relatedTarget; while (c && c != this) { try { c = c.parentNode } catch (b) { c = this } } if (c == this) { return false } var e = jQuery.extend({}, b); var f = this; if (f.hoverIntent_t) { f.hoverIntent_t = clearTimeout(f.hoverIntent_t) } if (b.type == "mouseover") { g = e.pageX; h = e.pageY; a(f).bind("mousemove", i); if (f.hoverIntent_s != 1) { f.hoverIntent_t = setTimeout(function() { j(e, f) }, d.interval) } } else { a(f).unbind("mousemove", i); if (f.hoverIntent_s == 1) { f.hoverIntent_t = setTimeout(function() { k(e, f) }, d.timeout) } } }; return this.mouseover(l).mouseout(l) } })(jQuery)


/*
* Superfish v1.4.8 - jQuery menu widget
* Copyright (c) 2008 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* 	http://www.opensource.org/licenses/mit-license.php
* 	http://www.gnu.org/licenses/gpl.html
*
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
*/
; (function(a) { a.fn.superfish = function(b) { var c = a.fn.superfish, d = c.c, e = a(['<span class="', d.arrowClass, '"> &#187;</span>'].join("")), f = function() { var b = a(this), c = h(b); clearTimeout(c.sfTimer); b.showSuperfishUl().siblings().hideSuperfishUl() }, g = function() { var b = a(this), d = h(b), e = c.op; clearTimeout(d.sfTimer); d.sfTimer = setTimeout(function() { e.retainPath = a.inArray(b[0], e.$path) > -1; b.hideSuperfishUl(); if (e.$path.length && b.parents(["li.", e.hoverClass].join("")).length < 1) { f.call(e.$path) } }, e.delay) }, h = function(a) { var b = a.parents(["ul.", d.menuClass, ":first"].join(""))[0]; c.op = c.o[b.serial]; return b }, i = function(a) { a.addClass(d.anchorClass).append(e.clone()) }; return this.each(function() { var e = this.serial = c.o.length; var h = a.extend({}, c.defaults, b); h.$path = a("li." + h.pathClass, this).slice(0, h.pathLevels).each(function() { a(this).addClass([h.hoverClass, d.bcClass].join(" ")).filter("li:has(ul)").removeClass(h.pathClass) }); c.o[e] = c.op = h; a("li:has(ul)", this)[a.fn.hoverIntent && !h.disableHI ? "hoverIntent" : "hover"](f, g).each(function() { if (h.autoArrows) i(a(">a:first-child", this)) }).not("." + d.bcClass).hideSuperfishUl(); var j = a("a", this); j.each(function(a) { var b = j.eq(a).parents("li"); j.eq(a).focus(function() { f.call(b) }).blur(function() { g.call(b) }) }); h.onInit.call(this) }).each(function() { var b = [d.menuClass]; if (c.op.dropShadows && !(a.browser.msie && a.browser.version < 7)) b.push(d.shadowClass); a(this).addClass(b.join(" ")) }) }; var b = a.fn.superfish; b.o = []; b.op = {}; b.IE7fix = function() { var c = b.op; if (a.browser.msie && a.browser.version > 6 && c.dropShadows && c.animation.opacity != undefined) this.toggleClass(b.c.shadowClass + "-off") }; b.c = { bcClass: "sf-breadcrumb", menuClass: "sf-js-enabled", anchorClass: "sf-with-ul", arrowClass: "sf-sub-indicator", shadowClass: "sf-shadow" }; b.defaults = { hoverClass: "sfHover", pathClass: "overideThisToUse", pathLevels: 1, delay: 800, animation: { opacity: "show" }, speed: "normal", autoArrows: true, dropShadows: true, disableHI: false, onInit: function() { }, onBeforeShow: function() { }, onShow: function() { }, onHide: function() { } }; a.fn.extend({ hideSuperfishUl: function() { var c = b.op, d = c.retainPath === true ? c.$path : ""; c.retainPath = false; var e = a(["li.", c.hoverClass].join(""), this).add(this).not(d).removeClass(c.hoverClass).find(">ul").hide().css("visibility", "hidden"); c.onHide.call(e); return this }, showSuperfishUl: function() { var a = b.op, c = b.c.shadowClass + "-off", d = this.addClass(a.hoverClass).find(">ul:hidden").css("visibility", "visible"); b.IE7fix.call(d); a.onBeforeShow.call(d); d.animate(a.animation, a.speed, function() { b.IE7fix.call(d); a.onShow.call(d) }); return this } }) })(jQuery)



/*
* Supersubs v0.2b - jQuery plugin
* Copyright (c) 2008 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* 	http://www.opensource.org/licenses/mit-license.php
* 	http://www.gnu.org/licenses/gpl.html
*
*
* This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
* their longest list item children. If you use this, please expect bugs and report them
* to the jQuery Google Group with the word 'Superfish' in the subject line.
*
*/
; (function(a) { a.fn.supersubs = function(b) { var c = a.extend({}, a.fn.supersubs.defaults, b); return this.each(function() { var b = a(this); var d = a.meta ? a.extend({}, c, b.data()) : c; var e = a('<li id="menu-fontsize">&#8212;</li>').css({ padding: 0, position: "absolute", top: "-999em", width: "auto" }).appendTo(b).width(); a("#menu-fontsize").remove(); $ULs = b.find("ul"); $ULs.each(function(b) { var c = $ULs.eq(b); var f = c.children(); var g = f.children("a"); var h = f.css("white-space", "nowrap").css("float"); var i = c.add(f).add(g).css({ "float": "none", width: "auto" }).end().end()[0].clientWidth / e; i += d.extraWidth; if (i > d.maxWidth) { i = d.maxWidth } else if (i < d.minWidth) { i = d.minWidth } i += "em"; c.css("width", i); f.css({ "float": h, width: "100%", "white-space": "normal" }).each(function() { var b = a(">ul", this); var c = b.css("left") !== undefined ? "left" : "right"; b.css(c, i) }) }) }) }; a.fn.supersubs.defaults = { minWidth: 9, maxWidth: 25, extraWidth: 0} })(jQuery)



/**
* jQuery Galleriffic plugin
*
* Copyright (c) 2008 Trent Foley (http://trentacular.com)
* Licensed under the MIT License:
*   http://www.opensource.org/licenses/mit-license.php
*
* Much thanks to primary contributer Ponticlaro (http://www.ponticlaro.com)
*/
; (function(a) { var b = {}; var c = 0; a.galleriffic = { version: "2.0.1", normalizeHash: function(a) { return a.replace(/^.*#/, "").replace(/\?.*$/, "") }, getImage: function(c) { if (!c) return undefined; c = a.galleriffic.normalizeHash(c); return b[c] }, gotoImage: function(b) { var c = a.galleriffic.getImage(b); if (!c) return false; var d = c.gallery; d.gotoImage(c); return true }, removeImageByHash: function(b, c) { var d = a.galleriffic.getImage(b); if (!d) return false; var e = d.gallery; if (c && c != e) return false; return e.removeImageByIndex(d.index) } }; var d = { delay: 3e3, numThumbs: 20, preloadAhead: 40, enableTopPager: false, enableBottomPager: true, maxPagesToShow: 7, imageContainerSel: "", captionContainerSel: "", controlsContainerSel: "", loadingContainerSel: "", renderSSControls: true, renderNavControls: true, playLinkText: "Play", pauseLinkText: "Pause", prevLinkText: "Previous", nextLinkText: "Next", nextPageLinkText: "Next ›", prevPageLinkText: "‹ Prev", enableHistory: false, enableKeyboardNavigation: true, autoStart: false, syncTransitions: false, defaultTransitionDuration: 1e3, onSlideChange: undefined, onTransitionOut: undefined, onTransitionIn: undefined, onPageTransitionOut: undefined, onPageTransitionIn: undefined, onImageAdded: undefined, onImageRemoved: undefined }; a.fn.galleriffic = function(e) { a.extend(this, { version: a.galleriffic.version, isSlideshowRunning: false, slideshowTimeout: undefined, clickHandler: function(b, c) { this.pause(); if (!this.enableHistory) { var d = a.galleriffic.normalizeHash(a(c).attr("href")); a.galleriffic.gotoImage(d); b.preventDefault() } }, appendImage: function(a) { this.addImage(a, false, false); return this }, insertImage: function(a, b) { this.addImage(a, false, true, b); return this }, addImage: function(d, e, f, g) { var h = typeof d === "string" ? a(d) : d; var i = h.find("a.thumb"); var j = i.attr("href"); var k = i.attr("title"); var l = h.find(".caption").remove(); var m = i.attr("name"); c++; if (!m || b["" + m]) { m = c } if (!f) g = this.data.length; var n = { title: k, slideUrl: j, caption: l, hash: m, gallery: this, index: g }; if (f) { this.data.splice(g, 0, n); this.updateIndices(g) } else { this.data.push(n) } var o = this; if (!e) { this.updateThumbs(function() { var a = o.find("ul.thumbs"); if (f) a.children(":eq(" + g + ")").before(h); else a.append(h); if (o.onImageAdded) o.onImageAdded(n, h) }) } b["" + m] = n; i.attr("rel", "history").attr("href", "#" + m).removeAttr("name").click(function(a) { o.clickHandler(a, this) }); return this }, removeImageByIndex: function(a) { if (a < 0 || a >= this.data.length) return false; var b = this.data[a]; if (!b) return false; this.removeImage(b); return true }, removeImageByHash: function(b) { return a.galleriffic.removeImageByHash(b, this) }, removeImage: function(a) { var c = a.index; this.data.splice(c, 1); delete b["" + a.hash]; this.updateThumbs(function() { var b = f.find("ul.thumbs").children(":eq(" + c + ")").remove(); if (f.onImageRemoved) f.onImageRemoved(a, b) }); this.updateIndices(c); return this }, updateIndices: function(a) { for (i = a; i < this.data.length; i++) { this.data[i].index = i } return this }, initializeThumbs: function() { this.data = []; var b = this; this.find("ul.thumbs > li").each(function(c) { b.addImage(a(this), true, false) }); return this }, isPreloadComplete: false, preloadInit: function() { if (this.preloadAhead == 0) return this; this.preloadStartIndex = this.currentImage.index; var a = this.getNextIndex(this.preloadStartIndex); return this.preloadRecursive(this.preloadStartIndex, a) }, preloadRelocate: function(a) { this.preloadStartIndex = a; return this }, preloadRecursive: function(a, b) { if (a != this.preloadStartIndex) { var c = this.getNextIndex(this.preloadStartIndex); return this.preloadRecursive(this.preloadStartIndex, c) } var d = this; var e = b - a; if (e < 0) e = this.data.length - 1 - a + b; if (this.preloadAhead >= 0 && e > this.preloadAhead) { setTimeout(function() { d.preloadRecursive(a, b) }, 500); return this } var f = this.data[b]; if (!f) return this; if (f.image) return this.preloadNext(a, b); var g = new Image; g.onload = function() { f.image = this; d.preloadNext(a, b) }; g.alt = f.title; g.src = f.slideUrl; return this }, preloadNext: function(a, b) { var c = this.getNextIndex(b); if (c == a) { this.isPreloadComplete = true } else { var d = this; setTimeout(function() { d.preloadRecursive(a, c) }, 100) } return this }, getNextIndex: function(a) { var b = a + 1; if (b >= this.data.length) b = 0; return b }, getPrevIndex: function(a) { var b = a - 1; if (b < 0) b = this.data.length - 1; return b }, pause: function() { this.isSlideshowRunning = false; if (this.slideshowTimeout) { clearTimeout(this.slideshowTimeout); this.slideshowTimeout = undefined } if (this.$controlsContainer) { this.$controlsContainer.find("div.ss-controls a").removeClass().addClass("play").attr("title", this.playLinkText).attr("href", "#play").html(this.playLinkText) } return this }, play: function() { this.isSlideshowRunning = true; if (this.$controlsContainer) { this.$controlsContainer.find("div.ss-controls a").removeClass().addClass("pause").attr("title", this.pauseLinkText).attr("href", "#pause").html(this.pauseLinkText) } if (!this.slideshowTimeout) { var a = this; this.slideshowTimeout = setTimeout(function() { a.ssAdvance() }, this.delay) } return this }, toggleSlideshow: function() { if (this.isSlideshowRunning) this.pause(); else this.play(); return this }, ssAdvance: function() { if (this.isSlideshowRunning) this.next(true); return this }, next: function(a, b) { this.gotoIndex(this.getNextIndex(this.currentImage.index), a, b); return this }, previous: function(a, b) { this.gotoIndex(this.getPrevIndex(this.currentImage.index), a, b); return this }, nextPage: function(a, b) { var c = this.getCurrentPage(); var d = this.getNumPages() - 1; if (c < d) { var e = c * this.numThumbs; var f = e + this.numThumbs; this.gotoIndex(f, a, b) } return this }, previousPage: function(a, b) { var c = this.getCurrentPage(); if (c > 0) { var d = c * this.numThumbs; var e = d - this.numThumbs; this.gotoIndex(e, a, b) } return this }, gotoIndex: function(b, c, d) { if (!c) this.pause(); if (b < 0) b = 0; else if (b >= this.data.length) b = this.data.length - 1; var e = this.data[b]; if (!d && this.enableHistory) a.historyLoad(String(e.hash)); else this.gotoImage(e); return this }, gotoImage: function(a) { var b = a.index; if (this.onSlideChange) this.onSlideChange(this.currentImage.index, b); this.currentImage = a; this.preloadRelocate(b); this.refresh(); return this }, getDefaultTransitionDuration: function(a) { if (a) return this.defaultTransitionDuration; return this.defaultTransitionDuration / 2 }, refresh: function() { var a = this.currentImage; if (!a) return this; var b = a.index; if (this.$controlsContainer) { this.$controlsContainer.find("div.nav-controls a.prev").attr("href", "#" + this.data[this.getPrevIndex(b)].hash).end().find("div.nav-controls a.next").attr("href", "#" + this.data[this.getNextIndex(b)].hash) } var c = this.$imageContainer.find("span.current").addClass("previous").removeClass("current"); var d = 0; if (this.$captionContainer) { d = this.$captionContainer.find("span.current").addClass("previous").removeClass("current") } var e = this.syncTransitions && a.image; var f = true; var g = this; var h = function() { f = false; c.remove(); if (d) d.remove(); if (!e) { if (a.image && a.hash == g.data[g.currentImage.index].hash) { g.buildImage(a, e) } else { if (g.$loadingContainer) { g.$loadingContainer.show() } } } }; if (c.length == 0) { h() } else { if (this.onTransitionOut) { this.onTransitionOut(c, d, e, h) } else { c.fadeTo(this.getDefaultTransitionDuration(e), 0, h); if (d) d.fadeTo(this.getDefaultTransitionDuration(e), 0) } } if (e) this.buildImage(a, e); if (!a.image) { var i = new Image; i.onload = function() { a.image = this; if (!f && a.hash == g.data[g.currentImage.index].hash) { g.buildImage(a, e) } }; i.alt = a.title; i.src = a.slideUrl } this.relocatePreload = true; return this.syncThumbs() }, buildImage: function(a, b) { var c = this; var d = this.getNextIndex(a.index); var e = this.$imageContainer.append('<span class="image-wrapper current"><a class="advance-link" rel="history" href="#' + this.data[d].hash + '" title="' + a.title + '"> </a></span>').find("span.current").css("opacity", "0"); e.find("a").append(a.image).click(function(a) { c.clickHandler(a, this) }); var f = 0; if (this.$captionContainer) { f = this.$captionContainer.append('<span class="image-caption current"></span>').find("span.current").css("opacity", "0").append(a.caption) } if (this.$loadingContainer) { this.$loadingContainer.hide() } if (this.onTransitionIn) { this.onTransitionIn(e, f, b) } else { e.fadeTo(this.getDefaultTransitionDuration(b), 1); if (f) f.fadeTo(this.getDefaultTransitionDuration(b), 1) } if (this.isSlideshowRunning) { if (this.slideshowTimeout) clearTimeout(this.slideshowTimeout); this.slideshowTimeout = setTimeout(function() { c.ssAdvance() }, this.delay) } return this }, getCurrentPage: function() { return Math.floor(this.currentImage.index / this.numThumbs) }, syncThumbs: function() { var a = this.getCurrentPage(); if (a != this.displayedPage) this.updateThumbs(); var b = this.find("ul.thumbs").children(); b.filter(".selected").removeClass("selected"); b.eq(this.currentImage.index).addClass("selected"); return this }, updateThumbs: function(a) { var b = this; var c = function() { if (a) a(); b.rebuildThumbs(); if (b.onPageTransitionIn) b.onPageTransitionIn(); else b.show() }; if (this.onPageTransitionOut) { this.onPageTransitionOut(c) } else { this.hide(); c() } return this }, rebuildThumbs: function() { var b = this.data.length > this.numThumbs; if (this.enableTopPager) { var c = this.find("div.top"); if (c.length == 0) c = this.prepend('<div class="top pagination"></div>').find("div.top"); else c.empty(); if (b) this.buildPager(c) } if (this.enableBottomPager) { var d = this.find("div.bottom"); if (d.length == 0) d = this.append('<div class="bottom pagination"></div>').find("div.bottom"); else d.empty(); if (b) this.buildPager(d) } var e = this.getCurrentPage(); var f = e * this.numThumbs; var g = f + this.numThumbs - 1; if (g >= this.data.length) g = this.data.length - 1; var h = this.find("ul.thumbs"); h.find("li").each(function(b) { var c = a(this); if (b >= f && b <= g) { c.show() } else { c.hide() } }); this.displayedPage = e; h.removeClass("noscript"); return this }, getNumPages: function() { return Math.ceil(this.data.length / this.numThumbs) }, buildPager: function(a) { var b = this; var c = this.getNumPages(); var d = this.getCurrentPage(); var e = d * this.numThumbs; var f = this.maxPagesToShow - 1; var g = d - Math.floor((this.maxPagesToShow - 1) / 2) + 1; if (g > 0) { var h = c - g; if (h < f) { g = g - (f - h) } } if (g < 0) { g = 0 } if (d > 0) { var i = e - this.numThumbs; a.append('<a rel="history" href="#' + this.data[i].hash + '" title="' + this.prevPageLinkText + '">' + this.prevPageLinkText + "</a>") } if (g > 0) { this.buildPageLink(a, 0, c); if (g > 1) a.append('<span class="ellipsis">…</span>'); f-- } while (f > 0) { this.buildPageLink(a, g, c); f--; g++ } if (g < c) { var j = c - 1; if (g < j) a.append('<span class="ellipsis">…</span>'); this.buildPageLink(a, j, c) } var k = e + this.numThumbs; if (k < this.data.length) { a.append('<a rel="history" href="#' + this.data[k].hash + '" title="' + this.nextPageLinkText + '">' + this.nextPageLinkText + "</a>") } a.find("a").click(function(a) { b.clickHandler(a, this) }); return this }, buildPageLink: function(a, b, c) { var d = b + 1; var e = this.getCurrentPage(); if (b == e) a.append('<span class="current">' + d + "</span>"); else if (b < c) { var f = b * this.numThumbs; a.append('<a rel="history" href="#' + this.data[f].hash + '" title="' + d + '">' + d + "</a>") } return this } }); a.extend(this, d, e); if (this.enableHistory && !a.historyInit) this.enableHistory = false; if (this.imageContainerSel) this.$imageContainer = a(this.imageContainerSel); if (this.captionContainerSel) this.$captionContainer = a(this.captionContainerSel); if (this.loadingContainerSel) this.$loadingContainer = a(this.loadingContainerSel); this.initializeThumbs(); if (this.maxPagesToShow < 3) this.maxPagesToShow = 3; this.displayedPage = -1; this.currentImage = this.data[0]; var f = this; if (this.$loadingContainer) this.$loadingContainer.hide(); if (this.controlsContainerSel) { this.$controlsContainer = a(this.controlsContainerSel).empty(); if (this.renderSSControls) { if (this.autoStart) { this.$controlsContainer.append('<div class="ss-controls"><a href="#pause" class="pause" title="' + this.pauseLinkText + '">' + this.pauseLinkText + "</a></div>") } else { this.$controlsContainer.append('<div class="ss-controls"><a href="#play" class="play" title="' + this.playLinkText + '">' + this.playLinkText + "</a></div>") } this.$controlsContainer.find("div.ss-controls a").click(function(a) { f.toggleSlideshow(); a.preventDefault(); return false }) } if (this.renderNavControls) { this.$controlsContainer.append('<div class="nav-controls"><a class="prev" rel="history" title="' + this.prevLinkText + '">' + this.prevLinkText + '</a><a class="next" rel="history" title="' + this.nextLinkText + '">' + this.nextLinkText + "</a></div>").find("div.nav-controls a").click(function(a) { f.clickHandler(a, this) }) } } var g = !this.enableHistory || !location.hash; if (this.enableHistory && location.hash) { var h = a.galleriffic.normalizeHash(location.hash); var j = b[h]; if (!j) g = true } if (g) this.gotoIndex(0, false, true); if (this.enableKeyboardNavigation) { a(document).keydown(function(a) { var b = a.charCode ? a.charCode : a.keyCode ? a.keyCode : 0; switch (b) { case 32: f.next(); a.preventDefault(); break; case 33: f.previousPage(); a.preventDefault(); break; case 34: f.nextPage(); a.preventDefault(); break; case 35: f.gotoIndex(f.data.length - 1); a.preventDefault(); break; case 36: f.gotoIndex(0); a.preventDefault(); break; case 37: f.previous(); a.preventDefault(); break; case 39: f.next(); a.preventDefault(); break } }) } if (this.autoStart) this.play(); setTimeout(function() { f.preloadInit() }, 1e3); return this } })(jQuery)


/*
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2010 M. Alsup
* Version: 2.99 (12-MAR-2011)
* Dual licensed under the MIT and GPL licenses.
* http://jquery.malsup.com/license.html
* Requires: jQuery v1.3.2 or later
*/
; (function($) { var ver = "2.99"; if ($.support == undefined) { $.support = { opacity: !($.browser.msie) }; } function debug(s) { $.fn.cycle.debug && log(s); } function log() { window.console && console.log && console.log("[cycle] " + Array.prototype.join.call(arguments, " ")); } $.expr[":"].paused = function(el) { return el.cyclePause; }; $.fn.cycle = function(options, arg2) { var o = { s: this.selector, c: this.context }; if (this.length === 0 && options != "stop") { if (!$.isReady && o.s) { log("DOM not ready, queuing slideshow"); $(function() { $(o.s, o.c).cycle(options, arg2); }); return this; } log("terminating; zero elements found by selector" + ($.isReady ? "" : " (DOM not ready)")); return this; } return this.each(function() { var opts = handleArguments(this, options, arg2); if (opts === false) { return; } opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink; if (this.cycleTimeout) { clearTimeout(this.cycleTimeout); } this.cycleTimeout = this.cyclePause = 0; var $cont = $(this); var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children(); var els = $slides.get(); if (els.length < 2) { log("terminating; too few slides: " + els.length); return; } var opts2 = buildOptions($cont, $slides, els, opts, o); if (opts2 === false) { return; } var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards); if (startTime) { startTime += (opts2.delay || 0); if (startTime < 10) { startTime = 10; } debug("first timeout: " + startTime); this.cycleTimeout = setTimeout(function() { go(els, opts2, 0, !opts.backwards); }, startTime); } }); }; function handleArguments(cont, options, arg2) { if (cont.cycleStop == undefined) { cont.cycleStop = 0; } if (options === undefined || options === null) { options = {}; } if (options.constructor == String) { switch (options) { case "destroy": case "stop": var opts = $(cont).data("cycle.opts"); if (!opts) { return false; } cont.cycleStop++; if (cont.cycleTimeout) { clearTimeout(cont.cycleTimeout); } cont.cycleTimeout = 0; $(cont).removeData("cycle.opts"); if (options == "destroy") { destroy(opts); } return false; case "toggle": cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1; checkInstantResume(cont.cyclePause, arg2, cont); return false; case "pause": cont.cyclePause = 1; return false; case "resume": cont.cyclePause = 0; checkInstantResume(false, arg2, cont); return false; case "prev": case "next": var opts = $(cont).data("cycle.opts"); if (!opts) { log('options not found, "prev/next" ignored'); return false; } $.fn.cycle[options](opts); return false; default: options = { fx: options }; } return options; } else { if (options.constructor == Number) { var num = options; options = $(cont).data("cycle.opts"); if (!options) { log("options not found, can not advance slide"); return false; } if (num < 0 || num >= options.elements.length) { log("invalid slide index: " + num); return false; } options.nextSlide = num; if (cont.cycleTimeout) { clearTimeout(cont.cycleTimeout); cont.cycleTimeout = 0; } if (typeof arg2 == "string") { options.oneTimeFx = arg2; } go(options.elements, options, 1, num >= options.currSlide); return false; } } return options; function checkInstantResume(isPaused, arg2, cont) { if (!isPaused && arg2 === true) { var options = $(cont).data("cycle.opts"); if (!options) { log("options not found, can not resume"); return false; } if (cont.cycleTimeout) { clearTimeout(cont.cycleTimeout); cont.cycleTimeout = 0; } go(options.elements, options, 1, !options.backwards); } } } function removeFilter(el, opts) { if (!$.support.opacity && opts.cleartype && el.style.filter) { try { el.style.removeAttribute("filter"); } catch (smother) { } } } function destroy(opts) { if (opts.next) { $(opts.next).unbind(opts.prevNextEvent); } if (opts.prev) { $(opts.prev).unbind(opts.prevNextEvent); } if (opts.pager || opts.pagerAnchorBuilder) { $.each(opts.pagerAnchors || [], function() { this.unbind().remove(); }); } opts.pagerAnchors = null; if (opts.destroy) { opts.destroy(opts); } } function buildOptions($cont, $slides, els, options, o) { var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); if (opts.autostop) { opts.countdown = opts.autostopCount || els.length; } var cont = $cont[0]; $cont.data("cycle.opts", opts); opts.$cont = $cont; opts.stopCount = cont.cycleStop; opts.elements = els; opts.before = opts.before ? [opts.before] : []; opts.after = opts.after ? [opts.after] : []; if (!$.support.opacity && opts.cleartype) { opts.after.push(function() { removeFilter(this, opts); }); } if (opts.continuous) { opts.after.push(function() { go(els, opts, 0, !opts.backwards); }); } saveOriginalOpts(opts); if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) { clearTypeFix($slides); } if ($cont.css("position") == "static") { $cont.css("position", "relative"); } if (opts.width) { $cont.width(opts.width); } if (opts.height && opts.height != "auto") { $cont.height(opts.height); } if (opts.startingSlide) { opts.startingSlide = parseInt(opts.startingSlide); } else { if (opts.backwards) { opts.startingSlide = els.length - 1; } } if (opts.random) { opts.randomMap = []; for (var i = 0; i < els.length; i++) { opts.randomMap.push(i); } opts.randomMap.sort(function(a, b) { return Math.random() - 0.5; }); opts.randomIndex = 1; opts.startingSlide = opts.randomMap[1]; } else { if (opts.startingSlide >= els.length) { opts.startingSlide = 0; } } opts.currSlide = opts.startingSlide || 0; var first = opts.startingSlide; $slides.css({ position: "absolute", top: 0, left: 0 }).hide().each(function(i) { var z; if (opts.backwards) { z = first ? i <= first ? els.length + (i - first) : first - i : els.length - i; } else { z = first ? i >= first ? els.length - (i - first) : first - i : els.length - i; } $(this).css("z-index", z); }); $(els[first]).css("opacity", 1).show(); removeFilter(els[first], opts); if (opts.fit && opts.width) { $slides.width(opts.width); } if (opts.fit && opts.height && opts.height != "auto") { $slides.height(opts.height); } var reshape = opts.containerResize && !$cont.innerHeight(); if (reshape) { var maxw = 0, maxh = 0; for (var j = 0; j < els.length; j++) { var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight(); if (!w) { w = e.offsetWidth || e.width || $e.attr("width"); } if (!h) { h = e.offsetHeight || e.height || $e.attr("height"); } maxw = w > maxw ? w : maxw; maxh = h > maxh ? h : maxh; } if (maxw > 0 && maxh > 0) { $cont.css({ width: maxw + "px", height: maxh + "px" }); } } if (opts.pause) { $cont.hover(function() { this.cyclePause++; }, function() { this.cyclePause--; }); } if (supportMultiTransitions(opts) === false) { return false; } var requeue = false; options.requeueAttempts = options.requeueAttempts || 0; $slides.each(function() { var $el = $(this); this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr("height") || 0); this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr("width") || 0); if ($el.is("img")) { var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete); var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete); var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete); var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete); if (loadingIE || loadingFF || loadingOp || loadingOther) { if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { log(options.requeueAttempts, " - img slide not loaded, requeuing slideshow: ", this.src, this.cycleW, this.cycleH); setTimeout(function() { $(o.s, o.c).cycle(options); }, opts.requeueTimeout); requeue = true; return false; } else { log("could not determine size of image: " + this.src, this.cycleW, this.cycleH); } } } return true; }); if (requeue) { return false; } opts.cssBefore = opts.cssBefore || {}; opts.cssAfter = opts.cssAfter || {}; opts.cssFirst = opts.cssFirst || {}; opts.animIn = opts.animIn || {}; opts.animOut = opts.animOut || {}; $slides.not(":eq(" + first + ")").css(opts.cssBefore); $($slides[first]).css(opts.cssFirst); if (opts.timeout) { opts.timeout = parseInt(opts.timeout); if (opts.speed.constructor == String) { opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed); } if (!opts.sync) { opts.speed = opts.speed / 2; } var buffer = opts.fx == "none" ? 0 : opts.fx == "shuffle" ? 500 : 250; while ((opts.timeout - opts.speed) < buffer) { opts.timeout += opts.speed; } } if (opts.easing) { opts.easeIn = opts.easeOut = opts.easing; } if (!opts.speedIn) { opts.speedIn = opts.speed; } if (!opts.speedOut) { opts.speedOut = opts.speed; } opts.slideCount = els.length; opts.currSlide = opts.lastSlide = first; if (opts.random) { if (++opts.randomIndex == els.length) { opts.randomIndex = 0; } opts.nextSlide = opts.randomMap[opts.randomIndex]; } else { if (opts.backwards) { opts.nextSlide = opts.startingSlide == 0 ? (els.length - 1) : opts.startingSlide - 1; } else { opts.nextSlide = opts.startingSlide >= (els.length - 1) ? 0 : opts.startingSlide + 1; } } if (!opts.multiFx) { var init = $.fn.cycle.transitions[opts.fx]; if ($.isFunction(init)) { init($cont, $slides, opts); } else { if (opts.fx != "custom" && !opts.multiFx) { log("unknown transition: " + opts.fx, "; slideshow terminating"); return false; } } } var e0 = $slides[first]; if (opts.before.length) { opts.before[0].apply(e0, [e0, e0, opts, true]); } if (opts.after.length) { opts.after[0].apply(e0, [e0, e0, opts, true]); } if (opts.next) { $(opts.next).bind(opts.prevNextEvent, function() { return advance(opts, 1); }); } if (opts.prev) { $(opts.prev).bind(opts.prevNextEvent, function() { return advance(opts, 0); }); } if (opts.pager || opts.pagerAnchorBuilder) { buildPager(els, opts); } exposeAddSlide(opts, els); return opts; } function saveOriginalOpts(opts) { opts.original = { before: [], after: [] }; opts.original.cssBefore = $.extend({}, opts.cssBefore); opts.original.cssAfter = $.extend({}, opts.cssAfter); opts.original.animIn = $.extend({}, opts.animIn); opts.original.animOut = $.extend({}, opts.animOut); $.each(opts.before, function() { opts.original.before.push(this); }); $.each(opts.after, function() { opts.original.after.push(this); }); } function supportMultiTransitions(opts) { var i, tx, txs = $.fn.cycle.transitions; if (opts.fx.indexOf(",") > 0) { opts.multiFx = true; opts.fxs = opts.fx.replace(/\s*/g, "").split(","); for (i = 0; i < opts.fxs.length; i++) { var fx = opts.fxs[i]; tx = txs[fx]; if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) { log("discarding unknown transition: ", fx); opts.fxs.splice(i, 1); i--; } } if (!opts.fxs.length) { log("No valid transitions named; slideshow terminating."); return false; } } else { if (opts.fx == "all") { opts.multiFx = true; opts.fxs = []; for (p in txs) { tx = txs[p]; if (txs.hasOwnProperty(p) && $.isFunction(tx)) { opts.fxs.push(p); } } } } if (opts.multiFx && opts.randomizeEffects) { var r1 = Math.floor(Math.random() * 20) + 30; for (i = 0; i < r1; i++) { var r2 = Math.floor(Math.random() * opts.fxs.length); opts.fxs.push(opts.fxs.splice(r2, 1)[0]); } debug("randomized fx sequence: ", opts.fxs); } return true; } function exposeAddSlide(opts, els) { opts.addSlide = function(newSlide, prepend) { var $s = $(newSlide), s = $s[0]; if (!opts.autostopCount) { opts.countdown++; } els[prepend ? "unshift" : "push"](s); if (opts.els) { opts.els[prepend ? "unshift" : "push"](s); } opts.slideCount = els.length; $s.css("position", "absolute"); $s[prepend ? "prependTo" : "appendTo"](opts.$cont); if (prepend) { opts.currSlide++; opts.nextSlide++; } if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) { clearTypeFix($s); } if (opts.fit && opts.width) { $s.width(opts.width); } if (opts.fit && opts.height && opts.height != "auto") { $s.height(opts.height); } s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height(); s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width(); $s.css(opts.cssBefore); if (opts.pager || opts.pagerAnchorBuilder) { $.fn.cycle.createPagerAnchor(els.length - 1, s, $(opts.pager), els, opts); } if ($.isFunction(opts.onAddSlide)) { opts.onAddSlide($s); } else { $s.hide(); } }; } $.fn.cycle.resetState = function(opts, fx) { fx = fx || opts.fx; opts.before = []; opts.after = []; opts.cssBefore = $.extend({}, opts.original.cssBefore); opts.cssAfter = $.extend({}, opts.original.cssAfter); opts.animIn = $.extend({}, opts.original.animIn); opts.animOut = $.extend({}, opts.original.animOut); opts.fxFn = null; $.each(opts.original.before, function() { opts.before.push(this); }); $.each(opts.original.after, function() { opts.after.push(this); }); var init = $.fn.cycle.transitions[fx]; if ($.isFunction(init)) { init(opts.$cont, $(opts.elements), opts); } }; function go(els, opts, manual, fwd) { if (manual && opts.busy && opts.manualTrump) { debug("manualTrump in go(), stopping active transition"); $(els).stop(true, true); opts.busy = 0; } if (opts.busy) { debug("transition active, ignoring new tx request"); return; } var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide]; if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual) { return; } if (!manual && !p.cyclePause && !opts.bounce && ((opts.autostop && (--opts.countdown <= 0)) || (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) { if (opts.end) { opts.end(opts); } return; } var changed = false; if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) { changed = true; var fx = opts.fx; curr.cycleH = curr.cycleH || $(curr).height(); curr.cycleW = curr.cycleW || $(curr).width(); next.cycleH = next.cycleH || $(next).height(); next.cycleW = next.cycleW || $(next).width(); if (opts.multiFx) { if (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length) { opts.lastFx = 0; } fx = opts.fxs[opts.lastFx]; opts.currFx = fx; } if (opts.oneTimeFx) { fx = opts.oneTimeFx; opts.oneTimeFx = null; } $.fn.cycle.resetState(opts, fx); if (opts.before.length) { $.each(opts.before, function(i, o) { if (p.cycleStop != opts.stopCount) { return; } o.apply(next, [curr, next, opts, fwd]); }); } var after = function() { opts.busy = 0; $.each(opts.after, function(i, o) { if (p.cycleStop != opts.stopCount) { return; } o.apply(next, [curr, next, opts, fwd]); }); }; debug("tx firing(" + fx + "); currSlide: " + opts.currSlide + "; nextSlide: " + opts.nextSlide); opts.busy = 1; if (opts.fxFn) { opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent); } else { if ($.isFunction($.fn.cycle[opts.fx])) { $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent); } else { $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent); } } } if (changed || opts.nextSlide == opts.currSlide) { opts.lastSlide = opts.currSlide; if (opts.random) { opts.currSlide = opts.nextSlide; if (++opts.randomIndex == els.length) { opts.randomIndex = 0; } opts.nextSlide = opts.randomMap[opts.randomIndex]; if (opts.nextSlide == opts.currSlide) { opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1; } } else { if (opts.backwards) { var roll = (opts.nextSlide - 1) < 0; if (roll && opts.bounce) { opts.backwards = !opts.backwards; opts.nextSlide = 1; opts.currSlide = 0; } else { opts.nextSlide = roll ? (els.length - 1) : opts.nextSlide - 1; opts.currSlide = roll ? 0 : opts.nextSlide + 1; } } else { var roll = (opts.nextSlide + 1) == els.length; if (roll && opts.bounce) { opts.backwards = !opts.backwards; opts.nextSlide = els.length - 2; opts.currSlide = els.length - 1; } else { opts.nextSlide = roll ? 0 : opts.nextSlide + 1; opts.currSlide = roll ? els.length - 1 : opts.nextSlide - 1; } } } } if (changed && opts.pager) { opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass); } var ms = 0; if (opts.timeout && !opts.continuous) { ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd); } else { if (opts.continuous && p.cyclePause) { ms = 10; } } if (ms > 0) { p.cycleTimeout = setTimeout(function() { go(els, opts, 0, !opts.backwards); }, ms); } } $.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) { $(pager).each(function() { $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName); }); }; function getTimeout(curr, next, opts, fwd) { if (opts.timeoutFn) { var t = opts.timeoutFn.call(curr, curr, next, opts, fwd); while (opts.fx != "none" && (t - opts.speed) < 250) { t += opts.speed; } debug("calculated timeout: " + t + "; speed: " + opts.speed); if (t !== false) { return t; } } return opts.timeout; } $.fn.cycle.next = function(opts) { advance(opts, 1); }; $.fn.cycle.prev = function(opts) { advance(opts, 0); }; function advance(opts, moveForward) { var val = moveForward ? 1 : -1; var els = opts.elements; var p = opts.$cont[0], timeout = p.cycleTimeout; if (timeout) { clearTimeout(timeout); p.cycleTimeout = 0; } if (opts.random && val < 0) { opts.randomIndex--; if (--opts.randomIndex == -2) { opts.randomIndex = els.length - 2; } else { if (opts.randomIndex == -1) { opts.randomIndex = els.length - 1; } } opts.nextSlide = opts.randomMap[opts.randomIndex]; } else { if (opts.random) { opts.nextSlide = opts.randomMap[opts.randomIndex]; } else { opts.nextSlide = opts.currSlide + val; if (opts.nextSlide < 0) { if (opts.nowrap) { return false; } opts.nextSlide = els.length - 1; } else { if (opts.nextSlide >= els.length) { if (opts.nowrap) { return false; } opts.nextSlide = 0; } } } } var cb = opts.onPrevNextEvent || opts.prevNextClick; if ($.isFunction(cb)) { cb(val > 0, opts.nextSlide, els[opts.nextSlide]); } go(els, opts, 1, moveForward); return false; } function buildPager(els, opts) { var $p = $(opts.pager); $.each(els, function(i, o) { $.fn.cycle.createPagerAnchor(i, o, $p, els, opts); }); opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass); } $.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) { var a; if ($.isFunction(opts.pagerAnchorBuilder)) { a = opts.pagerAnchorBuilder(i, el); debug("pagerAnchorBuilder(" + i + ", el) returned: " + a); } else { a = '<a href="#">' + (i + 1) + "</a>"; } if (!a) { return; } var $a = $(a); if ($a.parents("body").length === 0) { var arr = []; if ($p.length > 1) { $p.each(function() { var $clone = $a.clone(true); $(this).append($clone); arr.push($clone[0]); }); $a = $(arr); } else { $a.appendTo($p); } } opts.pagerAnchors = opts.pagerAnchors || []; opts.pagerAnchors.push($a); $a.bind(opts.pagerEvent, function(e) { e.preventDefault(); opts.nextSlide = i; var p = opts.$cont[0], timeout = p.cycleTimeout; if (timeout) { clearTimeout(timeout); p.cycleTimeout = 0; } var cb = opts.onPagerEvent || opts.pagerClick; if ($.isFunction(cb)) { cb(opts.nextSlide, els[opts.nextSlide]); } go(els, opts, 1, opts.currSlide < i); }); if (!/^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble) { $a.bind("click.cycle", function() { return false; }); } if (opts.pauseOnPagerHover) { $a.hover(function() { opts.$cont[0].cyclePause++; }, function() { opts.$cont[0].cyclePause--; }); } }; $.fn.cycle.hopsFromLast = function(opts, fwd) { var hops, l = opts.lastSlide, c = opts.currSlide; if (fwd) { hops = c > l ? c - l : opts.slideCount - l; } else { hops = c < l ? l - c : l + opts.slideCount - c; } return hops; }; function clearTypeFix($slides) { debug("applying clearType background-color hack"); function hex(s) { s = parseInt(s).toString(16); return s.length < 2 ? "0" + s : s; } function getBg(e) { for (; e && e.nodeName.toLowerCase() != "html"; e = e.parentNode) { var v = $.css(e, "background-color"); if (v && v.indexOf("rgb") >= 0) { var rgb = v.match(/\d+/g); return "#" + hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); } if (v && v != "transparent") { return v; } } return "#ffffff"; } $slides.each(function() { $(this).css("background-color", getBg(this)); }); } $.fn.cycle.commonReset = function(curr, next, opts, w, h, rev) { $(opts.elements).not(curr).hide(); if (typeof opts.cssBefore.opacity == "undefined") { opts.cssBefore.opacity = 1; } opts.cssBefore.display = "block"; if (opts.slideResize && w !== false && next.cycleW > 0) { opts.cssBefore.width = next.cycleW; } if (opts.slideResize && h !== false && next.cycleH > 0) { opts.cssBefore.height = next.cycleH; } opts.cssAfter = opts.cssAfter || {}; opts.cssAfter.display = "none"; $(curr).css("zIndex", opts.slideCount + (rev === true ? 1 : 0)); $(next).css("zIndex", opts.slideCount + (rev === true ? 0 : 1)); }; $.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) { var $l = $(curr), $n = $(next); var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut; $n.css(opts.cssBefore); if (speedOverride) { if (typeof speedOverride == "number") { speedIn = speedOut = speedOverride; } else { speedIn = speedOut = 1; } easeIn = easeOut = null; } var fn = function() { $n.animate(opts.animIn, speedIn, easeIn, function() { cb(); }); }; $l.animate(opts.animOut, speedOut, easeOut, function() { $l.css(opts.cssAfter); if (!opts.sync) { fn(); } }); if (opts.sync) { fn(); } }; $.fn.cycle.transitions = { fade: function($cont, $slides, opts) { $slides.not(":eq(" + opts.currSlide + ")").css("opacity", 0); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.cssBefore.opacity = 0; }); opts.animIn = { opacity: 1 }; opts.animOut = { opacity: 0 }; opts.cssBefore = { top: 0, left: 0 }; } }; $.fn.cycle.ver = function() { return ver; }; $.fn.cycle.defaults = { activePagerClass: "activeSlide", after: null, allowPagerClickBubble: false, animIn: null, animOut: null, autostop: 0, autostopCount: 0, backwards: false, before: null, cleartype: !$.support.opacity, cleartypeNoBg: false, containerResize: 1, continuous: 0, cssAfter: null, cssBefore: null, delay: 0, easeIn: null, easeOut: null, easing: null, end: null, fastOnEvent: 0, fit: 0, fx: "fade", fxFn: null, height: "auto", manualTrump: true, next: null, nowrap: 0, onPagerEvent: null, onPrevNextEvent: null, pager: null, pagerAnchorBuilder: null, pagerEvent: "click.cycle", pause: 0, pauseOnPagerHover: 0, prev: null, prevNextEvent: "click.cycle", random: 0, randomizeEffects: 1, requeueOnImageNotLoaded: true, requeueTimeout: 250, rev: 0, shuffle: null, slideExpr: null, slideResize: 1, speed: 1000, speedIn: null, speedOut: null, startingSlide: 0, sync: 1, timeout: 4000, timeoutFn: null, updateActivePagerLink: null }; })(jQuery);



/*
* jQuery Cycle Plugin Transition Definitions
* This script is a plugin for the jQuery Cycle Plugin
* Examples and documentation at: http://malsup.com/jquery/cycle/
* Copyright (c) 2007-2010 M. Alsup
* Version:	 2.73
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function($) { $.fn.cycle.transitions.none = function($cont, $slides, opts) { opts.fxFn = function(curr, next, opts, after) { $(next).show(); $(curr).hide(); after(); }; }; $.fn.cycle.transitions.fadeout = function($cont, $slides, opts) { $slides.not(":eq(" + opts.currSlide + ")").css({ display: "block", opacity: 1 }); opts.before.push(function(curr, next, opts, w, h, rev) { $(curr).css("zIndex", opts.slideCount + (!rev === true ? 1 : 0)); $(next).css("zIndex", opts.slideCount + (!rev === true ? 0 : 1)); }); opts.animIn.opacity = 1; opts.animOut.opacity = 0; opts.cssBefore.opacity = 1; opts.cssBefore.display = "block"; opts.cssAfter.zIndex = 0; }; $.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var h = $cont.height(); opts.cssBefore.top = h; opts.cssBefore.left = 0; opts.cssFirst.top = 0; opts.animIn.top = 0; opts.animOut.top = -h; }; $.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var h = $cont.height(); opts.cssFirst.top = 0; opts.cssBefore.top = -h; opts.cssBefore.left = 0; opts.animIn.top = 0; opts.animOut.top = h; }; $.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var w = $cont.width(); opts.cssFirst.left = 0; opts.cssBefore.left = w; opts.cssBefore.top = 0; opts.animIn.left = 0; opts.animOut.left = 0 - w; }; $.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push($.fn.cycle.commonReset); var w = $cont.width(); opts.cssFirst.left = 0; opts.cssBefore.left = -w; opts.cssBefore.top = 0; opts.animIn.left = 0; opts.animOut.left = w; }; $.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) { $cont.css("overflow", "hidden").width(); opts.before.push(function(curr, next, opts, fwd) { if (opts.rev) { fwd = !fwd; } $.fn.cycle.commonReset(curr, next, opts); opts.cssBefore.left = fwd ? (next.cycleW - 1) : (1 - next.cycleW); opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW; }); opts.cssFirst.left = 0; opts.cssBefore.top = 0; opts.animIn.left = 0; opts.animOut.top = 0; }; $.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) { $cont.css("overflow", "hidden"); opts.before.push(function(curr, next, opts, fwd) { if (opts.rev) { fwd = !fwd; } $.fn.cycle.commonReset(curr, next, opts); opts.cssBefore.top = fwd ? (1 - next.cycleH) : (next.cycleH - 1); opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH; }); opts.cssFirst.top = 0; opts.cssBefore.left = 0; opts.animIn.top = 0; opts.animOut.left = 0; }; $.fn.cycle.transitions.slideX = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $(opts.elements).not(curr).hide(); $.fn.cycle.commonReset(curr, next, opts, false, true); opts.animIn.width = next.cycleW; }); opts.cssBefore.left = 0; opts.cssBefore.top = 0; opts.cssBefore.width = 0; opts.animIn.width = "show"; opts.animOut.width = 0; }; $.fn.cycle.transitions.slideY = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $(opts.elements).not(curr).hide(); $.fn.cycle.commonReset(curr, next, opts, true, false); opts.animIn.height = next.cycleH; }); opts.cssBefore.left = 0; opts.cssBefore.top = 0; opts.cssBefore.height = 0; opts.animIn.height = "show"; opts.animOut.height = 0; }; $.fn.cycle.transitions.shuffle = function($cont, $slides, opts) { var i, w = $cont.css("overflow", "visible").width(); $slides.css({ left: 0, top: 0 }); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, true, true); }); if (!opts.speedAdjusted) { opts.speed = opts.speed / 2; opts.speedAdjusted = true; } opts.random = 0; opts.shuffle = opts.shuffle || { left: -w, top: 15 }; opts.els = []; for (i = 0; i < $slides.length; i++) { opts.els.push($slides[i]); } for (i = 0; i < opts.currSlide; i++) { opts.els.push(opts.els.shift()); } opts.fxFn = function(curr, next, opts, cb, fwd) { if (opts.rev) { fwd = !fwd; } var $el = fwd ? $(curr) : $(next); $(next).css(opts.cssBefore); var count = opts.slideCount; $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() { var hops = $.fn.cycle.hopsFromLast(opts, fwd); for (var k = 0; k < hops; k++) { fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop()); } if (fwd) { for (var i = 0, len = opts.els.length; i < len; i++) { $(opts.els[i]).css("z-index", len - i + count); } } else { var z = $(curr).css("z-index"); $el.css("z-index", parseInt(z) + 1 + count); } $el.animate({ left: 0, top: 0 }, opts.speedOut, opts.easeOut, function() { $(fwd ? this : curr).hide(); if (cb) { cb(); } }); }); }; $.extend(opts.cssBefore, { display: "block", opacity: 1, top: 0, left: 0 }); }; $.fn.cycle.transitions.turnUp = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false); opts.cssBefore.top = next.cycleH; opts.animIn.height = next.cycleH; opts.animOut.width = next.cycleW; }); opts.cssFirst.top = 0; opts.cssBefore.left = 0; opts.cssBefore.height = 0; opts.animIn.top = 0; opts.animOut.height = 0; }; $.fn.cycle.transitions.turnDown = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false); opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH; }); opts.cssFirst.top = 0; opts.cssBefore.left = 0; opts.cssBefore.top = 0; opts.cssBefore.height = 0; opts.animOut.height = 0; }; $.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true); opts.cssBefore.left = next.cycleW; opts.animIn.width = next.cycleW; }); opts.cssBefore.top = 0; opts.cssBefore.width = 0; opts.animIn.left = 0; opts.animOut.width = 0; }; $.fn.cycle.transitions.turnRight = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true); opts.animIn.width = next.cycleW; opts.animOut.left = curr.cycleW; }); $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 }); opts.animIn.left = 0; opts.animOut.width = 0; }; $.fn.cycle.transitions.zoom = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, false, true); opts.cssBefore.top = next.cycleH / 2; opts.cssBefore.left = next.cycleW / 2; $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH / 2, left: curr.cycleW / 2 }); }); opts.cssFirst.top = 0; opts.cssFirst.left = 0; opts.cssBefore.width = 0; opts.cssBefore.height = 0; }; $.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, false); opts.cssBefore.left = next.cycleW / 2; opts.cssBefore.top = next.cycleH / 2; $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); }); opts.cssBefore.width = 0; opts.cssBefore.height = 0; opts.animOut.opacity = 0; }; $.fn.cycle.transitions.blindX = function($cont, $slides, opts) { var w = $cont.css("overflow", "hidden").width(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.animIn.width = next.cycleW; opts.animOut.left = curr.cycleW; }); opts.cssBefore.left = w; opts.cssBefore.top = 0; opts.animIn.left = 0; opts.animOut.left = w; }; $.fn.cycle.transitions.blindY = function($cont, $slides, opts) { var h = $cont.css("overflow", "hidden").height(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH; }); opts.cssBefore.top = h; opts.cssBefore.left = 0; opts.animIn.top = 0; opts.animOut.top = h; }; $.fn.cycle.transitions.blindZ = function($cont, $slides, opts) { var h = $cont.css("overflow", "hidden").height(); var w = $cont.width(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH; }); opts.cssBefore.top = h; opts.cssBefore.left = w; opts.animIn.top = 0; opts.animIn.left = 0; opts.animOut.top = h; opts.animOut.left = w; }; $.fn.cycle.transitions.growX = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true); opts.cssBefore.left = this.cycleW / 2; opts.animIn.left = 0; opts.animIn.width = this.cycleW; opts.animOut.left = 0; }); opts.cssBefore.top = 0; opts.cssBefore.width = 0; }; $.fn.cycle.transitions.growY = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false); opts.cssBefore.top = this.cycleH / 2; opts.animIn.top = 0; opts.animIn.height = this.cycleH; opts.animOut.top = 0; }); opts.cssBefore.height = 0; opts.cssBefore.left = 0; }; $.fn.cycle.transitions.curtainX = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, false, true, true); opts.cssBefore.left = next.cycleW / 2; opts.animIn.left = 0; opts.animIn.width = this.cycleW; opts.animOut.left = curr.cycleW / 2; opts.animOut.width = 0; }); opts.cssBefore.top = 0; opts.cssBefore.width = 0; }; $.fn.cycle.transitions.curtainY = function($cont, $slides, opts) { opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, false, true); opts.cssBefore.top = next.cycleH / 2; opts.animIn.top = 0; opts.animIn.height = next.cycleH; opts.animOut.top = curr.cycleH / 2; opts.animOut.height = 0; }); opts.cssBefore.height = 0; opts.cssBefore.left = 0; }; $.fn.cycle.transitions.cover = function($cont, $slides, opts) { var d = opts.direction || "left"; var w = $cont.css("overflow", "hidden").width(); var h = $cont.height(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts); if (d == "right") { opts.cssBefore.left = -w; } else { if (d == "up") { opts.cssBefore.top = h; } else { if (d == "down") { opts.cssBefore.top = -h; } else { opts.cssBefore.left = w; } } } }); opts.animIn.left = 0; opts.animIn.top = 0; opts.cssBefore.top = 0; opts.cssBefore.left = 0; }; $.fn.cycle.transitions.uncover = function($cont, $slides, opts) { var d = opts.direction || "left"; var w = $cont.css("overflow", "hidden").width(); var h = $cont.height(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, true, true); if (d == "right") { opts.animOut.left = w; } else { if (d == "up") { opts.animOut.top = -h; } else { if (d == "down") { opts.animOut.top = h; } else { opts.animOut.left = -w; } } } }); opts.animIn.left = 0; opts.animIn.top = 0; opts.cssBefore.top = 0; opts.cssBefore.left = 0; }; $.fn.cycle.transitions.toss = function($cont, $slides, opts) { var w = $cont.css("overflow", "visible").width(); var h = $cont.height(); opts.before.push(function(curr, next, opts) { $.fn.cycle.commonReset(curr, next, opts, true, true, true); if (!opts.animOut.left && !opts.animOut.top) { $.extend(opts.animOut, { left: w * 2, top: -h / 2, opacity: 0 }); } else { opts.animOut.opacity = 0; } }); opts.cssBefore.left = 0; opts.cssBefore.top = 0; opts.animIn.left = 0; }; $.fn.cycle.transitions.wipe = function($cont, $slides, opts) { var w = $cont.css("overflow", "hidden").width(); var h = $cont.height(); opts.cssBefore = opts.cssBefore || {}; var clip; if (opts.clip) { if (/l2r/.test(opts.clip)) { clip = "rect(0px 0px " + h + "px 0px)"; } else { if (/r2l/.test(opts.clip)) { clip = "rect(0px " + w + "px " + h + "px " + w + "px)"; } else { if (/t2b/.test(opts.clip)) { clip = "rect(0px " + w + "px 0px 0px)"; } else { if (/b2t/.test(opts.clip)) { clip = "rect(" + h + "px " + w + "px " + h + "px 0px)"; } else { if (/zoom/.test(opts.clip)) { var top = parseInt(h / 2); var left = parseInt(w / 2); clip = "rect(" + top + "px " + left + "px " + top + "px " + left + "px)"; } } } } } } opts.cssBefore.clip = opts.cssBefore.clip || clip || "rect(0px 0px 0px 0px)"; var d = opts.cssBefore.clip.match(/(\d+)/g); var t = parseInt(d[0]), r = parseInt(d[1]), b = parseInt(d[2]), l = parseInt(d[3]); opts.before.push(function(curr, next, opts) { if (curr == next) { return; } var $curr = $(curr), $next = $(next); $.fn.cycle.commonReset(curr, next, opts, true, true, false); opts.cssAfter.display = "block"; var step = 1, count = parseInt((opts.speedIn / 13)) - 1; (function f() { var tt = t ? t - parseInt(step * (t / count)) : 0; var ll = l ? l - parseInt(step * (l / count)) : 0; var bb = b < h ? b + parseInt(step * ((h - b) / count || 1)) : h; var rr = r < w ? r + parseInt(step * ((w - r) / count || 1)) : w; $next.css({ clip: "rect(" + tt + "px " + rr + "px " + bb + "px " + ll + "px)" }); (step++ <= count) ? setTimeout(f, 13) : $curr.css("display", "none"); })(); }); $.extend(opts.cssBefore, { display: "block", opacity: 1, top: 0, left: 0 }); opts.animIn = { left: 0 }; opts.animOut = { left: 0 }; }; })(jQuery);


/**
* Equal Heights Plugin
* Equalize the heights of elements. Great for columns or any elements
* that need to be the same size (floats, etc).
* 
* Version 1.0
* Updated 12/10/2008
*
* Copyright (c) 2008 Rob Glazebrook (cssnewbie.com) 
*
* Usage: $(object).equalHeights([minHeight], [maxHeight]);
* 
* Example 1: $(".cols").equalHeights(); Sets all columns to the same height.
* Example 2: $(".cols").equalHeights(400); Sets all cols to at least 400px tall.
* Example 3: $(".cols").equalHeights(100,300); Cols are at least 100 but no more
* than 300 pixels tall. Elements with too much content will gain a scrollbar.
* 
*/

(function($) {
    $.fn.equalHeights = function(minHeight, maxHeight) {
        tallest = (minHeight) ? minHeight : 0;
        this.each(function() {
            if ($(this).height() > tallest) {
                tallest = $(this).height();
            }
        });
        if ((maxHeight) && tallest > maxHeight) tallest = maxHeight;
        return this.each(function() {
            $(this).height(tallest).css("overflow", "auto");
        });
    }
})(jQuery);
 

/*!
* jCarousel - Riding carousels with jQuery
*   http://sorgalla.com/jcarousel/
*
* Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Built on top of the jQuery library
*   http://jquery.com
*
* Inspired by the "Carousel Component" by Bill Scott
*   http://billwscott.com/carousel/
*/

//(function(a) { a.fn.jcarousel = function(b) { if (typeof b == "string") { var d = a(this).data("jcarousel"), e = Array.prototype.slice.call(arguments, 1); return d[b].apply(d, e) } else return this.each(function() { a(this).data("jcarousel", new c(this, b)) }) }; var b = { vertical: false, start: 1, offset: 1, size: null, scroll: 3, visible: null, animation: "normal", easing: "swing", auto: 0, wrap: null, initCallback: null, reloadCallback: null, itemLoadCallback: null, itemFirstInCallback: null, itemFirstOutCallback: null, itemLastInCallback: null, itemLastOutCallback: null, itemVisibleInCallback: null, itemVisibleOutCallback: null, buttonNextHTML: "<div></div>", buttonPrevHTML: "<div></div>", buttonNextEvent: "click", buttonPrevEvent: "click", buttonNextCallback: null, buttonPrevCallback: null }; a.jcarousel = function(c, d) { this.options = a.extend({}, b, d || {}); this.locked = false; this.container = null; this.clip = null; this.list = null; this.buttonNext = null; this.buttonPrev = null; this.wh = !this.options.vertical ? "width" : "height"; this.lt = !this.options.vertical ? "left" : "top"; var e = "", f = c.className.split(" "); for (var g = 0; g < f.length; g++) { if (f[g].indexOf("jcarousel-skin") != -1) { a(c).removeClass(f[g]); e = f[g]; break } } if (c.nodeName == "UL" || c.nodeName == "OL") { this.list = a(c); this.container = this.list.parent(); if (this.container.hasClass("jcarousel-clip")) { if (!this.container.parent().hasClass("jcarousel-container")) this.container = this.container.wrap("<div></div>"); this.container = this.container.parent() } else if (!this.container.hasClass("jcarousel-container")) this.container = this.list.wrap("<div></div>").parent() } else { this.container = a(c); this.list = this.container.find("ul,ol").eq(0) } if (e != "" && this.container.parent()[0].className.indexOf("jcarousel-skin") == -1) this.container.wrap('<div class=" ' + e + '"></div>'); this.clip = this.list.parent(); if (!this.clip.length || !this.clip.hasClass("jcarousel-clip")) this.clip = this.list.wrap("<div></div>").parent(); this.buttonNext = a(".jcarousel-next", this.container); if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null) this.buttonNext = this.clip.after(this.options.buttonNextHTML).next(); this.buttonNext.addClass(this.className("jcarousel-next")); this.buttonPrev = a(".jcarousel-prev", this.container); if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null) this.buttonPrev = this.clip.after(this.options.buttonPrevHTML).next(); this.buttonPrev.addClass(this.className("jcarousel-prev")); this.clip.addClass(this.className("jcarousel-clip")).css({ overflow: "hidden", position: "relative" }); this.list.addClass(this.className("jcarousel-list")).css({ overflow: "hidden", position: "relative", top: 0, left: 0, margin: 0, padding: 0 }); this.container.addClass(this.className("jcarousel-container")).css({ position: "relative" }); var h = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; var i = this.list.children("li"); var j = this; if (i.size() > 0) { var k = 0, g = this.options.offset; i.each(function() { j.format(this, g++); k += j.dimension(this, h) }); this.list.css(this.wh, k + "px"); if (!d || d.size === undefined) this.options.size = i.size() } this.container.css("display", "block"); this.buttonNext.css("display", "block"); this.buttonPrev.css("display", "block"); this.funcNext = function() { j.next() }; this.funcPrev = function() { j.prev() }; this.funcResize = function() { j.reload() }; if (this.options.initCallback != null) this.options.initCallback(this, "init"); if (a.browser.safari) { this.buttons(false, false); a(window).bind("load.jcarousel", function() { j.setup() }) } else this.setup() }; var c = a.jcarousel; c.fn = c.prototype = { jcarousel: "0.2.4" }; c.fn.extend = c.extend = a.extend; c.fn.extend({ setup: function() { this.first = null; this.last = null; this.prevFirst = null; this.prevLast = null; this.animating = false; this.timer = null; this.tail = null; this.inTail = false; if (this.locked) return; this.list.css(this.lt, this.pos(this.options.offset) + "px"); var b = this.pos(this.options.start); this.prevFirst = this.prevLast = null; this.animate(b, false); a(window).unbind("resize.jcarousel", this.funcResize).bind("resize.jcarousel", this.funcResize) }, reset: function() { this.list.empty(); this.list.css(this.lt, "0px"); this.list.css(this.wh, "10px"); if (this.options.initCallback != null) this.options.initCallback(this, "reset"); this.setup() }, reload: function() { if (this.tail != null && this.inTail) this.list.css(this.lt, c.intval(this.list.css(this.lt)) + this.tail); this.tail = null; this.inTail = false; if (this.options.reloadCallback != null) this.options.reloadCallback(this); if (this.options.visible != null) { var b = this; var d = Math.ceil(this.clipping() / this.options.visible), e = 0, f = 0; a("li", this.list).each(function(a) { e += b.dimension(this, d); if (a + 1 < b.first) f = e }); this.list.css(this.wh, e + "px"); this.list.css(this.lt, -f + "px") } this.scroll(this.first, false) }, lock: function() { this.locked = true; this.buttons() }, unlock: function() { this.locked = false; this.buttons() }, size: function(a) { if (a != undefined) { this.options.size = a; if (!this.locked) this.buttons() } return this.options.size }, has: function(a, b) { if (b == undefined || !b) b = a; if (this.options.size !== null && b > this.options.size) b = this.options.size; for (var c = a; c <= b; c++) { var d = this.get(c); if (!d.length || d.hasClass("jcarousel-item-placeholder")) return false } return true }, get: function(b) { return a(".jcarousel-item-" + b, this.list) }, add: function(a, b) { var d = this.get(a), e = 0, f = 0; if (d.length == 0) { var g, d = this.create(a), h = c.intval(a); while (g = this.get(--h)) { if (h <= 0 || g.length) { h <= 0 ? this.list.prepend(d) : g.after(d); break } } } else e = this.dimension(d); d.removeClass(this.className("jcarousel-item-placeholder")); typeof b == "string" ? d.html(b) : d.empty().append(b); var i = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; var j = this.dimension(d, i) - e; if (a > 0 && a < this.first) this.list.css(this.lt, c.intval(this.list.css(this.lt)) - j + "px"); this.list.css(this.wh, c.intval(this.list.css(this.wh)) + j + "px"); return d }, remove: function(a) { var b = this.get(a); if (!b.length || a >= this.first && a <= this.last) return; var d = this.dimension(b); if (a < this.first) this.list.css(this.lt, c.intval(this.list.css(this.lt)) + d + "px"); b.remove(); this.list.css(this.wh, c.intval(this.list.css(this.wh)) - d + "px") }, next: function() { this.stopAuto(); if (this.tail != null && !this.inTail) this.scrollTail(false); else this.scroll((this.options.wrap == "both" || this.options.wrap == "last") && this.options.size != null && this.last == this.options.size ? 1 : this.first + this.options.scroll) }, prev: function() { this.stopAuto(); if (this.tail != null && this.inTail) this.scrollTail(true); else this.scroll((this.options.wrap == "both" || this.options.wrap == "first") && this.options.size != null && this.first == 1 ? this.options.size : this.first - this.options.scroll) }, scrollTail: function(a) { if (this.locked || this.animating || !this.tail) return; var b = c.intval(this.list.css(this.lt)); !a ? b -= this.tail : b += this.tail; this.inTail = !a; this.prevFirst = this.first; this.prevLast = this.last; this.animate(b) }, scroll: function(a, b) { if (this.locked || this.animating) return; this.animate(this.pos(a), b) }, pos: function(a) { var b = c.intval(this.list.css(this.lt)); if (this.locked || this.animating) return b; if (this.options.wrap != "circular") a = a < 1 ? 1 : this.options.size && a > this.options.size ? this.options.size : a; var d = this.first > a; var e = this.options.wrap != "circular" && this.first <= 1 ? 1 : this.first; var f = d ? this.get(e) : this.get(this.last); var g = d ? e : e - 1; var h = null, i = 0, j = false, k = 0, l; while (d ? --g >= a : ++g < a) { h = this.get(g); j = !h.length; if (h.length == 0) { h = this.create(g).addClass(this.className("jcarousel-item-placeholder")); f[d ? "before" : "after"](h); if (this.first != null && this.options.wrap == "circular" && this.options.size !== null && (g <= 0 || g > this.options.size)) { l = this.get(this.index(g)); if (l.length) this.add(g, l.children().clone(true)) } } f = h; k = this.dimension(h); if (j) i += k; if (this.first != null && (this.options.wrap == "circular" || g >= 1 && (this.options.size == null || g <= this.options.size))) b = d ? b + k : b - k } var m = this.clipping(); var n = []; var o = 0, g = a, p = 0; var f = this.get(a - 1); while (++o) { h = this.get(g); j = !h.length; if (h.length == 0) { h = this.create(g).addClass(this.className("jcarousel-item-placeholder")); f.length == 0 ? this.list.prepend(h) : f[d ? "before" : "after"](h); if (this.first != null && this.options.wrap == "circular" && this.options.size !== null && (g <= 0 || g > this.options.size)) { l = this.get(this.index(g)); if (l.length) this.add(g, l.find(">*").clone(true)) } } f = h; var k = this.dimension(h); if (k == 0) { alert("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."); return 0 } if (this.options.wrap != "circular" && this.options.size !== null && g > this.options.size) n.push(h); else if (j) i += k; p += k; if (p >= m) break; g++ } for (var q = 0; q < n.length; q++) n[q].remove(); if (i > 0) { this.list.css(this.wh, this.dimension(this.list) + i + "px"); if (d) { b -= i; this.list.css(this.lt, c.intval(this.list.css(this.lt)) - i + "px") } } var r = a + o - 1; if (this.options.wrap != "circular" && this.options.size && r > this.options.size) r = this.options.size; if (g > r) { o = 0, g = r, p = 0; while (++o) { var h = this.get(g--); if (!h.length) break; p += this.dimension(h); if (p >= m) break } } var s = r - o + 1; if (this.options.wrap != "circular" && s < 1) s = 1; if (this.inTail && d) { b += this.tail; this.inTail = false } this.tail = null; if (this.options.wrap != "circular" && r == this.options.size && r - o + 1 >= 1) { var t = c.margin(this.get(r), !this.options.vertical ? "marginRight" : "marginBottom"); if (p - t > m) this.tail = p - m - t } while (a-- > s) b += this.dimension(this.get(a)); this.prevFirst = this.first; this.prevLast = this.last; this.first = s; this.last = r; return b }, animate: function(a, b) { if (this.locked || this.animating) return; this.animating = true; var c = this; var d = function() { c.animating = false; if (a == 0) c.list.css(c.lt, 0); if (c.options.wrap == "circular" || c.options.wrap == "both" || c.options.wrap == "last" || c.options.size == null || c.last < c.options.size) c.startAuto(); c.buttons(); c.notify("onAfterAnimation") }; this.notify("onBeforeAnimation"); if (!this.options.animation || b == false) { this.list.css(this.lt, a + "px"); d() } else { var e = !this.options.vertical ? { left: a} : { top: a }; this.list.animate(e, this.options.animation, this.options.easing, d) } }, startAuto: function(a) { if (a != undefined) this.options.auto = a; if (this.options.auto == 0) return this.stopAuto(); if (this.timer != null) return; var b = this; this.timer = setTimeout(function() { b.next() }, this.options.auto * 1e3) }, stopAuto: function() { if (this.timer == null) return; clearTimeout(this.timer); this.timer = null }, buttons: function(a, b) { if (a == undefined || a == null) { var a = !this.locked && this.options.size !== 0 && (this.options.wrap && this.options.wrap != "first" || this.options.size == null || this.last < this.options.size); if (!this.locked && (!this.options.wrap || this.options.wrap == "first") && this.options.size != null && this.last >= this.options.size) a = this.tail != null && !this.inTail } if (b == undefined || b == null) { var b = !this.locked && this.options.size !== 0 && (this.options.wrap && this.options.wrap != "last" || this.first > 1); if (!this.locked && (!this.options.wrap || this.options.wrap == "last") && this.options.size != null && this.first == 1) b = this.tail != null && this.inTail } var c = this; this.buttonNext[a ? "bind" : "unbind"](this.options.buttonNextEvent + ".jcarousel", this.funcNext)[a ? "removeClass" : "addClass"](this.className("jcarousel-next-disabled")).attr("disabled", a ? false : true); this.buttonPrev[b ? "bind" : "unbind"](this.options.buttonPrevEvent + ".jcarousel", this.funcPrev)[b ? "removeClass" : "addClass"](this.className("jcarousel-prev-disabled")).attr("disabled", b ? false : true); if (this.buttonNext.length > 0 && (this.buttonNext[0].jcarouselstate == undefined || this.buttonNext[0].jcarouselstate != a) && this.options.buttonNextCallback != null) { this.buttonNext.each(function() { c.options.buttonNextCallback(c, this, a) }); this.buttonNext[0].jcarouselstate = a } if (this.buttonPrev.length > 0 && (this.buttonPrev[0].jcarouselstate == undefined || this.buttonPrev[0].jcarouselstate != b) && this.options.buttonPrevCallback != null) { this.buttonPrev.each(function() { c.options.buttonPrevCallback(c, this, b) }); this.buttonPrev[0].jcarouselstate = b } }, notify: function(a) { var b = this.prevFirst == null ? "init" : this.prevFirst < this.first ? "next" : "prev"; this.callback("itemLoadCallback", a, b); if (this.prevFirst !== this.first) { this.callback("itemFirstInCallback", a, b, this.first); this.callback("itemFirstOutCallback", a, b, this.prevFirst) } if (this.prevLast !== this.last) { this.callback("itemLastInCallback", a, b, this.last); this.callback("itemLastOutCallback", a, b, this.prevLast) } this.callback("itemVisibleInCallback", a, b, this.first, this.last, this.prevFirst, this.prevLast); this.callback("itemVisibleOutCallback", a, b, this.prevFirst, this.prevLast, this.first, this.last) }, callback: function(b, c, d, e, f, g, h) { if (this.options[b] == undefined || typeof this.options[b] != "object" && c != "onAfterAnimation") return; var i = typeof this.options[b] == "object" ? this.options[b][c] : this.options[b]; if (!a.isFunction(i)) return; var j = this; if (e === undefined) i(j, d, c); else if (f === undefined) this.get(e).each(function() { i(j, this, e, d, c) }); else { for (var k = e; k <= f; k++) if (k !== null && !(k >= g && k <= h)) this.get(k).each(function() { i(j, this, k, d, c) }) } }, create: function(a) { return this.format("<li></li>", a) }, format: function(b, c) { var d = a(b).addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-" + c)).css({ "float": "left", "list-style": "none" }); d.attr("jcarouselindex", c); return d }, className: function(a) { return a + " " + a + (!this.options.vertical ? "-horizontal" : "-vertical") }, dimension: function(b, d) { var e = b.jquery != undefined ? b[0] : b; var f = !this.options.vertical ? e.offsetWidth + c.margin(e, "marginLeft") + c.margin(e, "marginRight") : e.offsetHeight + c.margin(e, "marginTop") + c.margin(e, "marginBottom"); if (d == undefined || f == d) return f; var g = !this.options.vertical ? d - c.margin(e, "marginLeft") - c.margin(e, "marginRight") : d - c.margin(e, "marginTop") - c.margin(e, "marginBottom"); a(e).css(this.wh, g + "px"); return this.dimension(e) }, clipping: function() { return !this.options.vertical ? this.clip[0].offsetWidth - c.intval(this.clip.css("borderLeftWidth")) - c.intval(this.clip.css("borderRightWidth")) : this.clip[0].offsetHeight - c.intval(this.clip.css("borderTopWidth")) - c.intval(this.clip.css("borderBottomWidth")) }, index: function(a, b) { if (b == undefined) b = this.options.size; return Math.round(((a - 1) / b - Math.floor((a - 1) / b)) * b) + 1 } }); c.extend({ defaults: function(c) { return a.extend(b, c || {}) }, margin: function(b, d) { if (!b) return 0; var e = b.jquery != undefined ? b[0] : b; if (d == "marginRight" && a.browser.safari) { var f = { display: "block", "float": "none", width: "auto" }, g, h; a.swap(e, f, function() { g = e.offsetWidth }); f["marginRight"] = 0; a.swap(e, f, function() { h = e.offsetWidth }); return h - g } return c.intval(a.css(e, d)) }, intval: function(a) { a = parseInt(a); return isNaN(a) ? 0 : a } }) })(jQuery)
(function(g) { var q = { vertical: !1, rtl: !1, start: 1, offset: 1, size: null, scroll: 3, visible: null, animation: "normal", easing: "swing", auto: 0, wrap: null, initCallback: null, setupCallback: null, reloadCallback: null, itemLoadCallback: null, itemFirstInCallback: null, itemFirstOutCallback: null, itemLastInCallback: null, itemLastOutCallback: null, itemVisibleInCallback: null, itemVisibleOutCallback: null, animationStepCallback: null, buttonNextHTML: "<div></div>", buttonPrevHTML: "<div></div>", buttonNextEvent: "click", buttonPrevEvent: "click", buttonNextCallback: null, buttonPrevCallback: null, itemFallbackDimension: null }, m = !1; g(window).bind("load.jcarousel", function() { m = !0 }); g.jcarousel = function(a, c) { this.options = g.extend({}, q, c || {}); this.autoStopped = this.locked = !1; this.buttonPrevState = this.buttonNextState = this.buttonPrev = this.buttonNext = this.list = this.clip = this.container = null; if (!c || c.rtl === void 0) this.options.rtl = (g(a).attr("dir") || g("html").attr("dir") || "").toLowerCase() == "rtl"; this.wh = !this.options.vertical ? "width" : "height"; this.lt = !this.options.vertical ? this.options.rtl ? "right" : "left" : "top"; for (var b = "", d = a.className.split(" "), f = 0; f < d.length; f++) if (d[f].indexOf("jcarousel-skin") != -1) { g(a).removeClass(d[f]); b = d[f]; break } a.nodeName.toUpperCase() == "UL" || a.nodeName.toUpperCase() == "OL" ? (this.list = g(a), this.clip = this.list.parents(".jcarousel-clip"), this.container = this.list.parents(".jcarousel-container")) : (this.container = g(a), this.list = this.container.find("ul,ol").eq(0), this.clip = this.container.find(".jcarousel-clip")); if (this.clip.size() === 0) this.clip = this.list.wrap("<div></div>").parent(); if (this.container.size() === 0) this.container = this.clip.wrap("<div></div>").parent(); b !== "" && this.container.parent()[0].className.indexOf("jcarousel-skin") == -1 && this.container.wrap('<div class=" ' + b + '"></div>'); this.buttonPrev = g(".jcarousel-prev", this.container); if (this.buttonPrev.size() === 0 && this.options.buttonPrevHTML !== null) this.buttonPrev = g(this.options.buttonPrevHTML).appendTo(this.container); this.buttonPrev.addClass(this.className("jcarousel-prev")); this.buttonNext = g(".jcarousel-next", this.container); if (this.buttonNext.size() === 0 && this.options.buttonNextHTML !== null) this.buttonNext = g(this.options.buttonNextHTML).appendTo(this.container); this.buttonNext.addClass(this.className("jcarousel-next")); this.clip.addClass(this.className("jcarousel-clip")).css({ position: "relative" }); this.list.addClass(this.className("jcarousel-list")).css({ overflow: "hidden", position: "relative", top: 0, margin: 0, padding: 0 }).css(this.options.rtl ? "right" : "left", 0); this.container.addClass(this.className("jcarousel-container")).css({ position: "relative" }); !this.options.vertical && this.options.rtl && this.container.addClass("jcarousel-direction-rtl").attr("dir", "rtl"); var j = this.options.visible !== null ? Math.ceil(this.clipping() / this.options.visible) : null, b = this.list.children("li"), e = this; if (b.size() > 0) { var h = 0, i = this.options.offset; b.each(function() { e.format(this, i++); h += e.dimension(this, j) }); this.list.css(this.wh, h + 100 + "px"); if (!c || c.size === void 0) this.options.size = b.size() } this.container.css("display", "block"); this.buttonNext.css("display", "block"); this.buttonPrev.css("display", "block"); this.funcNext = function() { e.next() }; this.funcPrev = function() { e.prev() }; this.funcResize = function() { e.resizeTimer && clearTimeout(e.resizeTimer); e.resizeTimer = setTimeout(function() { e.reload() }, 100) }; this.options.initCallback !== null && this.options.initCallback(this, "init"); !m && g.browser.safari ? (this.buttons(!1, !1), g(window).bind("load.jcarousel", function() { e.setup() })) : this.setup() }; var f = g.jcarousel; f.fn = f.prototype = { jcarousel: "0.2.8" }; f.fn.extend = f.extend = g.extend; f.fn.extend({ setup: function() { this.prevLast = this.prevFirst = this.last = this.first = null; this.animating = !1; this.tail = this.resizeTimer = this.timer = null; this.inTail = !1; if (!this.locked) { this.list.css(this.lt, this.pos(this.options.offset) + "px"); var a = this.pos(this.options.start, !0); this.prevFirst = this.prevLast = null; this.animate(a, !1); g(window).unbind("resize.jcarousel", this.funcResize).bind("resize.jcarousel", this.funcResize); this.options.setupCallback !== null && this.options.setupCallback(this) } }, reset: function() { this.list.empty(); this.list.css(this.lt, "0px"); this.list.css(this.wh, "10px"); this.options.initCallback !== null && this.options.initCallback(this, "reset"); this.setup() }, reload: function() { this.tail !== null && this.inTail && this.list.css(this.lt, f.intval(this.list.css(this.lt)) + this.tail); this.tail = null; this.inTail = !1; this.options.reloadCallback !== null && this.options.reloadCallback(this); if (this.options.visible !== null) { var a = this, c = Math.ceil(this.clipping() / this.options.visible), b = 0, d = 0; this.list.children("li").each(function(f) { b += a.dimension(this, c); f + 1 < a.first && (d = b) }); this.list.css(this.wh, b + "px"); this.list.css(this.lt, -d + "px") } this.scroll(this.first, !1) }, lock: function() { this.locked = !0; this.buttons() }, unlock: function() { this.locked = !1; this.buttons() }, size: function(a) { if (a !== void 0) this.options.size = a, this.locked || this.buttons(); return this.options.size }, has: function(a, c) { if (c === void 0 || !c) c = a; if (this.options.size !== null && c > this.options.size) c = this.options.size; for (var b = a; b <= c; b++) { var d = this.get(b); if (!d.length || d.hasClass("jcarousel-item-placeholder")) return !1 } return !0 }, get: function(a) { return g(">.jcarousel-item-" + a, this.list) }, add: function(a, c) { var b = this.get(a), d = 0, p = g(c); if (b.length === 0) for (var j, e = f.intval(a), b = this.create(a); ; ) { if (j = this.get(--e), e <= 0 || j.length) { e <= 0 ? this.list.prepend(b) : j.after(b); break } } else d = this.dimension(b); p.get(0).nodeName.toUpperCase() == "LI" ? (b.replaceWith(p), b = p) : b.empty().append(c); this.format(b.removeClass(this.className("jcarousel-item-placeholder")), a); p = this.options.visible !== null ? Math.ceil(this.clipping() / this.options.visible) : null; d = this.dimension(b, p) - d; a > 0 && a < this.first && this.list.css(this.lt, f.intval(this.list.css(this.lt)) - d + "px"); this.list.css(this.wh, f.intval(this.list.css(this.wh)) + d + "px"); return b }, remove: function(a) { var c = this.get(a); if (c.length && !(a >= this.first && a <= this.last)) { var b = this.dimension(c); a < this.first && this.list.css(this.lt, f.intval(this.list.css(this.lt)) + b + "px"); c.remove(); this.list.css(this.wh, f.intval(this.list.css(this.wh)) - b + "px") } }, next: function() { this.tail !== null && !this.inTail ? this.scrollTail(!1) : this.scroll((this.options.wrap == "both" || this.options.wrap == "last") && this.options.size !== null && this.last == this.options.size ? 1 : this.first + this.options.scroll) }, prev: function() { this.tail !== null && this.inTail ? this.scrollTail(!0) : this.scroll((this.options.wrap == "both" || this.options.wrap == "first") && this.options.size !== null && this.first == 1 ? this.options.size : this.first - this.options.scroll) }, scrollTail: function(a) { if (!this.locked && !this.animating && this.tail) { this.pauseAuto(); var c = f.intval(this.list.css(this.lt)), c = !a ? c - this.tail : c + this.tail; this.inTail = !a; this.prevFirst = this.first; this.prevLast = this.last; this.animate(c) } }, scroll: function(a, c) { !this.locked && !this.animating && (this.pauseAuto(), this.animate(this.pos(a), c)) }, pos: function(a, c) { var b = f.intval(this.list.css(this.lt)); if (this.locked || this.animating) return b; this.options.wrap != "circular" && (a = a < 1 ? 1 : this.options.size && a > this.options.size ? this.options.size : a); for (var d = this.first > a, g = this.options.wrap != "circular" && this.first <= 1 ? 1 : this.first, j = d ? this.get(g) : this.get(this.last), e = d ? g : g - 1, h = null, i = 0, k = !1, l = 0; d ? --e >= a : ++e < a; ) { h = this.get(e); k = !h.length; if (h.length === 0 && (h = this.create(e).addClass(this.className("jcarousel-item-placeholder")), j[d ? "before" : "after"](h), this.first !== null && this.options.wrap == "circular" && this.options.size !== null && (e <= 0 || e > this.options.size))) j = this.get(this.index(e)), j.length && (h = this.add(e, j.clone(!0))); j = h; l = this.dimension(h); k && (i += l); if (this.first !== null && (this.options.wrap == "circular" || e >= 1 && (this.options.size === null || e <= this.options.size))) b = d ? b + l : b - l } for (var g = this.clipping(), m = [], o = 0, n = 0, j = this.get(a - 1), e = a; ++o; ) { h = this.get(e); k = !h.length; if (h.length === 0) { h = this.create(e).addClass(this.className("jcarousel-item-placeholder")); if (j.length === 0) this.list.prepend(h); else j[d ? "before" : "after"](h); if (this.first !== null && this.options.wrap == "circular" && this.options.size !== null && (e <= 0 || e > this.options.size)) j = this.get(this.index(e)), j.length && (h = this.add(e, j.clone(!0))) } j = h; l = this.dimension(h); if (l === 0) throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."); this.options.wrap != "circular" && this.options.size !== null && e > this.options.size ? m.push(h) : k && (i += l); n += l; if (n >= g) break; e++ } for (h = 0; h < m.length; h++) m[h].remove(); i > 0 && (this.list.css(this.wh, this.dimension(this.list) + i + "px"), d && (b -= i, this.list.css(this.lt, f.intval(this.list.css(this.lt)) - i + "px"))); i = a + o - 1; if (this.options.wrap != "circular" && this.options.size && i > this.options.size) i = this.options.size; if (e > i) { o = 0; e = i; for (n = 0; ++o; ) { h = this.get(e--); if (!h.length) break; n += this.dimension(h); if (n >= g) break } } e = i - o + 1; this.options.wrap != "circular" && e < 1 && (e = 1); if (this.inTail && d) b += this.tail, this.inTail = !1; this.tail = null; if (this.options.wrap != "circular" && i == this.options.size && i - o + 1 >= 1 && (d = f.intval(this.get(i).css(!this.options.vertical ? "marginRight" : "marginBottom")), n - d > g)) this.tail = n - g - d; if (c && a === this.options.size && this.tail) b -= this.tail, this.inTail = !0; for (; a-- > e; ) b += this.dimension(this.get(a)); this.prevFirst = this.first; this.prevLast = this.last; this.first = e; this.last = i; return b }, animate: function(a, c) { if (!this.locked && !this.animating) { this.animating = !0; var b = this, d = function() { b.animating = !1; a === 0 && b.list.css(b.lt, 0); !b.autoStopped && (b.options.wrap == "circular" || b.options.wrap == "both" || b.options.wrap == "last" || b.options.size === null || b.last < b.options.size || b.last == b.options.size && b.tail !== null && !b.inTail) && b.startAuto(); b.buttons(); b.notify("onAfterAnimation"); if (b.options.wrap == "circular" && b.options.size !== null) for (var c = b.prevFirst; c <= b.prevLast; c++) c !== null && !(c >= b.first && c <= b.last) && (c < 1 || c > b.options.size) && b.remove(c) }; this.notify("onBeforeAnimation"); if (!this.options.animation || c === !1) this.list.css(this.lt, a + "px"), d(); else { var f = !this.options.vertical ? this.options.rtl ? { right: a} : { left: a} : { top: a }, d = { duration: this.options.animation, easing: this.options.easing, complete: d }; if (g.isFunction(this.options.animationStepCallback)) d.step = this.options.animationStepCallback; this.list.animate(f, d) } } }, startAuto: function(a) { if (a !== void 0) this.options.auto = a; if (this.options.auto === 0) return this.stopAuto(); if (this.timer === null) { this.autoStopped = !1; var c = this; this.timer = window.setTimeout(function() { c.next() }, this.options.auto * 1E3) } }, stopAuto: function() { this.pauseAuto(); this.autoStopped = !0 }, pauseAuto: function() { if (this.timer !== null) window.clearTimeout(this.timer), this.timer = null }, buttons: function(a, c) { if (a == null && (a = !this.locked && this.options.size !== 0 && (this.options.wrap && this.options.wrap != "first" || this.options.size === null || this.last < this.options.size), !this.locked && (!this.options.wrap || this.options.wrap == "first") && this.options.size !== null && this.last >= this.options.size)) a = this.tail !== null && !this.inTail; if (c == null && (c = !this.locked && this.options.size !== 0 && (this.options.wrap && this.options.wrap != "last" || this.first > 1), !this.locked && (!this.options.wrap || this.options.wrap == "last") && this.options.size !== null && this.first == 1)) c = this.tail !== null && this.inTail; var b = this; this.buttonNext.size() > 0 ? (this.buttonNext.unbind(this.options.buttonNextEvent + ".jcarousel", this.funcNext), a && this.buttonNext.bind(this.options.buttonNextEvent + ".jcarousel", this.funcNext), this.buttonNext[a ? "removeClass" : "addClass"](this.className("jcarousel-next-disabled")).attr("disabled", a ? !1 : !0), this.options.buttonNextCallback !== null && this.buttonNext.data("jcarouselstate") != a && this.buttonNext.each(function() { b.options.buttonNextCallback(b, this, a) }).data("jcarouselstate", a)) : this.options.buttonNextCallback !== null && this.buttonNextState != a && this.options.buttonNextCallback(b, null, a); this.buttonPrev.size() > 0 ? (this.buttonPrev.unbind(this.options.buttonPrevEvent + ".jcarousel", this.funcPrev), c && this.buttonPrev.bind(this.options.buttonPrevEvent + ".jcarousel", this.funcPrev), this.buttonPrev[c ? "removeClass" : "addClass"](this.className("jcarousel-prev-disabled")).attr("disabled", c ? !1 : !0), this.options.buttonPrevCallback !== null && this.buttonPrev.data("jcarouselstate") != c && this.buttonPrev.each(function() { b.options.buttonPrevCallback(b, this, c) }).data("jcarouselstate", c)) : this.options.buttonPrevCallback !== null && this.buttonPrevState != c && this.options.buttonPrevCallback(b, null, c); this.buttonNextState = a; this.buttonPrevState = c }, notify: function(a) { var c = this.prevFirst === null ? "init" : this.prevFirst < this.first ? "next" : "prev"; this.callback("itemLoadCallback", a, c); this.prevFirst !== this.first && (this.callback("itemFirstInCallback", a, c, this.first), this.callback("itemFirstOutCallback", a, c, this.prevFirst)); this.prevLast !== this.last && (this.callback("itemLastInCallback", a, c, this.last), this.callback("itemLastOutCallback", a, c, this.prevLast)); this.callback("itemVisibleInCallback", a, c, this.first, this.last, this.prevFirst, this.prevLast); this.callback("itemVisibleOutCallback", a, c, this.prevFirst, this.prevLast, this.first, this.last) }, callback: function(a, c, b, d, f, j, e) { if (!(this.options[a] == null || typeof this.options[a] != "object" && c != "onAfterAnimation")) { var h = typeof this.options[a] == "object" ? this.options[a][c] : this.options[a]; if (g.isFunction(h)) { var i = this; if (d === void 0) h(i, b, c); else if (f === void 0) this.get(d).each(function() { h(i, this, d, b, c) }); else for (var a = function(a) { i.get(a).each(function() { h(i, this, a, b, c) }) }, k = d; k <= f; k++) k !== null && !(k >= j && k <= e) && a(k) } } }, create: function(a) { return this.format("<li></li>", a) }, format: function(a, c) { for (var a = g(a), b = a.get(0).className.split(" "), d = 0; d < b.length; d++) b[d].indexOf("jcarousel-") != -1 && a.removeClass(b[d]); a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-" + c)).css({ "float": this.options.rtl ? "right" : "left", "list-style": "none" }).attr("jcarouselindex", c); return a }, className: function(a) { return a + " " + a + (!this.options.vertical ? "-horizontal" : "-vertical") }, dimension: function(a, c) { var b = g(a); if (c == null) return !this.options.vertical ? b.outerWidth(!0) || f.intval(this.options.itemFallbackDimension) : b.outerHeight(!0) || f.intval(this.options.itemFallbackDimension); else { var d = !this.options.vertical ? c - f.intval(b.css("marginLeft")) - f.intval(b.css("marginRight")) : c - f.intval(b.css("marginTop")) - f.intval(b.css("marginBottom")); g(b).css(this.wh, d + "px"); return this.dimension(b) } }, clipping: function() { return !this.options.vertical ? this.clip[0].offsetWidth - f.intval(this.clip.css("borderLeftWidth")) - f.intval(this.clip.css("borderRightWidth")) : this.clip[0].offsetHeight - f.intval(this.clip.css("borderTopWidth")) - f.intval(this.clip.css("borderBottomWidth")) }, index: function(a, c) { if (c == null) c = this.options.size; return Math.round(((a - 1) / c - Math.floor((a - 1) / c)) * c) + 1 } }); f.extend({ defaults: function(a) { return g.extend(q, a || {}) }, intval: function(a) { a = parseInt(a, 10); return isNaN(a) ? 0 : a }, windowLoaded: function() { m = !0 } }); g.fn.jcarousel = function(a) { if (typeof a == "string") { var c = g(this).data("jcarousel"), b = Array.prototype.slice.call(arguments, 1); return c[a].apply(c, b) } else return this.each(function() { var b = g(this).data("jcarousel"); b ? (a && g.extend(b.options, a), b.reload()) : g(this).data("jcarousel", new f(this, a)) }) } })(jQuery);



/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/

jQuery.cookie = function(a, b, c) { if (typeof b != "undefined") { c = c || {}; if (b === null) { b = ""; c.expires = -1 } var d = ""; if (c.expires && (typeof c.expires == "number" || c.expires.toUTCString)) { var e; if (typeof c.expires == "number") { e = new Date; e.setTime(e.getTime() + c.expires * 24 * 60 * 60 * 1e3) } else { e = c.expires } d = "; expires=" + e.toUTCString() } var f = c.path ? "; path=" + c.path : ""; var g = c.domain ? "; domain=" + c.domain : ""; var h = c.secure ? "; secure" : ""; document.cookie = [a, "=", encodeURIComponent(b), d, f, g, h].join("") } else { var i = null; if (document.cookie && document.cookie != "") { var j = document.cookie.split(";"); for (var k = 0; k < j.length; k++) { var l = jQuery.trim(j[k]); if (l.substring(0, a.length + 1) == a + "=") { i = decodeURIComponent(l.substring(a.length + 1)); break } } } return i } }


/*
* DC jQuery Vertical Accordion Menu - jQuery vertical accordion menu plugin
* Copyright (c) 2011 Design Chemical
*
* Dual licensed under the MIT and GPL licenses:
* 	http://www.opensource.org/licenses/mit-license.php
* 	http://www.gnu.org/licenses/gpl.html
*
*/

; (function(a) { a.fn.dcAccordion = function(b) { function e(b, c, d) { var e = []; a("li a." + d, c).each(function(b) { var d = a(this).parent("li"); var f = a("li", c).index(d); e.push(f) }); a.cookie(b, e, { path: "/" }) } function d(b, c, d) { var e = a.cookie(b); if (e != null) { var f = e.split(","); a.each(f, function(b, e) { var f = a("li:eq(" + e + ")", c); a("> a", f).addClass(d); var g = f.parents("li"); a("> a", g).addClass(d) }) } } var c = { classParent: "dcjq-parent", classActive: "active", classArrow: "dcjq-icon", classCount: "dcjq-count", classExpand: "dcjq-current-parent", classDisable: "", eventType: "click", hoverDelay: 300, menuClose: true, autoClose: true, autoExpand: false, speed: "slow", saveState: true, disableLink: true, showCount: false, cookie: "dcjq-accordion" }; var b = a.extend(c, b); this.each(function(b) { function o() { $objSub.hide(); var b = a("a." + classActive, f).parents("li"); a("> a", b).addClass(classActive); $allActiveLi = a("a." + classActive, f); a($allActiveLi).siblings("ul").show() } function n(b, d) { $objSub.not(d).slideUp(c.speed); a("a", f).removeClass(classActive); a("> a", b).addClass(classActive) } function m() { if (c.menuClose == true) { $objSub.slideUp(c.speed); a("a", f).removeClass(classActive); e(c.cookie, f, classActive) } } function l() { } function k() { } function j() { $activeLi = a(this).parent("li"); $parentsLi = $activeLi.parents("li"); $parentsUl = $activeLi.parents("ul"); if (c.autoClose == true) { n($parentsLi, $parentsUl) } if (a("> ul", $activeLi).is(":visible")) { a("ul", $activeLi).slideUp(c.speed); a("a", $activeLi).removeClass(classActive) } else { a(this).siblings("ul").slideToggle(c.speed); a("> a", $activeLi).addClass(classActive) } if (c.saveState == true) { e(c.cookie, f, classActive) } } function i() { $arrow = '<span class="' + c.classArrow + '"></span>'; var b = c.classParent + "-li"; $objSub.show(); a("li", f).each(function() { if (a("> ul", this).length > 0) { a(this).addClass(b); a("> a", this).addClass(c.classParent).append($arrow) } }); $objSub.hide(); if (c.classDisable) { a("li." + c.classDisable + " > ul").show() } if (c.showCount == true) { a("li." + b, f).each(function() { if (c.disableLink == true) { var b = parseInt(a("ul a:not(." + c.classParent + ")", this).length) } else { var b = parseInt(a("ul a", this).length) } a("> a", this).append(' <span class="' + c.classCount + '">(' + b + ")</span>") }) } } var f = this; $objLinks = a("li > a", f); $objSub = a("li > ul", f); if (c.classDisable) { $objLinks = a("li:not(." + c.classDisable + ") > a", f); $objSub = a("li:not(." + c.classDisable + ") > ul", f) } classActive = c.classActive; i(); if (c.saveState == true) { d(c.cookie, f, classActive) } if (c.autoExpand == true) { a("li." + c.classExpand + " > a").addClass(classActive) } o(); if (c.eventType == "hover") { var g = { sensitivity: 2, interval: c.hoverDelay, over: j, timeout: c.hoverDelay, out: k }; $objLinks.hoverIntent(g); var h = { sensitivity: 2, interval: 1e3, over: l, timeout: 1e3, out: m }; a(f).hoverIntent(h); if (c.disableLink == true) { $objLinks.click(function(b) { if (a(this).siblings("ul").length > 0) { b.preventDefault() } }) } } else { $objLinks.click(function(b) { $activeLi = a(this).parent("li"); $parentsLi = $activeLi.parents("li"); $parentsUl = $activeLi.parents("ul"); if (c.disableLink == true) { if (a(this).siblings("ul").length > 0) { b.preventDefault() } } if (c.autoClose == true) { n($parentsLi, $parentsUl) } if (a("> ul", $activeLi).is(":visible")) { a("ul", $activeLi).slideUp(c.speed); a("a", $activeLi).removeClass(classActive) } else { a(this).siblings("ul").slideToggle(c.speed); a("> a", $activeLi).addClass(classActive) } if (c.saveState == true) { e(c.cookie, f, classActive) } }) } }) } })(jQuery)



/*
* jScroller 0.4 - Autoscroller PlugIn for jQuery
*
* Copyright (c) 2007 Markus Bordihn (http://markusbordihn.de)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* $Date: 2009-06-18 20:00:00 +0100 (Sat, 18 Jul 2009) $
* $Rev: 0.4 $
*/

eval(function(p, a, c, k, e, r) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function(e) { return r[e] } ]; e = function() { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('$2={Q:{R:"S 2 T w U",V:0.4,W:"X Y (Z://10.11)",12:"13 14 15"},5:{g:[],x:16,s:{6:/([0-9,.\\-]+)6/}},h:{m:0,y:0},17:j(a,b,c,d,e){3($(a).F&&$(b).F&&c&&d>=1){$(a).k({18:\'19\'});$(b).k({1a:\'1b\',7:0,8:0});3(e){$(b).1c(j(){$2.n($(b),1d)},j(){$2.n($(b),G)})}$2.5.g.1e({z:$(a),f:$(b),H:c,o:d,n:G})}},n:j(a,b){3(a&&I b!==\'J\'){w(t i K $2.5.g){3($2.5.g[i].f.L("M")===a.L("M")){$2.5.g[i].n=b}}}},p:j(){3($2.h.m===0&&$2.5.x>0){$2.h.m=l.1f($2.A,$2.5.x)}3(!$2.h.y){$(l).1g($2.N);$(l).O($2.p);$(l).1h($2.p);$(l).A($2.p);$(1i).1j($2.p);3($.1k.1l){l.O()}$2.h.y=1}},N:j(){3($2.h.m){l.1m($2.h.m);$2.h.m=0}},B:{6:j(a){t b=\'\';3(a){3(a.C($2.5.s.6)){3(I a.C($2.5.s.6)[1]!==\'J\'){b=a.C($2.5.s.6)[1]}}}1n b}},A:j(){w(t i K $2.5.g){3($2.5.g.1o(i)){t a=$2.5.g[i],7=P(($2.B.6(a.f.k(\'7\'))||0)),8=P(($2.B.6(a.f.k(\'8\'))||0)),D=a.z.q(),E=a.z.r(),q=a.f.q(),r=a.f.r();3(!a.n){1p(a.H){u\'1q\':3(8<=-1*q){8=D}a.f.k(\'8\',8-a.o+\'6\');v;u\'1r\':3(7>=E){7=-1*r}a.f.k(\'7\',7+a.o+\'6\');v;u\'7\':3(7<=-1*r){7=E}a.f.k(\'7\',7-a.o+\'6\');v;u\'1s\':3(8>=D){8=-1*q}a.f.k(\'8\',8+a.o+\'6\');v}}}}}};', 62, 91, '||jScroller|if||config|px|left|top|||||||child|obj|cache||function|css|window|timer|pause|speed|start|height|width|regExp|var|case|break|for|refresh|init|parent|scroll|get|match|min_height|min_width|length|false|direction|typeof|undefined|in|attr|id|stop|focus|Number|info|Name|ByRei|Plugin|jQuery|Version|Author|Markus|Bordihn|http|markusbordihn|de|Description|Next|Generation|Autoscroller|120|add|overflow|hidden|position|absolute|hover|true|push|setInterval|blur|resize|document|mousemove|browser|msie|clearInterval|return|hasOwnProperty|switch|up|right|down'.split('|'), 0, {}))
