@pimaonline/pimaonline-themepack 3.10.13 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +12 -23
- package/dist/css/main.css +1 -1
- package/dist/css/plugins/alt-icons.css +1 -1
- package/dist/css/plugins/font-awesome.css +1 -1
- package/dist/css/routes.css +1 -1
- package/dist/css/themes/ait/styles.css +1 -1
- package/dist/css/themes/ajs/styles.css +1 -1
- package/dist/css/themes/ant/styles.css +1 -0
- package/dist/css/themes/art/styles.css +1 -1
- package/dist/css/themes/aviation/styles.css +1 -1
- package/dist/css/themes/bct/styles.css +1 -1
- package/dist/css/themes/bio/styles.css +1 -1
- package/dist/css/themes/business/styles.css +1 -1
- package/dist/css/themes/cad/styles.css +1 -1
- package/dist/css/themes/cards/styles.css +1 -1
- package/dist/css/themes/cas/styles.css +1 -0
- package/dist/css/themes/cda/styles.css +1 -1
- package/dist/css/themes/chm/styles.css +1 -0
- package/dist/css/themes/cis/styles.css +1 -1
- package/dist/css/themes/communication/styles.css +1 -1
- package/dist/css/themes/computer-information-systems/styles.css +1 -1
- package/dist/css/themes/culinary/styles.css +1 -1
- package/dist/css/themes/culinary/versions/black-marble.css +1 -1
- package/dist/css/themes/culinary/versions/stainless.css +1 -1
- package/dist/css/themes/culinary/versions/wood.css +1 -1
- package/dist/css/themes/dental/styles.css +1 -1
- package/dist/css/themes/ece/styles.css +1 -1
- package/dist/css/themes/ecn/styles.css +1 -1
- package/dist/css/themes/eng/styles.css +1 -1
- package/dist/css/themes/fashion/styles.css +1 -1
- package/dist/css/themes/fitness/styles.css +1 -1
- package/dist/css/themes/fsc/styles.css +1 -1
- package/dist/css/themes/geography/styles.css +1 -1
- package/dist/css/themes/geology/styles.css +1 -1
- package/dist/css/themes/health-it/styles.css +1 -1
- package/dist/css/themes/history/styles.css +1 -1
- package/dist/css/themes/hrm/styles.css +1 -1
- package/dist/css/themes/hrs/styles.css +1 -1
- package/dist/css/themes/journalism/styles.css +1 -1
- package/dist/css/themes/lang/styles.css +1 -1
- package/dist/css/themes/lgm/styles.css +1 -1
- package/dist/css/themes/machine/styles.css +1 -1
- package/dist/css/themes/math/styles.css +1 -1
- package/dist/css/themes/mgt/styles.css +1 -1
- package/dist/css/themes/minimalist/styles.css +1 -1
- package/dist/css/themes/mkt/styles.css +1 -0
- package/dist/css/themes/music/styles.css +1 -1
- package/dist/css/themes/nursing/styles.css +1 -0
- package/dist/css/themes/philosophy/styles.css +1 -1
- package/dist/css/themes/pht/styles.css +1 -1
- package/dist/css/themes/phy/styles.css +1 -0
- package/dist/css/themes/pos/styles.css +1 -0
- package/dist/css/themes/psy/styles.css +1 -1
- package/dist/css/themes/reading/styles.css +1 -0
- package/dist/css/themes/resort/styles.css +1 -1
- package/dist/css/themes/soc/styles.css +1 -1
- package/dist/css/themes/ss/styles.css +1 -1
- package/dist/css/themes/tps/styles.css +1 -0
- package/dist/css/themes/university/styles.css +1 -1
- package/dist/css/themes/vet/styles.css +1 -1
- package/dist/css/themes/welding/styles.css +1 -1
- package/dist/css/themes/writing/styles.css +1 -1
- package/dist/img/general/arrow-right-black.svg +1 -0
- package/dist/img/general/arrow-right-primary-blue.svg +1 -0
- package/dist/img/general/arrow-right-white.svg +1 -0
- package/dist/img/theme-images/ant/texture.png +0 -0
- package/dist/img/theme-images/cas/city-vector.svg +92 -0
- package/dist/img/theme-images/cas/farm-vector.svg +1 -0
- package/dist/img/theme-images/cas/ocean-vector.svg +1 -0
- package/dist/img/theme-images/cas/recycle-symbol.svg +1 -0
- package/dist/img/theme-images/chm/chem-letters/letter-a.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-b.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-c.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-d.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-e.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-f.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-g.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-h.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-i.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-j.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-k.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-l.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-m.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-n.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-o.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-p.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-q.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-r.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-s.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-t.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-u.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-v.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-w.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-x.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-y.png +0 -0
- package/dist/img/theme-images/chm/chem-letters/letter-z.png +0 -0
- package/dist/img/theme-images/mkt/blue/bluebars.svg +36 -0
- package/dist/img/theme-images/mkt/blue/blueheader.jpg +0 -0
- package/dist/img/theme-images/mkt/blue/bluepie.svg +42 -0
- package/dist/img/theme-images/mkt/green/greenbars.svg +36 -0
- package/dist/img/theme-images/mkt/green/greenheader.jpg +0 -0
- package/dist/img/theme-images/mkt/green/greenpie.svg +42 -0
- package/dist/img/theme-images/mkt/yellow/yellowbars.svg +36 -0
- package/dist/img/theme-images/mkt/yellow/yellowheader.jpg +0 -0
- package/dist/img/theme-images/mkt/yellow/yellowpie.svg +42 -0
- package/dist/img/theme-images/nursing/blue/bottomright-blue.svg +95 -0
- package/dist/img/theme-images/nursing/blue/topleft-blue.svg +111 -0
- package/dist/img/theme-images/nursing/green/bottomright-green.svg +95 -0
- package/dist/img/theme-images/nursing/green/topleft-green.svg +111 -0
- package/dist/img/theme-images/nursing/purple/bottomright-purple.svg +95 -0
- package/dist/img/theme-images/nursing/purple/topleft-purple.svg +111 -0
- package/dist/img/theme-images/nursing/teal/bottomright-teal.svg +95 -0
- package/dist/img/theme-images/nursing/teal/topleft-teal.svg +111 -0
- package/dist/img/theme-images/phy/background.svg +150 -0
- package/dist/img/theme-images/phy/tape-style1.svg +8 -0
- package/dist/img/theme-images/reading/bg10.jpg +0 -0
- package/dist/js/scripts2.js +1 -1018
- package/dist/js/themes/cas.js +1 -0
- package/dist/js/themes/chm.js +1 -0
- package/dist/js/themes/ecn.js +1 -13
- package/dist/js/themes/hrs.js +1 -19
- package/dist/js/themes/ss.js +1 -197
- package/dist/plugins/fancybox/fancybox-example.html +1 -1
- package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.js +2 -122
- package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.js.LICENSE.txt +15 -0
- package/dist/plugins/fancybox/helpers/jquery.fancybox-media.js +2 -201
- package/dist/plugins/fancybox/helpers/jquery.fancybox-media.js.LICENSE.txt +64 -0
- package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.js +2 -165
- package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.js.LICENSE.txt +16 -0
- package/dist/plugins/fancybox/jquery.fancybox.js +2 -2018
- package/dist/plugins/fancybox/jquery.fancybox.js.LICENSE.txt +11 -0
- package/dist/plugins/fancybox/jquery.fancybox.pack.js +2 -46
- package/dist/plugins/fancybox/jquery.fancybox.pack.js.LICENSE.txt +1 -0
- package/dist/plugins/flashcards/flashcards-example.html +1 -1
- package/dist/plugins/flashcards/js/flash_cards.min.js +1 -12
- package/dist/plugins/flashcards/js/plugins/flash_cards.js +1 -62
- package/dist/plugins/flashcards/js/plugins/jquery.cycle.js +2 -1148
- package/dist/plugins/flashcards/js/plugins/jquery.cycle.js.LICENSE.txt +20 -0
- package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.js +2 -9404
- package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.js.LICENSE.txt +22 -0
- package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.min.js +2 -4
- package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.min.js.LICENSE.txt +1 -0
- package/dist/plugins/flashcards/js/vendor/modernizr-2.5.3.min.js +1 -4
- package/dist/plugins/floating-particles/floating-particles.js +1 -68
- package/dist/plugins/global-homepage-overrides/global-homepage-overrides.js +1 -53
- package/dist/plugins/preview-banner/preview-banner.js +1 -57
- package/package.json +22 -11
- package/dist/js/jumpTo.js +0 -4
- package/dist/js/scripts.js +0 -327
@@ -1,1148 +1,2 @@
|
|
1
|
-
/*!
|
2
|
-
* jQuery Cycle Plugin (with Transition Definitions)
|
3
|
-
* Examples and documentation at: http://jquery.malsup.com/cycle/
|
4
|
-
* Copyright (c) 2007-2010 M. Alsup
|
5
|
-
* Version: 2.9999.5 (10-APR-2012)
|
6
|
-
* Dual licensed under the MIT and GPL licenses.
|
7
|
-
* http://jquery.malsup.com/license.html
|
8
|
-
* Requires: jQuery v1.3.2 or later
|
9
|
-
*/
|
10
|
-
;(function($, undefined) {
|
11
|
-
"use strict";
|
12
|
-
|
13
|
-
var ver = '2.9999.5';
|
14
|
-
|
15
|
-
// if $.support is not defined (pre jQuery 1.3) add what I need
|
16
|
-
if ($.support === undefined) {
|
17
|
-
$.support = {
|
18
|
-
opacity: !($.browser.msie)
|
19
|
-
};
|
20
|
-
}
|
21
|
-
|
22
|
-
function debug(s) {
|
23
|
-
if ($.fn.cycle.debug)
|
24
|
-
log(s);
|
25
|
-
}
|
26
|
-
function log() {
|
27
|
-
if (window.console && console.log)
|
28
|
-
console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
|
29
|
-
}
|
30
|
-
$.expr[':'].paused = function(el) {
|
31
|
-
return el.cyclePause;
|
32
|
-
};
|
33
|
-
|
34
|
-
|
35
|
-
// the options arg can be...
|
36
|
-
// a number - indicates an immediate transition should occur to the given slide index
|
37
|
-
// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
|
38
|
-
// an object - properties to control the slideshow
|
39
|
-
//
|
40
|
-
// the arg2 arg can be...
|
41
|
-
// the name of an fx (only used in conjunction with a numeric value for 'options')
|
42
|
-
// the value true (only used in first arg == 'resume') and indicates
|
43
|
-
// that the resume should occur immediately (not wait for next timeout)
|
44
|
-
|
45
|
-
$.fn.cycle = function(options, arg2) {
|
46
|
-
var o = { s: this.selector, c: this.context };
|
47
|
-
|
48
|
-
// in 1.3+ we can fix mistakes with the ready state
|
49
|
-
if (this.length === 0 && options != 'stop') {
|
50
|
-
if (!$.isReady && o.s) {
|
51
|
-
log('DOM not ready, queuing slideshow');
|
52
|
-
$(function() {
|
53
|
-
$(o.s,o.c).cycle(options,arg2);
|
54
|
-
});
|
55
|
-
return this;
|
56
|
-
}
|
57
|
-
// is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
|
58
|
-
log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
|
59
|
-
return this;
|
60
|
-
}
|
61
|
-
|
62
|
-
// iterate the matched nodeset
|
63
|
-
return this.each(function() {
|
64
|
-
var opts = handleArguments(this, options, arg2);
|
65
|
-
if (opts === false)
|
66
|
-
return;
|
67
|
-
|
68
|
-
opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
|
69
|
-
|
70
|
-
// stop existing slideshow for this container (if there is one)
|
71
|
-
if (this.cycleTimeout)
|
72
|
-
clearTimeout(this.cycleTimeout);
|
73
|
-
this.cycleTimeout = this.cyclePause = 0;
|
74
|
-
this.cycleStop = 0; // issue #108
|
75
|
-
|
76
|
-
var $cont = $(this);
|
77
|
-
var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
|
78
|
-
var els = $slides.get();
|
79
|
-
|
80
|
-
if (els.length < 2) {
|
81
|
-
log('terminating; too few slides: ' + els.length);
|
82
|
-
return;
|
83
|
-
}
|
84
|
-
|
85
|
-
var opts2 = buildOptions($cont, $slides, els, opts, o);
|
86
|
-
if (opts2 === false)
|
87
|
-
return;
|
88
|
-
|
89
|
-
var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
|
90
|
-
|
91
|
-
// if it's an auto slideshow, kick it off
|
92
|
-
if (startTime) {
|
93
|
-
startTime += (opts2.delay || 0);
|
94
|
-
if (startTime < 10)
|
95
|
-
startTime = 10;
|
96
|
-
debug('first timeout: ' + startTime);
|
97
|
-
this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards);}, startTime);
|
98
|
-
}
|
99
|
-
});
|
100
|
-
};
|
101
|
-
|
102
|
-
function triggerPause(cont, byHover, onPager) {
|
103
|
-
var opts = $(cont).data('cycle.opts');
|
104
|
-
var paused = !!cont.cyclePause;
|
105
|
-
if (paused && opts.paused)
|
106
|
-
opts.paused(cont, opts, byHover, onPager);
|
107
|
-
else if (!paused && opts.resumed)
|
108
|
-
opts.resumed(cont, opts, byHover, onPager);
|
109
|
-
}
|
110
|
-
|
111
|
-
// process the args that were passed to the plugin fn
|
112
|
-
function handleArguments(cont, options, arg2) {
|
113
|
-
if (cont.cycleStop === undefined)
|
114
|
-
cont.cycleStop = 0;
|
115
|
-
if (options === undefined || options === null)
|
116
|
-
options = {};
|
117
|
-
if (options.constructor == String) {
|
118
|
-
switch(options) {
|
119
|
-
case 'destroy':
|
120
|
-
case 'stop':
|
121
|
-
var opts = $(cont).data('cycle.opts');
|
122
|
-
if (!opts)
|
123
|
-
return false;
|
124
|
-
cont.cycleStop++; // callbacks look for change
|
125
|
-
if (cont.cycleTimeout)
|
126
|
-
clearTimeout(cont.cycleTimeout);
|
127
|
-
cont.cycleTimeout = 0;
|
128
|
-
if (opts.elements)
|
129
|
-
$(opts.elements).stop();
|
130
|
-
$(cont).removeData('cycle.opts');
|
131
|
-
if (options == 'destroy')
|
132
|
-
destroy(cont, opts);
|
133
|
-
return false;
|
134
|
-
case 'toggle':
|
135
|
-
cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
|
136
|
-
checkInstantResume(cont.cyclePause, arg2, cont);
|
137
|
-
triggerPause(cont);
|
138
|
-
return false;
|
139
|
-
case 'pause':
|
140
|
-
cont.cyclePause = 1;
|
141
|
-
triggerPause(cont);
|
142
|
-
return false;
|
143
|
-
case 'resume':
|
144
|
-
cont.cyclePause = 0;
|
145
|
-
checkInstantResume(false, arg2, cont);
|
146
|
-
triggerPause(cont);
|
147
|
-
return false;
|
148
|
-
case 'prev':
|
149
|
-
case 'next':
|
150
|
-
opts = $(cont).data('cycle.opts');
|
151
|
-
if (!opts) {
|
152
|
-
log('options not found, "prev/next" ignored');
|
153
|
-
return false;
|
154
|
-
}
|
155
|
-
$.fn.cycle[options](opts);
|
156
|
-
return false;
|
157
|
-
default:
|
158
|
-
options = { fx: options };
|
159
|
-
}
|
160
|
-
return options;
|
161
|
-
}
|
162
|
-
else if (options.constructor == Number) {
|
163
|
-
// go to the requested slide
|
164
|
-
var num = options;
|
165
|
-
options = $(cont).data('cycle.opts');
|
166
|
-
if (!options) {
|
167
|
-
log('options not found, can not advance slide');
|
168
|
-
return false;
|
169
|
-
}
|
170
|
-
if (num < 0 || num >= options.elements.length) {
|
171
|
-
log('invalid slide index: ' + num);
|
172
|
-
return false;
|
173
|
-
}
|
174
|
-
options.nextSlide = num;
|
175
|
-
if (cont.cycleTimeout) {
|
176
|
-
clearTimeout(cont.cycleTimeout);
|
177
|
-
cont.cycleTimeout = 0;
|
178
|
-
}
|
179
|
-
if (typeof arg2 == 'string')
|
180
|
-
options.oneTimeFx = arg2;
|
181
|
-
go(options.elements, options, 1, num >= options.currSlide);
|
182
|
-
return false;
|
183
|
-
}
|
184
|
-
return options;
|
185
|
-
|
186
|
-
function checkInstantResume(isPaused, arg2, cont) {
|
187
|
-
if (!isPaused && arg2 === true) { // resume now!
|
188
|
-
var options = $(cont).data('cycle.opts');
|
189
|
-
if (!options) {
|
190
|
-
log('options not found, can not resume');
|
191
|
-
return false;
|
192
|
-
}
|
193
|
-
if (cont.cycleTimeout) {
|
194
|
-
clearTimeout(cont.cycleTimeout);
|
195
|
-
cont.cycleTimeout = 0;
|
196
|
-
}
|
197
|
-
go(options.elements, options, 1, !options.backwards);
|
198
|
-
}
|
199
|
-
}
|
200
|
-
}
|
201
|
-
|
202
|
-
function removeFilter(el, opts) {
|
203
|
-
if (!$.support.opacity && opts.cleartype && el.style.filter) {
|
204
|
-
try { el.style.removeAttribute('filter'); }
|
205
|
-
catch(smother) {} // handle old opera versions
|
206
|
-
}
|
207
|
-
}
|
208
|
-
|
209
|
-
// unbind event handlers
|
210
|
-
function destroy(cont, opts) {
|
211
|
-
if (opts.next)
|
212
|
-
$(opts.next).unbind(opts.prevNextEvent);
|
213
|
-
if (opts.prev)
|
214
|
-
$(opts.prev).unbind(opts.prevNextEvent);
|
215
|
-
|
216
|
-
if (opts.pager || opts.pagerAnchorBuilder)
|
217
|
-
$.each(opts.pagerAnchors || [], function() {
|
218
|
-
this.unbind().remove();
|
219
|
-
});
|
220
|
-
opts.pagerAnchors = null;
|
221
|
-
$(cont).unbind('mouseenter.cycle mouseleave.cycle');
|
222
|
-
if (opts.destroy) // callback
|
223
|
-
opts.destroy(opts);
|
224
|
-
}
|
225
|
-
|
226
|
-
// one-time initialization
|
227
|
-
function buildOptions($cont, $slides, els, options, o) {
|
228
|
-
var startingSlideSpecified;
|
229
|
-
// support metadata plugin (v1.0 and v2.0)
|
230
|
-
var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
|
231
|
-
var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
|
232
|
-
if (meta)
|
233
|
-
opts = $.extend(opts, meta);
|
234
|
-
if (opts.autostop)
|
235
|
-
opts.countdown = opts.autostopCount || els.length;
|
236
|
-
|
237
|
-
var cont = $cont[0];
|
238
|
-
$cont.data('cycle.opts', opts);
|
239
|
-
opts.$cont = $cont;
|
240
|
-
opts.stopCount = cont.cycleStop;
|
241
|
-
opts.elements = els;
|
242
|
-
opts.before = opts.before ? [opts.before] : [];
|
243
|
-
opts.after = opts.after ? [opts.after] : [];
|
244
|
-
|
245
|
-
// push some after callbacks
|
246
|
-
if (!$.support.opacity && opts.cleartype)
|
247
|
-
opts.after.push(function() { removeFilter(this, opts); });
|
248
|
-
if (opts.continuous)
|
249
|
-
opts.after.push(function() { go(els,opts,0,!opts.backwards); });
|
250
|
-
|
251
|
-
saveOriginalOpts(opts);
|
252
|
-
|
253
|
-
// clearType corrections
|
254
|
-
if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
|
255
|
-
clearTypeFix($slides);
|
256
|
-
|
257
|
-
// container requires non-static position so that slides can be position within
|
258
|
-
if ($cont.css('position') == 'static')
|
259
|
-
$cont.css('position', 'relative');
|
260
|
-
if (opts.width)
|
261
|
-
$cont.width(opts.width);
|
262
|
-
if (opts.height && opts.height != 'auto')
|
263
|
-
$cont.height(opts.height);
|
264
|
-
|
265
|
-
if (opts.startingSlide !== undefined) {
|
266
|
-
opts.startingSlide = parseInt(opts.startingSlide,10);
|
267
|
-
if (opts.startingSlide >= els.length || opts.startSlide < 0)
|
268
|
-
opts.startingSlide = 0; // catch bogus input
|
269
|
-
else
|
270
|
-
startingSlideSpecified = true;
|
271
|
-
}
|
272
|
-
else if (opts.backwards)
|
273
|
-
opts.startingSlide = els.length - 1;
|
274
|
-
else
|
275
|
-
opts.startingSlide = 0;
|
276
|
-
|
277
|
-
// if random, mix up the slide array
|
278
|
-
if (opts.random) {
|
279
|
-
opts.randomMap = [];
|
280
|
-
for (var i = 0; i < els.length; i++)
|
281
|
-
opts.randomMap.push(i);
|
282
|
-
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
283
|
-
if (startingSlideSpecified) {
|
284
|
-
// try to find the specified starting slide and if found set start slide index in the map accordingly
|
285
|
-
for ( var cnt = 0; cnt < els.length; cnt++ ) {
|
286
|
-
if ( opts.startingSlide == opts.randomMap[cnt] ) {
|
287
|
-
opts.randomIndex = cnt;
|
288
|
-
}
|
289
|
-
}
|
290
|
-
}
|
291
|
-
else {
|
292
|
-
opts.randomIndex = 1;
|
293
|
-
opts.startingSlide = opts.randomMap[1];
|
294
|
-
}
|
295
|
-
}
|
296
|
-
else if (opts.startingSlide >= els.length)
|
297
|
-
opts.startingSlide = 0; // catch bogus input
|
298
|
-
opts.currSlide = opts.startingSlide || 0;
|
299
|
-
var first = opts.startingSlide;
|
300
|
-
|
301
|
-
// set position and zIndex on all the slides
|
302
|
-
$slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
|
303
|
-
var z;
|
304
|
-
if (opts.backwards)
|
305
|
-
z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
|
306
|
-
else
|
307
|
-
z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
|
308
|
-
$(this).css('z-index', z);
|
309
|
-
});
|
310
|
-
|
311
|
-
// make sure first slide is visible
|
312
|
-
$(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
|
313
|
-
removeFilter(els[first], opts);
|
314
|
-
|
315
|
-
// stretch slides
|
316
|
-
if (opts.fit) {
|
317
|
-
if (!opts.aspect) {
|
318
|
-
if (opts.width)
|
319
|
-
$slides.width(opts.width);
|
320
|
-
if (opts.height && opts.height != 'auto')
|
321
|
-
$slides.height(opts.height);
|
322
|
-
} else {
|
323
|
-
$slides.each(function(){
|
324
|
-
var $slide = $(this);
|
325
|
-
var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect;
|
326
|
-
if( opts.width && $slide.width() != opts.width ) {
|
327
|
-
$slide.width( opts.width );
|
328
|
-
$slide.height( opts.width / ratio );
|
329
|
-
}
|
330
|
-
|
331
|
-
if( opts.height && $slide.height() < opts.height ) {
|
332
|
-
$slide.height( opts.height );
|
333
|
-
$slide.width( opts.height * ratio );
|
334
|
-
}
|
335
|
-
});
|
336
|
-
}
|
337
|
-
}
|
338
|
-
|
339
|
-
if (opts.center && ((!opts.fit) || opts.aspect)) {
|
340
|
-
$slides.each(function(){
|
341
|
-
var $slide = $(this);
|
342
|
-
$slide.css({
|
343
|
-
"margin-left": opts.width ?
|
344
|
-
((opts.width - $slide.width()) / 2) + "px" :
|
345
|
-
0,
|
346
|
-
"margin-top": opts.height ?
|
347
|
-
((opts.height - $slide.height()) / 2) + "px" :
|
348
|
-
0
|
349
|
-
});
|
350
|
-
});
|
351
|
-
}
|
352
|
-
|
353
|
-
if (opts.center && !opts.fit && !opts.slideResize) {
|
354
|
-
$slides.each(function(){
|
355
|
-
var $slide = $(this);
|
356
|
-
$slide.css({
|
357
|
-
"margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
|
358
|
-
"margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
|
359
|
-
});
|
360
|
-
});
|
361
|
-
}
|
362
|
-
|
363
|
-
// stretch container
|
364
|
-
var reshape = opts.containerResize && !$cont.innerHeight();
|
365
|
-
if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
|
366
|
-
var maxw = 0, maxh = 0;
|
367
|
-
for(var j=0; j < els.length; j++) {
|
368
|
-
var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
|
369
|
-
if (!w) w = e.offsetWidth || e.width || $e.attr('width');
|
370
|
-
if (!h) h = e.offsetHeight || e.height || $e.attr('height');
|
371
|
-
maxw = w > maxw ? w : maxw;
|
372
|
-
maxh = h > maxh ? h : maxh;
|
373
|
-
}
|
374
|
-
if (maxw > 0 && maxh > 0)
|
375
|
-
$cont.css({width:maxw+'px',height:maxh+'px'});
|
376
|
-
}
|
377
|
-
|
378
|
-
var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
|
379
|
-
if (opts.pause)
|
380
|
-
$cont.bind('mouseenter.cycle', function(){
|
381
|
-
pauseFlag = true;
|
382
|
-
this.cyclePause++;
|
383
|
-
triggerPause(cont, true);
|
384
|
-
}).bind('mouseleave.cycle', function(){
|
385
|
-
if (pauseFlag)
|
386
|
-
this.cyclePause--;
|
387
|
-
triggerPause(cont, true);
|
388
|
-
});
|
389
|
-
|
390
|
-
if (supportMultiTransitions(opts) === false)
|
391
|
-
return false;
|
392
|
-
|
393
|
-
// apparently a lot of people use image slideshows without height/width attributes on the images.
|
394
|
-
// Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
|
395
|
-
var requeue = false;
|
396
|
-
options.requeueAttempts = options.requeueAttempts || 0;
|
397
|
-
$slides.each(function() {
|
398
|
-
// try to get height/width of each slide
|
399
|
-
var $el = $(this);
|
400
|
-
this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
|
401
|
-
this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
|
402
|
-
|
403
|
-
if ( $el.is('img') ) {
|
404
|
-
// sigh.. sniffing, hacking, shrugging... this crappy hack tries to account for what browsers do when
|
405
|
-
// an image is being downloaded and the markup did not include sizing info (height/width attributes);
|
406
|
-
// there seems to be some "default" sizes used in this situation
|
407
|
-
var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
|
408
|
-
var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete);
|
409
|
-
var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete);
|
410
|
-
var loadingOther = (this.cycleH === 0 && this.cycleW === 0 && !this.complete);
|
411
|
-
// don't requeue for images that are still loading but have a valid size
|
412
|
-
if (loadingIE || loadingFF || loadingOp || loadingOther) {
|
413
|
-
if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
|
414
|
-
log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
|
415
|
-
setTimeout(function() {$(o.s,o.c).cycle(options);}, opts.requeueTimeout);
|
416
|
-
requeue = true;
|
417
|
-
return false; // break each loop
|
418
|
-
}
|
419
|
-
else {
|
420
|
-
log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
|
421
|
-
}
|
422
|
-
}
|
423
|
-
}
|
424
|
-
return true;
|
425
|
-
});
|
426
|
-
|
427
|
-
if (requeue)
|
428
|
-
return false;
|
429
|
-
|
430
|
-
opts.cssBefore = opts.cssBefore || {};
|
431
|
-
opts.cssAfter = opts.cssAfter || {};
|
432
|
-
opts.cssFirst = opts.cssFirst || {};
|
433
|
-
opts.animIn = opts.animIn || {};
|
434
|
-
opts.animOut = opts.animOut || {};
|
435
|
-
|
436
|
-
$slides.not(':eq('+first+')').css(opts.cssBefore);
|
437
|
-
$($slides[first]).css(opts.cssFirst);
|
438
|
-
|
439
|
-
if (opts.timeout) {
|
440
|
-
opts.timeout = parseInt(opts.timeout,10);
|
441
|
-
// ensure that timeout and speed settings are sane
|
442
|
-
if (opts.speed.constructor == String)
|
443
|
-
opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
|
444
|
-
if (!opts.sync)
|
445
|
-
opts.speed = opts.speed / 2;
|
446
|
-
|
447
|
-
var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250;
|
448
|
-
while((opts.timeout - opts.speed) < buffer) // sanitize timeout
|
449
|
-
opts.timeout += opts.speed;
|
450
|
-
}
|
451
|
-
if (opts.easing)
|
452
|
-
opts.easeIn = opts.easeOut = opts.easing;
|
453
|
-
if (!opts.speedIn)
|
454
|
-
opts.speedIn = opts.speed;
|
455
|
-
if (!opts.speedOut)
|
456
|
-
opts.speedOut = opts.speed;
|
457
|
-
|
458
|
-
opts.slideCount = els.length;
|
459
|
-
opts.currSlide = opts.lastSlide = first;
|
460
|
-
if (opts.random) {
|
461
|
-
if (++opts.randomIndex == els.length)
|
462
|
-
opts.randomIndex = 0;
|
463
|
-
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
464
|
-
}
|
465
|
-
else if (opts.backwards)
|
466
|
-
opts.nextSlide = opts.startingSlide === 0 ? (els.length-1) : opts.startingSlide-1;
|
467
|
-
else
|
468
|
-
opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
|
469
|
-
|
470
|
-
// run transition init fn
|
471
|
-
if (!opts.multiFx) {
|
472
|
-
var init = $.fn.cycle.transitions[opts.fx];
|
473
|
-
if ($.isFunction(init))
|
474
|
-
init($cont, $slides, opts);
|
475
|
-
else if (opts.fx != 'custom' && !opts.multiFx) {
|
476
|
-
log('unknown transition: ' + opts.fx,'; slideshow terminating');
|
477
|
-
return false;
|
478
|
-
}
|
479
|
-
}
|
480
|
-
|
481
|
-
// fire artificial events
|
482
|
-
var e0 = $slides[first];
|
483
|
-
if (!opts.skipInitializationCallbacks) {
|
484
|
-
if (opts.before.length)
|
485
|
-
opts.before[0].apply(e0, [e0, e0, opts, true]);
|
486
|
-
if (opts.after.length)
|
487
|
-
opts.after[0].apply(e0, [e0, e0, opts, true]);
|
488
|
-
}
|
489
|
-
if (opts.next)
|
490
|
-
$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});
|
491
|
-
if (opts.prev)
|
492
|
-
$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});
|
493
|
-
if (opts.pager || opts.pagerAnchorBuilder)
|
494
|
-
buildPager(els,opts);
|
495
|
-
|
496
|
-
exposeAddSlide(opts, els);
|
497
|
-
|
498
|
-
return opts;
|
499
|
-
}
|
500
|
-
|
501
|
-
// save off original opts so we can restore after clearing state
|
502
|
-
function saveOriginalOpts(opts) {
|
503
|
-
opts.original = { before: [], after: [] };
|
504
|
-
opts.original.cssBefore = $.extend({}, opts.cssBefore);
|
505
|
-
opts.original.cssAfter = $.extend({}, opts.cssAfter);
|
506
|
-
opts.original.animIn = $.extend({}, opts.animIn);
|
507
|
-
opts.original.animOut = $.extend({}, opts.animOut);
|
508
|
-
$.each(opts.before, function() { opts.original.before.push(this); });
|
509
|
-
$.each(opts.after, function() { opts.original.after.push(this); });
|
510
|
-
}
|
511
|
-
|
512
|
-
function supportMultiTransitions(opts) {
|
513
|
-
var i, tx, txs = $.fn.cycle.transitions;
|
514
|
-
// look for multiple effects
|
515
|
-
if (opts.fx.indexOf(',') > 0) {
|
516
|
-
opts.multiFx = true;
|
517
|
-
opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
|
518
|
-
// discard any bogus effect names
|
519
|
-
for (i=0; i < opts.fxs.length; i++) {
|
520
|
-
var fx = opts.fxs[i];
|
521
|
-
tx = txs[fx];
|
522
|
-
if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
|
523
|
-
log('discarding unknown transition: ',fx);
|
524
|
-
opts.fxs.splice(i,1);
|
525
|
-
i--;
|
526
|
-
}
|
527
|
-
}
|
528
|
-
// if we have an empty list then we threw everything away!
|
529
|
-
if (!opts.fxs.length) {
|
530
|
-
log('No valid transitions named; slideshow terminating.');
|
531
|
-
return false;
|
532
|
-
}
|
533
|
-
}
|
534
|
-
else if (opts.fx == 'all') { // auto-gen the list of transitions
|
535
|
-
opts.multiFx = true;
|
536
|
-
opts.fxs = [];
|
537
|
-
for (var p in txs) {
|
538
|
-
if (txs.hasOwnProperty(p)) {
|
539
|
-
tx = txs[p];
|
540
|
-
if (txs.hasOwnProperty(p) && $.isFunction(tx))
|
541
|
-
opts.fxs.push(p);
|
542
|
-
}
|
543
|
-
}
|
544
|
-
}
|
545
|
-
if (opts.multiFx && opts.randomizeEffects) {
|
546
|
-
// munge the fxs array to make effect selection random
|
547
|
-
var r1 = Math.floor(Math.random() * 20) + 30;
|
548
|
-
for (i = 0; i < r1; i++) {
|
549
|
-
var r2 = Math.floor(Math.random() * opts.fxs.length);
|
550
|
-
opts.fxs.push(opts.fxs.splice(r2,1)[0]);
|
551
|
-
}
|
552
|
-
debug('randomized fx sequence: ',opts.fxs);
|
553
|
-
}
|
554
|
-
return true;
|
555
|
-
}
|
556
|
-
|
557
|
-
// provide a mechanism for adding slides after the slideshow has started
|
558
|
-
function exposeAddSlide(opts, els) {
|
559
|
-
opts.addSlide = function(newSlide, prepend) {
|
560
|
-
var $s = $(newSlide), s = $s[0];
|
561
|
-
if (!opts.autostopCount)
|
562
|
-
opts.countdown++;
|
563
|
-
els[prepend?'unshift':'push'](s);
|
564
|
-
if (opts.els)
|
565
|
-
opts.els[prepend?'unshift':'push'](s); // shuffle needs this
|
566
|
-
opts.slideCount = els.length;
|
567
|
-
|
568
|
-
// add the slide to the random map and resort
|
569
|
-
if (opts.random) {
|
570
|
-
opts.randomMap.push(opts.slideCount-1);
|
571
|
-
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
572
|
-
}
|
573
|
-
|
574
|
-
$s.css('position','absolute');
|
575
|
-
$s[prepend?'prependTo':'appendTo'](opts.$cont);
|
576
|
-
|
577
|
-
if (prepend) {
|
578
|
-
opts.currSlide++;
|
579
|
-
opts.nextSlide++;
|
580
|
-
}
|
581
|
-
|
582
|
-
if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
|
583
|
-
clearTypeFix($s);
|
584
|
-
|
585
|
-
if (opts.fit && opts.width)
|
586
|
-
$s.width(opts.width);
|
587
|
-
if (opts.fit && opts.height && opts.height != 'auto')
|
588
|
-
$s.height(opts.height);
|
589
|
-
s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
|
590
|
-
s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
|
591
|
-
|
592
|
-
$s.css(opts.cssBefore);
|
593
|
-
|
594
|
-
if (opts.pager || opts.pagerAnchorBuilder)
|
595
|
-
$.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
|
596
|
-
|
597
|
-
if ($.isFunction(opts.onAddSlide))
|
598
|
-
opts.onAddSlide($s);
|
599
|
-
else
|
600
|
-
$s.hide(); // default behavior
|
601
|
-
};
|
602
|
-
}
|
603
|
-
|
604
|
-
// reset internal state; we do this on every pass in order to support multiple effects
|
605
|
-
$.fn.cycle.resetState = function(opts, fx) {
|
606
|
-
fx = fx || opts.fx;
|
607
|
-
opts.before = []; opts.after = [];
|
608
|
-
opts.cssBefore = $.extend({}, opts.original.cssBefore);
|
609
|
-
opts.cssAfter = $.extend({}, opts.original.cssAfter);
|
610
|
-
opts.animIn = $.extend({}, opts.original.animIn);
|
611
|
-
opts.animOut = $.extend({}, opts.original.animOut);
|
612
|
-
opts.fxFn = null;
|
613
|
-
$.each(opts.original.before, function() { opts.before.push(this); });
|
614
|
-
$.each(opts.original.after, function() { opts.after.push(this); });
|
615
|
-
|
616
|
-
// re-init
|
617
|
-
var init = $.fn.cycle.transitions[fx];
|
618
|
-
if ($.isFunction(init))
|
619
|
-
init(opts.$cont, $(opts.elements), opts);
|
620
|
-
};
|
621
|
-
|
622
|
-
// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
|
623
|
-
function go(els, opts, manual, fwd) {
|
624
|
-
var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
|
625
|
-
|
626
|
-
// opts.busy is true if we're in the middle of an animation
|
627
|
-
if (manual && opts.busy && opts.manualTrump) {
|
628
|
-
// let manual transitions requests trump active ones
|
629
|
-
debug('manualTrump in go(), stopping active transition');
|
630
|
-
$(els).stop(true,true);
|
631
|
-
opts.busy = 0;
|
632
|
-
clearTimeout(p.cycleTimeout);
|
633
|
-
}
|
634
|
-
|
635
|
-
// don't begin another timeout-based transition if there is one active
|
636
|
-
if (opts.busy) {
|
637
|
-
debug('transition active, ignoring new tx request');
|
638
|
-
return;
|
639
|
-
}
|
640
|
-
|
641
|
-
|
642
|
-
// stop cycling if we have an outstanding stop request
|
643
|
-
if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
|
644
|
-
return;
|
645
|
-
|
646
|
-
// check to see if we should stop cycling based on autostop options
|
647
|
-
if (!manual && !p.cyclePause && !opts.bounce &&
|
648
|
-
((opts.autostop && (--opts.countdown <= 0)) ||
|
649
|
-
(opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
|
650
|
-
if (opts.end)
|
651
|
-
opts.end(opts);
|
652
|
-
return;
|
653
|
-
}
|
654
|
-
|
655
|
-
// if slideshow is paused, only transition on a manual trigger
|
656
|
-
var changed = false;
|
657
|
-
if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
|
658
|
-
changed = true;
|
659
|
-
var fx = opts.fx;
|
660
|
-
// keep trying to get the slide size if we don't have it yet
|
661
|
-
curr.cycleH = curr.cycleH || $(curr).height();
|
662
|
-
curr.cycleW = curr.cycleW || $(curr).width();
|
663
|
-
next.cycleH = next.cycleH || $(next).height();
|
664
|
-
next.cycleW = next.cycleW || $(next).width();
|
665
|
-
|
666
|
-
// support multiple transition types
|
667
|
-
if (opts.multiFx) {
|
668
|
-
if (fwd && (opts.lastFx === undefined || ++opts.lastFx >= opts.fxs.length))
|
669
|
-
opts.lastFx = 0;
|
670
|
-
else if (!fwd && (opts.lastFx === undefined || --opts.lastFx < 0))
|
671
|
-
opts.lastFx = opts.fxs.length - 1;
|
672
|
-
fx = opts.fxs[opts.lastFx];
|
673
|
-
}
|
674
|
-
|
675
|
-
// one-time fx overrides apply to: $('div').cycle(3,'zoom');
|
676
|
-
if (opts.oneTimeFx) {
|
677
|
-
fx = opts.oneTimeFx;
|
678
|
-
opts.oneTimeFx = null;
|
679
|
-
}
|
680
|
-
|
681
|
-
$.fn.cycle.resetState(opts, fx);
|
682
|
-
|
683
|
-
// run the before callbacks
|
684
|
-
if (opts.before.length)
|
685
|
-
$.each(opts.before, function(i,o) {
|
686
|
-
if (p.cycleStop != opts.stopCount) return;
|
687
|
-
o.apply(next, [curr, next, opts, fwd]);
|
688
|
-
});
|
689
|
-
|
690
|
-
// stage the after callacks
|
691
|
-
var after = function() {
|
692
|
-
opts.busy = 0;
|
693
|
-
$.each(opts.after, function(i,o) {
|
694
|
-
if (p.cycleStop != opts.stopCount) return;
|
695
|
-
o.apply(next, [curr, next, opts, fwd]);
|
696
|
-
});
|
697
|
-
if (!p.cycleStop) {
|
698
|
-
// queue next transition
|
699
|
-
queueNext();
|
700
|
-
}
|
701
|
-
};
|
702
|
-
|
703
|
-
debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
|
704
|
-
|
705
|
-
// get ready to perform the transition
|
706
|
-
opts.busy = 1;
|
707
|
-
if (opts.fxFn) // fx function provided?
|
708
|
-
opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
709
|
-
else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
|
710
|
-
$.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
711
|
-
else
|
712
|
-
$.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
|
713
|
-
}
|
714
|
-
else {
|
715
|
-
queueNext();
|
716
|
-
}
|
717
|
-
|
718
|
-
if (changed || opts.nextSlide == opts.currSlide) {
|
719
|
-
// calculate the next slide
|
720
|
-
var roll;
|
721
|
-
opts.lastSlide = opts.currSlide;
|
722
|
-
if (opts.random) {
|
723
|
-
opts.currSlide = opts.nextSlide;
|
724
|
-
if (++opts.randomIndex == els.length) {
|
725
|
-
opts.randomIndex = 0;
|
726
|
-
opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
|
727
|
-
}
|
728
|
-
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
729
|
-
if (opts.nextSlide == opts.currSlide)
|
730
|
-
opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
|
731
|
-
}
|
732
|
-
else if (opts.backwards) {
|
733
|
-
roll = (opts.nextSlide - 1) < 0;
|
734
|
-
if (roll && opts.bounce) {
|
735
|
-
opts.backwards = !opts.backwards;
|
736
|
-
opts.nextSlide = 1;
|
737
|
-
opts.currSlide = 0;
|
738
|
-
}
|
739
|
-
else {
|
740
|
-
opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
|
741
|
-
opts.currSlide = roll ? 0 : opts.nextSlide+1;
|
742
|
-
}
|
743
|
-
}
|
744
|
-
else { // sequence
|
745
|
-
roll = (opts.nextSlide + 1) == els.length;
|
746
|
-
if (roll && opts.bounce) {
|
747
|
-
opts.backwards = !opts.backwards;
|
748
|
-
opts.nextSlide = els.length-2;
|
749
|
-
opts.currSlide = els.length-1;
|
750
|
-
}
|
751
|
-
else {
|
752
|
-
opts.nextSlide = roll ? 0 : opts.nextSlide+1;
|
753
|
-
opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
|
754
|
-
}
|
755
|
-
}
|
756
|
-
}
|
757
|
-
if (changed && opts.pager)
|
758
|
-
opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
|
759
|
-
|
760
|
-
function queueNext() {
|
761
|
-
// stage the next transition
|
762
|
-
var ms = 0, timeout = opts.timeout;
|
763
|
-
if (opts.timeout && !opts.continuous) {
|
764
|
-
ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
|
765
|
-
if (opts.fx == 'shuffle')
|
766
|
-
ms -= opts.speedOut;
|
767
|
-
}
|
768
|
-
else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
|
769
|
-
ms = 10;
|
770
|
-
if (ms > 0)
|
771
|
-
p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms);
|
772
|
-
}
|
773
|
-
}
|
774
|
-
|
775
|
-
// invoked after transition
|
776
|
-
$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
|
777
|
-
$(pager).each(function() {
|
778
|
-
$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
|
779
|
-
});
|
780
|
-
};
|
781
|
-
|
782
|
-
// calculate timeout value for current transition
|
783
|
-
function getTimeout(curr, next, opts, fwd) {
|
784
|
-
if (opts.timeoutFn) {
|
785
|
-
// call user provided calc fn
|
786
|
-
var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
|
787
|
-
while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout
|
788
|
-
t += opts.speed;
|
789
|
-
debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
|
790
|
-
if (t !== false)
|
791
|
-
return t;
|
792
|
-
}
|
793
|
-
return opts.timeout;
|
794
|
-
}
|
795
|
-
|
796
|
-
// expose next/prev function, caller must pass in state
|
797
|
-
$.fn.cycle.next = function(opts) { advance(opts,1); };
|
798
|
-
$.fn.cycle.prev = function(opts) { advance(opts,0);};
|
799
|
-
|
800
|
-
// advance slide forward or back
|
801
|
-
function advance(opts, moveForward) {
|
802
|
-
var val = moveForward ? 1 : -1;
|
803
|
-
var els = opts.elements;
|
804
|
-
var p = opts.$cont[0], timeout = p.cycleTimeout;
|
805
|
-
if (timeout) {
|
806
|
-
clearTimeout(timeout);
|
807
|
-
p.cycleTimeout = 0;
|
808
|
-
}
|
809
|
-
if (opts.random && val < 0) {
|
810
|
-
// move back to the previously display slide
|
811
|
-
opts.randomIndex--;
|
812
|
-
if (--opts.randomIndex == -2)
|
813
|
-
opts.randomIndex = els.length-2;
|
814
|
-
else if (opts.randomIndex == -1)
|
815
|
-
opts.randomIndex = els.length-1;
|
816
|
-
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
817
|
-
}
|
818
|
-
else if (opts.random) {
|
819
|
-
opts.nextSlide = opts.randomMap[opts.randomIndex];
|
820
|
-
}
|
821
|
-
else {
|
822
|
-
opts.nextSlide = opts.currSlide + val;
|
823
|
-
if (opts.nextSlide < 0) {
|
824
|
-
if (opts.nowrap) return false;
|
825
|
-
opts.nextSlide = els.length - 1;
|
826
|
-
}
|
827
|
-
else if (opts.nextSlide >= els.length) {
|
828
|
-
if (opts.nowrap) return false;
|
829
|
-
opts.nextSlide = 0;
|
830
|
-
}
|
831
|
-
}
|
832
|
-
|
833
|
-
var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
|
834
|
-
if ($.isFunction(cb))
|
835
|
-
cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
|
836
|
-
go(els, opts, 1, moveForward);
|
837
|
-
return false;
|
838
|
-
}
|
839
|
-
|
840
|
-
function buildPager(els, opts) {
|
841
|
-
var $p = $(opts.pager);
|
842
|
-
$.each(els, function(i,o) {
|
843
|
-
$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
|
844
|
-
});
|
845
|
-
opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
|
846
|
-
}
|
847
|
-
|
848
|
-
$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
|
849
|
-
var a;
|
850
|
-
if ($.isFunction(opts.pagerAnchorBuilder)) {
|
851
|
-
a = opts.pagerAnchorBuilder(i,el);
|
852
|
-
debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
|
853
|
-
}
|
854
|
-
else
|
855
|
-
a = '<a href="#">'+(i+1)+'</a>';
|
856
|
-
|
857
|
-
if (!a)
|
858
|
-
return;
|
859
|
-
var $a = $(a);
|
860
|
-
// don't reparent if anchor is in the dom
|
861
|
-
if ($a.parents('body').length === 0) {
|
862
|
-
var arr = [];
|
863
|
-
if ($p.length > 1) {
|
864
|
-
$p.each(function() {
|
865
|
-
var $clone = $a.clone(true);
|
866
|
-
$(this).append($clone);
|
867
|
-
arr.push($clone[0]);
|
868
|
-
});
|
869
|
-
$a = $(arr);
|
870
|
-
}
|
871
|
-
else {
|
872
|
-
$a.appendTo($p);
|
873
|
-
}
|
874
|
-
}
|
875
|
-
|
876
|
-
opts.pagerAnchors = opts.pagerAnchors || [];
|
877
|
-
opts.pagerAnchors.push($a);
|
878
|
-
|
879
|
-
var pagerFn = function(e) {
|
880
|
-
e.preventDefault();
|
881
|
-
opts.nextSlide = i;
|
882
|
-
var p = opts.$cont[0], timeout = p.cycleTimeout;
|
883
|
-
if (timeout) {
|
884
|
-
clearTimeout(timeout);
|
885
|
-
p.cycleTimeout = 0;
|
886
|
-
}
|
887
|
-
var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
|
888
|
-
if ($.isFunction(cb))
|
889
|
-
cb(opts.nextSlide, els[opts.nextSlide]);
|
890
|
-
go(els,opts,1,opts.currSlide < i); // trigger the trans
|
891
|
-
// return false; // <== allow bubble
|
892
|
-
};
|
893
|
-
|
894
|
-
if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
|
895
|
-
$a.hover(pagerFn, function(){/* no-op */} );
|
896
|
-
}
|
897
|
-
else {
|
898
|
-
$a.bind(opts.pagerEvent, pagerFn);
|
899
|
-
}
|
900
|
-
|
901
|
-
if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
|
902
|
-
$a.bind('click.cycle', function(){return false;}); // suppress click
|
903
|
-
|
904
|
-
var cont = opts.$cont[0];
|
905
|
-
var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
|
906
|
-
if (opts.pauseOnPagerHover) {
|
907
|
-
$a.hover(
|
908
|
-
function() {
|
909
|
-
pauseFlag = true;
|
910
|
-
cont.cyclePause++;
|
911
|
-
triggerPause(cont,true,true);
|
912
|
-
}, function() {
|
913
|
-
if (pauseFlag)
|
914
|
-
cont.cyclePause--;
|
915
|
-
triggerPause(cont,true,true);
|
916
|
-
}
|
917
|
-
);
|
918
|
-
}
|
919
|
-
};
|
920
|
-
|
921
|
-
// helper fn to calculate the number of slides between the current and the next
|
922
|
-
$.fn.cycle.hopsFromLast = function(opts, fwd) {
|
923
|
-
var hops, l = opts.lastSlide, c = opts.currSlide;
|
924
|
-
if (fwd)
|
925
|
-
hops = c > l ? c - l : opts.slideCount - l;
|
926
|
-
else
|
927
|
-
hops = c < l ? l - c : l + opts.slideCount - c;
|
928
|
-
return hops;
|
929
|
-
};
|
930
|
-
|
931
|
-
// fix clearType problems in ie6 by setting an explicit bg color
|
932
|
-
// (otherwise text slides look horrible during a fade transition)
|
933
|
-
function clearTypeFix($slides) {
|
934
|
-
debug('applying clearType background-color hack');
|
935
|
-
function hex(s) {
|
936
|
-
s = parseInt(s,10).toString(16);
|
937
|
-
return s.length < 2 ? '0'+s : s;
|
938
|
-
}
|
939
|
-
function getBg(e) {
|
940
|
-
for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
|
941
|
-
var v = $.css(e,'background-color');
|
942
|
-
if (v && v.indexOf('rgb') >= 0 ) {
|
943
|
-
var rgb = v.match(/\d+/g);
|
944
|
-
return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
|
945
|
-
}
|
946
|
-
if (v && v != 'transparent')
|
947
|
-
return v;
|
948
|
-
}
|
949
|
-
return '#ffffff';
|
950
|
-
}
|
951
|
-
$slides.each(function() { $(this).css('background-color', getBg(this)); });
|
952
|
-
}
|
953
|
-
|
954
|
-
// reset common props before the next transition
|
955
|
-
$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
|
956
|
-
$(opts.elements).not(curr).hide();
|
957
|
-
if (typeof opts.cssBefore.opacity == 'undefined')
|
958
|
-
opts.cssBefore.opacity = 1;
|
959
|
-
opts.cssBefore.display = 'block';
|
960
|
-
if (opts.slideResize && w !== false && next.cycleW > 0)
|
961
|
-
opts.cssBefore.width = next.cycleW;
|
962
|
-
if (opts.slideResize && h !== false && next.cycleH > 0)
|
963
|
-
opts.cssBefore.height = next.cycleH;
|
964
|
-
opts.cssAfter = opts.cssAfter || {};
|
965
|
-
opts.cssAfter.display = 'none';
|
966
|
-
$(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
|
967
|
-
$(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
|
968
|
-
};
|
969
|
-
|
970
|
-
// the actual fn for effecting a transition
|
971
|
-
$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
|
972
|
-
var $l = $(curr), $n = $(next);
|
973
|
-
var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
|
974
|
-
$n.css(opts.cssBefore);
|
975
|
-
if (speedOverride) {
|
976
|
-
if (typeof speedOverride == 'number')
|
977
|
-
speedIn = speedOut = speedOverride;
|
978
|
-
else
|
979
|
-
speedIn = speedOut = 1;
|
980
|
-
easeIn = easeOut = null;
|
981
|
-
}
|
982
|
-
var fn = function() {
|
983
|
-
$n.animate(opts.animIn, speedIn, easeIn, function() {
|
984
|
-
cb();
|
985
|
-
});
|
986
|
-
};
|
987
|
-
$l.animate(opts.animOut, speedOut, easeOut, function() {
|
988
|
-
$l.css(opts.cssAfter);
|
989
|
-
if (!opts.sync)
|
990
|
-
fn();
|
991
|
-
});
|
992
|
-
if (opts.sync) fn();
|
993
|
-
};
|
994
|
-
|
995
|
-
// transition definitions - only fade is defined here, transition pack defines the rest
|
996
|
-
$.fn.cycle.transitions = {
|
997
|
-
fade: function($cont, $slides, opts) {
|
998
|
-
$slides.not(':eq('+opts.currSlide+')').css('opacity',0);
|
999
|
-
opts.before.push(function(curr,next,opts) {
|
1000
|
-
$.fn.cycle.commonReset(curr,next,opts);
|
1001
|
-
opts.cssBefore.opacity = 0;
|
1002
|
-
});
|
1003
|
-
opts.animIn = { opacity: 1 };
|
1004
|
-
opts.animOut = { opacity: 0 };
|
1005
|
-
opts.cssBefore = { top: 0, left: 0 };
|
1006
|
-
}
|
1007
|
-
};
|
1008
|
-
|
1009
|
-
$.fn.cycle.ver = function() { return ver; };
|
1010
|
-
|
1011
|
-
// override these globally if you like (they are all optional)
|
1012
|
-
$.fn.cycle.defaults = {
|
1013
|
-
activePagerClass: 'activeSlide', // class name used for the active pager link
|
1014
|
-
after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1015
|
-
allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
|
1016
|
-
animIn: null, // properties that define how the slide animates in
|
1017
|
-
animOut: null, // properties that define how the slide animates out
|
1018
|
-
aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
|
1019
|
-
autostop: 0, // true to end slideshow after X transitions (where X == slide count)
|
1020
|
-
autostopCount: 0, // number of transitions (optionally used with autostop to define X)
|
1021
|
-
backwards: false, // true to start slideshow at last slide and move backwards through the stack
|
1022
|
-
before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1023
|
-
center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options)
|
1024
|
-
cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE)
|
1025
|
-
cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
|
1026
|
-
containerResize: 1, // resize container to fit largest slide
|
1027
|
-
continuous: 0, // true to start next transition immediately after current one completes
|
1028
|
-
cssAfter: null, // properties that defined the state of the slide after transitioning out
|
1029
|
-
cssBefore: null, // properties that define the initial state of the slide before transitioning in
|
1030
|
-
delay: 0, // additional delay (in ms) for first transition (hint: can be negative)
|
1031
|
-
easeIn: null, // easing for "in" transition
|
1032
|
-
easeOut: null, // easing for "out" transition
|
1033
|
-
easing: null, // easing method for both in and out transitions
|
1034
|
-
end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
|
1035
|
-
fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
|
1036
|
-
fit: 0, // force slides to fit container
|
1037
|
-
fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
|
1038
|
-
fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
|
1039
|
-
height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well)
|
1040
|
-
manualTrump: true, // causes manual transition to stop an active transition instead of being ignored
|
1041
|
-
metaAttr: 'cycle', // data- attribute that holds the option data for the slideshow
|
1042
|
-
next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
|
1043
|
-
nowrap: 0, // true to prevent slideshow from wrapping
|
1044
|
-
onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
|
1045
|
-
onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
|
1046
|
-
pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container
|
1047
|
-
pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement)
|
1048
|
-
pagerEvent: 'click.cycle', // name of event which drives the pager navigation
|
1049
|
-
pause: 0, // true to enable "pause on hover"
|
1050
|
-
pauseOnPagerHover: 0, // true to pause when hovering over pager link
|
1051
|
-
prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
|
1052
|
-
prevNextEvent: 'click.cycle',// event which drives the manual transition to the previous or next slide
|
1053
|
-
random: 0, // true for random, false for sequence (not applicable to shuffle fx)
|
1054
|
-
randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random
|
1055
|
-
requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
|
1056
|
-
requeueTimeout: 250, // ms delay for requeue
|
1057
|
-
rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
|
1058
|
-
shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 }
|
1059
|
-
skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
|
1060
|
-
slideExpr: null, // expression for selecting slides (if something other than all children is required)
|
1061
|
-
slideResize: 1, // force slide width/height to fixed size before every transition
|
1062
|
-
speed: 1000, // speed of the transition (any valid fx speed value)
|
1063
|
-
speedIn: null, // speed of the 'in' transition
|
1064
|
-
speedOut: null, // speed of the 'out' transition
|
1065
|
-
startingSlide: undefined,// zero-based index of the first slide to be displayed
|
1066
|
-
sync: 1, // true if in/out transitions should occur simultaneously
|
1067
|
-
timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance)
|
1068
|
-
timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag)
|
1069
|
-
updateActivePagerLink: null,// callback fn invoked to update the active pager link (adds/removes activePagerClass style)
|
1070
|
-
width: null // container width (if the 'fit' option is true, the slides will be set to this width as well)
|
1071
|
-
};
|
1072
|
-
|
1073
|
-
})(jQuery);
|
1074
|
-
|
1075
|
-
|
1076
|
-
/*!
|
1077
|
-
* jQuery Cycle Plugin Transition Definitions
|
1078
|
-
* This script is a plugin for the jQuery Cycle Plugin
|
1079
|
-
* Examples and documentation at: http://malsup.com/jquery/cycle/
|
1080
|
-
* Copyright (c) 2007-2010 M. Alsup
|
1081
|
-
* Version: 2.73
|
1082
|
-
* Dual licensed under the MIT and GPL licenses:
|
1083
|
-
* http://www.opensource.org/licenses/mit-license.php
|
1084
|
-
* http://www.gnu.org/licenses/gpl.html
|
1085
|
-
*/
|
1086
|
-
(function($) {
|
1087
|
-
"use strict";
|
1088
|
-
|
1089
|
-
//
|
1090
|
-
// These functions define slide initialization and properties for the named
|
1091
|
-
// transitions. To save file size feel free to remove any of these that you
|
1092
|
-
// don't need.
|
1093
|
-
//
|
1094
|
-
|
1095
|
-
// shuffle
|
1096
|
-
$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
|
1097
|
-
var i, w = $cont.css('overflow', 'visible').width();
|
1098
|
-
$slides.css({left: 0, top: 0});
|
1099
|
-
opts.before.push(function(curr,next,opts) {
|
1100
|
-
$.fn.cycle.commonReset(curr,next,opts,true,true,true);
|
1101
|
-
});
|
1102
|
-
// only adjust speed once!
|
1103
|
-
if (!opts.speedAdjusted) {
|
1104
|
-
opts.speed = opts.speed / 2; // shuffle has 2 transitions
|
1105
|
-
opts.speedAdjusted = true;
|
1106
|
-
}
|
1107
|
-
opts.random = 0;
|
1108
|
-
opts.shuffle = opts.shuffle || {left:-w, top:15};
|
1109
|
-
opts.els = [];
|
1110
|
-
for (i=0; i < $slides.length; i++)
|
1111
|
-
opts.els.push($slides[i]);
|
1112
|
-
|
1113
|
-
for (i=0; i < opts.currSlide; i++)
|
1114
|
-
opts.els.push(opts.els.shift());
|
1115
|
-
|
1116
|
-
// custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
|
1117
|
-
opts.fxFn = function(curr, next, opts, cb, fwd) {
|
1118
|
-
if (opts.rev)
|
1119
|
-
fwd = !fwd;
|
1120
|
-
var $el = fwd ? $(curr) : $(next);
|
1121
|
-
$(next).css(opts.cssBefore);
|
1122
|
-
var count = opts.slideCount;
|
1123
|
-
$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
|
1124
|
-
var hops = $.fn.cycle.hopsFromLast(opts, fwd);
|
1125
|
-
for (var k=0; k < hops; k++) {
|
1126
|
-
if (fwd)
|
1127
|
-
opts.els.push(opts.els.shift());
|
1128
|
-
else
|
1129
|
-
opts.els.unshift(opts.els.pop());
|
1130
|
-
}
|
1131
|
-
if (fwd) {
|
1132
|
-
for (var i=0, len=opts.els.length; i < len; i++)
|
1133
|
-
$(opts.els[i]).css('z-index', len-i+count);
|
1134
|
-
}
|
1135
|
-
else {
|
1136
|
-
var z = $(curr).css('z-index');
|
1137
|
-
$el.css('z-index', parseInt(z,10)+1+count);
|
1138
|
-
}
|
1139
|
-
$el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
|
1140
|
-
$(fwd ? this : curr).hide();
|
1141
|
-
if (cb) cb();
|
1142
|
-
});
|
1143
|
-
});
|
1144
|
-
};
|
1145
|
-
$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
|
1146
|
-
};
|
1147
|
-
|
1148
|
-
})(jQuery);
|
1
|
+
/*! For license information please see jquery.cycle.js.LICENSE.txt */
|
2
|
+
!function(e,t){"use strict";function n(t){e.fn.cycle.debug&&i(t)}function i(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function r(t,n,i){var r=e(t).data("cycle.opts"),c=!!t.cyclePause;c&&r.paused?r.paused(t,r,n,i):!c&&r.resumed&&r.resumed(t,r,n,i)}function c(t,n){if(!e.support.opacity&&n.cleartype&&t.style.filter)try{t.style.removeAttribute("filter")}catch(e){}}function s(i,r,c,o){var l=r.$cont[0],u=i[r.currSlide],d=i[r.nextSlide];if(c&&r.busy&&r.manualTrump&&(n("manualTrump in go(), stopping active transition"),e(i).stop(!0,!0),r.busy=0,clearTimeout(l.cycleTimeout)),r.busy)n("transition active, ignoring new tx request");else if(l.cycleStop==r.stopCount&&(0!==l.cycleTimeout||c))if(c||l.cyclePause||r.bounce||!(r.autostop&&--r.countdown<=0||r.nowrap&&!r.random&&r.nextSlide<r.currSlide)){var f,h=!1;if(!c&&l.cyclePause||r.nextSlide==r.currSlide)m();else{h=!0;var p=r.fx;u.cycleH=u.cycleH||e(u).height(),u.cycleW=u.cycleW||e(u).width(),d.cycleH=d.cycleH||e(d).height(),d.cycleW=d.cycleW||e(d).width(),r.multiFx&&(o&&(r.lastFx===t||++r.lastFx>=r.fxs.length)?r.lastFx=0:!o&&(r.lastFx===t||--r.lastFx<0)&&(r.lastFx=r.fxs.length-1),p=r.fxs[r.lastFx]),r.oneTimeFx&&(p=r.oneTimeFx,r.oneTimeFx=null),e.fn.cycle.resetState(r,p),r.before.length&&e.each(r.before,(function(e,t){l.cycleStop==r.stopCount&&t.apply(d,[u,d,r,o])}));var g=function(){r.busy=0,e.each(r.after,(function(e,t){l.cycleStop==r.stopCount&&t.apply(d,[u,d,r,o])})),l.cycleStop||m()};n("tx firing("+p+"); currSlide: "+r.currSlide+"; nextSlide: "+r.nextSlide),r.busy=1,r.fxFn?r.fxFn(u,d,r,g,o,c&&r.fastOnEvent):e.isFunction(e.fn.cycle[r.fx])?e.fn.cycle[r.fx](u,d,r,g,o,c&&r.fastOnEvent):e.fn.cycle.custom(u,d,r,g,o,c&&r.fastOnEvent)}(h||r.nextSlide==r.currSlide)&&(r.lastSlide=r.currSlide,r.random?(r.currSlide=r.nextSlide,++r.randomIndex==i.length&&(r.randomIndex=0,r.randomMap.sort((function(e,t){return Math.random()-.5}))),r.nextSlide=r.randomMap[r.randomIndex],r.nextSlide==r.currSlide&&(r.nextSlide=r.currSlide==r.slideCount-1?0:r.currSlide+1)):r.backwards?(f=r.nextSlide-1<0)&&r.bounce?(r.backwards=!r.backwards,r.nextSlide=1,r.currSlide=0):(r.nextSlide=f?i.length-1:r.nextSlide-1,r.currSlide=f?0:r.nextSlide+1):(f=r.nextSlide+1==i.length)&&r.bounce?(r.backwards=!r.backwards,r.nextSlide=i.length-2,r.currSlide=i.length-1):(r.nextSlide=f?0:r.nextSlide+1,r.currSlide=f?i.length-1:r.nextSlide-1)),h&&r.pager&&r.updateActivePagerLink(r.pager,r.currSlide,r.activePagerClass)}else r.end&&r.end(r);function m(){var e=0;r.timeout,r.timeout&&!r.continuous?(e=a(i[r.currSlide],i[r.nextSlide],r,o),"shuffle"==r.fx&&(e-=r.speedOut)):r.continuous&&l.cyclePause&&(e=10),e>0&&(l.cycleTimeout=setTimeout((function(){s(i,r,0,!r.backwards)}),e))}}function a(e,t,i,r){if(i.timeoutFn){for(var c=i.timeoutFn.call(e,e,t,i,r);"none"!=i.fx&&c-i.speed<250;)c+=i.speed;if(n("calculated timeout: "+c+"; speed: "+i.speed),!1!==c)return c}return i.timeout}function o(t,n){var i=n?1:-1,r=t.elements,c=t.$cont[0],a=c.cycleTimeout;if(a&&(clearTimeout(a),c.cycleTimeout=0),t.random&&i<0)t.randomIndex--,-2==--t.randomIndex?t.randomIndex=r.length-2:-1==t.randomIndex&&(t.randomIndex=r.length-1),t.nextSlide=t.randomMap[t.randomIndex];else if(t.random)t.nextSlide=t.randomMap[t.randomIndex];else if(t.nextSlide=t.currSlide+i,t.nextSlide<0){if(t.nowrap)return!1;t.nextSlide=r.length-1}else if(t.nextSlide>=r.length){if(t.nowrap)return!1;t.nextSlide=0}var o=t.onPrevNextEvent||t.prevNextClick;return e.isFunction(o)&&o(i>0,t.nextSlide,r[t.nextSlide]),s(r,t,1,n),!1}function l(t){function i(e){return(e=parseInt(e,10).toString(16)).length<2?"0"+e:e}n("applying clearType background-color hack"),t.each((function(){e(this).css("background-color",function(t){for(;t&&"html"!=t.nodeName.toLowerCase();t=t.parentNode){var n=e.css(t,"background-color");if(n&&n.indexOf("rgb")>=0){var r=n.match(/\d+/g);return"#"+i(r[0])+i(r[1])+i(r[2])}if(n&&"transparent"!=n)return n}return"#ffffff"}(this))}))}e.support===t&&(e.support={opacity:!e.browser.msie}),e.expr[":"].paused=function(e){return e.cyclePause},e.fn.cycle=function(u,d){var f={s:this.selector,c:this.context};return 0===this.length&&"stop"!=u?!e.isReady&&f.s?(i("DOM not ready, queuing slideshow"),e((function(){e(f.s,f.c).cycle(u,d)})),this):(i("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this):this.each((function(){var h=function(n,c,a){if(n.cycleStop===t&&(n.cycleStop=0),c!==t&&null!==c||(c={}),c.constructor==String){switch(c){case"destroy":case"stop":var o=e(n).data("cycle.opts");return!!o&&(n.cycleStop++,n.cycleTimeout&&clearTimeout(n.cycleTimeout),n.cycleTimeout=0,o.elements&&e(o.elements).stop(),e(n).removeData("cycle.opts"),"destroy"==c&&function(t,n){n.next&&e(n.next).unbind(n.prevNextEvent),n.prev&&e(n.prev).unbind(n.prevNextEvent),(n.pager||n.pagerAnchorBuilder)&&e.each(n.pagerAnchors||[],(function(){this.unbind().remove()})),n.pagerAnchors=null,e(t).unbind("mouseenter.cycle mouseleave.cycle"),n.destroy&&n.destroy(n)}(n,o),!1);case"toggle":return n.cyclePause=1===n.cyclePause?0:1,u(n.cyclePause,a,n),r(n),!1;case"pause":return n.cyclePause=1,r(n),!1;case"resume":return n.cyclePause=0,u(!1,a,n),r(n),!1;case"prev":case"next":return(o=e(n).data("cycle.opts"))?(e.fn.cycle[c](o),!1):(i('options not found, "prev/next" ignored'),!1);default:c={fx:c}}return c}if(c.constructor==Number){var l=c;return(c=e(n).data("cycle.opts"))?l<0||l>=c.elements.length?(i("invalid slide index: "+l),!1):(c.nextSlide=l,n.cycleTimeout&&(clearTimeout(n.cycleTimeout),n.cycleTimeout=0),"string"==typeof a&&(c.oneTimeFx=a),s(c.elements,c,1,l>=c.currSlide),!1):(i("options not found, can not advance slide"),!1)}return c;function u(t,n,r){if(!t&&!0===n){var c=e(r).data("cycle.opts");if(!c)return i("options not found, can not resume"),!1;r.cycleTimeout&&(clearTimeout(r.cycleTimeout),r.cycleTimeout=0),s(c.elements,c,1,!c.backwards)}}}(this,u,d);if(!1!==h){h.updateActivePagerLink=h.updateActivePagerLink||e.fn.cycle.updateActivePagerLink,this.cycleTimeout&&clearTimeout(this.cycleTimeout),this.cycleTimeout=this.cyclePause=0,this.cycleStop=0;var p=e(this),g=h.slideExpr?e(h.slideExpr,this):p.children(),m=g.get();if(m.length<2)i("terminating; too few slides: "+m.length);else{var y=function(a,u,d,f,h){var p,g=e.extend({},e.fn.cycle.defaults,f||{},e.metadata?a.metadata():e.meta?a.data():{}),m=e.isFunction(a.data)?a.data(g.metaAttr):null;m&&(g=e.extend(g,m)),g.autostop&&(g.countdown=g.autostopCount||d.length);var y=a[0];if(a.data("cycle.opts",g),g.$cont=a,g.stopCount=y.cycleStop,g.elements=d,g.before=g.before?[g.before]:[],g.after=g.after?[g.after]:[],!e.support.opacity&&g.cleartype&&g.after.push((function(){c(this,g)})),g.continuous&&g.after.push((function(){s(d,g,0,!g.backwards)})),function(t){t.original={before:[],after:[]},t.original.cssBefore=e.extend({},t.cssBefore),t.original.cssAfter=e.extend({},t.cssAfter),t.original.animIn=e.extend({},t.animIn),t.original.animOut=e.extend({},t.animOut),e.each(t.before,(function(){t.original.before.push(this)})),e.each(t.after,(function(){t.original.after.push(this)}))}(g),e.support.opacity||!g.cleartype||g.cleartypeNoBg||l(u),"static"==a.css("position")&&a.css("position","relative"),g.width&&a.width(g.width),g.height&&"auto"!=g.height&&a.height(g.height),g.startingSlide!==t?(g.startingSlide=parseInt(g.startingSlide,10),g.startingSlide>=d.length||g.startSlide<0?g.startingSlide=0:p=!0):g.backwards?g.startingSlide=d.length-1:g.startingSlide=0,g.random){g.randomMap=[];for(var x=0;x<d.length;x++)g.randomMap.push(x);if(g.randomMap.sort((function(e,t){return Math.random()-.5})),p)for(var v=0;v<d.length;v++)g.startingSlide==g.randomMap[v]&&(g.randomIndex=v);else g.randomIndex=1,g.startingSlide=g.randomMap[1]}else g.startingSlide>=d.length&&(g.startingSlide=0);g.currSlide=g.startingSlide||0;var S=g.startingSlide;if(u.css({position:"absolute",top:0,left:0}).hide().each((function(t){var n;n=g.backwards?S?t<=S?d.length+(t-S):S-t:d.length-t:S?t>=S?d.length-(t-S):S-t:d.length-t,e(this).css("z-index",n)})),e(d[S]).css("opacity",1).show(),c(d[S],g),g.fit&&(g.aspect?u.each((function(){var t=e(this),n=!0===g.aspect?t.width()/t.height():g.aspect;g.width&&t.width()!=g.width&&(t.width(g.width),t.height(g.width/n)),g.height&&t.height()<g.height&&(t.height(g.height),t.width(g.height*n))})):(g.width&&u.width(g.width),g.height&&"auto"!=g.height&&u.height(g.height))),!g.center||g.fit&&!g.aspect||u.each((function(){var t=e(this);t.css({"margin-left":g.width?(g.width-t.width())/2+"px":0,"margin-top":g.height?(g.height-t.height())/2+"px":0})})),!g.center||g.fit||g.slideResize||u.each((function(){var t=e(this);t.css({"margin-left":g.width?(g.width-t.width())/2+"px":0,"margin-top":g.height?(g.height-t.height())/2+"px":0})})),g.containerResize&&!a.innerHeight()){for(var w=0,b=0,A=0;A<d.length;A++){var I=e(d[A]),T=I[0],k=I.outerWidth(),F=I.outerHeight();k||(k=T.offsetWidth||T.width||I.attr("width")),F||(F=T.offsetHeight||T.height||I.attr("height")),w=k>w?k:w,b=F>b?F:b}w>0&&b>0&&a.css({width:w+"px",height:b+"px"})}var P=!1;if(g.pause&&a.bind("mouseenter.cycle",(function(){P=!0,this.cyclePause++,r(y,!0)})).bind("mouseleave.cycle",(function(){P&&this.cyclePause--,r(y,!0)})),!1===function(t){var r,c,s=e.fn.cycle.transitions;if(t.fx.indexOf(",")>0){for(t.multiFx=!0,t.fxs=t.fx.replace(/\s*/g,"").split(","),r=0;r<t.fxs.length;r++){var a=t.fxs[r];(c=s[a])&&s.hasOwnProperty(a)&&e.isFunction(c)||(i("discarding unknown transition: ",a),t.fxs.splice(r,1),r--)}if(!t.fxs.length)return i("No valid transitions named; slideshow terminating."),!1}else if("all"==t.fx)for(var o in t.multiFx=!0,t.fxs=[],s)s.hasOwnProperty(o)&&(c=s[o],s.hasOwnProperty(o)&&e.isFunction(c)&&t.fxs.push(o));if(t.multiFx&&t.randomizeEffects){var l=Math.floor(20*Math.random())+30;for(r=0;r<l;r++){var u=Math.floor(Math.random()*t.fxs.length);t.fxs.push(t.fxs.splice(u,1)[0])}n("randomized fx sequence: ",t.fxs)}return!0}(g))return!1;var O=!1;if(f.requeueAttempts=f.requeueAttempts||0,u.each((function(){var t=e(this);if(this.cycleH=g.fit&&g.height?g.height:t.height()||this.offsetHeight||this.height||t.attr("height")||0,this.cycleW=g.fit&&g.width?g.width:t.width()||this.offsetWidth||this.width||t.attr("width")||0,t.is("img")){var n=e.browser.msie&&28==this.cycleW&&30==this.cycleH&&!this.complete,r=e.browser.mozilla&&34==this.cycleW&&19==this.cycleH&&!this.complete,c=e.browser.opera&&(42==this.cycleW&&19==this.cycleH||37==this.cycleW&&17==this.cycleH)&&!this.complete,s=0===this.cycleH&&0===this.cycleW&&!this.complete;if(n||r||c||s){if(h.s&&g.requeueOnImageNotLoaded&&++f.requeueAttempts<100)return i(f.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout((function(){e(h.s,h.c).cycle(f)}),g.requeueTimeout),O=!0,!1;i("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}return!0})),O)return!1;if(g.cssBefore=g.cssBefore||{},g.cssAfter=g.cssAfter||{},g.cssFirst=g.cssFirst||{},g.animIn=g.animIn||{},g.animOut=g.animOut||{},u.not(":eq("+S+")").css(g.cssBefore),e(u[S]).css(g.cssFirst),g.timeout){g.timeout=parseInt(g.timeout,10),g.speed.constructor==String&&(g.speed=e.fx.speeds[g.speed]||parseInt(g.speed,10)),g.sync||(g.speed=g.speed/2);for(var B="none"==g.fx?0:"shuffle"==g.fx?500:250;g.timeout-g.speed<B;)g.timeout+=g.speed}if(g.easing&&(g.easeIn=g.easeOut=g.easing),g.speedIn||(g.speedIn=g.speed),g.speedOut||(g.speedOut=g.speed),g.slideCount=d.length,g.currSlide=g.lastSlide=S,g.random?(++g.randomIndex==d.length&&(g.randomIndex=0),g.nextSlide=g.randomMap[g.randomIndex]):g.backwards?g.nextSlide=0===g.startingSlide?d.length-1:g.startingSlide-1:g.nextSlide=g.startingSlide>=d.length-1?0:g.startingSlide+1,!g.multiFx){var C=e.fn.cycle.transitions[g.fx];if(e.isFunction(C))C(a,u,g);else if("custom"!=g.fx&&!g.multiFx)return i("unknown transition: "+g.fx,"; slideshow terminating"),!1}var E=u[S];return g.skipInitializationCallbacks||(g.before.length&&g.before[0].apply(E,[E,E,g,!0]),g.after.length&&g.after[0].apply(E,[E,E,g,!0])),g.next&&e(g.next).bind(g.prevNextEvent,(function(){return o(g,1)})),g.prev&&e(g.prev).bind(g.prevNextEvent,(function(){return o(g,0)})),(g.pager||g.pagerAnchorBuilder)&&function(t,n){var i=e(n.pager);e.each(t,(function(r,c){e.fn.cycle.createPagerAnchor(r,c,i,t,n)})),n.updateActivePagerLink(n.pager,n.startingSlide,n.activePagerClass)}(d,g),function(t,n){t.addSlide=function(i,r){var c=e(i),s=c[0];t.autostopCount||t.countdown++,n[r?"unshift":"push"](s),t.els&&t.els[r?"unshift":"push"](s),t.slideCount=n.length,t.random&&(t.randomMap.push(t.slideCount-1),t.randomMap.sort((function(e,t){return Math.random()-.5}))),c.css("position","absolute"),c[r?"prependTo":"appendTo"](t.$cont),r&&(t.currSlide++,t.nextSlide++),e.support.opacity||!t.cleartype||t.cleartypeNoBg||l(c),t.fit&&t.width&&c.width(t.width),t.fit&&t.height&&"auto"!=t.height&&c.height(t.height),s.cycleH=t.fit&&t.height?t.height:c.height(),s.cycleW=t.fit&&t.width?t.width:c.width(),c.css(t.cssBefore),(t.pager||t.pagerAnchorBuilder)&&e.fn.cycle.createPagerAnchor(n.length-1,s,e(t.pager),n,t),e.isFunction(t.onAddSlide)?t.onAddSlide(c):c.hide()}}(g,d),g}(p,g,m,h,f);if(!1!==y){var x=y.continuous?10:a(m[y.currSlide],m[y.nextSlide],y,!y.backwards);x&&((x+=y.delay||0)<10&&(x=10),n("first timeout: "+x),this.cycleTimeout=setTimeout((function(){s(m,y,0,!h.backwards)}),x))}}}}))},e.fn.cycle.resetState=function(t,n){n=n||t.fx,t.before=[],t.after=[],t.cssBefore=e.extend({},t.original.cssBefore),t.cssAfter=e.extend({},t.original.cssAfter),t.animIn=e.extend({},t.original.animIn),t.animOut=e.extend({},t.original.animOut),t.fxFn=null,e.each(t.original.before,(function(){t.before.push(this)})),e.each(t.original.after,(function(){t.after.push(this)}));var i=e.fn.cycle.transitions[n];e.isFunction(i)&&i(t.$cont,e(t.elements),t)},e.fn.cycle.updateActivePagerLink=function(t,n,i){e(t).each((function(){e(this).children().removeClass(i).eq(n).addClass(i)}))},e.fn.cycle.next=function(e){o(e,1)},e.fn.cycle.prev=function(e){o(e,0)},e.fn.cycle.createPagerAnchor=function(t,i,c,a,o){var l;if(e.isFunction(o.pagerAnchorBuilder)?(l=o.pagerAnchorBuilder(t,i),n("pagerAnchorBuilder("+t+", el) returned: "+l)):l='<a href="#">'+(t+1)+"</a>",l){var u=e(l);if(0===u.parents("body").length){var d=[];c.length>1?(c.each((function(){var t=u.clone(!0);e(this).append(t),d.push(t[0])})),u=e(d)):u.appendTo(c)}o.pagerAnchors=o.pagerAnchors||[],o.pagerAnchors.push(u);var f=function(n){n.preventDefault(),o.nextSlide=t;var i=o.$cont[0],r=i.cycleTimeout;r&&(clearTimeout(r),i.cycleTimeout=0);var c=o.onPagerEvent||o.pagerClick;e.isFunction(c)&&c(o.nextSlide,a[o.nextSlide]),s(a,o,1,o.currSlide<t)};/mouseenter|mouseover/i.test(o.pagerEvent)?u.hover(f,(function(){})):u.bind(o.pagerEvent,f),/^click/.test(o.pagerEvent)||o.allowPagerClickBubble||u.bind("click.cycle",(function(){return!1}));var h=o.$cont[0],p=!1;o.pauseOnPagerHover&&u.hover((function(){p=!0,h.cyclePause++,r(h,!0,!0)}),(function(){p&&h.cyclePause--,r(h,!0,!0)}))}},e.fn.cycle.hopsFromLast=function(e,t){var n=e.lastSlide,i=e.currSlide;return t?i>n?i-n:e.slideCount-n:i<n?n-i:n+e.slideCount-i},e.fn.cycle.commonReset=function(t,n,i,r,c,s){e(i.elements).not(t).hide(),void 0===i.cssBefore.opacity&&(i.cssBefore.opacity=1),i.cssBefore.display="block",i.slideResize&&!1!==r&&n.cycleW>0&&(i.cssBefore.width=n.cycleW),i.slideResize&&!1!==c&&n.cycleH>0&&(i.cssBefore.height=n.cycleH),i.cssAfter=i.cssAfter||{},i.cssAfter.display="none",e(t).css("zIndex",i.slideCount+(!0===s?1:0)),e(n).css("zIndex",i.slideCount+(!0===s?0:1))},e.fn.cycle.custom=function(t,n,i,r,c,s){var a=e(t),o=e(n),l=i.speedIn,u=i.speedOut,d=i.easeIn,f=i.easeOut;o.css(i.cssBefore),s&&(l=u="number"==typeof s?s:1,d=f=null);var h=function(){o.animate(i.animIn,l,d,(function(){r()}))};a.animate(i.animOut,u,f,(function(){a.css(i.cssAfter),i.sync||h()})),i.sync&&h()},e.fn.cycle.transitions={fade:function(t,n,i){n.not(":eq("+i.currSlide+")").css("opacity",0),i.before.push((function(t,n,i){e.fn.cycle.commonReset(t,n,i),i.cssBefore.opacity=0})),i.animIn={opacity:1},i.animOut={opacity:0},i.cssBefore={top:0,left:0}}},e.fn.cycle.ver=function(){return"2.9999.5"},e.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:!1,animIn:null,animOut:null,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartype:!e.support.opacity,cleartypeNoBg:!1,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:!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:t,sync:1,timeout:4e3,timeoutFn:null,updateActivePagerLink:null,width:null}}(jQuery),function(e){"use strict";e.fn.cycle.transitions.shuffle=function(t,n,i){var r,c=t.css("overflow","visible").width();for(n.css({left:0,top:0}),i.before.push((function(t,n,i){e.fn.cycle.commonReset(t,n,i,!0,!0,!0)})),i.speedAdjusted||(i.speed=i.speed/2,i.speedAdjusted=!0),i.random=0,i.shuffle=i.shuffle||{left:-c,top:15},i.els=[],r=0;r<n.length;r++)i.els.push(n[r]);for(r=0;r<i.currSlide;r++)i.els.push(i.els.shift());i.fxFn=function(t,n,i,r,c){i.rev&&(c=!c);var s=e(c?t:n);e(n).css(i.cssBefore);var a=i.slideCount;s.animate(i.shuffle,i.speedIn,i.easeIn,(function(){for(var n=e.fn.cycle.hopsFromLast(i,c),o=0;o<n;o++)c?i.els.push(i.els.shift()):i.els.unshift(i.els.pop());if(c)for(var l=0,u=i.els.length;l<u;l++)e(i.els[l]).css("z-index",u-l+a);else{var d=e(t).css("z-index");s.css("z-index",parseInt(d,10)+1+a)}s.animate({left:0,top:0},i.speedOut,i.easeOut,(function(){e(c?this:t).hide(),r&&r()}))}))},e.extend(i.cssBefore,{display:"block",opacity:1,top:0,left:0})}}(jQuery);
|