PageSourceSearch

https://www.u-keiai.ac.jp/common/js/jquery.bxslider.js

js u-keiai.ac.jp collected 2026-10-02 05:35:28 UTC 50,623 bytes, 1,287 lines download raw bytes

1/**
2 * BxSlider v4.1 - Fully loaded, responsive content slider
3 * http://bxslider.com
4 *
5 * Copyright 2012, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com
6 * Written while drinking Belgian ales and listening to jazz
7 *
8 * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
9 */
10
11;(function($){
12
13	var plugin = {};
14	
15	var defaults = {
16		
17		// GENERAL
18		mode: 'horizontal',
19		slideSelector: '',
20		infiniteLoop: true,
21		hideControlOnEnd: false,
22		speed: 500,
23		easing: null,
24		slideMargin: 0,
25		startSlide: 0,
26		randomStart: false,
27		captions: false,
28		ticker: false,
29		tickerHover: false,
30		adaptiveHeight: false,
31		adaptiveHeightSpeed: 500,
32		video: false,
33		useCSS: true,
34		preloadImages: 'visible',
35
36		// TOUCH
37		touchEnabled: true,
38		swipeThreshold: 50,
39		oneToOneTouch: true,
40		preventDefaultSwipeX: true,
41		preventDefaultSwipeY: false,
42		
43		// PAGER
44		pager: true,
45		pagerType: 'full',
46		pagerShortSeparator: ' / ',
47		pagerSelector: null,
48		buildPager: null,
49		pagerCustom: null,
50		
51		// CONTROLS
52		controls: true,
53		nextText: 'Next',
54		prevText: 'Prev',
55		nextSelector: null,
56		prevSelector: null,
57		autoControls: false,
58		startText: 'Start',
59		stopText: 'Stop',
60		autoControlsCombine: false,
61		autoControlsSelector: null,
62		
63		// AUTO
64		auto: false,
65		pause: 4000,
66		autoStart: true,
67		autoDirection: 'next',
68		autoHover: false,
69		autoDelay: 0,
70		
71		// CAROUSEL
72		minSlides: 1,
73		maxSlides: 1,
74		moveSlides: 0,
75		slideWidth: 0,
76		
77		// CALLBACKS
78		onSliderLoad: function() {},
79		onSlideBefore: function() {},
80		onSlideAfter: function() {},
81		onSlideNext: function() {},
82		onSlidePrev: function() {}
83	}
84
85	$.fn.bxSlider = function(options){
86		
87		if(this.length == 0) return this;
88		
89		// support mutltiple elements
90		if(this.length > 1){
91			this.each(function(){$(this).bxSlider(options)});
92			return this;
93		}
94		
95		// create a namespace to be used throughout the plugin
96		var slider = {};
97		// set a reference to our slider element
98		var el = this;
99		plugin.el = this;
100
101		/**
102		 * Makes slideshow responsive
103		 */
104		// first get the original window dimens (thanks alot IE)
105		var windowWidth = $(window).width();
106		var windowHeight = $(window).height();
107
108		
109		
110		/**
111		 * ===================================================================================
112		 * = PRIVATE FUNCTIONS
113		 * ===================================================================================
114		 */
115		
116		/**
117		 * Initializes namespace settings to be used throughout plugin
118		 */
119		var init = function(){
120			// merge user-supplied options with the defaults
121			slider.settings = $.extend({}, defaults, options);
122			// parse slideWidth setting
123			slider.settings.slideWidth = parseInt(slider.settings.slideWidth);
124			// store the original children
125			slider.children = el.children(slider.settings.slideSelector);
126			// check if actual number of slides is less than minSlides / maxSlides
127			if(slider.children.length < slider.settings.minSlides) slider.settings.minSlides = slider.children.length;
128			if(slider.children.length < slider.settings.maxSlides) slider.settings.maxSlides = slider.children.length;
129			// if random start, set the startSlide setting to random number
130			if(slider.settings.randomStart) slider.settings.startSlide = Math.floor(Math.random() * slider.children.length);
131			// store active slide information
132			slider.active = { index: slider.settings.startSlide }
133			// store if the slider is in carousel mode (displaying / moving multiple slides)
134			slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
135			// if carousel, force preloadImages = 'all'
136			if(slider.carousel) slider.settings.preloadImages = 'all';
137			// calculate the min / max width thresholds based on min / max number of slides
138			// used to setup and update carousel slides dimensions
139			slider.minThreshold = (slider.settings.minSlides * slider.settings.slideWidth) + ((slider.settings.minSlides - 1) * slider.settings.slideMargin);
140			slider.maxThreshold = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
141			// store the current state of the slider (if currently animating, working is true)
142			slider.working = false;
143			// initialize the controls object
144			slider.controls = {};
145			// initialize an auto interval
146			slider.interval = null;
147			// determine which property to use for transitions
148			slider.animProp = slider.settings.mode == 'vertical' ? 'top' : 'left';
149			// determine if hardware acceleration can be used
150			slider.usingCSS = slider.settings.useCSS && slider.settings.mode != 'fade' && (function(){
151				// create our test div element
152				var div = document.createElement('div');
153				// css transition properties
154				var props = ['WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
155				// test for each property
156				for(var i in props){
157					if(div.style[props[i]] !== undefined){
158						slider.cssPrefix = props[i].replace('Perspective', '').toLowerCase();
159						slider.animProp = '-' + slider.cssPrefix + '-transform';
160						return true;
161					}
162				}
163				return false;
164			}());
165			// if vertical mode always make maxSlides and minSlides equal
166			if(slider.settings.mode == 'vertical') slider.settings.maxSlides = slider.settings.minSlides;
167			// perform all DOM / CSS modifications
168			setup();
169		}
170
171		/**
172		 * Performs all DOM and CSS modifications
173		 */
174		var setup = function(){
175			// wrap el in a wrapper
176			el.wrap('<div class="bx-wrapper"><div class="bx-viewport"></div></div>');
177			// store a namspace reference to .bx-viewport
178			slider.viewport = el.parent();
179			// add a loading div to display while images are loading
180			slider.loader = $('<div class="bx-loading" />');
181			slider.viewport.prepend(slider.loader);
182			// set el to a massive width, to hold any needed slides
183			// also strip any margin and padding from el
184			el.css({
185				width: slider.settings.mode == 'horizontal' ? slider.children.length * 215 + '%' : 'auto',
186				position: 'relative'
187			});
188			// if using CSS, add the easing property
189			if(slider.usingCSS && slider.settings.easing){
190				el.css('-' + slider.cssPrefix + '-transition-timing-function', slider.settings.easing);
191			// if not using CSS and no easing value was supplied, use the default JS animation easing (swing)
192			}else if(!slider.settings.easing){
193				slider.settings.easing = 'swing';
194			}
195			var slidesShowing = getNumberSlidesShowing();
196			// make modifications to the viewport (.bx-viewport)
197			slider.viewport.css({
198				width: '100%',
199				overflow: 'hidden',
200				position: 'relative'
201			});
202			slider.viewport.parent().css({
203				maxWidth: getViewportMaxWidth()
204			});
205			// apply css to all slider children
206			slider.children.css({
207				'float': slider.settings.mode == 'horizontal' ? 'left' : 'none',
208				listStyle: 'none',
209				position: 'relative'
210			});
211			// apply the calculated width after the float is applied to prevent scrollbar interference
212			slider.children.width(getSlideWidth());
213			// if slideMargin is supplied, add the css
214			if(slider.settings.mode == 'horizontal' && slider.settings.slideMargin > 0) slider.children.css('marginRight', slider.settings.slideMargin);
215			if(slider.settings.mode == 'vertical' && slider.settings.slideMargin > 0) slider.children.css('marginBottom', slider.settings.slideMargin);
216			// if "fade" mode, add positioning and z-index CSS
217			if(slider.settings.mode == 'fade'){
218				slider.children.css({
219					position: 'absolute',
220					zIndex: 0,
221					display: 'none'
222				});
223				// prepare the z-index on the showing element
224				slider.children.eq(slider.settings.startSlide).css({zIndex: 50, display: 'block'});
225			}
226			// create an element to contain all slider controls (pager, start / stop, etc)
227			slider.controls.el = $('<div class="bx-controls" />');
228			// if captions are requested, add them
229			if(slider.settings.captions) appendCaptions();
230			// if infinite loop, prepare additional slides
231			if(slider.settings.infiniteLoop && slider.settings.mode != 'fade' && !slider.settings.ticker){
232				var slice = slider.settings.mode == 'vertical' ? slider.settings.minSlides : slider.settings.maxSlides;
233				var sliceAppend = slider.children.slice(0, slice).clone().addClass('bx-clone');
234				var slicePrepend = slider.children.slice(-slice).clone().addClass('bx-clone');
235				el.append(sliceAppend).prepend(slicePrepend);
236			}
237			// check if startSlide is last slide
238			slider.active.last = slider.settings.startSlide == getPagerQty() - 1;
239			// if video is true, set up the fitVids plugin
240			if(slider.settings.video) el.fitVids();
241			// set the default preload selector (visible)
242			var preloadSelector = slider.children.eq(slider.settings.startSlide);
243			if (slider.settings.preloadImages == "all") preloadSelector = el.children();
244			// only check for control addition if not in "ticker" mode
245			if(!slider.settings.ticker){
246				// if pager is requested, add it
247				if(slider.settings.pager) appendPager();
248				// if controls are requested, add them
249				if(slider.settings.controls) appendControls();
250				// if auto is true, and auto controls are requested, add them
251				if(slider.settings.auto && slider.settings.autoControls) appendControlsAuto();
252				// if any control option is requested, add the controls wrapper
253				if(slider.settings.controls || slider.settings.autoControls || slider.settings.pager) slider.viewport.after(slider.controls.el);
254			// if ticker mode, do not allow a pager
255			}else{
256				slider.settings.pager = false;
257			}
258			// preload all images, then perform final DOM / CSS modifications that depend on images being loaded
259			preloadSelector.imagesLoaded(start);
260		}
261
262		/**
263		 * Start the slider
264		 */
265		var start = function(){
266			// remove the loading DOM element
267			slider.loader.remove();
268			// set the left / top position of "el"
269			setSlidePosition();
270			// if "vertical" mode, always use adaptiveHeight to prevent odd behavior
271			if (slider.settings.mode == 'vertical') slider.settings.adaptiveHeight = true;
272			// set the viewport height
273			slider.viewport.height(getViewportHeight());
274			// make sure everything is positioned just right (same as a window resize)
275			el.redrawSlider();
276			// onSliderLoad callback
277			slider.settings.onSliderLoad(slider.active.index);
278			// slider has been fully initialized
279			slider.initialized = true;
280			// bind the resize call to the window
281			$(window).bind('resize', resizeWindow);
282			// if auto is true, start the show
283			if (slider.settings.auto && slider.settings.autoStart) initAuto();
284			// if ticker is true, start the ticker
285			if (slider.settings.ticker) initTicker();
286			// if pager is requested, make the appropriate pager link active
287			if (slider.settings.pager) updatePagerActive(slider.settings.startSlide);
288			// check for any updates to the controls (like hideControlOnEnd updates)
289			if (slider.settings.controls) updateDirectionControls();
290			// if touchEnabled is true, setup the touch events
291			if (slider.settings.touchEnabled && !slider.settings.ticker) initTouch();
292		}
293		
294		/**
295		 * Returns the calculated height of the viewport, used to determine either adaptiveHeight or the maxHeight value
296		 */
297		var getViewportHeight = function(){
298			var height = 0;
299			// first determine which children (slides) should be used in our height calculation
300			var children = $();
301			// if mode is not "vertical" and adaptiveHeight is false, include all children
302			if(slider.settings.mode != 'vertical' && !slider.settings.adaptiveHeight){
303				children = slider.children;
304			}else{
305				// if not carousel, return the single active child
306				if(!slider.carousel){
307					children = slider.children.eq(slider.active.index);
308				// if carousel, return a slice of children
309				}else{
310					// get the individual slide index
311					var currentIndex = slider.settings.moveSlides == 1 ? slider.active.index : slider.active.index * getMoveBy();
312					// add the current slide to the children
313					children = slider.children.eq(currentIndex);
314					// cycle through the remaining "showing" slides
315					for (i = 1; i <= slider.settings.maxSlides - 1; i++){
316						// if looped back to the start
317						if(currentIndex + i >= slider.children.length){
318							children = children.add(slider.children.eq(i - 1));
319						}else{
320							children = children.add(slider.children.eq(currentIndex + i));
321						}
322					}
323				}
324			}
325			// if "vertical" mode, calculate the sum of the heights of the children
326			if(slider.settings.mode == 'vertical'){
327				children.each(function(index) {
328				  height += $(this).outerHeight();
329				});
330				// add user-supplied margins
331				if(slider.settings.slideMargin > 0){
332					height += slider.settings.slideMargin * (slider.settings.minSlides - 1);
333				}
334			// if not "vertical" mode, calculate the max height of the children
335			}else{
336				height = Math.max.apply(Math, children.map(function(){
337					return $(this).outerHeight(false);
338				}).get());
339			}
340			return height;
341		}
342
343		/**
344		 * Returns the calculated width to be used for the outer wrapper / viewport
345		 */
346		var getViewportMaxWidth = function(){
347			var width = '100%';
348			if(slider.settings.slideWidth > 0){
349				if(slider.settings.mode == 'horizontal'){
350					width = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
351				}else{
352					width = slider.settings.slideWidth;
353				}
354			}
355			return width;
356		}
357		
358		/**
359		 * Returns the calculated width to be applied to each slide
360		 */
361		var getSlideWidth = function(){
362			// start with any user-supplied slide width
363			var newElWidth = slider.settings.slideWidth;
364			// get the current viewport width
365			var wrapWidth = slider.viewport.width();
366			// if slide width was not supplied, or is larger than the viewport use the viewport width
367			if(slider.settings.slideWidth == 0 ||
368				(slider.settings.slideWidth > wrapWidth && !slider.carousel) ||
369				slider.settings.mode == 'vertical'){
370				newElWidth = wrapWidth;
371			// if carousel, use the thresholds to determine the width
372			}else if(slider.settings.maxSlides > 1 && slider.settings.mode == 'horizontal'){
373				if(wrapWidth > slider.maxThreshold){
374					// newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.maxSlides - 1))) / slider.settings.maxSlides;
375				}else if(wrapWidth < slider.minThreshold){
376					newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.minSlides - 1))) / slider.settings.minSlides;
377				}
378			}
379			return newElWidth;
380		}
381		
382		/**
383		 * Returns the number of slides currently visible in the viewport (includes partially visible slides)
384		 */
385		var getNumberSlidesShowing = function(){
386			var slidesShowing = 1;
387			if(slider.settings.mode == 'horizontal' && slider.settings.slideWidth > 0){
388				// if viewport is smaller than minThreshold, return minSlides
389				if(slider.viewport.width() < slider.minThreshold){
390					slidesShowing = slider.settings.minSlides;
391				// if viewport is larger than minThreshold, return maxSlides
392				}else if(slider.viewport.width() > slider.maxThreshold){
393					slidesShowing = slider.settings.maxSlides;
394				// if viewport is between min / max thresholds, divide viewport width by first child width
395				}else{
396					var childWidth = slider.children.first().width();
397					slidesShowing = Math.floor(slider.viewport.width() / childWidth);
398				}
399			// if "vertical" mode, slides showing will always be minSlides
400			}else if(slider.settings.mode == 'vertical'){
401				slidesShowing = slider.settings.minSlides;
402			}
403			return slidesShowing;
404		}
405		
406		/**
407		 * Returns the number of pages (one full viewport of slides is one "page")
408		 */
409		var getPagerQty = function(){
410			var pagerQty = 0;
411			// if moveSlides is specified by the user
412			if(slider.settings.moveSlides > 0){
413				if(slider.settings.infiniteLoop){
414					pagerQty = slider.children.length / getMoveBy();
415				}else{
416					// use a while loop to determine pages
417					var breakPoint = 0;
418					var counter = 0
419					// when breakpoint goes above children length, counter is the number of pages
420					while (breakPoint < slider.children.length){
421						++pagerQty;
422						breakPoint = counter + getNumberSlidesShowing();
423						counter += slider.settings.moveSlides <= getNumberSlidesShowing() ? slider.settings.moveSlides : getNumberSlidesShowing();
424					}
425				}
426			// if moveSlides is 0 (auto) divide children length by sides showing, then round up
427			}else{
428				pagerQty = Math.ceil(slider.children.length / getNumberSlidesShowing());
429			}
430			return pagerQty;
431		}
432		
433		/**
434		 * Returns the number of indivual slides by which to shift the slider
435		 */
436		var getMoveBy = function(){
437			// if moveSlides was set by the user and moveSlides is less than number of slides showing
438			if(slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing()){
439				return slider.settings.moveSlides;
440			}
441			// if moveSlides is 0 (auto)
442			return getNumberSlidesShowing();
443		}
444		
445		/**
446		 * Sets the slider's (el) left or top position
447		 */
448		var setSlidePosition = function(){
449			// if last slide, not infinite loop, and number of children is larger than specified maxSlides
450			if(slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop){
451				if (slider.settings.mode == 'horizontal'){
452					// get the last child's position
453					var lastChild = slider.children.last();
454					var position = lastChild.position();
455					// set the left position
456					setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.width())), 'reset', 0);
457				}else if(slider.settings.mode == 'vertical'){
458					// get the last showing index's position
459					var lastShowingIndex = slider.children.length - slider.settings.minSlides;
460					var position = slider.children.eq(lastShowingIndex).position();
461					// set the top position
462					setPositionProperty(-position.top, 'reset', 0);
463				}
464			// if not last slide
465			}else{
466				// get the position of the first showing slide
467				var position = slider.children.eq(slider.active.index * getMoveBy()).position();
468				// check for last slide
469				if (slider.active.index == getPagerQty() - 1) slider.active.last = true;
470				// set the repective position
471				if (position != undefined){
472					if (slider.settings.mode == 'horizontal') setPositionProperty(-position.left, 'reset', 0);
473					else if (slider.settings.mode == 'vertical') setPositionProperty(-position.top, 'reset', 0);
474				}
475			}
476		}
477		
478		/**
479		 * Sets the el's animating property position (which in turn will sometimes animate el).
480		 * If using CSS, sets the transform property. If not using CSS, sets the top / left property.
481		 *
482		 * @param value (int) 
483		 *  - the animating property's value
484		 *
485		 * @param type (string) 'slider', 'reset', 'ticker'
486		 *  - the type of instance for which the function is being
487		 *
488		 * @param duration (int) 
489		 *  - the amount of time (in ms) the transition should occupy
490		 *
491		 * @param params (array) optional
492		 *  - an optional parameter containing any variables that need to be passed in
493		 */
494		var setPositionProperty = function(value, type, duration, params){
495			// use CSS transform
496			if(slider.usingCSS){
497				// determine the translate3d value
498				var propValue = slider.settings.mode == 'vertical' ? 'translate3d(0, ' + value + 'px, 0)' : 'translate3d(' + value + 'px, 0, 0)';
499				// add the CSS transition-duration
500				el.css('-' + slider.cssPrefix + '-transition-duration', duration / 1000 + 's');
501				if(type == 'slide'){
502					// set the property value
503					el.css(slider.animProp, propValue);
504					// bind a callback method - executes when CSS transition completes
505					el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(){
506						// unbind the callback
507						el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
508						updateAfterSlideTransition();
509					});
510				}else if(type == 'reset'){
511					el.css(slider.animProp, propValue);
512				}else if(type == 'ticker'){
513					// make the transition use 'linear'
514					el.css('-' + slider.cssPrefix + '-transition-timing-function', 'linear');
515					el.css(slider.animProp, propValue);
516					// bind a callback method - executes when CSS transition completes
517					el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(){
518						// unbind the callback
519						el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
520						// reset the position
521						setPositionProperty(params['resetValue'], 'reset', 0);
522						// start the loop again
523						tickerLoop();
524					});
525				}
526			// use JS animate
527			}else{
528				var animateObj = {};
529				animateObj[slider.animProp] = value;
530				if(type == 'slide'){
531					el.animate(animateObj, duration, slider.settings.easing, function(){
532						updateAfterSlideTransition();
533					});
534				}else if(type == 'reset'){
535					el.css(slider.animProp, value)
536				}else if(type == 'ticker'){
537					el.animate(animateObj, speed, 'linear', function(){
538						setPositionProperty(params['resetValue'], 'reset', 0);
539						// run the recursive loop after animation
540						tickerLoop();
541					});
542				}
543			}
544		}
545		
546		/**
547		 * Populates the pager with proper amount of pages
548		 */
549		var populatePager = function(){
550			var pagerHtml = '';
551			var pagerQty = getPagerQty();
552			// loop through each pager item
553			for(var i=0; i < pagerQty; i++){
554				var linkContent = '';
555				// if a buildPager function is supplied, use it to get pager link value, else use index + 1
556				if(slider.settings.buildPager && $.isFunction(slider.settings.buildPager)){
557					linkContent = slider.settings.buildPager(i);
558					slider.pagerEl.addClass('bx-custom-pager');
559				}else{
560					linkContent = i + 1;
561					slider.pagerEl.addClass('bx-default-pager');
562				}
563				// var linkContent = slider.settings.buildPager && $.isFunction(slider.settings.buildPager) ? slider.settings.buildPager(i) : i + 1;
564				// add the markup to the string
565				pagerHtml += '<div class="bx-pager-item"><a href="javascript:;" data-slide-index="' + i + '" class="bx-pager-link">' + linkContent + '</a></div>';
566			};
567			// populate the pager element with pager links
568			slider.pagerEl.html(pagerHtml);
569		}
570		
571		/**
572		 * Appends the pager to the controls element
573		 */
574		var appendPager = function(){
575			if(!slider.settings.pagerCustom){
576				// create the pager DOM element
577				slider.pagerEl = $('<div class="bx-pager" />');
578				// if a pager selector was supplied, populate it with the pager
579				if(slider.settings.pagerSelector){
580					$(slider.settings.pagerSelector).html(slider.pagerEl);
581				// if no pager selector was supplied, add it after the wrapper
582				}else{
583					slider.controls.el.addClass('bx-has-pager').append(slider.pagerEl);
584				}
585				// populate the pager
586				populatePager();
587			}else{
588				slider.pagerEl = $(slider.settings.pagerCustom);
589			}
590			// assign the pager click binding
591			slider.pagerEl.delegate('a', 'click', clickPagerBind);
592		}
593		
594		/**
595		 * Appends prev / next controls to the controls element
596		 */
597		var appendControls = function(){
598			slider.controls.next = $('<a class="bx-next" href="javascript:;">' + slider.settings.nextText + '</a>');
599			slider.controls.prev = $('<a class="bx-prev" href="javascript:;">' + slider.settings.prevText + '</a>');
600			// bind click actions to the controls
601			slider.controls.next.bind('click', clickNextBind);
602			slider.controls.prev.bind('click', clickPrevBind);
603			// if nextSlector was supplied, populate it
604			if(slider.settings.nextSelector){
605				$(slider.settings.nextSelector).append(slider.controls.next);
606			}
607			// if prevSlector was supplied, populate it
608			if(slider.settings.prevSelector){
609				$(slider.settings.prevSelector).append(slider.controls.prev);
610			}
611			// if no custom selectors were supplied
612			if(!slider.settings.nextSelector && !slider.settings.prevSelector){
613				// add the controls to the DOM
614				slider.controls.directionEl = $('<div class="bx-controls-direction" />');
615				// add the control elements to the directionEl
616				slider.controls.directionEl.append(slider.controls.prev).append(slider.controls.next);
617				// slider.viewport.append(slider.controls.directionEl);
618				slider.controls.el.addClass('bx-has-controls-direction').append(slider.controls.directionEl);
619			}
620		}
621		
622		/**
623		 * Appends start / stop auto controls to the controls element
624		 */
625		var appendControlsAuto = function(){
626			slider.controls.start = $('<div class="bx-controls-auto-item"><a class="bx-start" href="">' + slider.settings.startText + '</a></div>');
627			slider.controls.stop = $('<div class="bx-controls-auto-item"><a class="bx-stop" href="">' + slider.settings.stopText + '</a></div>');
628			// add the controls to the DOM
629			slider.controls.autoEl = $('<div class="bx-controls-auto" />');
630			// bind click actions to the controls
631			slider.controls.autoEl.delegate('.bx-start', 'click', clickStartBind);
632			slider.controls.autoEl.delegate('.bx-stop', 'click', clickStopBind);
633			// if autoControlsCombine, insert only the "start" control
634			if(slider.settings.autoControlsCombine){
635				slider.controls.autoEl.append(slider.controls.start);
636			// if autoControlsCombine is false, insert both controls
637			}else{
638				slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop);
639			}
640			// if auto controls selector was supplied, populate it with the controls
641			if(slider.settings.autoControlsSelector){
642				$(slider.settings.autoControlsSelector).html(slider.controls.autoEl);
643			// if auto controls selector was not supplied, add it after the wrapper
644			}else{
645				slider.controls.el.addClass('bx-has-controls-auto').append(slider.controls.autoEl);
646			}
647			// update the auto controls
648			updateAutoControls(sli
648der.settings.autoStart ? 'stop' : 'start');
649		}
650		
651		/**
652		 * Appends image captions to the DOM
653		 */
654		var appendCaptions = function(){
655			// cycle through each child
656			slider.children.each(function(index){
657				// get the image title attribute
658				var title = $(this).find('img:first').attr('title');
659				// append the caption
660				if (title != undefined) $(this).append('<div class="bx-caption"><span>' + title + '</span></div>');
661			});
662		}
663		
664		/**
665		 * Click next binding
666		 *
667		 * @param e (event) 
668		 *  - DOM event object
669		 */
670		var clickNextBind = function(e){
671			// if auto show is running, stop it
672			if (slider.settings.auto) el.stopAuto();
673			el.goToNextSlide();
674			e.preventDefault();
675		}
676		
677		/**
678		 * Click prev binding
679		 *
680		 * @param e (event) 
681		 *  - DOM event object
682		 */
683		var clickPrevBind = function(e){
684			// if auto show is running, stop it
685			if (slider.settings.auto) el.stopAuto();
686			el.goToPrevSlide();
687			e.preventDefault();
688		}
689		
690		/**
691		 * Click start binding
692		 *
693		 * @param e (event) 
694		 *  - DOM event object
695		 */
696		var clickStartBind = function(e){
697			el.startAuto();
698			e.preventDefault();
699		}
700		
701		/**
702		 * Click stop binding
703		 *
704		 * @param e (event) 
705		 *  - DOM event object
706		 */
707		var clickStopBind = function(e){
708			el.stopAuto();
709			e.preventDefault();
710		}
711
712		/**
713		 * Click pager binding
714		 *
715		 * @param e (event) 
716		 *  - DOM event object
717		 */
718		var clickPagerBind = function(e){
719			// if auto show is running, stop it
720			if (slider.settings.auto) el.stopAuto();
721			var pagerLink = $(e.currentTarget);
722			var pagerIndex = parseInt(pagerLink.attr('data-slide-index'));
723			// if clicked pager link is not active, continue with the goToSlide call
724			if(pagerIndex != slider.active.index) el.goToSlide(pagerIndex);
725			e.preventDefault();
726		}
727		
728		/**
729		 * Updates the pager links with an active class
730		 *
731		 * @param slideIndex (int) 
732		 *  - index of slide to make active
733		 */
734		var updatePagerActive = function(slideIndex){
735			// if "short" pager type
736			if(slider.settings.pagerType == 'short'){
737				slider.pagerEl.html((slideIndex + 1) + slider.settings.pagerShortSeparator + slider.children.length);
738				return;
739			}
740			// remove all pager active classes
741			slider.pagerEl.find('a').removeClass('active');
742			// apply the active class for all pagers
743			slider.pagerEl.each(function(i, el) { $(el).find('a').eq(slideIndex).addClass('active'); });
744		}
745		
746		/**
747		 * Performs needed actions after a slide transition
748		 */
749		var updateAfterSlideTransition = function(){
750			// if infinte loop is true
751			if(slider.settings.infiniteLoop){
752				var position = '';
753				// first slide
754				if(slider.active.index == 0){
755					// set the new position
756					position = slider.children.eq(0).position();
757				// carousel, last slide
758				}else if(slider.active.index == getPagerQty() - 1 && slider.carousel){
759					position = slider.children.eq((getPagerQty() - 1) * getMoveBy()).position();
760				// last slide
761				}else if(slider.active.index == slider.children.length - 1){
762					position = slider.children.eq(slider.children.length - 1).position();
763				}
764				if (slider.settings.mode == 'horizontal') { setPositionProperty(-position.left, 'reset', 0);; }
765				else if (slider.settings.mode == 'vertical') { setPositionProperty(-position.top, 'reset', 0);; }
766			}
767			// declare that the transition is complete
768			slider.working = false;
769			// onSlideAfter callback
770			slider.settings.onSlideAfter(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
771		}
772		
773		/**
774		 * Updates the auto controls state (either active, or combined switch)
775		 *
776		 * @param state (string) "start", "stop"
777		 *  - the new state of the auto show
778		 */
779		var updateAutoControls = function(state){
780			// if autoControlsCombine is true, replace the current control with the new state 
781			if(slider.settings.autoControlsCombine){
782				slider.controls.autoEl.html(slider.controls[state]);
783			// if autoControlsCombine is false, apply the "active" class to the appropriate control 
784			}else{
785				slider.controls.autoEl.find('a').removeClass('active');
786				slider.controls.autoEl.find('a:not(.bx-' + state + ')').addClass('active');
787			}
788		}
789		
790		/**
791		 * Updates the direction controls (checks if either should be hidden)
792		 */
793		var updateDirectionControls = function(){
794			// if infiniteLoop is false and hideControlOnEnd is true
795			if(!slider.settings.infiniteLoop && slider.settings.hideControlOnEnd){
796				// if first slide
797				if (slider.active.index == 0){
798					slider.controls.prev.addClass('disabled');
799					slider.controls.next.removeClass('disabled');
800				// if last slide
801				}else if(slider.active.index == getPagerQty() - 1){
802					slider.controls.next.addClass('disabled');
803					slider.controls.prev.removeClass('disabled');
804				// if any slide in the middle
805				}else{
806					slider.controls.prev.removeClass('disabled');
807					slider.controls.next.removeClass('disabled');
808				}
809			// if slider has only one page, disable controls
810			}else if(getPagerQty() == 1){
811				slider.controls.prev.addClass('disabled');
812				slider.controls.next.addClass('disabled');
813			}
814		}
815		
816		/**
817		 * Initialzes the auto process
818		 */
819		var initAuto = function(){
820			// if autoDelay was supplied, launch the auto show using a setTimeout() call
821			if(slider.settings.autoDelay > 0){
822				var timeout = setTimeout(el.startAuto, slider.settings.autoDelay);
823			// if autoDelay was not supplied, start the auto show normally
824			}else{
825				el.startAuto();
826			}
827			// if autoHover is requested
828			if(slider.settings.autoHover){
829				// on el hover
830				el.hover(function(){
831					// if the auto show is currently playing (has an active interval)
832					if(slider.interval){
833						// stop the auto show and pass true agument which will prevent control update
834						el.stopAuto(true);
835						// create a new autoPaused value which will be used by the relative "mouseout" event
836						slider.autoPaused = true;
837					}
838				}, function(){
839					// if the autoPaused value was created be the prior "mouseover" event
840					if(slider.autoPaused){
841						// start the auto show and pass true agument which will prevent control update
842						el.startAuto(true);
843						// reset the autoPaused value
844						slider.autoPaused = null;
845					}
846				});
847			}
848		}
849		
850		/**
851		 * Initialzes the ticker process
852		 */
853		var initTicker = function(){
854			var startPosition = 0;
855			// if autoDirection is "next", append a clone of the entire slider
856			if(slider.settings.autoDirection == 'next'){
857				el.append(slider.children.clone().addClass('bx-clone'));
858			// if autoDirection is "prev", prepend a clone of the entire slider, and set the left position
859			}else{
860				el.prepend(slider.children.clone().addClass('bx-clone'));
861				var position = slider.children.first().position();
862				startPosition = slider.settings.mode == 'horizontal' ? -position.left : -position.top;
863			}
864			setPositionProperty(startPosition, 'reset', 0);
865			// do not allow controls in ticker mode
866			slider.settings.pager = false;
867			slider.settings.controls = false;
868			slider.settings.autoControls = false;
869			// if autoHover is requested
870			if(slider.settings.tickerHover && !slider.usingCSS){
871				// on el hover
872				slider.viewport.hover(function(){
873					el.stop();
874				}, function(){
875					// calculate the total width of children (used to calculate the speed ratio)
876					var totalDimens = 0;
877					slider.children.each(function(index){
878					  totalDimens += slider.settings.mode == 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);
879					});
880					// calculate the speed ratio (used to determine the new speed to finish the paused animation)
881					var ratio = slider.settings.speed / totalDimens;
882					// determine which property to use
883					var property = slider.settings.mode == 'horizontal' ? 'left' : 'top';
884					// calculate the new speed
885					var newSpeed = ratio * (totalDimens - (Math.abs(parseInt(el.css(property)))));
886					tickerLoop(newSpeed);
887				});
888			}
889			// start the ticker loop
890			tickerLoop();
891		}
892		
893		/**
894		 * Runs a continuous loop, news ticker-style
895		 */
896		var tickerLoop = function(resumeSpeed){
897			speed = resumeSpeed ? resumeSpeed : slider.settings.speed;
898			var position = {left: 0, top: 0};
899			var reset = {left: 0, top: 0};
900			// if "next" animate left position to last child, then reset left to 0
901			if(slider.settings.autoDirection == 'next'){
902				position = el.find('.bx-clone').first().position();
903			// if "prev" animate left position to 0, then reset left to first non-clone child
904			}else{
905				reset = slider.children.first().position();
906			}
907			var animateProperty = slider.settings.mode == 'horizontal' ? -position.left : -position.top;
908			var resetValue = slider.settings.mode == 'horizontal' ? -reset.left : -reset.top;
909			var params = {resetValue: resetValue};
910			setPositionProperty(animateProperty, 'ticker', speed, params);
911		}
912		
913		/**
914		 * Initializes touch events
915		 */
916		var initTouch = function(){
917			// initialize object to contain all touch values
918			slider.touch = {
919				start: {x: 0, y: 0},
920				end: {x: 0, y: 0}
921			}
922			slider.viewport.bind('touchstart', onTouchStart);
923		}
924		
925		/**
926		 * Event handler for "touchstart"
927		 *
928		 * @param e (event) 
929		 *  - DOM event object
930		 */
931		var onTouchStart = function(e){
932			if(slider.working){
933				e.preventDefault();
934			}else{
935				// record the original position when touch starts
936				slider.touch.originalPos = el.position();
937				var orig = e.originalEvent;
938				// record the starting touch x, y coordinates
939				slider.touch.start.x = orig.changedTouches[0].pageX;
940				slider.touch.start.y = orig.changedTouches[0].pageY;
941				// bind a "touchmove" event to the viewport
942				slider.viewport.bind('touchmove', onTouchMove);
943				// bind a "touchend" event to the viewport
944				slider.viewport.bind('touchend', onTouchEnd);
945			}
946		}
947		
948		/**
949		 * Event handler for "touchmove"
950		 *
951		 * @param e (event) 
952		 *  - DOM event object
953		 */
954		var onTouchMove = function(e){
955			var orig = e.originalEvent;
956			// if scrolling on y axis, do not prevent default
957			var xMovement = Math.abs(orig.changedTouches[0].pageX - slider.touch.start.x);
958			var yMovement = Math.abs(orig.changedTouches[0].pageY - slider.touch.start.y);
959			// x axis swipe
960			if((xMovement * 3) > yMovement && slider.settings.preventDefaultSwipeX){
961				e.preventDefault();
962			// y axis swipe
963			}else if((yMovement * 3) > xMovement && slider.settings.preventDefaultSwipeY){
964				e.preventDefault();
965			}
966			if(slider.settings.mode != 'fade' && slider.settings.oneToOneTouch){
967				var value = 0;
968				// if horizontal, drag along x axis
969				if(slider.settings.mode == 'horizontal'){
970					var change = orig.changedTouches[0].pageX - slider.touch.start.x;
971					value = slider.touch.originalPos.left + change;
972				// if vertical, drag along y axis
973				}else{
974					var change = orig.changedTouches[0].pageY - slider.touch.start.y;
975					value = slider.touch.originalPos.top + change;
976				}
977				setPositionProperty(value, 'reset', 0);
978			}
979		}
980		
981		/**
982		 * Event handler for "touchend"
983		 *
984		 * @param e (event) 
985		 *  - DOM event object
986		 */
987		var onTouchEnd = function(e){
988			slider.viewport.unbind('touchmove', onTouchMove);
989			var orig = e.originalEvent;
990			var value = 0;
991			// record end x, y positions
992			slider.touch.end.x = orig.changedTouches[0].pageX;
993			slider.touch.end.y = orig.changedTouches[0].pageY;
994			// if fade mode, check if absolute x distance clears the threshold
995			if(slider.settings.mode == 'fade'){
996				var distance = Math.abs(slider.touch.start.x - slider.touch.end.x);
997				if(distance >= slider.settings.swipeThreshold){
998					slider.touch.start.x > slider.touch.end.x ? el.goToNextSlide() : el.goToPrevSlide();
999					el.stopAuto();
1000				}
1001			// not fade mode
1002			}else{
1003				var distance = 0;
1004				// calculate distance and el's animate property
1005				if(slider.settings.mode == 'horizontal'){
1006					distance = slider.touch.end.x - slider.touch.start.x;
1007					value = slider.touch.originalPos.left;
1008				}else{
1009					distance = slider.touch.end.y - slider.touch.start.y;
1010					value = slider.touch.originalPos.top;
1011				}
1012				// if not infinite loop and first / last slide, do not attempt a slide transition
1013				if(!slider.settings.infiniteLoop && ((slider.active.index == 0 && distance > 0) || (slider.active.last && distance < 0))){
1014					setPositionProperty(value, 'reset', 200);
1015				}else{
1016					// check if distance clears threshold
1017					if(Math.abs(distance) >= slider.settings.swipeThreshold){
1018						distance < 0 ? el.goToNextSlide() : el.goToPrevSlide();
1019						el.stopAuto();
1020					}else{
1021						// el.animate(property, 200);
1022						setPositionProperty(value, 'reset', 200);
1023					}
1024				}
1025			}
1026			slider.viewport.unbind('touchend', onTouchEnd);
1027		}
1028
1029		/**
1030		 * Window resize event callback
1031		 */
1032		var resizeWindow = function(e){
1033			// get the new window dimens (again, thank you IE)
1034			var windowWidthNew = $(window).width();
1035			var windowHeightNew = $(window).height();
1036			// make sure that it is a true window resize
1037			// *we must check this because our dinosaur friend IE fires a window resize event when certain DOM elements
1038			// are resized. Can you just die already?*
1039			if(windowWidth != windowWidthNew || windowHeight != windowHeightNew){
1040				// set the new window dimens
1041				windowWidth = windowWidthNew;
1042				windowHeight = windowHeightNew;
1043				// update all dynamic elements
1044				el.redrawSlider();
1045			}
1046		}
1047		
1048		/**
1049		 * ===================================================================================
1050		 * = PUBLIC FUNCTIONS
1051		 * ===================================================================================
1052		 */
1053		
1054		/**
1055		 * Performs slide transition to the specified slide
1056		 *
1057		 * @param slideIndex (int) 
1058		 *  - the destination slide's index (zero-based)
1059		 *
1060		 * @param direction (string) 
1061		 *  - INTERNAL USE ONLY - the direction of travel ("prev" / "next")
1062		 */
1063		el.goToSlide = function(slideIndex, direction){
1064			// if plugin is currently in motion, ignore request
1065			if(slider.working || slider.active.index == slideIndex) return;
1066			// declare that plugin is in motion
1067			slider.working = true;
1068			// store the old index
1069			slider.oldIndex = slider.active.index;
1070			// if slideIndex is less than zero, set active index to last child (this happens during infinite loop)
1071			if(slideIndex < 0){
1072				slider.active.index = getPagerQty() - 1;
1073			// if slideIndex is greater than children length, set active index to 0 (this happens during infinite loop)
1074			}else if(slideIndex >= getPagerQty()){
1075				slider.active.index = 0;
1076			// set active index to requested slide
1077			}else{
1078				slider.active.index = slideIndex;
1079			}
1080			// onSlideBefore, onSlideNext, onSlidePrev callbacks
1081			slider.settings.onSlideBefore(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1082			if(direction == 'next'){
1083				slider.settings.onSlideNext(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1084			}else if(direction == 'prev'){
1085				slider.settings.onSlidePrev(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1086			}
1087			// check if last slide
1088			slider.active.last = slider.active.index >= getPagerQty() - 1;
1089			// update the pager with active class
1090			if(slider.settings.pager) updatePagerActive(slider.active.index);
1091			// // check for direction control update
1092			if(slider.settings.controls) updateDirectionControls();
1093			// if slider is set to mode: "fade"
1094			if(slider.settings.mode == 'fade'){
1095				// if adaptiveHeight is true and next height is different from current height, animate to the new height
1096				if(slider.settings.adaptiveHeight && slider.viewport.height() != getViewportHeight()){
1097					slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
1098				}
1099				// fade out the visible child and reset its z-index value
1100				slider.children.filter(':visible').fadeOut(slider.settings.speed).css({zIndex: 0});
1101				// fade in the newly requested slide
1102				slider.children.eq(slider.active.index).css('zIndex', 51).fadeIn(slider.settings.speed, function(){
1103					$(this).css('zIndex', 50);
1104					updateAfterSlideTransition();
1105				});
1106			// slider mode is not "fade"
1107			}else{
1108				// if adaptiveHeight is true and next height is different from current height, animate to the new height
1109				if(slider.settings.adaptiveHeight && slider.viewport.height() != getViewportHe
1109ight()){
1110					slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
1111				}
1112				var moveBy = 0;
1113				var position = {left: 0, top: 0};
1114				// if carousel and not infinite loop
1115				if(!slider.settings.infiniteLoop && slider.carousel && slider.active.last){
1116					if(slider.settings.mode == 'horizontal'){
1117						// get the last child position
1118						var lastChild = slider.children.eq(slider.children.length - 1);
1119						position = lastChild.position();
1120						// calculate the position of the last slide
1121						moveBy = slider.viewport.width() - lastChild.width();
1122					}else{
1123						// get last showing index position
1124						var lastShowingIndex = slider.children.length - slider.settings.minSlides;
1125						position = slider.children.eq(lastShowingIndex).position();
1126					}
1127					// horizontal carousel, going previous while on first slide (infiniteLoop mode)
1128				}else if(slider.carousel && slider.active.last && direction == 'prev'){
1129					// get the last child position
1130					var eq = slider.settings.moveSlides == 1 ? slider.settings.maxSlides - getMoveBy() : ((getPagerQty() - 1) * getMoveBy()) - (slider.children.length - slider.settings.maxSlides);
1131					var lastChild = el.children('.bx-clone').eq(eq);
1132					position = lastChild.position();
1133				// if infinite loop and "Next" is clicked on the last slide
1134				}else if(direction == 'next' && slider.active.index == 0){
1135					// get the last clone position
1136					position = el.find('.bx-clone').eq(slider.settings.maxSlides).position();
1137					slider.active.last = false;
1138				// normal non-zero requests
1139				}else if(slideIndex >= 0){
1140					var requestEl = slideIndex * getMoveBy();
1141					position = slider.children.eq(requestEl).position();
1142				}
1143				// plugin values to be animated
1144				var value = slider.settings.mode == 'horizontal' ? -(position.left - moveBy) : -position.top;
1145				setPositionProperty(value, 'slide', slider.settings.speed);
1146			}
1147		}
1148		
1149		/**
1150		 * Transitions to the next slide in the show
1151		 */
1152		el.goToNextSlide = function(){
1153			// if infiniteLoop is false and last page is showing, disregard call
1154			if (!slider.settings.infiniteLoop && slider.active.last) return;
1155			var pagerIndex = parseInt(slider.active.index) + 1;
1156			el.goToSlide(pagerIndex, 'next');
1157		}
1158		
1159		/**
1160		 * Transitions to the prev slide in the show
1161		 */
1162		el.goToPrevSlide = function(){
1163			// if infiniteLoop is false and last page is showing, disregard call
1164			if (!slider.settings.infiniteLoop && slider.active.index == 0) return;
1165			var pagerIndex = parseInt(slider.active.index) - 1;
1166			el.goToSlide(pagerIndex, 'prev');
1167		}
1168		
1169		/**
1170		 * Starts the auto show
1171		 *
1172		 * @param preventControlUpdate (boolean) 
1173		 *  - if true, auto controls state will not be updated
1174		 */
1175		el.startAuto = function(preventControlUpdate){
1176			// if an interval already exists, disregard call
1177			if(slider.interval) return;
1178			// create an interval
1179			slider.interval = setInterval(function(){
1180				slider.settings.autoDirection == 'next' ? el.goToNextSlide() : el.goToPrevSlide();
1181			}, slider.settings.pause);
1182			// if auto controls are displayed and preventControlUpdate is not true
1183			if (slider.settings.autoControls && preventControlUpdate != true) updateAutoControls('stop');
1184		}
1185		
1186		/**
1187		 * Stops the auto show
1188		 *
1189		 * @param preventControlUpdate (boolean) 
1190		 *  - if true, auto controls state will not be updated
1191		 */
1192		el.stopAuto = function(preventControlUpdate){
1193			// if no interval exists, disregard call
1194			if(!slider.interval) return;
1195			// clear the interval
1196			clearInterval(slider.interval);
1197			slider.interval = null;
1198			// if auto controls are displayed and preventControlUpdate is not true
1199			if (slider.settings.autoControls && preventControlUpdate != true) updateAutoControls('start');
1200		}
1201		
1202		/**
1203		 * Returns current slide index (zero-based)
1204		 */
1205		el.getCurrentSlide = function(){
1206			return slider.active.index;
1207		}
1208		
1209		/**
1210		 * Returns number of slides in show
1211		 */
1212		el.getSlideCount = function(){
1213			return slider.children.length;
1214		}
1215
1216		/**
1217		 * Update all dynamic slider elements
1218		 */
1219		el.redrawSlider = function(){
1220			// resize all children in ratio to new screen size
1221			slider.children.add(el.find('.bx-clone')).width(getSlideWidth());
1222			// adjust the height
1223			slider.viewport.css('height', getViewportHeight());
1224			// update the slide position
1225			if(!slider.settings.ticker) setSlidePosition();
1226			// if active.last was true before the screen resize, we want
1227			// to keep it last no matter what screen size we end on
1228			if (slider.active.last) slider.active.index = getPagerQty() - 1;
1229			// if the active index (page) no longer exists due to the resize, simply set the index as last
1230			if (slider.active.index >= getPagerQty()) slider.active.last = true;
1231			// if a pager is being displayed and a custom pager is not being used, update it
1232			if(slider.settings.pager && !slider.settings.pagerCustom){
1233				populatePager();
1234				updatePagerActive(slider.active.index);
1235			}
1236		}
1237
1238		/**
1239		 * Destroy the current instance of the slider (revert everything back to original state)
1240		 */
1241		el.destroySlider = function(){
1242			// don't do anything if slider has already been destroyed
1243			if(!slider.initialized) return;
1244			slider.initialized = false;
1245			$('.bx-clone', this).remove();
1246			slider.children.removeAttr('style');
1247			this.removeAttr('style').unwrap().unwrap();
1248			if(slider.controls.el) slider.controls.el.remove();
1249			if(slider.controls.next) slider.controls.next.remove();
1250			if(slider.controls.prev) slider.controls.prev.remove();
1251			if(slider.pagerEl) slider.pagerEl.remove();
1252			$('.bx-caption', this).remove();
1253			if(slider.controls.autoEl) slider.controls.autoEl.remove();
1254			clearInterval(slider.interval);
1255			$(window).unbind('resize', resizeWindow);
1256		}
1257
1258		/**
1259		 * Reload the slider (revert all DOM changes, and re-initialize)
1260		 */
1261		el.reloadSlider = function(settings){
1262			if (settings != undefined) options = settings;
1263			el.destroySlider();
1264			init();
1265		}
1266		
1267		init();
1268		
1269		// returns the current jQuery object
1270		return this;
1271	}
1272
1273})(jQuery);
1274
1275/*!
1276 * jQuery imagesLoaded plugin v2.1.0
1277 * http://github.com/desandro/imagesloaded
1278 *
1279 * MIT License. by Paul Irish et al.
1280 */
1281
1282/*jshint curly: true, eqeqeq: true, noempty: true, strict: true, undef: true, browser: true */
1283/*global jQuery: false */
1284
1285(function(c,n){var l="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";c.fn.imagesLoaded=function(f){function m(){var b=c(i),a=c(h);d&&(h.length?d.reject(e,b,a):d.resolve(e));c.isFunction(f)&&f.call(g,e,b,a)}function j(b,a){b.src===l||-1!==c.inArray(b,k)||(k.push(b),a?h.push(b):i.push(b),c.data(b,"imagesLoaded",{isBroken:a,src:b.src}),o&&d.notifyWith(c(b),[a,e,c(i),c(h)]),e.length===k.length&&(setTimeout(m),e.unbind(".imagesLoaded")))}var g=this,d=c.isFunction(c.Deferred)?c.Deferred():
12860,o=c.isFunction(d.notify),e=g.find("img").add(g.filter("img")),k=[],i=[],h=[];c.isPlainObject(f)&&c.each(f,function(b,a){if("callback"===b)f=a;else if(d)d[b](a)});e.length?e.bind("load.imagesLoaded error.imagesLoaded",function(b){j(b.target,"error"===b.type)}).each(function(b,a){var d=a.src,e=c.data(a,"imagesLoaded");if(e&&e.src===d)j(a,e.isBroken);else if(a.complete&&a.naturalWidth!==n)j(a,0===a.naturalWidth||0===a.naturalHeight);else if(a.readyState||a.complete)a.src=l,a.src=d}):m();return d?d.promise(g):
1287g}})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.