From ea9d32c1c5d8405849d5a96ce52d1fbf1217c902 Mon Sep 17 00:00:00 2001 From: Laurent Laffont <llaffont@afi-sa.fr> Date: Fri, 29 Sep 2017 12:28:50 +0200 Subject: [PATCH] dev #65510 fix jquery compatibility --- .../opac/java/diaporama/jquery.cycle.all.js | 1543 +++++++++++++++++ .../java/diaporama/jquery.cycle.all.min.js | 122 +- 2 files changed, 1612 insertions(+), 53 deletions(-) create mode 100644 public/opac/java/diaporama/jquery.cycle.all.js diff --git a/public/opac/java/diaporama/jquery.cycle.all.js b/public/opac/java/diaporama/jquery.cycle.all.js new file mode 100644 index 00000000000..dc474ea0cb1 --- /dev/null +++ b/public/opac/java/diaporama/jquery.cycle.all.js @@ -0,0 +1,1543 @@ +/*! + * jQuery Cycle Plugin (with Transition Definitions) + * Examples and documentation at: http://jquery.malsup.com/cycle/ + * Copyright (c) 2007-2013 M. Alsup + * Version: 3.0.3 (11-JUL-2013) + * Dual licensed under the MIT and GPL licenses. + * http://jquery.malsup.com/license.html + * Requires: jQuery v1.7.1 or later + */ +;(function($, undefined) { +"use strict"; + +var ver = '3.0.3'; + +function debug(s) { + if ($.fn.cycle.debug) + log(s); +} +function log() { + /*global console */ + if (window.console && console.log) + console.log('[cycle] ' + Array.prototype.join.call(arguments,' ')); +} +$.expr[':'].paused = function(el) { + return el.cyclePause; +}; + + +// the options arg can be... +// a number - indicates an immediate transition should occur to the given slide index +// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc) +// an object - properties to control the slideshow +// +// the arg2 arg can be... +// the name of an fx (only used in conjunction with a numeric value for 'options') +// the value true (only used in first arg == 'resume') and indicates +// that the resume should occur immediately (not wait for next timeout) + +$.fn.cycle = function(options, arg2) { + var o = { s: this.selector, c: this.context }; + + // in 1.3+ we can fix mistakes with the ready state + 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; + } + // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready() + log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)')); + return this; + } + + // iterate the matched nodeset + return this.each(function() { + var opts = handleArguments(this, options, arg2); + if (opts === false) + return; + + opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink; + + // stop existing slideshow for this container (if there is one) + if (this.cycleTimeout) + clearTimeout(this.cycleTimeout); + this.cycleTimeout = this.cyclePause = 0; + this.cycleStop = 0; // issue #108 + + 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 it's an auto slideshow, kick it off + 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 triggerPause(cont, byHover, onPager) { + var opts = $(cont).data('cycle.opts'); + if (!opts) + return; + var paused = !!cont.cyclePause; + if (paused && opts.paused) + opts.paused(cont, opts, byHover, onPager); + else if (!paused && opts.resumed) + opts.resumed(cont, opts, byHover, onPager); +} + +// process the args that were passed to the plugin fn +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++; // callbacks look for change + if (cont.cycleTimeout) + clearTimeout(cont.cycleTimeout); + cont.cycleTimeout = 0; + if (opts.elements) + $(opts.elements).stop(); + $(cont).removeData('cycle.opts'); + if (options == 'destroy') + destroy(cont, opts); + return false; + case 'toggle': + cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1; + checkInstantResume(cont.cyclePause, arg2, cont); + triggerPause(cont); + return false; + case 'pause': + cont.cyclePause = 1; + triggerPause(cont); + return false; + case 'resume': + cont.cyclePause = 0; + checkInstantResume(false, arg2, cont); + triggerPause(cont); + return false; + case 'prev': + case 'next': + opts = $(cont).data('cycle.opts'); + if (!opts) { + log('options not found, "prev/next" ignored'); + return false; + } + if (typeof arg2 == 'string') + opts.oneTimeFx = arg2; + $.fn.cycle[options](opts); + return false; + default: + options = { fx: options }; + } + return options; + } + else if (options.constructor == Number) { + // go to the requested slide + 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) { // resume now! + 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) {} // handle old opera versions + } +} + +// unbind event handlers +function destroy(cont, 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; + $(cont).unbind('mouseenter.cycle mouseleave.cycle'); + if (opts.destroy) // callback + opts.destroy(opts); +} + +// one-time initialization +function buildOptions($cont, $slides, els, options, o) { + var startingSlideSpecified; + // support metadata plugin (v1.0 and v2.0) + var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); + var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null; + if (meta) + opts = $.extend(opts, meta); + 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] : []; + + // push some after callbacks + 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); + + // clearType corrections + if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) + clearTypeFix($slides); + + // container requires non-static position so that slides can be position within + 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 !== undefined) { + opts.startingSlide = parseInt(opts.startingSlide,10); + if (opts.startingSlide >= els.length || opts.startSlide < 0) + opts.startingSlide = 0; // catch bogus input + else + startingSlideSpecified = true; + } + else if (opts.backwards) + opts.startingSlide = els.length - 1; + else + opts.startingSlide = 0; + + // if random, mix up the slide array + 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;}); + if (startingSlideSpecified) { + // try to find the specified starting slide and if found set start slide index in the map accordingly + for ( var cnt = 0; cnt < els.length; cnt++ ) { + if ( opts.startingSlide == opts.randomMap[cnt] ) { + opts.randomIndex = cnt; + } + } + } + else { + opts.randomIndex = 1; + opts.startingSlide = opts.randomMap[1]; + } + } + else if (opts.startingSlide >= els.length) + opts.startingSlide = 0; // catch bogus input + opts.currSlide = opts.startingSlide || 0; + var first = opts.startingSlide; + + // set position and zIndex on all the slides + $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); + }); + + // make sure first slide is visible + $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case + removeFilter(els[first], opts); + + // stretch slides + if (opts.fit) { + if (!opts.aspect) { + if (opts.width) + $slides.width(opts.width); + if (opts.height && opts.height != 'auto') + $slides.height(opts.height); + } else { + $slides.each(function(){ + var $slide = $(this); + var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect; + if( opts.width && $slide.width() != opts.width ) { + $slide.width( opts.width ); + $slide.height( opts.width / ratio ); + } + + if( opts.height && $slide.height() < opts.height ) { + $slide.height( opts.height ); + $slide.width( opts.height * ratio ); + } + }); + } + } + + if (opts.center && ((!opts.fit) || opts.aspect)) { + $slides.each(function(){ + var $slide = $(this); + $slide.css({ + "margin-left": opts.width ? + ((opts.width - $slide.width()) / 2) + "px" : + 0, + "margin-top": opts.height ? + ((opts.height - $slide.height()) / 2) + "px" : + 0 + }); + }); + } + + if (opts.center && !opts.fit && !opts.slideResize) { + $slides.each(function(){ + var $slide = $(this); + $slide.css({ + "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0, + "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0 + }); + }); + } + + // stretch container + var reshape = (opts.containerResize || opts.containerResizeHeight) && $cont.innerHeight() < 1; + if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9 + 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 (opts.containerResize && maxw > 0 && maxh > 0) + $cont.css({width:maxw+'px',height:maxh+'px'}); + if (opts.containerResizeHeight && maxh > 0) + $cont.css({height:maxh+'px'}); + } + + var pauseFlag = false; // https://github.com/malsup/cycle/issues/44 + if (opts.pause) + $cont.bind('mouseenter.cycle', function(){ + pauseFlag = true; + this.cyclePause++; + triggerPause(cont, true); + }).bind('mouseleave.cycle', function(){ + if (pauseFlag) + this.cyclePause--; + triggerPause(cont, true); + }); + + if (supportMultiTransitions(opts) === false) + return false; + + // apparently a lot of people use image slideshows without height/width attributes on the images. + // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that. + var requeue = false; + options.requeueAttempts = options.requeueAttempts || 0; + $slides.each(function() { + // try to get height/width of each slide + 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 loading = (this.cycleH === 0 && this.cycleW === 0 && !this.complete); + // don't requeue for images that are still loading but have a valid size + if (loading) { + if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever + 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; // break each loop + } + 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,10); + // ensure that timeout and speed settings are sane + if (opts.speed.constructor == String) + opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10); + 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) // sanitize timeout + 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; + + // run transition init fn + 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; + } + } + + // fire artificial events + var e0 = $slides[first]; + if (!opts.skipInitializationCallbacks) { + 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; +} + +// save off original opts so we can restore after clearing state +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; + // look for multiple effects + if (opts.fx.indexOf(',') > 0) { + opts.multiFx = true; + opts.fxs = opts.fx.replace(/\s*/g,'').split(','); + // discard any bogus effect names + 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 we have an empty list then we threw everything away! + if (!opts.fxs.length) { + log('No valid transitions named; slideshow terminating.'); + return false; + } + } + else if (opts.fx == 'all') { // auto-gen the list of transitions + opts.multiFx = true; + opts.fxs = []; + for (var p in txs) { + if (txs.hasOwnProperty(p)) { + tx = txs[p]; + if (txs.hasOwnProperty(p) && $.isFunction(tx)) + opts.fxs.push(p); + } + } + } + if (opts.multiFx && opts.randomizeEffects) { + // munge the fxs array to make effect selection random + 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; +} + +// provide a mechanism for adding slides after the slideshow has started +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); // shuffle needs this + opts.slideCount = els.length; + + // add the slide to the random map and resort + if (opts.random) { + opts.randomMap.push(opts.slideCount-1); + opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); + } + + $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(); // default behavior + }; +} + +// reset internal state; we do this on every pass in order to support multiple effects +$.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); }); + + // re-init + var init = $.fn.cycle.transitions[fx]; + if ($.isFunction(init)) + init(opts.$cont, $(opts.elements), opts); +}; + +// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt +function go(els, opts, manual, fwd) { + var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide]; + + // opts.busy is true if we're in the middle of an animation + if (manual && opts.busy && opts.manualTrump) { + // let manual transitions requests trump active ones + debug('manualTrump in go(), stopping active transition'); + $(els).stop(true,true); + opts.busy = 0; + clearTimeout(p.cycleTimeout); + } + + // don't begin another timeout-based transition if there is one active + if (opts.busy) { + debug('transition active, ignoring new tx request'); + return; + } + + + // stop cycling if we have an outstanding stop request + if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual) + return; + + // check to see if we should stop cycling based on autostop options + 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; + } + + // if slideshow is paused, only transition on a manual trigger + var changed = false; + if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) { + changed = true; + var fx = opts.fx; + // keep trying to get the slide size if we don't have it yet + curr.cycleH = curr.cycleH || $(curr).height(); + curr.cycleW = curr.cycleW || $(curr).width(); + next.cycleH = next.cycleH || $(next).height(); + next.cycleW = next.cycleW || $(next).width(); + + // support multiple transition types + if (opts.multiFx) { + if (fwd && (opts.lastFx === undefined || ++opts.lastFx >= opts.fxs.length)) + opts.lastFx = 0; + else if (!fwd && (opts.lastFx === undefined || --opts.lastFx < 0)) + opts.lastFx = opts.fxs.length - 1; + fx = opts.fxs[opts.lastFx]; + } + + // one-time fx overrides apply to: $('div').cycle(3,'zoom'); + if (opts.oneTimeFx) { + fx = opts.oneTimeFx; + opts.oneTimeFx = null; + } + + $.fn.cycle.resetState(opts, fx); + + // run the before callbacks + if (opts.before.length) + $.each(opts.before, function(i,o) { + if (p.cycleStop != opts.stopCount) return; + o.apply(next, [curr, next, opts, fwd]); + }); + + // stage the after callacks + 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]); + }); + if (!p.cycleStop) { + // queue next transition + queueNext(); + } + }; + + debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide); + + // get ready to perform the transition + opts.busy = 1; + if (opts.fxFn) // fx function provided? + opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent); + else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ? + $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent); + else + $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent); + } + else { + queueNext(); + } + + if (changed || opts.nextSlide == opts.currSlide) { + // calculate the next slide + var roll; + opts.lastSlide = opts.currSlide; + if (opts.random) { + opts.currSlide = opts.nextSlide; + if (++opts.randomIndex == els.length) { + opts.randomIndex = 0; + opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); + } + 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) { + 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 { // sequence + 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); + + function queueNext() { + // stage the next transition + var ms = 0, timeout = opts.timeout; + if (opts.timeout && !opts.continuous) { + ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd); + if (opts.fx == 'shuffle') + ms -= opts.speedOut; + } + else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic + ms = 10; + if (ms > 0) + p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms); + } +} + +// invoked after transition +$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) { + $(pager).each(function() { + $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName); + }); +}; + +// calculate timeout value for current transition +function getTimeout(curr, next, opts, fwd) { + if (opts.timeoutFn) { + // call user provided calc fn + var t = opts.timeoutFn.call(curr,curr,next,opts,fwd); + while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout + t += opts.speed; + debug('calculated timeout: ' + t + '; speed: ' + opts.speed); + if (t !== false) + return t; + } + return opts.timeout; +} + +// expose next/prev function, caller must pass in state +$.fn.cycle.next = function(opts) { advance(opts,1); }; +$.fn.cycle.prev = function(opts) { advance(opts,0);}; + +// advance slide forward or back +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) { + // move back to the previously display slide + 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; // prevNextClick is deprecated + 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); + // don't reparent if anchor is in the dom + 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); + + var pagerFn = 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; // pagerClick is deprecated + if ($.isFunction(cb)) + cb(opts.nextSlide, els[opts.nextSlide]); + go(els,opts,1,opts.currSlide < i); // trigger the trans +// return false; // <== allow bubble + }; + + if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) { + $a.hover(pagerFn, function(){/* no-op */} ); + } + else { + $a.bind(opts.pagerEvent, pagerFn); + } + + if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble) + $a.bind('click.cycle', function(){return false;}); // suppress click + + var cont = opts.$cont[0]; + var pauseFlag = false; // https://github.com/malsup/cycle/issues/44 + if (opts.pauseOnPagerHover) { + $a.hover( + function() { + pauseFlag = true; + cont.cyclePause++; + triggerPause(cont,true,true); + }, function() { + if (pauseFlag) + cont.cyclePause--; + triggerPause(cont,true,true); + } + ); + } +}; + +// helper fn to calculate the number of slides between the current and the next +$.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; +}; + +// fix clearType problems in ie6 by setting an explicit bg color +// (otherwise text slides look horrible during a fade transition) +function clearTypeFix($slides) { + debug('applying clearType background-color hack'); + function hex(s) { + s = parseInt(s,10).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)); }); +} + +// reset common props before the next transition +$.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)); +}; + +// the actual fn for effecting a transition +$.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, animInDelay = opts.animInDelay, animOutDelay = opts.animOutDelay; + $n.css(opts.cssBefore); + if (speedOverride) { + if (typeof speedOverride == 'number') + speedIn = speedOut = speedOverride; + else + speedIn = speedOut = 1; + easeIn = easeOut = null; + } + var fn = function() { + $n.delay(animInDelay).animate(opts.animIn, speedIn, easeIn, function() { + cb(); + }); + }; + $l.delay(animOutDelay).animate(opts.animOut, speedOut, easeOut, function() { + $l.css(opts.cssAfter); + if (!opts.sync) + fn(); + }); + if (opts.sync) fn(); +}; + +// transition definitions - only fade is defined here, transition pack defines the rest +$.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; }; + +// override these globally if you like (they are all optional) +$.fn.cycle.defaults = { + activePagerClass: 'activeSlide', // class name used for the active pager link + after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag) + allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling + animIn: null, // properties that define how the slide animates in + animInDelay: 0, // allows delay before next slide transitions in + animOut: null, // properties that define how the slide animates out + animOutDelay: 0, // allows delay before current slide transitions out + aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option) + autostop: 0, // true to end slideshow after X transitions (where X == slide count) + autostopCount: 0, // number of transitions (optionally used with autostop to define X) + backwards: false, // true to start slideshow at last slide and move backwards through the stack + before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag) + center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options) + cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE) + cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides) + containerResize: 1, // resize container to fit largest slide + containerResizeHeight: 0, // resize containers height to fit the largest slide but leave the width dynamic + continuous: 0, // true to start next transition immediately after current one completes + cssAfter: null, // properties that defined the state of the slide after transitioning out + cssBefore: null, // properties that define the initial state of the slide before transitioning in + delay: 0, // additional delay (in ms) for first transition (hint: can be negative) + easeIn: null, // easing for "in" transition + easeOut: null, // easing for "out" transition + easing: null, // easing method for both in and out transitions + end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options) + fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms + fit: 0, // force slides to fit container + fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle') + fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) + height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well) + manualTrump: true, // causes manual transition to stop an active transition instead of being ignored + metaAttr: 'cycle', // data- attribute that holds the option data for the slideshow + next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide + nowrap: 0, // true to prevent slideshow from wrapping + onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement) + onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement) + pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container + pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement) + pagerEvent: 'click.cycle', // name of event which drives the pager navigation + pause: 0, // true to enable "pause on hover" + pauseOnPagerHover: 0, // true to pause when hovering over pager link + prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide + prevNextEvent: 'click.cycle',// event which drives the manual transition to the previous or next slide + random: 0, // true for random, false for sequence (not applicable to shuffle fx) + randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random + requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded + requeueTimeout: 250, // ms delay for requeue + rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle) + shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 } + skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition + slideExpr: null, // expression for selecting slides (if something other than all children is required) + slideResize: 1, // force slide width/height to fixed size before every transition + speed: 1000, // speed of the transition (any valid fx speed value) + speedIn: null, // speed of the 'in' transition + speedOut: null, // speed of the 'out' transition + startingSlide: undefined,// zero-based index of the first slide to be displayed + sync: 1, // true if in/out transitions should occur simultaneously + timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance) + timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag) + updateActivePagerLink: null,// callback fn invoked to update the active pager link (adds/removes activePagerClass style) + width: null // container width (if the 'fit' option is true, the slides will be set to this width as well) +}; + +})(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($) { +"use strict"; + +// +// These functions define slide initialization and properties for the named +// transitions. To save file size feel free to remove any of these that you +// don't need. +// +$.fn.cycle.transitions.none = function($cont, $slides, opts) { + opts.fxFn = function(curr,next,opts,after){ + $(next).show(); + $(curr).hide(); + after(); + }; +}; + +// not a cross-fade, fadeout only fades out the top slide +$.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; +}; + +// scrollUp/Down/Left/Right +$.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; +}; + +// slideX/slideY +$.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; +}; + +// shuffle +$.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); + }); + // only adjust speed once! + if (!opts.speedAdjusted) { + opts.speed = opts.speed / 2; // shuffle has 2 transitions + 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()); + + // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!) + 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++) { + if (fwd) + opts.els.push(opts.els.shift()); + else + 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,10)+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 }); +}; + +// turnUp/Down/Left/Right +$.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; +}; + +// zoom +$.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; +}; + +// fadeZoom +$.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; +}; + +// blindX +$.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; +}; +// blindY +$.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; +}; +// blindZ +$.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; +}; + +// growX - grow horizontally from centered 0 width +$.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; +}; +// growY - grow vertically from centered 0 height +$.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; +}; + +// curtainX - squeeze in both edges horizontally +$.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; +}; +// curtainY - squeeze in both edges vertically +$.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; +}; + +// cover - curr slide covered by next slide +$.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); + opts.cssAfter.display = ''; + 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; +}; + +// uncover - curr slide moves off next slide +$.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; +}; + +// toss - move top slide and fade away +$.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); + // provide default toss settings if animOut not provided + 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; +}; + +// wipe - clip animation +$.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,10); + var left = parseInt(w/2,10); + 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],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10); + + 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),10) - 1; + (function f() { + var tt = t ? t - parseInt(step * (t/count),10) : 0; + var ll = l ? l - parseInt(step * (l/count),10) : 0; + var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h; + var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : 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); diff --git a/public/opac/java/diaporama/jquery.cycle.all.min.js b/public/opac/java/diaporama/jquery.cycle.all.min.js index 32089d25a08..31bb49e8d40 100644 --- a/public/opac/java/diaporama/jquery.cycle.all.min.js +++ b/public/opac/java/diaporama/jquery.cycle.all.min.js @@ -1,53 +1,69 @@ -(function(e,c){function h(b){e.fn.cycle.debug&&a(b)}function a(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function j(b,f,a){var d=e(b).data("cycle.opts"),c=!!b.cyclePause;c&&d.paused?d.paused(b,d,f,a):!c&&d.resumed&&d.resumed(b,d,f,a)}function i(b,f,k){function d(b,f,k){if(!b&&f===true){b=e(k).data("cycle.opts");if(!b)return a("options not found, can not resume"),false;if(k.cycleTimeout)clearTimeout(k.cycleTimeout),k.cycleTimeout=0;s(b.elements, -b,1,!b.backwards)}}if(b.cycleStop===c)b.cycleStop=0;if(f===c||f===null)f={};if(f.constructor==String)switch(f){case "destroy":case "stop":k=e(b).data("cycle.opts");if(!k)return false;b.cycleStop++;b.cycleTimeout&&clearTimeout(b.cycleTimeout);b.cycleTimeout=0;k.elements&&e(k.elements).stop();e(b).removeData("cycle.opts");f=="destroy"&&l(b,k);return false;case "toggle":return b.cyclePause=b.cyclePause===1?0:1,d(b.cyclePause,k,b),j(b),false;case "pause":return b.cyclePause=1,j(b),false;case "resume":return b.cyclePause= -0,d(false,k,b),j(b),false;case "prev":case "next":k=e(b).data("cycle.opts");if(!k)return a('options not found, "prev/next" ignored'),false;e.fn.cycle[f](k);return false;default:f={fx:f}}else if(f.constructor==Number){var i=f,f=e(b).data("cycle.opts");if(!f)return a("options not found, can not advance slide"),false;if(i<0||i>=f.elements.length)return a("invalid slide index: "+i),false;f.nextSlide=i;if(b.cycleTimeout)clearTimeout(b.cycleTimeout),b.cycleTimeout=0;if(typeof k=="string")f.oneTimeFx=k; -s(f.elements,f,1,i>=f.currSlide);return false}return f}function d(b,f){if(!e.support.opacity&&f.cleartype&&b.style.filter)try{b.style.removeAttribute("filter")}catch(a){}}function l(b,f){f.next&&e(f.next).unbind(f.prevNextEvent);f.prev&&e(f.prev).unbind(f.prevNextEvent);if(f.pager||f.pagerAnchorBuilder)e.each(f.pagerAnchors||[],function(){this.unbind().remove()});f.pagerAnchors=null;e(b).unbind("mouseenter.cycle mouseleave.cycle");f.destroy&&f.destroy(f)}function n(b,f,k,i,y){var p,g=e.extend({}, -e.fn.cycle.defaults,i||{},e.metadata?b.metadata():e.meta?b.data():{}),h=e.isFunction(b.data)?b.data(g.metaAttr):null;h&&(g=e.extend(g,h));if(g.autostop)g.countdown=g.autostopCount||k.length;var l=b[0];b.data("cycle.opts",g);g.$cont=b;g.stopCount=l.cycleStop;g.elements=k;g.before=g.before?[g.before]:[];g.after=g.after?[g.after]:[];!e.support.opacity&&g.cleartype&&g.after.push(function(){d(this,g)});g.continuous&&g.after.push(function(){s(k,g,0,!g.backwards)});m(g);!e.support.opacity&&g.cleartype&& -!g.cleartypeNoBg&&q(f);b.css("position")=="static"&&b.css("position","relative");g.width&&b.width(g.width);g.height&&g.height!="auto"&&b.height(g.height);g.startingSlide!==c?(g.startingSlide=parseInt(g.startingSlide,10),g.startingSlide>=k.length||g.startSlide<0?g.startingSlide=0:p=true):g.startingSlide=g.backwards?k.length-1:0;if(g.random){g.randomMap=[];for(h=0;h<k.length;h++)g.randomMap.push(h);g.randomMap.sort(function(){return Math.random()-0.5});if(p)for(p=0;p<k.length;p++){if(g.startingSlide== -g.randomMap[p])g.randomIndex=p}else g.randomIndex=1,g.startingSlide=g.randomMap[1]}else if(g.startingSlide>=k.length)g.startingSlide=0;g.currSlide=g.startingSlide||0;var o=g.startingSlide;f.css({position:"absolute",top:0,left:0}).hide().each(function(b){b=g.backwards?o?b<=o?k.length+(b-o):o-b:k.length-b:o?b>=o?k.length-(b-o):o-b:k.length-b;e(this).css("z-index",b)});e(k[o]).css("opacity",1).show();d(k[o],g);g.fit&&(g.aspect?f.each(function(){var b=e(this),f=g.aspect===true?b.width()/b.height():g.aspect; -g.width&&b.width()!=g.width&&(b.width(g.width),b.height(g.width/f));g.height&&b.height()<g.height&&(b.height(g.height),b.width(g.height*f))}):(g.width&&f.width(g.width),g.height&&g.height!="auto"&&f.height(g.height)));g.center&&(!g.fit||g.aspect)&&f.each(function(){var b=e(this);b.css({"margin-left":g.width?(g.width-b.width())/2+"px":0,"margin-top":g.height?(g.height-b.height())/2+"px":0})});g.center&&!g.fit&&!g.slideResize&&f.each(function(){var b=e(this);b.css({"margin-left":g.width?(g.width-b.width())/ -2+"px":0,"margin-top":g.height?(g.height-b.height())/2+"px":0})});if(g.containerResize&&!b.innerHeight()){for(var n=h=p=0;n<k.length;n++){var u=e(k[n]),v=u[0],t=u.outerWidth(),w=u.outerHeight();t||(t=v.offsetWidth||v.width||u.attr("width"));w||(w=v.offsetHeight||v.height||u.attr("height"));p=t>p?t:p;h=w>h?w:h}p>0&&h>0&&b.css({width:p+"px",height:h+"px"})}var A=false;g.pause&&b.bind("mouseenter.cycle",function(){A=true;this.cyclePause++;j(l,true)}).bind("mouseleave.cycle",function(){A&&this.cyclePause--; -j(l,true)});if(r(g)===false)return false;var B=false;i.requeueAttempts=i.requeueAttempts||0;f.each(function(){var b=e(this);this.cycleH=g.fit&&g.height?g.height:b.height()||this.offsetHeight||this.height||b.attr("height")||0;this.cycleW=g.fit&&g.width?g.width:b.width()||this.offsetWidth||this.width||b.attr("width")||0;if(b.is("img")){var b=e.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete,f=e.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete, -k=this.cycleH===0&&this.cycleW===0&&!this.complete;if(e.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete||b||f||k)if(y.s&&g.requeueOnImageNotLoaded&&++i.requeueAttempts<100)return a(i.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){e(y.s,y.c).cycle(i)},g.requeueTimeout),B=true,false;else a("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(B)return false;g.cssBefore=g.cssBefore|| -{};g.cssAfter=g.cssAfter||{};g.cssFirst=g.cssFirst||{};g.animIn=g.animIn||{};g.animOut=g.animOut||{};f.not(":eq("+o+")").css(g.cssBefore);e(f[o]).css(g.cssFirst);if(g.timeout){g.timeout=parseInt(g.timeout,10);if(g.speed.constructor==String)g.speed=e.fx.speeds[g.speed]||parseInt(g.speed,10);g.sync||(g.speed/=2);for(p=g.fx=="none"?0:g.fx=="shuffle"?500:250;g.timeout-g.speed<p;)g.timeout+=g.speed}if(g.easing)g.easeIn=g.easeOut=g.easing;if(!g.speedIn)g.speedIn=g.speed;if(!g.speedOut)g.speedOut=g.speed; -g.slideCount=k.length;g.currSlide=g.lastSlide=o;if(g.random){if(++g.randomIndex==k.length)g.randomIndex=0;g.nextSlide=g.randomMap[g.randomIndex]}else g.nextSlide=g.backwards?g.startingSlide===0?k.length-1:g.startingSlide-1:g.startingSlide>=k.length-1?0:g.startingSlide+1;if(!g.multiFx)if(p=e.fn.cycle.transitions[g.fx],e.isFunction(p))p(b,f,g);else if(g.fx!="custom"&&!g.multiFx)return a("unknown transition: "+g.fx,"; slideshow terminating"),false;b=f[o];g.skipInitializationCallbacks||(g.before.length&& -g.before[0].apply(b,[b,b,g,true]),g.after.length&&g.after[0].apply(b,[b,b,g,true]));g.next&&e(g.next).bind(g.prevNextEvent,function(){return x(g,1)});g.prev&&e(g.prev).bind(g.prevNextEvent,function(){return x(g,0)});(g.pager||g.pagerAnchorBuilder)&&z(k,g);C(g,k);return g}function m(b){b.original={before:[],after:[]};b.original.cssBefore=e.extend({},b.cssBefore);b.original.cssAfter=e.extend({},b.cssAfter);b.original.animIn=e.extend({},b.animIn);b.original.animOut=e.extend({},b.animOut);e.each(b.before, -function(){b.original.before.push(this)});e.each(b.after,function(){b.original.after.push(this)})}function r(b){var f,k,d=e.fn.cycle.transitions;if(b.fx.indexOf(",")>0){b.multiFx=true;b.fxs=b.fx.replace(/\s*/g,"").split(",");for(f=0;f<b.fxs.length;f++){var i=b.fxs[f];k=d[i];if(!k||!d.hasOwnProperty(i)||!e.isFunction(k))a("discarding unknown transition: ",i),b.fxs.splice(f,1),f--}if(!b.fxs.length)return a("No valid transitions named; slideshow terminating."),false}else if(b.fx=="all")for(f in b.multiFx= -true,b.fxs=[],d)d.hasOwnProperty(f)&&(k=d[f],d.hasOwnProperty(f)&&e.isFunction(k)&&b.fxs.push(f));if(b.multiFx&&b.randomizeEffects){k=Math.floor(Math.random()*20)+30;for(f=0;f<k;f++)d=Math.floor(Math.random()*b.fxs.length),b.fxs.push(b.fxs.splice(d,1)[0]);h("randomized fx sequence: ",b.fxs)}return true}function C(b,f){b.addSlide=function(a,d){var i=e(a),c=i[0];b.autostopCount||b.countdown++;f[d?"unshift":"push"](c);if(b.els)b.els[d?"unshift":"push"](c);b.slideCount=f.length;b.random&&(b.randomMap.push(b.slideCount- -1),b.randomMap.sort(function(){return Math.random()-0.5}));i.css("position","absolute");i[d?"prependTo":"appendTo"](b.$cont);d&&(b.currSlide++,b.nextSlide++);!e.support.opacity&&b.cleartype&&!b.cleartypeNoBg&&q(i);b.fit&&b.width&&i.width(b.width);b.fit&&b.height&&b.height!="auto"&&i.height(b.height);c.cycleH=b.fit&&b.height?b.height:i.height();c.cycleW=b.fit&&b.width?b.width:i.width();i.css(b.cssBefore);(b.pager||b.pagerAnchorBuilder)&&e.fn.cycle.createPagerAnchor(f.length-1,c,e(b.pager),f,b);if(e.isFunction(b.onAddSlide))b.onAddSlide(i); -else i.hide()}}function s(b,f,a,d){function i(){var a=0;f.timeout&&!f.continuous?(a=t(b[f.currSlide],b[f.nextSlide],f,d),f.fx=="shuffle"&&(a-=f.speedOut)):f.continuous&&j.cyclePause&&(a=10);if(a>0)j.cycleTimeout=setTimeout(function(){s(b,f,0,!f.backwards)},a)}var j=f.$cont[0],g=b[f.currSlide],l=b[f.nextSlide];if(a&&f.busy&&f.manualTrump)h("manualTrump in go(), stopping active transition"),e(b).stop(true,true),f.busy=0,clearTimeout(j.cycleTimeout);if(f.busy)h("transition active, ignoring new tx request"); -else if(!(j.cycleStop!=f.stopCount||j.cycleTimeout===0&&!a))if(!a&&!j.cyclePause&&!f.bounce&&(f.autostop&&--f.countdown<=0||f.nowrap&&!f.random&&f.nextSlide<f.currSlide))f.end&&f.end(f);else{var n=false;if((a||!j.cyclePause)&&f.nextSlide!=f.currSlide){var n=true,o=f.fx;g.cycleH=g.cycleH||e(g).height();g.cycleW=g.cycleW||e(g).width();l.cycleH=l.cycleH||e(l).height();l.cycleW=l.cycleW||e(l).width();if(f.multiFx){if(d&&(f.lastFx===c||++f.lastFx>=f.fxs.length))f.lastFx=0;else if(!d&&(f.lastFx===c||--f.lastFx< -0))f.lastFx=f.fxs.length-1;o=f.fxs[f.lastFx]}if(f.oneTimeFx)o=f.oneTimeFx,f.oneTimeFx=null;e.fn.cycle.resetState(f,o);f.before.length&&e.each(f.before,function(b,a){j.cycleStop==f.stopCount&&a.apply(l,[g,l,f,d])});var m=function(){f.busy=0;e.each(f.after,function(b,a){j.cycleStop==f.stopCount&&a.apply(l,[g,l,f,d])});j.cycleStop||i()};h("tx firing("+o+"); currSlide: "+f.currSlide+"; nextSlide: "+f.nextSlide);f.busy=1;if(f.fxFn)f.fxFn(g,l,f,m,d,a&&f.fastOnEvent);else if(e.isFunction(e.fn.cycle[f.fx]))e.fn.cycle[f.fx](g, -l,f,m,d,a&&f.fastOnEvent);else e.fn.cycle.custom(g,l,f,m,d,a&&f.fastOnEvent)}else i();if(n||f.nextSlide==f.currSlide)if(f.lastSlide=f.currSlide,f.random){f.currSlide=f.nextSlide;if(++f.randomIndex==b.length)f.randomIndex=0,f.randomMap.sort(function(){return Math.random()-0.5});f.nextSlide=f.randomMap[f.randomIndex];if(f.nextSlide==f.currSlide)f.nextSlide=f.currSlide==f.slideCount-1?0:f.currSlide+1}else f.backwards?(a=f.nextSlide-1<0)&&f.bounce?(f.backwards=!f.backwards,f.nextSlide=1,f.currSlide=0): -(f.nextSlide=a?b.length-1:f.nextSlide-1,f.currSlide=a?0:f.nextSlide+1):(a=f.nextSlide+1==b.length)&&f.bounce?(f.backwards=!f.backwards,f.nextSlide=b.length-2,f.currSlide=b.length-1):(f.nextSlide=a?0:f.nextSlide+1,f.currSlide=a?b.length-1:f.nextSlide-1);n&&f.pager&&f.updateActivePagerLink(f.pager,f.currSlide,f.activePagerClass)}}function t(b,f,a,e){if(a.timeoutFn){for(b=a.timeoutFn.call(b,b,f,a,e);a.fx!="none"&&b-a.speed<250;)b+=a.speed;h("calculated timeout: "+b+"; speed: "+a.speed);if(b!==false)return b}return a.timeout} -function x(b,f){var a=f?1:-1,d=b.elements,i=b.$cont[0],c=i.cycleTimeout;if(c)clearTimeout(c),i.cycleTimeout=0;if(b.random&&a<0){b.randomIndex--;if(--b.randomIndex==-2)b.randomIndex=d.length-2;else if(b.randomIndex==-1)b.randomIndex=d.length-1;b.nextSlide=b.randomMap[b.randomIndex]}else if(b.random)b.nextSlide=b.randomMap[b.randomIndex];else if(b.nextSlide=b.currSlide+a,b.nextSlide<0){if(b.nowrap)return false;b.nextSlide=d.length-1}else if(b.nextSlide>=d.length){if(b.nowrap)return false;b.nextSlide= -0}i=b.onPrevNextEvent||b.prevNextClick;e.isFunction(i)&&i(a>0,b.nextSlide,d[b.nextSlide]);s(d,b,1,f);return false}function z(b,a){var d=e(a.pager);e.each(b,function(i,c){e.fn.cycle.createPagerAnchor(i,c,d,b,a)});a.updateActivePagerLink(a.pager,a.startingSlide,a.activePagerClass)}function q(b){function a(b){b=parseInt(b,10).toString(16);return b.length<2?"0"+b:b}function d(b){for(;b&&b.nodeName.toLowerCase()!="html";b=b.parentNode){var i=e.css(b,"background-color");if(i&&i.indexOf("rgb")>=0)return b= -i.match(/\d+/g),"#"+a(b[0])+a(b[1])+a(b[2]);if(i&&i!="transparent")return i}return"#ffffff"}h("applying clearType background-color hack");b.each(function(){e(this).css("background-color",d(this))})}if(e.support===c)e.support={opacity:!e.browser.msie};e.expr[":"].paused=function(b){return b.cyclePause};e.fn.cycle=function(b,f){var d={s:this.selector,c:this.context};if(this.length===0&&b!="stop"){if(!e.isReady&&d.s)return a("DOM not ready, queuing slideshow"),e(function(){e(d.s,d.c).cycle(b,f)}),this; -a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var c=i(this,b,f);if(c!==false){c.updateActivePagerLink=c.updateActivePagerLink||e.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleStop=this.cycleTimeout=this.cyclePause=0;var j=e(this),l=c.slideExpr?e(c.slideExpr,this):j.children(),g=l.get();if(g.length<2)a("terminating; too few slides: "+g.length);else{var m=n(j,l,g,c,d);if(m!==false&& -(j=m.continuous?10:t(g[m.currSlide],g[m.nextSlide],m,!m.backwards)))j+=m.delay||0,j<10&&(j=10),h("first timeout: "+j),this.cycleTimeout=setTimeout(function(){s(g,m,0,!c.backwards)},j)}}})};e.fn.cycle.resetState=function(b,a){a=a||b.fx;b.before=[];b.after=[];b.cssBefore=e.extend({},b.original.cssBefore);b.cssAfter=e.extend({},b.original.cssAfter);b.animIn=e.extend({},b.original.animIn);b.animOut=e.extend({},b.original.animOut);b.fxFn=null;e.each(b.original.before,function(){b.before.push(this)});e.each(b.original.after, -function(){b.after.push(this)});var d=e.fn.cycle.transitions[a];e.isFunction(d)&&d(b.$cont,e(b.elements),b)};e.fn.cycle.updateActivePagerLink=function(b,a,d){e(b).each(function(){e(this).children().removeClass(d).eq(a).addClass(d)})};e.fn.cycle.next=function(b){x(b,1)};e.fn.cycle.prev=function(b){x(b,0)};e.fn.cycle.createPagerAnchor=function(b,a,d,i,c){e.isFunction(c.pagerAnchorBuilder)?(a=c.pagerAnchorBuilder(b,a),h("pagerAnchorBuilder("+b+", el) returned: "+a)):a='<a href="#">'+(b+1)+"</a>";if(a){var l= -e(a);if(l.parents("body").length===0){var g=[];d.length>1?(d.each(function(){var b=l.clone(true);e(this).append(b);g.push(b[0])}),l=e(g)):l.appendTo(d)}c.pagerAnchors=c.pagerAnchors||[];c.pagerAnchors.push(l);d=function(a){a.preventDefault();c.nextSlide=b;var a=c.$cont[0],f=a.cycleTimeout;if(f)clearTimeout(f),a.cycleTimeout=0;a=c.onPagerEvent||c.pagerClick;e.isFunction(a)&&a(c.nextSlide,i[c.nextSlide]);s(i,c,1,c.currSlide<b)};/mouseenter|mouseover/i.test(c.pagerEvent)?l.hover(d,function(){}):l.bind(c.pagerEvent, -d);!/^click/.test(c.pagerEvent)&&!c.allowPagerClickBubble&&l.bind("click.cycle",function(){return false});var m=c.$cont[0],n=false;c.pauseOnPagerHover&&l.hover(function(){n=true;m.cyclePause++;j(m,true,true)},function(){n&&m.cyclePause--;j(m,true,true)})}};e.fn.cycle.hopsFromLast=function(b,a){var e=b.lastSlide,d=b.currSlide;return a?d>e?d-e:b.slideCount-e:d<e?e-d:e+b.slideCount-d};e.fn.cycle.commonReset=function(b,a,d,c,i,j){e(d.elements).not(b).hide();if(typeof d.cssBefore.opacity=="undefined")d.cssBefore.opacity= -1;d.cssBefore.display="block";if(d.slideResize&&c!==false&&a.cycleW>0)d.cssBefore.width=a.cycleW;if(d.slideResize&&i!==false&&a.cycleH>0)d.cssBefore.height=a.cycleH;d.cssAfter=d.cssAfter||{};d.cssAfter.display="none";e(b).css("zIndex",d.slideCount+(j===true?1:0));e(a).css("zIndex",d.slideCount+(j===true?0:1))};e.fn.cycle.custom=function(b,a,d,c,i,j){var g=e(b),h=e(a),l=d.speedIn,b=d.speedOut,m=d.easeIn,a=d.easeOut;h.css(d.cssBefore);j&&(l=typeof j=="number"?b=j:b=1,m=a=null);var n=function(){h.animate(d.animIn, -l,m,function(){c()})};g.animate(d.animOut,b,a,function(){g.css(d.cssAfter);d.sync||n()});d.sync&&n()};e.fn.cycle.transitions={fade:function(b,a,d){a.not(":eq("+d.currSlide+")").css("opacity",0);d.before.push(function(b,a,d){e.fn.cycle.commonReset(b,a,d);d.cssBefore.opacity=0});d.animIn={opacity:1};d.animOut={opacity:0};d.cssBefore={top:0,left:0}}};e.fn.cycle.ver=function(){return"2.9999.5"};e.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null, -aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!e.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,metaAttr:"cycle",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,skipInitializationCallbacks:false,slideExpr:null,slideResize:1,speed:1E3,speedIn:null,speedOut:null,startingSlide:c,sync:1,timeout:4E3,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery); -(function(e){e.fn.cycle.transitions.none=function(c,h,a){a.fxFn=function(a,c,d,h){e(c).show();e(a).hide();h()}};e.fn.cycle.transitions.fadeout=function(c,h,a){h.not(":eq("+a.currSlide+")").css({display:"block",opacity:1});a.before.push(function(a,c,d,h,n,m){e(a).css("zIndex",d.slideCount+(m!==true?1:0));e(c).css("zIndex",d.slideCount+(m!==true?0:1))});a.animIn.opacity=1;a.animOut.opacity=0;a.cssBefore.opacity=1;a.cssBefore.display="block";a.cssAfter.zIndex=0};e.fn.cycle.transitions.scrollUp=function(c, -h,a){c.css("overflow","hidden");a.before.push(e.fn.cycle.commonReset);c=c.height();a.cssBefore.top=c;a.cssBefore.left=0;a.cssFirst.top=0;a.animIn.top=0;a.animOut.top=-c};e.fn.cycle.transitions.scrollDown=function(c,h,a){c.css("overflow","hidden");a.before.push(e.fn.cycle.commonReset);c=c.height();a.cssFirst.top=0;a.cssBefore.top=-c;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=c};e.fn.cycle.transitions.scrollLeft=function(c,h,a){c.css("overflow","hidden");a.before.push(e.fn.cycle.commonReset);c= -c.width();a.cssFirst.left=0;a.cssBefore.left=c;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=0-c};e.fn.cycle.transitions.scrollRight=function(c,h,a){c.css("overflow","hidden");a.before.push(e.fn.cycle.commonReset);c=c.width();a.cssFirst.left=0;a.cssBefore.left=-c;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=c};e.fn.cycle.transitions.scrollHorz=function(c,h,a){c.css("overflow","hidden").width();a.before.push(function(a,c,d,h){d.rev&&(h=!h);e.fn.cycle.commonReset(a,c,d);d.cssBefore.left=h?c.cycleW- -1:1-c.cycleW;d.animOut.left=h?-a.cycleW:a.cycleW});a.cssFirst.left=0;a.cssBefore.top=0;a.animIn.left=0;a.animOut.top=0};e.fn.cycle.transitions.scrollVert=function(c,h,a){c.css("overflow","hidden");a.before.push(function(a,c,d,h){d.rev&&(h=!h);e.fn.cycle.commonReset(a,c,d);d.cssBefore.top=h?1-c.cycleH:c.cycleH-1;d.animOut.top=h?a.cycleH:-a.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.animIn.top=0;a.animOut.left=0};e.fn.cycle.transitions.slideX=function(c,h,a){a.before.push(function(a,c,d){e(d.elements).not(a).hide(); -e.fn.cycle.commonReset(a,c,d,false,true);d.animIn.width=c.cycleW});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.width="show";a.animOut.width=0};e.fn.cycle.transitions.slideY=function(c,h,a){a.before.push(function(a,c,d){e(d.elements).not(a).hide();e.fn.cycle.commonReset(a,c,d,true,false);d.animIn.height=c.cycleH});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animIn.height="show";a.animOut.height=0};e.fn.cycle.transitions.shuffle=function(c,h,a){c=c.css("overflow", -"visible").width();h.css({left:0,top:0});a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,true,true,true)});if(!a.speedAdjusted)a.speed/=2,a.speedAdjusted=true;a.random=0;a.shuffle=a.shuffle||{left:-c,top:15};a.els=[];for(c=0;c<h.length;c++)a.els.push(h[c]);for(c=0;c<a.currSlide;c++)a.els.push(a.els.shift());a.fxFn=function(a,c,d,h,n){d.rev&&(n=!n);var m=n?e(a):e(c);e(c).css(d.cssBefore);var r=d.slideCount;m.animate(d.shuffle,d.speedIn,d.easeIn,function(){for(var c=e.fn.cycle.hopsFromLast(d, -n),i=0;i<c;i++)n?d.els.push(d.els.shift()):d.els.unshift(d.els.pop());if(n){c=0;for(i=d.els.length;c<i;c++)e(d.els[c]).css("z-index",i-c+r)}else c=e(a).css("z-index"),m.css("z-index",parseInt(c,10)+1+r);m.animate({left:0,top:0},d.speedOut,d.easeOut,function(){e(n?this:a).hide();h&&h()})})};e.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0})};e.fn.cycle.transitions.turnUp=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,true,false);d.cssBefore.top=c.cycleH;d.animIn.height= -c.cycleH;d.animOut.width=c.cycleW});a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.height=0;a.animIn.top=0;a.animOut.height=0};e.fn.cycle.transitions.turnDown=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,true,false);d.animIn.height=c.cycleH;d.animOut.top=a.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animOut.height=0};e.fn.cycle.transitions.turnLeft=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false, -true);d.cssBefore.left=c.cycleW;d.animIn.width=c.cycleW});a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.left=0;a.animOut.width=0};e.fn.cycle.transitions.turnRight=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,true);d.animIn.width=c.cycleW;d.animOut.left=a.cycleW});e.extend(a.cssBefore,{top:0,left:0,width:0});a.animIn.left=0;a.animOut.width=0};e.fn.cycle.transitions.zoom=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,false,true); -d.cssBefore.top=c.cycleH/2;d.cssBefore.left=c.cycleW/2;e.extend(d.animIn,{top:0,left:0,width:c.cycleW,height:c.cycleH});e.extend(d.animOut,{width:0,height:0,top:a.cycleH/2,left:a.cycleW/2})});a.cssFirst.top=0;a.cssFirst.left=0;a.cssBefore.width=0;a.cssBefore.height=0};e.fn.cycle.transitions.fadeZoom=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,false);d.cssBefore.left=c.cycleW/2;d.cssBefore.top=c.cycleH/2;e.extend(d.animIn,{top:0,left:0,width:c.cycleW,height:c.cycleH})}); -a.cssBefore.width=0;a.cssBefore.height=0;a.animOut.opacity=0};e.fn.cycle.transitions.blindX=function(c,h,a){c=c.css("overflow","hidden").width();a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d);d.animIn.width=c.cycleW;d.animOut.left=a.cycleW});a.cssBefore.left=c;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=c};e.fn.cycle.transitions.blindY=function(c,h,a){c=c.css("overflow","hidden").height();a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d);d.animIn.height=c.cycleH;d.animOut.top= -a.cycleH});a.cssBefore.top=c;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=c};e.fn.cycle.transitions.blindZ=function(c,h,a){h=c.css("overflow","hidden").height();c=c.width();a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d);d.animIn.height=c.cycleH;d.animOut.top=a.cycleH});a.cssBefore.top=h;a.cssBefore.left=c;a.animIn.top=0;a.animIn.left=0;a.animOut.top=h;a.animOut.left=c};e.fn.cycle.transitions.growX=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,true); -d.cssBefore.left=this.cycleW/2;d.animIn.left=0;d.animIn.width=this.cycleW;d.animOut.left=0});a.cssBefore.top=0;a.cssBefore.width=0};e.fn.cycle.transitions.growY=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,true,false);d.cssBefore.top=this.cycleH/2;d.animIn.top=0;d.animIn.height=this.cycleH;d.animOut.top=0});a.cssBefore.height=0;a.cssBefore.left=0};e.fn.cycle.transitions.curtainX=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,true,true); -d.cssBefore.left=c.cycleW/2;d.animIn.left=0;d.animIn.width=this.cycleW;d.animOut.left=a.cycleW/2;d.animOut.width=0});a.cssBefore.top=0;a.cssBefore.width=0};e.fn.cycle.transitions.curtainY=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,true,false,true);d.cssBefore.top=c.cycleH/2;d.animIn.top=0;d.animIn.height=c.cycleH;d.animOut.top=a.cycleH/2;d.animOut.height=0});a.cssBefore.height=0;a.cssBefore.left=0};e.fn.cycle.transitions.cover=function(c,h,a){var j=a.direction||"left", -i=c.css("overflow","hidden").width(),d=c.height();a.before.push(function(a,c,h){e.fn.cycle.commonReset(a,c,h);j=="right"?h.cssBefore.left=-i:j=="up"?h.cssBefore.top=d:j=="down"?h.cssBefore.top=-d:h.cssBefore.left=i});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};e.fn.cycle.transitions.uncover=function(c,h,a){var j=a.direction||"left",i=c.css("overflow","hidden").width(),d=c.height();a.before.push(function(a,c,h){e.fn.cycle.commonReset(a,c,h,true,true,true);j=="right"?h.animOut.left= -i:j=="up"?h.animOut.top=-d:j=="down"?h.animOut.top=d:h.animOut.left=-i});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};e.fn.cycle.transitions.toss=function(c,h,a){var j=c.css("overflow","visible").width(),i=c.height();a.before.push(function(a,c,h){e.fn.cycle.commonReset(a,c,h,true,true,true);!h.animOut.left&&!h.animOut.top?e.extend(h.animOut,{left:j*2,top:-i/2,opacity:0}):h.animOut.opacity=0});a.cssBefore.left=0;a.cssBefore.top=0;a.animIn.left=0};e.fn.cycle.transitions.wipe= -function(c,h,a){var j=c.css("overflow","hidden").width(),i=c.height();a.cssBefore=a.cssBefore||{};var d;a.clip&&(/l2r/.test(a.clip)?d="rect(0px 0px "+i+"px 0px)":/r2l/.test(a.clip)?d="rect(0px "+j+"px "+i+"px "+j+"px)":/t2b/.test(a.clip)?d="rect(0px "+j+"px 0px 0px)":/b2t/.test(a.clip)?d="rect("+i+"px "+j+"px "+i+"px 0px)":/zoom/.test(a.clip)&&(c=parseInt(i/2,10),h=parseInt(j/2,10),d="rect("+c+"px "+h+"px "+c+"px "+h+"px)"));a.cssBefore.clip=a.cssBefore.clip||d||"rect(0px 0px 0px 0px)";var c=a.cssBefore.clip.match(/(\d+)/g), -l=parseInt(c[0],10),n=parseInt(c[1],10),m=parseInt(c[2],10),r=parseInt(c[3],10);a.before.push(function(a,c,d){if(a!=c){var h=e(a),z=e(c);e.fn.cycle.commonReset(a,c,d,true,true,false);d.cssAfter.display="block";var q=1,b=parseInt(d.speedIn/13,10)-1;(function k(){var a=l?l-parseInt(q*(l/b),10):0,c=r?r-parseInt(q*(r/b),10):0,d=m<i?m+parseInt(q*((i-m)/b||1),10):i,e=n<j?n+parseInt(q*((j-n)/b||1),10):j;z.css({clip:"rect("+a+"px "+e+"px "+d+"px "+c+"px)"});q++<=b?setTimeout(k,13):h.css("display","none")})()}}); -e.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0});a.animIn={left:0};a.animOut={left:0}}})(jQuery); +/* + jQuery Cycle Plugin (with Transition Definitions) + Examples and documentation at: http://jquery.malsup.com/cycle/ + Copyright (c) 2007-2013 M. Alsup + Version: 3.0.3 (11-JUL-2013) + Dual licensed under the MIT and GPL licenses. + http://jquery.malsup.com/license.html + Requires: jQuery v1.7.1 or later + 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(f,h){function k(b){f.fn.cycle.debug&&a(b)}function a(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function m(b,c,a){var l=f(b).data("cycle.opts");if(l){var d=!!b.cyclePause;d&&l.paused?l.paused(b,l,c,a):!d&&l.resumed&&l.resumed(b,l,c,a)}}function g(b,c,l){function d(b,c,l){if(!b&&!0===c){b=f(l).data("cycle.opts");if(!b)return a("options not found, can not resume"),!1;l.cycleTimeout&&(clearTimeout(l.cycleTimeout),l.cycleTimeout=0);t(b.elements, +b,1,!b.backwards)}}b.cycleStop===h&&(b.cycleStop=0);if(c===h||null===c)c={};if(c.constructor==String)switch(c){case "destroy":case "stop":var g=f(b).data("cycle.opts");if(!g)return!1;b.cycleStop++;b.cycleTimeout&&clearTimeout(b.cycleTimeout);b.cycleTimeout=0;g.elements&&f(g.elements).stop();f(b).removeData("cycle.opts");"destroy"==c&&n(b,g);return!1;case "toggle":return b.cyclePause=1===b.cyclePause?0:1,d(b.cyclePause,l,b),m(b),!1;case "pause":return b.cyclePause=1,m(b),!1;case "resume":return b.cyclePause= +0,d(!1,l,b),m(b),!1;case "prev":case "next":g=f(b).data("cycle.opts");if(!g)return a('options not found, "prev/next" ignored'),!1;"string"==typeof l&&(g.oneTimeFx=l);f.fn.cycle[c](g);return!1;default:c={fx:c}}else if(c.constructor==Number){g=c;c=f(b).data("cycle.opts");if(!c)return a("options not found, can not advance slide"),!1;if(0>g||g>=c.elements.length)return a("invalid slide index: "+g),!1;c.nextSlide=g;b.cycleTimeout&&(clearTimeout(b.cycleTimeout),b.cycleTimeout=0);"string"==typeof l&&(c.oneTimeFx= +l);t(c.elements,c,1,g>=c.currSlide);return!1}return c}function d(b,c){if(!f.support.opacity&&c.cleartype&&b.style.filter)try{b.style.removeAttribute("filter")}catch(l){}}function n(b,c){c.next&&f(c.next).unbind(c.prevNextEvent);c.prev&&f(c.prev).unbind(c.prevNextEvent);(c.pager||c.pagerAnchorBuilder)&&f.each(c.pagerAnchors||[],function(){this.unbind().remove()});c.pagerAnchors=null;f(b).unbind("mouseenter.cycle mouseleave.cycle");c.destroy&&c.destroy(c)}function r(b,c,l,g,C){var p,e=f.extend({},f.fn.cycle.defaults, +g||{},f.metadata?b.metadata():f.meta?b.data():{}),k=f.isFunction(b.data)?b.data(e.metaAttr):null;k&&(e=f.extend(e,k));e.autostop&&(e.countdown=e.autostopCount||l.length);var n=b[0];b.data("cycle.opts",e);e.$cont=b;e.stopCount=n.cycleStop;e.elements=l;e.before=e.before?[e.before]:[];e.after=e.after?[e.after]:[];!f.support.opacity&&e.cleartype&&e.after.push(function(){d(this,e)});e.continuous&&e.after.push(function(){t(l,e,0,!e.backwards)});u(e);f.support.opacity||!e.cleartype||e.cleartypeNoBg||v(c); +"static"==b.css("position")&&b.css("position","relative");e.width&&b.width(e.width);e.height&&"auto"!=e.height&&b.height(e.height);e.startingSlide!==h?(e.startingSlide=parseInt(e.startingSlide,10),e.startingSlide>=l.length||0>e.startSlide?e.startingSlide=0:p=!0):e.startingSlide=e.backwards?l.length-1:0;if(e.random){e.randomMap=[];for(k=0;k<l.length;k++)e.randomMap.push(k);e.randomMap.sort(function(b,c){return Math.random()-.5});if(p)for(p=0;p<l.length;p++)e.startingSlide==e.randomMap[p]&&(e.randomIndex= +p);else e.randomIndex=1,e.startingSlide=e.randomMap[1]}else e.startingSlide>=l.length&&(e.startingSlide=0);e.currSlide=e.startingSlide||0;var q=e.startingSlide;c.css({position:"absolute",top:0,left:0}).hide().each(function(b){b=e.backwards?q?b<=q?l.length+(b-q):q-b:l.length-b:q?b>=q?l.length-(b-q):q-b:l.length-b;f(this).css("z-index",b)});f(l[q]).css("opacity",1).show();d(l[q],e);e.fit&&(e.aspect?c.each(function(){var b=f(this),c=!0===e.aspect?b.width()/b.height():e.aspect;e.width&&b.width()!=e.width&& +(b.width(e.width),b.height(e.width/c));e.height&&b.height()<e.height&&(b.height(e.height),b.width(e.height*c))}):(e.width&&c.width(e.width),e.height&&"auto"!=e.height&&c.height(e.height)));!e.center||e.fit&&!e.aspect||c.each(function(){var b=f(this);b.css({"margin-left":e.width?(e.width-b.width())/2+"px":0,"margin-top":e.height?(e.height-b.height())/2+"px":0})});!e.center||e.fit||e.slideResize||c.each(function(){var b=f(this);b.css({"margin-left":e.width?(e.width-b.width())/2+"px":0,"margin-top":e.height? +(e.height-b.height())/2+"px":0})});if((e.containerResize||e.containerResizeHeight)&&1>b.innerHeight()){for(var r=k=p=0;r<l.length;r++){var x=f(l[r]),z=x[0],w=x.outerWidth(),A=x.outerHeight();w||(w=z.offsetWidth||z.width||x.attr("width"));A||(A=z.offsetHeight||z.height||x.attr("height"));p=w>p?w:p;k=A>k?A:k}e.containerResize&&0<p&&0<k&&b.css({width:p+"px",height:k+"px"});e.containerResizeHeight&&0<k&&b.css({height:k+"px"})}var D=!1;e.pause&&b.bind("mouseenter.cycle",function(){D=!0;this.cyclePause++; +m(n,!0)}).bind("mouseleave.cycle",function(){D&&this.cyclePause--;m(n,!0)});if(!1===y(e))return!1;var E=!1;g.requeueAttempts=g.requeueAttempts||0;c.each(function(){var b=f(this);this.cycleH=e.fit&&e.height?e.height:b.height()||this.offsetHeight||this.height||b.attr("height")||0;this.cycleW=e.fit&&e.width?e.width:b.width()||this.offsetWidth||this.width||b.attr("width")||0;if(b.is("img")&&0===this.cycleH&&0===this.cycleW&&!this.complete){if(C.s&&e.requeueOnImageNotLoaded&&100>++g.requeueAttempts)return a(g.requeueAttempts, +" - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){f(C.s,C.c).cycle(g)},e.requeueTimeout),E=!0,!1;a("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return!0});if(E)return!1;e.cssBefore=e.cssBefore||{};e.cssAfter=e.cssAfter||{};e.cssFirst=e.cssFirst||{};e.animIn=e.animIn||{};e.animOut=e.animOut||{};c.not(":eq("+q+")").css(e.cssBefore);f(c[q]).css(e.cssFirst);if(e.timeout)for(e.timeout=parseInt(e.timeout,10),e.speed.constructor== +String&&(e.speed=f.fx.speeds[e.speed]||parseInt(e.speed,10)),e.sync||(e.speed/=2),p="none"==e.fx?0:"shuffle"==e.fx?500:250;e.timeout-e.speed<p;)e.timeout+=e.speed;e.easing&&(e.easeIn=e.easeOut=e.easing);e.speedIn||(e.speedIn=e.speed);e.speedOut||(e.speedOut=e.speed);e.slideCount=l.length;e.currSlide=e.lastSlide=q;e.random?(++e.randomIndex==l.length&&(e.randomIndex=0),e.nextSlide=e.randomMap[e.randomIndex]):e.nextSlide=e.backwards?0===e.startingSlide?l.length-1:e.startingSlide-1:e.startingSlide>=l.length- +1?0:e.startingSlide+1;if(!e.multiFx)if(p=f.fn.cycle.transitions[e.fx],f.isFunction(p))p(b,c,e);else if("custom"!=e.fx&&!e.multiFx)return a("unknown transition: "+e.fx,"; slideshow terminating"),!1;b=c[q];e.skipInitializationCallbacks||(e.before.length&&e.before[0].apply(b,[b,b,e,!0]),e.after.length&&e.after[0].apply(b,[b,b,e,!0]));e.next&&f(e.next).bind(e.prevNextEvent,function(){return B(e,1)});e.prev&&f(e.prev).bind(e.prevNextEvent,function(){return B(e,0)});(e.pager||e.pagerAnchorBuilder)&&F(l, +e);G(e,l);return e}function u(b){b.original={before:[],after:[]};b.original.cssBefore=f.extend({},b.cssBefore);b.original.cssAfter=f.extend({},b.cssAfter);b.original.animIn=f.extend({},b.animIn);b.original.animOut=f.extend({},b.animOut);f.each(b.before,function(){b.original.before.push(this)});f.each(b.after,function(){b.original.after.push(this)})}function y(b){var c,l=f.fn.cycle.transitions;if(0<b.fx.indexOf(",")){b.multiFx=!0;b.fxs=b.fx.replace(/\s*/g,"").split(",");for(c=0;c<b.fxs.length;c++){var d= +b.fxs[c];var g=l[d];g&&l.hasOwnProperty(d)&&f.isFunction(g)||(a("discarding unknown transition: ",d),b.fxs.splice(c,1),c--)}if(!b.fxs.length)return a("No valid transitions named; slideshow terminating."),!1}else if("all"==b.fx)for(c in b.multiFx=!0,b.fxs=[],l)l.hasOwnProperty(c)&&(g=l[c],l.hasOwnProperty(c)&&f.isFunction(g)&&b.fxs.push(c));if(b.multiFx&&b.randomizeEffects){g=Math.floor(20*Math.random())+30;for(c=0;c<g;c++)b.fxs.push(b.fxs.splice(Math.floor(Math.random()*b.fxs.length),1)[0]);k("randomized fx sequence: ", +b.fxs)}return!0}function G(b,c){b.addSlide=function(a,d){a=f(a);var l=a[0];b.autostopCount||b.countdown++;c[d?"unshift":"push"](l);if(b.els)b.els[d?"unshift":"push"](l);b.slideCount=c.length;b.random&&(b.randomMap.push(b.slideCount-1),b.randomMap.sort(function(b,c){return Math.random()-.5}));a.css("position","absolute");a[d?"prependTo":"appendTo"](b.$cont);d&&(b.currSlide++,b.nextSlide++);f.support.opacity||!b.cleartype||b.cleartypeNoBg||v(a);b.fit&&b.width&&a.width(b.width);b.fit&&b.height&&"auto"!= +b.height&&a.height(b.height);l.cycleH=b.fit&&b.height?b.height:a.height();l.cycleW=b.fit&&b.width?b.width:a.width();a.css(b.cssBefore);(b.pager||b.pagerAnchorBuilder)&&f.fn.cycle.createPagerAnchor(c.length-1,l,f(b.pager),c,b);if(f.isFunction(b.onAddSlide))b.onAddSlide(a);else a.hide()}}function t(b,c,a,d){function l(){var a=0;c.timeout&&!c.continuous?(a=w(b[c.currSlide],b[c.nextSlide],c,d),"shuffle"==c.fx&&(a-=c.speedOut)):c.continuous&&g.cyclePause&&(a=10);0<a&&(g.cycleTimeout=setTimeout(function(){t(b, +c,0,!c.backwards)},a))}var g=c.$cont[0],e=b[c.currSlide],m=b[c.nextSlide];a&&c.busy&&c.manualTrump&&(k("manualTrump in go(), stopping active transition"),f(b).stop(!0,!0),c.busy=0,clearTimeout(g.cycleTimeout));if(c.busy)k("transition active, ignoring new tx request");else if(g.cycleStop==c.stopCount&&(0!==g.cycleTimeout||a))if(a||g.cyclePause||c.bounce||!(c.autostop&&0>=--c.countdown||c.nowrap&&!c.random&&c.nextSlide<c.currSlide)){var p=!1;if(!a&&g.cyclePause||c.nextSlide==c.currSlide)l();else{p= +!0;var q=c.fx;e.cycleH=e.cycleH||f(e).height();e.cycleW=e.cycleW||f(e).width();m.cycleH=m.cycleH||f(m).height();m.cycleW=m.cycleW||f(m).width();c.multiFx&&(d&&(c.lastFx===h||++c.lastFx>=c.fxs.length)?c.lastFx=0:!d&&(c.lastFx===h||0>--c.lastFx)&&(c.lastFx=c.fxs.length-1),q=c.fxs[c.lastFx]);c.oneTimeFx&&(q=c.oneTimeFx,c.oneTimeFx=null);f.fn.cycle.resetState(c,q);c.before.length&&f.each(c.before,function(b,a){g.cycleStop==c.stopCount&&a.apply(m,[e,m,c,d])});var n=function(){c.busy=0;f.each(c.after,function(b, +a){g.cycleStop==c.stopCount&&a.apply(m,[e,m,c,d])});g.cycleStop||l()};k("tx firing("+q+"); currSlide: "+c.currSlide+"; nextSlide: "+c.nextSlide);c.busy=1;if(c.fxFn)c.fxFn(e,m,c,n,d,a&&c.fastOnEvent);else if(f.isFunction(f.fn.cycle[c.fx]))f.fn.cycle[c.fx](e,m,c,n,d,a&&c.fastOnEvent);else f.fn.cycle.custom(e,m,c,n,d,a&&c.fastOnEvent)}if(p||c.nextSlide==c.currSlide)c.lastSlide=c.currSlide,c.random?(c.currSlide=c.nextSlide,++c.randomIndex==b.length&&(c.randomIndex=0,c.randomMap.sort(function(b,c){return Math.random()- +.5})),c.nextSlide=c.randomMap[c.randomIndex],c.nextSlide==c.currSlide&&(c.nextSlide=c.currSlide==c.slideCount-1?0:c.currSlide+1)):c.backwards?(a=0>c.nextSlide-1)&&c.bounce?(c.backwards=!c.backwards,c.nextSlide=1,c.currSlide=0):(c.nextSlide=a?b.length-1:c.nextSlide-1,c.currSlide=a?0:c.nextSlide+1):(a=c.nextSlide+1==b.length)&&c.bounce?(c.backwards=!c.backwards,c.nextSlide=b.length-2,c.currSlide=b.length-1):(c.nextSlide=a?0:c.nextSlide+1,c.currSlide=a?b.length-1:c.nextSlide-1);p&&c.pager&&c.updateActivePagerLink(c.pager, +c.currSlide,c.activePagerClass)}else c.end&&c.end(c)}function w(b,c,a,f){if(a.timeoutFn){for(b=a.timeoutFn.call(b,b,c,a,f);"none"!=a.fx&&250>b-a.speed;)b+=a.speed;k("calculated timeout: "+b+"; speed: "+a.speed);if(!1!==b)return b}return a.timeout}function B(b,a){var c=a?1:-1,d=b.elements,g=b.$cont[0],m=g.cycleTimeout;m&&(clearTimeout(m),g.cycleTimeout=0);if(b.random&&0>c)b.randomIndex--,-2==--b.randomIndex?b.randomIndex=d.length-2:-1==b.randomIndex&&(b.randomIndex=d.length-1),b.nextSlide=b.randomMap[b.randomIndex]; +else if(b.random)b.nextSlide=b.randomMap[b.randomIndex];else if(b.nextSlide=b.currSlide+c,0>b.nextSlide){if(b.nowrap)return!1;b.nextSlide=d.length-1}else if(b.nextSlide>=d.length){if(b.nowrap)return!1;b.nextSlide=0}g=b.onPrevNextEvent||b.prevNextClick;f.isFunction(g)&&g(0<c,b.nextSlide,d[b.nextSlide]);t(d,b,1,a);return!1}function F(b,a){var c=f(a.pager);f.each(b,function(d,g){f.fn.cycle.createPagerAnchor(d,g,c,b,a)});a.updateActivePagerLink(a.pager,a.startingSlide,a.activePagerClass)}function v(b){function a(b){b= +parseInt(b,10).toString(16);return 2>b.length?"0"+b:b}function d(b){for(;b&&"html"!=b.nodeName.toLowerCase();b=b.parentNode){var c=f.css(b,"background-color");if(c&&0<=c.indexOf("rgb"))return b=c.match(/\d+/g),"#"+a(b[0])+a(b[1])+a(b[2]);if(c&&"transparent"!=c)return c}return"#ffffff"}k("applying clearType background-color hack");b.each(function(){f(this).css("background-color",d(this))})}f.expr[":"].paused=function(b){return b.cyclePause};f.fn.cycle=function(b,c){var d={s:this.selector,c:this.context}; +if(0===this.length&&"stop"!=b){if(!f.isReady&&d.s)return a("DOM not ready, queuing slideshow"),f(function(){f(d.s,d.c).cycle(b,c)}),this;a("terminating; zero elements found by selector"+(f.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var l=g(this,b,c);if(!1!==l){l.updateActivePagerLink=l.updateActivePagerLink||f.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleStop=this.cycleTimeout=this.cyclePause=0;var m=f(this),h=l.slideExpr? +f(l.slideExpr,this):m.children(),e=h.get();if(2>e.length)a("terminating; too few slides: "+e.length);else{var n=r(m,h,e,l,d);!1!==n&&(m=n.continuous?10:w(e[n.currSlide],e[n.nextSlide],n,!n.backwards))&&(m+=n.delay||0,10>m&&(m=10),k("first timeout: "+m),this.cycleTimeout=setTimeout(function(){t(e,n,0,!l.backwards)},m))}}})};f.fn.cycle.resetState=function(b,a){a=a||b.fx;b.before=[];b.after=[];b.cssBefore=f.extend({},b.original.cssBefore);b.cssAfter=f.extend({},b.original.cssAfter);b.animIn=f.extend({}, +b.original.animIn);b.animOut=f.extend({},b.original.animOut);b.fxFn=null;f.each(b.original.before,function(){b.before.push(this)});f.each(b.original.after,function(){b.after.push(this)});a=f.fn.cycle.transitions[a];f.isFunction(a)&&a(b.$cont,f(b.elements),b)};f.fn.cycle.updateActivePagerLink=function(b,a,d){f(b).each(function(){f(this).children().removeClass(d).eq(a).addClass(d)})};f.fn.cycle.next=function(b){B(b,1)};f.fn.cycle.prev=function(b){B(b,0)};f.fn.cycle.createPagerAnchor=function(b,a,d, +g,h){f.isFunction(h.pagerAnchorBuilder)?(a=h.pagerAnchorBuilder(b,a),k("pagerAnchorBuilder("+b+", el) returned: "+a)):a='<a href="#">'+(b+1)+"</a>";if(a){var c=f(a);if(0===c.parents("body").length){var e=[];1<d.length?(d.each(function(){var b=c.clone(!0);f(this).append(b);e.push(b[0])}),c=f(e)):c.appendTo(d)}h.pagerAnchors=h.pagerAnchors||[];h.pagerAnchors.push(c);d=function(a){a.preventDefault();h.nextSlide=b;a=h.$cont[0];var c=a.cycleTimeout;c&&(clearTimeout(c),a.cycleTimeout=0);a=h.onPagerEvent|| +h.pagerClick;f.isFunction(a)&&a(h.nextSlide,g[h.nextSlide]);t(g,h,1,h.currSlide<b)};/mouseenter|mouseover/i.test(h.pagerEvent)?c.hover(d,function(){}):c.bind(h.pagerEvent,d);/^click/.test(h.pagerEvent)||h.allowPagerClickBubble||c.bind("click.cycle",function(){return!1});var l=h.$cont[0],n=!1;h.pauseOnPagerHover&&c.hover(function(){n=!0;l.cyclePause++;m(l,!0,!0)},function(){n&&l.cyclePause--;m(l,!0,!0)})}};f.fn.cycle.hopsFromLast=function(b,a){var c=b.lastSlide,f=b.currSlide;return a?f>c?f-c:b.slideCount- +c:f<c?c-f:c+b.slideCount-f};f.fn.cycle.commonReset=function(b,a,d,g,h,m){f(d.elements).not(b).hide();"undefined"==typeof d.cssBefore.opacity&&(d.cssBefore.opacity=1);d.cssBefore.display="block";d.slideResize&&!1!==g&&0<a.cycleW&&(d.cssBefore.width=a.cycleW);d.slideResize&&!1!==h&&0<a.cycleH&&(d.cssBefore.height=a.cycleH);d.cssAfter=d.cssAfter||{};d.cssAfter.display="none";f(b).css("zIndex",d.slideCount+(!0===m?1:0));f(a).css("zIndex",d.slideCount+(!0===m?0:1))};f.fn.cycle.custom=function(b,a,d,g, +h,m){var c=f(b),l=f(a),k=d.speedIn;b=d.speedOut;var n=d.easeIn;a=d.easeOut;var r=d.animInDelay;h=d.animOutDelay;l.css(d.cssBefore);m&&(k="number"==typeof m?b=m:b=1,n=a=null);var p=function(){l.delay(r).animate(d.animIn,k,n,function(){g()})};c.delay(h).animate(d.animOut,b,a,function(){c.css(d.cssAfter);d.sync||p()});d.sync&&p()};f.fn.cycle.transitions={fade:function(b,a,d){a.not(":eq("+d.currSlide+")").css("opacity",0);d.before.push(function(b,a,c){f.fn.cycle.commonReset(b,a,c);c.cssBefore.opacity= +0});d.animIn={opacity:1};d.animOut={opacity:0};d.cssBefore={top:0,left:0}}};f.fn.cycle.ver=function(){return"3.0.3"};f.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:!1,animIn:null,animInDelay:0,animOut:null,animOutDelay:0,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartype:!f.support.opacity,cleartypeNoBg:!1,containerResize:1,containerResizeHeight:0,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:!0,metaAttr:"cycle",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:!0,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:!1,slideExpr:null,slideResize:1,speed:1E3,speedIn:null,speedOut:null,startingSlide:h,sync:1,timeout:4E3, +timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery); +(function(f){f.fn.cycle.transitions.none=function(h,k,a){a.fxFn=function(a,g,d,h){f(g).show();f(a).hide();h()}};f.fn.cycle.transitions.fadeout=function(h,k,a){k.not(":eq("+a.currSlide+")").css({display:"block",opacity:1});a.before.push(function(a,g,d,h,k,u){f(a).css("zIndex",d.slideCount+(!0!==u?1:0));f(g).css("zIndex",d.slideCount+(!0!==u?0:1))});a.animIn.opacity=1;a.animOut.opacity=0;a.cssBefore.opacity=1;a.cssBefore.display="block";a.cssAfter.zIndex=0};f.fn.cycle.transitions.scrollUp=function(h, +k,a){h.css("overflow","hidden");a.before.push(f.fn.cycle.commonReset);h=h.height();a.cssBefore.top=h;a.cssBefore.left=0;a.cssFirst.top=0;a.animIn.top=0;a.animOut.top=-h};f.fn.cycle.transitions.scrollDown=function(h,k,a){h.css("overflow","hidden");a.before.push(f.fn.cycle.commonReset);h=h.height();a.cssFirst.top=0;a.cssBefore.top=-h;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=h};f.fn.cycle.transitions.scrollLeft=function(h,k,a){h.css("overflow","hidden");a.before.push(f.fn.cycle.commonReset);h= +h.width();a.cssFirst.left=0;a.cssBefore.left=h;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=0-h};f.fn.cycle.transitions.scrollRight=function(h,k,a){h.css("overflow","hidden");a.before.push(f.fn.cycle.commonReset);h=h.width();a.cssFirst.left=0;a.cssBefore.left=-h;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=h};f.fn.cycle.transitions.scrollHorz=function(h,k,a){h.css("overflow","hidden").width();a.before.push(function(a,g,d,h){d.rev&&(h=!h);f.fn.cycle.commonReset(a,g,d);d.cssBefore.left=h?g.cycleW- +1:1-g.cycleW;d.animOut.left=h?-a.cycleW:a.cycleW});a.cssFirst.left=0;a.cssBefore.top=0;a.animIn.left=0;a.animOut.top=0};f.fn.cycle.transitions.scrollVert=function(h,k,a){h.css("overflow","hidden");a.before.push(function(a,g,d,h){d.rev&&(h=!h);f.fn.cycle.commonReset(a,g,d);d.cssBefore.top=h?1-g.cycleH:g.cycleH-1;d.animOut.top=h?a.cycleH:-a.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.animIn.top=0;a.animOut.left=0};f.fn.cycle.transitions.slideX=function(h,k,a){a.before.push(function(a,g,d){f(d.elements).not(a).hide(); +f.fn.cycle.commonReset(a,g,d,!1,!0);d.animIn.width=g.cycleW});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.width="show";a.animOut.width=0};f.fn.cycle.transitions.slideY=function(h,k,a){a.before.push(function(a,g,d){f(d.elements).not(a).hide();f.fn.cycle.commonReset(a,g,d,!0,!1);d.animIn.height=g.cycleH});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animIn.height="show";a.animOut.height=0};f.fn.cycle.transitions.shuffle=function(h,k,a){h=h.css("overflow","visible").width(); +k.css({left:0,top:0});a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!0,!0,!0)});a.speedAdjusted||(a.speed/=2,a.speedAdjusted=!0);a.random=0;a.shuffle=a.shuffle||{left:-h,top:15};a.els=[];for(h=0;h<k.length;h++)a.els.push(k[h]);for(h=0;h<a.currSlide;h++)a.els.push(a.els.shift());a.fxFn=function(a,g,d,h,k){d.rev&&(k=!k);var m=k?f(a):f(g);f(g).css(d.cssBefore);var n=d.slideCount;m.animate(d.shuffle,d.speedIn,d.easeIn,function(){for(var g=f.fn.cycle.hopsFromLast(d,k),r=0;r<g;r++)k?d.els.push(d.els.shift()): +d.els.unshift(d.els.pop());if(k)for(g=0,r=d.els.length;g<r;g++)f(d.els[g]).css("z-index",r-g+n);else g=f(a).css("z-index"),m.css("z-index",parseInt(g,10)+1+n);m.animate({left:0,top:0},d.speedOut,d.easeOut,function(){f(k?this:a).hide();h&&h()})})};f.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0})};f.fn.cycle.transitions.turnUp=function(h,k,a){a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!0,!1);d.cssBefore.top=g.cycleH;d.animIn.height=g.cycleH;d.animOut.width=g.cycleW});a.cssFirst.top= +0;a.cssBefore.left=0;a.cssBefore.height=0;a.animIn.top=0;a.animOut.height=0};f.fn.cycle.transitions.turnDown=function(h,k,a){a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!0,!1);d.animIn.height=g.cycleH;d.animOut.top=a.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animOut.height=0};f.fn.cycle.transitions.turnLeft=function(h,k,a){a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!1,!0);d.cssBefore.left=g.cycleW;d.animIn.width=g.cycleW}); +a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.left=0;a.animOut.width=0};f.fn.cycle.transitions.turnRight=function(h,k,a){a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!1,!0);d.animIn.width=g.cycleW;d.animOut.left=a.cycleW});f.extend(a.cssBefore,{top:0,left:0,width:0});a.animIn.left=0;a.animOut.width=0};f.fn.cycle.transitions.zoom=function(h,k,a){a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!1,!1,!0);d.cssBefore.top=g.cycleH/2;d.cssBefore.left=g.cycleW/2;f.extend(d.animIn, +{top:0,left:0,width:g.cycleW,height:g.cycleH});f.extend(d.animOut,{width:0,height:0,top:a.cycleH/2,left:a.cycleW/2})});a.cssFirst.top=0;a.cssFirst.left=0;a.cssBefore.width=0;a.cssBefore.height=0};f.fn.cycle.transitions.fadeZoom=function(h,k,a){a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!1,!1);d.cssBefore.left=g.cycleW/2;d.cssBefore.top=g.cycleH/2;f.extend(d.animIn,{top:0,left:0,width:g.cycleW,height:g.cycleH})});a.cssBefore.width=0;a.cssBefore.height=0;a.animOut.opacity=0};f.fn.cycle.transitions.blindX= +function(h,k,a){h=h.css("overflow","hidden").width();a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d);d.animIn.width=g.cycleW;d.animOut.left=a.cycleW});a.cssBefore.left=h;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=h};f.fn.cycle.transitions.blindY=function(h,k,a){h=h.css("overflow","hidden").height();a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d);d.animIn.height=g.cycleH;d.animOut.top=a.cycleH});a.cssBefore.top=h;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=h};f.fn.cycle.transitions.blindZ= +function(h,k,a){k=h.css("overflow","hidden").height();h=h.width();a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d);d.animIn.height=g.cycleH;d.animOut.top=a.cycleH});a.cssBefore.top=k;a.cssBefore.left=h;a.animIn.top=0;a.animIn.left=0;a.animOut.top=k;a.animOut.left=h};f.fn.cycle.transitions.growX=function(h,k,a){a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!1,!0);d.cssBefore.left=this.cycleW/2;d.animIn.left=0;d.animIn.width=this.cycleW;d.animOut.left=0});a.cssBefore.top=0;a.cssBefore.width= +0};f.fn.cycle.transitions.growY=function(h,k,a){a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!0,!1);d.cssBefore.top=this.cycleH/2;d.animIn.top=0;d.animIn.height=this.cycleH;d.animOut.top=0});a.cssBefore.height=0;a.cssBefore.left=0};f.fn.cycle.transitions.curtainX=function(h,k,a){a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!1,!0,!0);d.cssBefore.left=g.cycleW/2;d.animIn.left=0;d.animIn.width=this.cycleW;d.animOut.left=a.cycleW/2;d.animOut.width=0});a.cssBefore.top=0;a.cssBefore.width= +0};f.fn.cycle.transitions.curtainY=function(h,k,a){a.before.push(function(a,g,d){f.fn.cycle.commonReset(a,g,d,!0,!1,!0);d.cssBefore.top=g.cycleH/2;d.animIn.top=0;d.animIn.height=g.cycleH;d.animOut.top=a.cycleH/2;d.animOut.height=0});a.cssBefore.height=0;a.cssBefore.left=0};f.fn.cycle.transitions.cover=function(h,k,a){var m=a.direction||"left",g=h.css("overflow","hidden").width(),d=h.height();a.before.push(function(a,h,k){f.fn.cycle.commonReset(a,h,k);k.cssAfter.display="";"right"==m?k.cssBefore.left= +-g:"up"==m?k.cssBefore.top=d:"down"==m?k.cssBefore.top=-d:k.cssBefore.left=g});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};f.fn.cycle.transitions.uncover=function(h,k,a){var m=a.direction||"left",g=h.css("overflow","hidden").width(),d=h.height();a.before.push(function(a,h,k){f.fn.cycle.commonReset(a,h,k,!0,!0,!0);"right"==m?k.animOut.left=g:"up"==m?k.animOut.top=-d:"down"==m?k.animOut.top=d:k.animOut.left=-g});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left= +0};f.fn.cycle.transitions.toss=function(h,k,a){var m=h.css("overflow","visible").width(),g=h.height();a.before.push(function(a,h,k){f.fn.cycle.commonReset(a,h,k,!0,!0,!0);k.animOut.left||k.animOut.top?k.animOut.opacity=0:f.extend(k.animOut,{left:2*m,top:-g/2,opacity:0})});a.cssBefore.left=0;a.cssBefore.top=0;a.animIn.left=0};f.fn.cycle.transitions.wipe=function(h,k,a){var m=h.css("overflow","hidden").width(),g=h.height();a.cssBefore=a.cssBefore||{};if(a.clip)if(/l2r/.test(a.clip))var d="rect(0px 0px "+ +g+"px 0px)";else/r2l/.test(a.clip)?d="rect(0px "+m+"px "+g+"px "+m+"px)":/t2b/.test(a.clip)?d="rect(0px "+m+"px 0px 0px)":/b2t/.test(a.clip)?d="rect("+g+"px "+m+"px "+g+"px 0px)":/zoom/.test(a.clip)&&(h=parseInt(g/2,10),k=parseInt(m/2,10),d="rect("+h+"px "+k+"px "+h+"px "+k+"px)");a.cssBefore.clip=a.cssBefore.clip||d||"rect(0px 0px 0px 0px)";h=a.cssBefore.clip.match(/(\d+)/g);var n=parseInt(h[0],10),r=parseInt(h[1],10),u=parseInt(h[2],10),y=parseInt(h[3],10);a.before.push(function(a,d,h){if(a!=d){var k= +f(a),t=f(d);f.fn.cycle.commonReset(a,d,h,!0,!0,!1);h.cssAfter.display="block";var v=1,b=parseInt(h.speedIn/13,10)-1;(function l(){var a=n?n-parseInt(n/b*v,10):0,d=y?y-parseInt(y/b*v,10):0,f=u<g?u+parseInt(v*((g-u)/b||1),10):g,e=r<m?r+parseInt(v*((m-r)/b||1),10):m;t.css({clip:"rect("+a+"px "+e+"px "+f+"px "+d+"px)"});v++<=b?setTimeout(l,13):k.css("display","none")})()}});f.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0});a.animIn={left:0};a.animOut={left:0}}})(jQuery); -- GitLab