PageSourceSearch

https://www.open-dental.jp/assets/js/common.min.js

js open-dental.jp collected 2026-09-28 09:11:50 UTC 583,347 bytes, 19,959 lines download raw bytes

vendor: 4,408 bytes, lines 1-180
1/*!
2 * jQuery JavaScript Library v1.12.4
3 * http://jquery.com/
4 *
5 * Includes Sizzle.js
6 * http://sizzlejs.com/
7 *
8 * Copyright jQuery Foundation and other contributors
9 * Released under the MIT license
10 * http://jquery.org/license
11 *
12 * Date: 2016-05-20T17:17Z
13 */
14
15(function( global, factory ) {
16
17	if ( typeof module === "object" && typeof module.exports === "object" ) {
18		// For CommonJS and CommonJS-like environments where a proper `window`
19		// is present, execute the factory and get jQuery.
20		// For environments that do not have a `window` with a `document`
21		// (such as Node.js), expose a factory as module.exports.
22		// This accentuates the need for the creation of a real `window`.
23		// e.g. var jQuery = require("jquery")(window);
24		// See ticket #14549 for more info.
25		module.exports = global.document ?
26			factory( global, true ) :
27			function( w ) {
28				if ( !w.document ) {
29					throw new Error( "jQuery requires a window with a document" );
30				}
31				return factory( w );
32			};
33	} else {
34		factory( global );
35	}
36
37// Pass this if window is not defined yet
38}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
39
40// Support: Firefox 18+
41// Can't be in strict mode, several libs including ASP.NET trace
42// the stack via arguments.caller.callee and Firefox dies if
43// you try to trace through "use strict" call chains. (#13335)
44//"use strict";
45var deletedIds = [];
46
47var document = window.document;
48
49var slice = deletedIds.slice;
50
51var concat = deletedIds.concat;
52
53var push = deletedIds.push;
54
55var indexOf = deletedIds.indexOf;
56
57var class2type = {};
58
59var toString = class2type.toString;
60
61var hasOwn = class2type.hasOwnProperty;
62
63var support = {};
64
65
66
67var
68	version = "1.12.4",
69
70	// Define a local copy of jQuery
71	jQuery = function( selector, context ) {
72
73		// The jQuery object is actually just the init constructor 'enhanced'
74		// Need init if jQuery is called (just allow error to be thrown if not included)
75		return new jQuery.fn.init( selector, context );
76	},
77
78	// Support: Android<4.1, IE<9
79	// Make sure we trim BOM and NBSP
80	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
81
82	// Matches dashed string for camelizing
83	rmsPrefix = /^-ms-/,
84	rdashAlpha = /-([\da-z])/gi,
85
86	// Used by jQuery.camelCase as callback to replace()
87	fcamelCase = function( all, letter ) {
88		return letter.toUpperCase();
89	};
90
91jQuery.fn = jQuery.prototype = {
92
93	// The current version of jQuery being used
94	jquery: version,
95
96	constructor: jQuery,
97
98	// Start with an empty selector
99	selector: "",
100
101	// The default length of a jQuery object is 0
102	length: 0,
103
104	toArray: function() {
105		return slice.call( this );
106	},
107
108	// Get the Nth element in the matched element set OR
109	// Get the whole matched element set as a clean array
110	get: function( num ) {
111		return num != null ?
112
113			// Return just the one element from the set
114			( num < 0 ? this[ num + this.length ] : this[ num ] ) :
115
116			// Return all the elements in a clean array
117			slice.call( this );
118	},
119
120	// Take an array of elements and push it onto the stack
121	// (returning the new matched element set)
122	pushStack: function( elems ) {
123
124		// Build a new jQuery matched element set
125		var ret = jQuery.merge( this.constructor(), elems );
126
127		// Add the old object onto the stack (as a reference)
128		ret.prevObject = this;
129		ret.context = this.context;
130
131		// Return the newly-formed element set
132		return ret;
133	},
134
135	// Execute a callback for every element in the matched set.
136	each: function( callback ) {
137		return jQuery.each( this, callback );
138	},
139
140	map: function( callback ) {
141		return this.pushStack( jQuery.map( this, function( elem, i ) {
142			return callback.call( elem, i, elem );
143		} ) );
144	},
145
146	slice: function() {
147		return this.pushStack( slice.apply( this, arguments ) );
148	},
149
150	first: function() {
151		return this.eq( 0 );
152	},
153
154	last: function() {
155		return this.eq( -1 );
156	},
157
158	eq: function( i ) {
159		var len = this.length,
160			j = +i + ( i < 0 ? len : 0 );
161		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
162	},
163
164	end: function() {
165		return this.prevObject || this.constructor();
166	},
167
168	// For internal use only.
169	// Behaves like an Array's method, not like a jQuery method.
170	push: push,
171	sort: deletedIds.sort,
172	splice: deletedIds.splice
173};
174
175jQuery.extend = jQuery.fn.extend = function() {
176	var src, copyIsArray, copy, name, options, clone,
177		target = arguments[ 0 ] || {},
178		i = 1,
179		length = arguments.length,
180		deep = false;
vendor: 8,863 bytes, lines 181-553
181
182	// Handle a deep copy situation
183	if ( typeof target === "boolean" ) {
184		deep = target;
185
186		// skip the boolean and the target
187		target = arguments[ i ] || {};
188		i++;
189	}
190
191	// Handle case when target is a string or something (possible in deep copy)
192	if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
193		target = {};
194	}
195
196	// extend jQuery itself if only one argument is passed
197	if ( i === length ) {
198		target = this;
199		i--;
200	}
201
202	for ( ; i < length; i++ ) {
203
204		// Only deal with non-null/undefined values
205		if ( ( options = arguments[ i ] ) != null ) {
206
207			// Extend the base object
208			for ( name in options ) {
209				src = target[ name ];
210				copy = options[ name ];
211
212				// Prevent never-ending loop
213				if ( target === copy ) {
214					continue;
215				}
216
217				// Recurse if we're merging plain objects or arrays
218				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
219					( copyIsArray = jQuery.isArray( copy ) ) ) ) {
220
221					if ( copyIsArray ) {
222						copyIsArray = false;
223						clone = src && jQuery.isArray( src ) ? src : [];
224
225					} else {
226						clone = src && jQuery.isPlainObject( src ) ? src : {};
227					}
228
229					// Never move original objects, clone them
230					target[ name ] = jQuery.extend( deep, clone, copy );
231
232				// Don't bring in undefined values
233				} else if ( copy !== undefined ) {
234					target[ name ] = copy;
235				}
236			}
237		}
238	}
239
240	// Return the modified object
241	return target;
242};
243
244jQuery.extend( {
245
246	// Unique for each copy of jQuery on the page
247	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
248
249	// Assume jQuery is ready without the ready module
250	isReady: true,
251
252	error: function( msg ) {
253		throw new Error( msg );
254	},
255
256	noop: function() {},
257
258	// See test/unit/core.js for details concerning isFunction.
259	// Since version 1.3, DOM methods and functions like alert
260	// aren't supported. They return false on IE (#2968).
261	isFunction: function( obj ) {
262		return jQuery.type( obj ) === "function";
263	},
264
265	isArray: Array.isArray || function( obj ) {
266		return jQuery.type( obj ) === "array";
267	},
268
269	isWindow: function( obj ) {
270		/* jshint eqeqeq: false */
271		return obj != null && obj == obj.window;
272	},
273
274	isNumeric: function( obj ) {
275
276		// parseFloat NaNs numeric-cast false positives (null|true|false|"")
277		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
278		// subtraction forces infinities to NaN
279		// adding 1 corrects loss of precision from parseFloat (#15100)
280		var realStringObj = obj && obj.toString();
281		return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
282	},
283
284	isEmptyObject: function( obj ) {
285		var name;
286		for ( name in obj ) {
287			return false;
288		}
289		return true;
290	},
291
292	isPlainObject: function( obj ) {
293		var key;
294
295		// Must be an Object.
296		// Because of IE, we also have to check the presence of the constructor property.
297		// Make sure that DOM nodes and window objects don't pass through, as well
298		if ( !obj || jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
299			return false;
300		}
301
302		try {
303
304			// Not own constructor property must be Object
305			if ( obj.constructor &&
306				!hasOwn.call( obj, "constructor" ) &&
307				!hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
308				return false;
309			}
310		} catch ( e ) {
311
312			// IE8,9 Will throw exceptions on certain host objects #9897
313			return false;
314		}
315
316		// Support: IE<9
317		// Handle iteration over inherited properties before own properties.
318		if ( !support.ownFirst ) {
319			for ( key in obj ) {
320				return hasOwn.call( obj, key );
321			}
322		}
323
324		// Own properties are enumerated firstly, so to speed up,
325		// if last one is own, then all properties are own.
326		for ( key in obj ) {}
327
328		return key === undefined || hasOwn.call( obj, key );
329	},
330
331	type: function( obj ) {
332		if ( obj == null ) {
333			return obj + "";
334		}
335		return typeof obj === "object" || typeof obj === "function" ?
336			class2type[ toString.call( obj ) ] || "object" :
337			typeof obj;
338	},
339
340	// Workarounds based on findings by Jim Driscoll
341	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
342	globalEval: function( data ) {
343		if ( data && jQuery.trim( data ) ) {
344
345			// We use execScript on Internet Explorer
346			// We use an anonymous function so that context is window
347			// rather than jQuery in Firefox
348			( window.execScript || function( data ) {
349				window[ "eval" ].call( window, data ); // jscs:ignore requireDotNotation
350			} )( data );
351		}
352	},
353
354	// Convert dashed to camelCase; used by the css and data modules
355	// Microsoft forgot to hump their vendor prefix (#9572)
356	camelCase: function( string ) {
357		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
358	},
359
360	nodeName: function( elem, name ) {
361		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
362	},
363
364	each: function( obj, callback ) {
365		var length, i = 0;
366
367		if ( isArrayLike( obj ) ) {
368			length = obj.length;
369			for ( ; i < length; i++ ) {
370				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
371					break;
372				}
373			}
374		} else {
375			for ( i in obj ) {
376				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
377					break;
378				}
379			}
380		}
381
382		return obj;
383	},
384
385	// Support: Android<4.1, IE<9
386	trim: function( text ) {
387		return text == null ?
388			"" :
389			( text + "" ).replace( rtrim, "" );
390	},
391
392	// results is for internal usage only
393	makeArray: function( arr, results ) {
394		var ret = results || [];
395
396		if ( arr != null ) {
397			if ( isArrayLike( Object( arr ) ) ) {
398				jQuery.merge( ret,
399					typeof arr === "string" ?
400					[ arr ] : arr
401				);
402			} else {
403				push.call( ret, arr );
404			}
405		}
406
407		return ret;
408	},
409
410	inArray: function( elem, arr, i ) {
411		var len;
412
413		if ( arr ) {
414			if ( indexOf ) {
415				return indexOf.call( arr, elem, i );
416			}
417
418			len = arr.length;
419			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
420
421			for ( ; i < len; i++ ) {
422
423				// Skip accessing in sparse arrays
424				if ( i in arr && arr[ i ] === elem ) {
425					return i;
426				}
427			}
428		}
429
430		return -1;
431	},
432
433	merge: function( first, second ) {
434		var len = +second.length,
435			j = 0,
436			i = first.length;
437
438		while ( j < len ) {
439			first[ i++ ] = second[ j++ ];
440		}
441
442		// Support: IE<9
443		// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
444		if ( len !== len ) {
445			while ( second[ j ] !== undefined ) {
446				first[ i++ ] = second[ j++ ];
447			}
448		}
449
450		first.length = i;
451
452		return first;
453	},
454
455	grep: function( elems, callback, invert ) {
456		var callbackInverse,
457			matches = [],
458			i = 0,
459			length = elems.length,
460			callbackExpect = !invert;
461
462		// Go through the array, only saving the items
463		// that pass the validator function
464		for ( ; i < length; i++ ) {
465			callbackInverse = !callback( elems[ i ], i );
466			if ( callbackInverse !== callbackExpect ) {
467				matches.push( elems[ i ] );
468			}
469		}
470
471		return matches;
472	},
473
474	// arg is for internal usage only
475	map: function( elems, callback, arg ) {
476		var length, value,
477			i = 0,
478			ret = [];
479
480		// Go through the array, translating each of the items to their new values
481		if ( isArrayLike( elems ) ) {
482			length = elems.length;
483			for ( ; i < length; i++ ) {
484				value = callback( elems[ i ], i, arg );
485
486				if ( value != null ) {
487					ret.push( value );
488				}
489			}
490
491		// Go through every key on the object,
492		} else {
493			for ( i in elems ) {
494				value = callback( elems[ i ], i, arg );
495
496				if ( value != null ) {
497					ret.push( value );
498				}
499			}
500		}
501
502		// Flatten any nested arrays
503		return concat.apply( [], ret );
504	},
505
506	// A global GUID counter for objects
507	guid: 1,
508
509	// Bind a function to a context, optionally partially applying any
510	// arguments.
511	proxy: function( fn, context ) {
512		var args, proxy, tmp;
513
514		if ( typeof context === "string" ) {
515			tmp = fn[ context ];
516			context = fn;
517			fn = tmp;
518		}
519
520		// Quick check to determine if target is callable, in the spec
521		// this throws a TypeError, but we will just return undefined.
522		if ( !jQuery.isFunction( fn ) ) {
523			return undefined;
524		}
525
526		// Simulated bind
527		args = slice.call( arguments, 2 );
528		proxy = function() {
529			return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
530		};
531
532		// Set the guid of unique handler to the same of original handler, so it can be removed
533		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
534
535		return proxy;
536	},
537
538	now: function() {
539		return +( new Date() );
540	},
541
542	// jQuery.support is not used in Core but other projects attach their
543	// properties to it so it needs to exist.
544	support: support
545} );
546
547// JSHint would error on this code due to the Symbol not being defined in ES5.
548// Defining this global in .jshintrc would create a danger of using the global
549// unguarded in another place, it seems safer to just disable JSHint for these
550// three lines.
551/* jshint ignore: start */
552if ( typeof Symbol === "function" ) {
553	jQuery.fn[ Symbol.iterator ] = deletedIds
vendor: 63,327 bytes, lines 553-2790
553[ Symbol.iterator ];
554}
555/* jshint ignore: end */
556
557// Populate the class2type map
558jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
559function( i, name ) {
560	class2type[ "[object " + name + "]" ] = name.toLowerCase();
561} );
562
563function isArrayLike( obj ) {
564
565	// Support: iOS 8.2 (not reproducible in simulator)
566	// `in` check used to prevent JIT error (gh-2145)
567	// hasOwn isn't used here due to false negatives
568	// regarding Nodelist length in IE
569	var length = !!obj && "length" in obj && obj.length,
570		type = jQuery.type( obj );
571
572	if ( type === "function" || jQuery.isWindow( obj ) ) {
573		return false;
574	}
575
576	return type === "array" || length === 0 ||
577		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
578}
579var Sizzle =
580/*!
581 * Sizzle CSS Selector Engine v2.2.1
582 * http://sizzlejs.com/
583 *
584 * Copyright jQuery Foundation and other contributors
585 * Released under the MIT license
586 * http://jquery.org/license
587 *
588 * Date: 2015-10-17
589 */
590(function( window ) {
591
592var i,
593	support,
594	Expr,
595	getText,
596	isXML,
597	tokenize,
598	compile,
599	select,
600	outermostContext,
601	sortInput,
602	hasDuplicate,
603
604	// Local document vars
605	setDocument,
606	document,
607	docElem,
608	documentIsHTML,
609	rbuggyQSA,
610	rbuggyMatches,
611	matches,
612	contains,
613
614	// Instance-specific data
615	expando = "sizzle" + 1 * new Date(),
616	preferredDoc = window.document,
617	dirruns = 0,
618	done = 0,
619	classCache = createCache(),
620	tokenCache = createCache(),
621	compilerCache = createCache(),
622	sortOrder = function( a, b ) {
623		if ( a === b ) {
624			hasDuplicate = true;
625		}
626		return 0;
627	},
628
629	// General-purpose constants
630	MAX_NEGATIVE = 1 << 31,
631
632	// Instance methods
633	hasOwn = ({}).hasOwnProperty,
634	arr = [],
635	pop = arr.pop,
636	push_native = arr.push,
637	push = arr.push,
638	slice = arr.slice,
639	// Use a stripped-down indexOf as it's faster than native
640	// http://jsperf.com/thor-indexof-vs-for/5
641	indexOf = function( list, elem ) {
642		var i = 0,
643			len = list.length;
644		for ( ; i < len; i++ ) {
645			if ( list[i] === elem ) {
646				return i;
647			}
648		}
649		return -1;
650	},
651
652	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
653
654	// Regular expressions
655
656	// http://www.w3.org/TR/css3-selectors/#whitespace
657	whitespace = "[\\x20\\t\\r\\n\\f]",
658
659	// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
660	identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
661
662	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
663	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
664		// Operator (capture 2)
665		"*([*^$|!~]?=)" + whitespace +
666		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
667		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
668		"*\\]",
669
670	pseudos = ":(" + identifier + ")(?:\\((" +
671		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
672		// 1. quoted (capture 3; capture 4 or capture 5)
673		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
674		// 2. simple (capture 6)
675		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
676		// 3. anything else (capture 2)
677		".*" +
678		")\\)|)",
679
680	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
681	rwhitespace = new RegExp( whitespace + "+", "g" ),
682	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
683
684	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
685	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
686
687	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
688
689	rpseudo = new RegExp( pseudos ),
690	ridentifier = new RegExp( "^" + identifier + "$" ),
691
692	matchExpr = {
693		"ID": new RegExp( "^#(" + identifier + ")" ),
694		"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
695		"TAG": new RegExp( "^(" + identifier + "|[*])" ),
696		"ATTR": new RegExp( "^" + attributes ),
697		"PSEUDO": new RegExp( "^" + pseudos ),
698		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
699			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
700			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
701		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
702		// For use in libraries implementing .is()
703		// We use this for POS matching in `select`
704		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
705			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
706	},
707
708	rinputs = /^(?:input|select|textarea|button)$/i,
709	rheader = /^h\d$/i,
710
711	rnative = /^[^{]+\{\s*\[native \w/,
712
713	// Easily-parseable/retrievable ID or TAG or CLASS selectors
714	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
715
716	rsibling = /[+~]/,
717	rescape = /'|\\/g,
718
719	// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
720	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
721	funescape = function( _, escaped, escapedWhitespace ) {
722		var high = "0x" + escaped - 0x10000;
723		// NaN means non-codepoint
724		// Support: Firefox<24
725		// Workaround erroneous numeric interpretation of +"0x"
726		return high !== high || escapedWhitespace ?
727			escaped :
728			high < 0 ?
729				// BMP codepoint
730				String.fromCharCode( high + 0x10000 ) :
731				// Supplemental Plane codepoint (surrogate pair)
732				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
733	},
734
735	// Used for iframes
736	// See setDocument()
737	// Removing the function wrapper causes a "Permission Denied"
738	// error in IE
739	unloadHandler = function() {
740		setDocument();
741	};
742
743// Optimize for push.apply( _, NodeList )
744try {
745	push.apply(
746		(arr = slice.call( preferredDoc.childNodes )),
747		preferredDoc.childNodes
748	);
749	// Support: Android<4.0
750	// Detect silently failing push.apply
751	arr[ preferredDoc.childNodes.length ].nodeType;
752} catch ( e ) {
753	push = { apply: arr.length ?
754
755		// Leverage slice if possible
756		function( target, els ) {
757			push_native.apply( target, slice.call(els) );
758		} :
759
760		// Support: IE<9
761		// Otherwise append directly
762		function( target, els ) {
763			var j = target.length,
764				i = 0;
765			// Can't trust NodeList.length
766			while ( (target[j++] = els[i++]) ) {}
767			target.length = j - 1;
768		}
769	};
770}
771
772function Sizzle( selector, context, results, seed ) {
773	var m, i, elem, nid, nidselect, match, groups, newSelector,
774		newContext = context && context.ownerDocument,
775
776		// nodeType defaults to 9, since context defaults to document
777		nodeType = context ? context.nodeType : 9;
778
779	results = results || [];
780
781	// Return early from calls with invalid selector or context
782	if ( typeof selector !== "string" || !selector ||
783		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
784
785		return results;
786	}
787
788	// Try to shortcut find operations (as opposed to filters) in HTML documents
789	if ( !seed ) {
790
791		if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
792			setDocument( context );
793		}
794		context = context || document;
795
796		if ( documentIsHTML ) {
797
798			// If the selector is sufficiently simple, try using a "get*By*" DOM method
799			// (excepting DocumentFragment context, where the methods don't exist)
800			if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
801
802				// ID selector
803				if ( (m = match[1]) ) {
804
805					// Document context
806					if ( nodeType === 9 ) {
807						if ( (elem = context.getElementById( m )) ) {
808
809							// Support: IE, Opera, Webkit
810							// TODO: identify versions
811							// getElementById can match elements by name instead of ID
812							if ( elem.id === m ) {
813								results.push( elem );
814								return results;
815							}
816						} else {
817							return results;
818						}
819
820					// Element context
821					} else {
822
823						// Support: IE, Opera, Webkit
824						// TODO: identify versions
825						// getElementById can match elements by name instead of ID
826						if ( newContext && (elem = newContext.getElementById( m )) &&
827							contains( context, elem ) &&
828							elem.id === m ) {
829
830							results.push( elem );
831							return results;
832						}
833					}
834
835				// Type selector
836				} else if ( match[2] ) {
837					push.apply( results, context.getElementsByTagName( selector ) );
838					return results;
839
840				// Class selector
841				} else if ( (m = match[3]) && support.getElementsByClassName &&
842					context.getElementsByClassName ) {
843
844					push.apply( results, context.getElementsByClassName( m ) );
845					return results;
846				}
847			}
848
849			// Take advantage of querySelectorAll
850			if ( support.qsa &&
851				!compilerCache[ selector + " " ] &&
852				(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
853
854				if ( nodeType !== 1 ) {
855					newContext = context;
856					newSelector = selector;
857
858				// qSA looks outside Element context, which is not what we want
859				// Thanks to Andrew Dupont for this workaround technique
860				// Support: IE <=8
861				// Exclude object elements
862				} else if ( context.nodeName.toLowerCase() !== "object" ) {
863
864					// Capture the context ID, setting it first if necessary
865					if ( (nid = context.getAttribute( "id" )) ) {
866						nid = nid.replace( rescape, "\\$&" );
867					} else {
868						context.setAttribute( "id", (nid = expando) );
869					}
870
871					// Prefix every selector in the list
872					groups = tokenize( selector );
873					i = groups.length;
874					nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
875					while ( i-- ) {
876						groups[i] = nidselect + " " + toSelector( groups[i] );
877					}
878					newSelector = groups.join( "," );
879
880					// Expand context for sibling selectors
881					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
882						context;
883				}
884
885				if ( newSelector ) {
886					try {
887						push.apply( results,
888							newContext.querySelectorAll( newSelector )
889						);
890						return results;
891					} catch ( qsaError ) {
892					} finally {
893						if ( nid === expando ) {
894							context.removeAttribute( "id" );
895						}
896					}
897				}
898			}
899		}
900	}
901
902	// All others
903	return select( selector.replace( rtrim, "$1" ), context, results, seed );
904}
905
906/**
907 * Create key-value caches of limited size
908 * @returns {function(string, object)} Returns the Object data after storing it on itself with
909 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
910 *	deleting the oldest entry
911 */
912function createCache() {
913	var keys = [];
914
915	function cache( key, value ) {
916		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
917		if ( keys.push( key + " " ) > Expr.cacheLength ) {
918			// Only keep the most recent entries
919			delete cache[ keys.shift() ];
920		}
921		return (cache[ key + " " ] = value);
922	}
923	return cache;
924}
925
926/**
927 * Mark a function for special use by Sizzle
928 * @param {Function} fn The function to mark
929 */
930function markFunction( fn ) {
931	fn[ expando ] = true;
932	return fn;
933}
934
935/**
936 * Support testing using an element
937 * @param {Function} fn Passed the created div and expects a boolean result
938 */
939function assert( fn ) {
940	var div = document.createElement("div");
941
942	try {
943		return !!fn( div );
944	} catch (e) {
945		return false;
946	} finally {
947		// Remove from its parent by default
948		if ( div.parentNode ) {
949			div.parentNode.removeChild( div );
950		}
951		// release memory in IE
952		div = null;
953	}
954}
955
956/**
957 * Adds the same handler for all of the specified attrs
958 * @param {String} attrs Pipe-separated list of attributes
959 * @param {Function} handler The method that will be applied
960 */
961function addHandle( attrs, handler ) {
962	var arr = attrs.split("|"),
963		i = arr.length;
964
965	while ( i-- ) {
966		Expr.attrHandle[ arr[i] ] = handler;
967	}
968}
969
970/**
971 * Checks document order of two siblings
972 * @param {Element} a
973 * @param {Element} b
974 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
975 */
976function siblingCheck( a, b ) {
977	var cur = b && a,
978		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
979			( ~b.sourceIndex || MAX_NEGATIVE ) -
980			( ~a.sourceIndex || MAX_NEGATIVE );
981
982	// Use IE sourceIndex if available on both nodes
983	if ( diff ) {
984		return diff;
985	}
986
987	// Check if b follows a
988	if ( cur ) {
989		while ( (cur = cur.nextSibling) ) {
990			if ( cur === b ) {
991				return -1;
992			}
993		}
994	}
995
996	return a ? 1 : -1;
997}
998
999/**
1000 * Returns a function to use in pseudos for input types
1001 * @param {String} type
1002 */
1003function createInputPseudo( type ) {
1004	return function( elem ) {
1005		var name = elem.nodeName.toLowerCase();
1006		return name === "input" && elem.type === type;
1007	};
1008}
1009
1010/**
1011 * Returns a function to use in pseudos for buttons
1012 * @param {String} type
1013 */
1014function createButtonPseudo( type ) {
1015	return function( elem ) {
1016		var name = elem.nodeName.toLowerCase();
1017		return (name === "input" || name === "button") && elem.type === type;
1018	};
1019}
1020
1021/**
1022 * Returns a function to use in pseudos for positionals
1023 * @param {Function} fn
1024 */
1025function createPositionalPseudo( fn ) {
1026	return markFunction(function( argument ) {
1027		argument = +argument;
1028		return markFunction(function( seed, matches ) {
1029			var j,
1030				matchIndexes = fn( [], seed.length, argument ),
1031				i = matchIndexes.length;
1032
1033			// Match elements found at the specified indexes
1034			while ( i-- ) {
1035				if ( seed[ (j = matchIndexes[i]) ] ) {
1036					seed[j] = !(matches[j] = seed[j]);
1037				}
1038			}
1039		});
1040	});
1041}
1042
1043/**
1044 * Checks a node for validity as a Sizzle context
1045 * @param {Element|Object=} context
1046 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
1047 */
1048function testContext( context ) {
1049	return context && typeof context.getElementsByTagName !== "undefined" && context;
1050}
1051
1052// Expose support vars for convenience
1053support = Sizzle.support = {};
1054
1055/**
1056 * Detects XML nodes
1057 * @param {Element|Object} elem An element or a document
1058 * @returns {Boolean} True iff elem is a non-HTML XML node
1059 */
1060isXML = Sizzle.isXML = function( elem ) {
1061	// documentElement is verified for cases where it doesn't yet exist
1062	// (such as loading iframes in IE - #4833)
1063	var documentElement = elem && (elem.ownerDocument || elem).documentElement;
1064	return documentElement ? documentElement.nodeName !== "HTML" : false;
1065};
1066
1067/**
1068 * Sets document-related variables once based on the current document
1069 * @param {Element|Object} [doc] An element or document object to use to set the document
1070 * @returns {Object} Returns the current document
1071 */
1072setDocument = Sizzle.setDocument = function( node ) {
1073	var hasCompare, parent,
1074		doc = node ? node.ownerDocument || node : preferredDoc;
1075
1076	// Return early if doc is invalid or already selected
1077	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
1078		return document;
1079	}
1080
1081	// Update global variables
1082	document = doc;
1083	docElem = document.documentElement;
1084	documentIsHTML = !isXML( document );
1085
1086	// Support: IE 9-11, Edge
1087	// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
1088	if ( (parent = document.defaultView) && parent.top !== parent ) {
1089		// Support: IE 11
1090		if ( parent.addEventListener ) {
1091			parent.addEventListener( "unload", unloadHandler, false );
1092
1093		// Support: IE 9 - 10 only
1094		} else if ( parent.attachEvent ) {
1095			parent.attachEvent( "onunload", unloadHandler );
1096		}
1097	}
1098
1099	/* Attributes
1100	---------------------------------------------------------------------- */
1101
1102	// Support: IE<8
1103	// Verify that getAttribute really returns attributes and not properties
1104	// (excepting IE8 booleans)
1105	support.attributes = assert(function( div ) {
1106		div.className = "i";
1107		return !div.getAttribute("className");
1108	});
1109
1110	/* getElement(s)By*
1111	---------------------------------------------------------------------- */
1112
1113	// Check if getElementsByTagName("*") returns only elements
1114	support.getElementsByTagName = assert(function( div ) {
1115		div.appendChild( document.createComment("") );
1116		return !div.getElementsByTagName("*").length;
1117	});
1118
1119	// Support: IE<9
1120	support.getElementsByClassName = rnative.test( document.getElementsByClassName );
1121
1122	// Support: IE<10
1123	// Check if getElementById returns elements by name
1124	// The broken getElementById methods don't pick up programatically-set names,
1125	// so use a roundabout getElementsByName test
1126	support.getById = assert(function( div ) {
1127		docElem.appendChild( div ).id = expando;
1128		return !document.getElementsByName || !document.getElementsByName( expando ).length;
1129	});
1130
1131	// ID find and filter
1132	if ( support.getById ) {
1133		Expr.find["ID"] = function( id, context ) {
1134			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
1135				var m = context.getElementById( id );
1136				return m ? [ m ] : [];
1137			}
1138		};
1139		Expr.filter["ID"] = function( id ) {
1140			var attrId = id.replace( runescape, funescape );
1141			return function( elem ) {
1142				return elem.getAttribute("id") === attrId;
1143			};
1144		};
1145	} else {
1146		// Support: IE6/7
1147		// getElementById is not reliable as a find shortcut
1148		delete Expr.find["ID"];
1149
1150		Expr.filter["ID"] =  function( id ) {
1151			var attrId = id.replace( runescape, funescape );
1152			return function( elem ) {
1153				var node = typeof elem.getAttributeNode !== "undefined" &&
1154					elem.getAttributeNode("id");
1155				return node && node.value === attrId;
1156			};
1157		};
1158	}
1159
1160	// Tag
1161	Expr.find["TAG"] = support.getElementsByTagName ?
1162		function( tag, context ) {
1163			if ( typeof context.getElementsByTagName !== "undefined" ) {
1164				return context.getElementsByTagName( tag );
1165
1166			// DocumentFragment nodes don't have gEBTN
1167			} else if ( support.qsa ) {
1168				return context.querySelectorAll( tag );
1169			}
1170		} :
1171
1172		function( tag, context ) {
1173			var elem,
1174				tmp = [],
1175				i = 0,
1176				// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
1177				results = context.getElementsByTagName( tag );
1178
1179			// Filter out possible comments
1180			if ( tag === "*" ) {
1181				while ( (elem = results[i++]) ) {
1182					if ( elem.nodeType === 1 ) {
1183						tmp.push( elem );
1184					}
1185				}
1186
1187				return tmp;
1188			}
1189			return results;
1190		};
1191
1192	// Class
1193	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
1194		if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
1195			return context.getElementsByClassName( className );
1196		}
1197	};
1198
1199	/* QSA/matchesSelector
1200	---------------------------------------------------------------------- */
1201
1202	// QSA and matchesSelector support
1203
1204	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
1205	rbuggyMatches = [];
1206
1207	// qSa(:focus) reports false when true (Chrome 21)
1208	// We allow this because of a bug in IE8/9 that throws an error
1209	// whenever `document.activeElement` is accessed on an iframe
1210	// So, we allow :focus to pass through QSA all the time to avoid the IE error
1211	// See http://bugs.jquery.com/ticket/13378
1212	rbuggyQSA = [];
1213
1214	if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
1215		// Build QSA regex
1216		// Regex strategy adopted from Diego Perini
1217		assert(function( div ) {
1218			// Select is set to empty string on purpose
1219			// This is to test IE's treatment of not explicitly
1220			// setting a boolean content attribute,
1221			// since its presence should be enough
1222			// http://bugs.jquery.com/ticket/12359
1223			docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
1224				"<select id='" + expando + "-\r\\' msallowcapture=''>" +
1225				"<option selected=''></option></select>";
1226
1227			// Support: IE8, Opera 11-12.16
1228			// Nothing should be selected when empty strings follow ^= or $= or *=
1229			// The test attribute must be unknown in Opera but "safe" for WinRT
1230			// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
1231			if ( div.querySelectorAll("[msallowcapture^='']").length ) {
1232				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
1233			}
1234
1235			// Support: IE8
1236			// Boolean attributes and "value" are not treated correctly
1237			if ( !div.querySelectorAll("[selected]").length ) {
1238				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
1239			}
1240
1241			// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
1242			if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
1243				rbuggyQSA.push("~=");
1244			}
1245
1246			// Webkit/Opera - :checked should return selected option elements
1247			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1248			// IE8 throws error here and will not see later tests
1249			if ( !div.querySelectorAll(":checked").length ) {
1250				rbuggyQSA.push(":checked");
1251			}
1252
1253			// Support: Safari 8+, iOS 8+
1254			// https://bugs.webkit.org/show_bug.cgi?id=136851
1255			// In-page `selector#id sibing-combinator selector` fails
1256			if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
1257				rbuggyQSA.push(".#.+[+~]");
1258			}
1259		});
1260
1261		assert(function( div ) {
1262			// Support: Windows 8 Native Apps
1263			// The type and name attributes are restricted during .innerHTML assignment
1264			var input = document.createElement("input");
1265			input.setAttribute( "type", "hidden" );
1266			div.appendChild( input ).setAttribute( "name", "D" );
1267
1268			// Support: IE8
1269			// Enforce case-sensitivity of name attribute
1270			if ( div.querySelectorAll("[name=d]").length ) {
1271				rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
1272			}
1273
1274			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
1275			// IE8 throws error here and will not see later tests
1276			if ( !div.querySelectorAll(":enabled").length ) {
1277				rbuggyQSA.push( ":enabled", ":disabled" );
1278			}
1279
1280			// Opera 10-11 does not throw on post-comma invalid pseudos
1281			div.querySelectorAll("*,:x");
1282			rbuggyQSA.push(",.*:");
1283		});
1284	}
1285
1286	if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
1287		docElem.webkitMatchesSelector ||
1288		docElem.mozMatchesSelector ||
1289		docElem.oMatchesSelector ||
1290		docElem.msMatchesSelector) )) ) {
1291
1292		assert(function( div ) {
1293			// Check to see if it's possible to do matchesSelector
1294			// on a disconnected node (IE 9)
1295			support.disconnectedMatch = matches.call( div, "div" );
1296
1297			// This should fail with an exception
1298			// Gecko does not error, returns false instead
1299			matches.call( div, "[s!='']:x" );
1300			rbuggyMatches.push( "!=", pseudos );
1301		});
1302	}
1303
1304	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
1305	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
1306
1307	/* Contains
1308	---------------------------------------------------------------------- */
1309	hasCompare = rnative.test( docElem.compareDocumentPosition );
1310
1311	// Element contains another
1312	// Purposefully self-exclusive
1313	// As in, an element does not contain itself
1314	contains = hasCompare || rnative.test( docElem.contains ) ?
1315		function( a, b ) {
1316			var adown = a.nodeType === 9 ? a.documentElement : a,
1317				bup = b && b.parentNode;
1318			return a === bup || !!( bup && bup.nodeType === 1 && (
1319				adown.contains ?
1320					adown.contains( bup ) :
1321					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
1322			));
1323		} :
1324		function( a, b ) {
1325			if ( b ) {
1326				while ( (b = b.parentNode) ) {
1327					if ( b === a ) {
1328						return true;
1329					}
1330				}
1331			}
1332			return false;
1333		};
1334
1335	/* Sorting
1336	---------------------------------------------------------------------- */
1337
1338	// Document order sorting
1339	sortOrder = hasCompare ?
1340	function( a, b ) {
1341
1342		// Flag for duplicate removal
1343		if ( a === b ) {
1344			hasDuplicate = true;
1345			return 0;
1346		}
1347
1348		// Sort on method existence if only one input has compareDocumentPosition
1349		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
1350		if ( compare ) {
1351			return compare;
1352		}
1353
1354		// Calculate position if both inputs belong to the same document
1355		compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
1356			a.compareDocumentPosition( b ) :
1357
1358			// Otherwise we know they are disconnected
1359			1;
1360
1361		// Disconnected nodes
1362		if ( compare & 1 ||
1363			(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
1364
1365			// Choose the first element that is related to our preferred document
1366			if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
1367				return -1;
1368			}
1369			if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
1370				return 1;
1371			}
1372
1373			// Maintain original order
1374			return sortInput ?
1375				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
1376				0;
1377		}
1378
1379		return compare & 4 ? -1 : 1;
1380	} :
1381	function( a, b ) {
1382		// Exit early if the nodes are identical
1383		if ( a === b ) {
1384			hasDuplicate = true;
1385			return 0;
1386		}
1387
1388		var cur,
1389			i = 0,
1390			aup = a.parentNode,
1391			bup = b.parentNode,
1392			ap = [ a ],
1393			bp = [ b ];
1394
1395		// Parentless nodes are either documents or disconnected
1396		if ( !aup || !bup ) {
1397			return a === document ? -1 :
1398				b === document ? 1 :
1399				aup ? -1 :
1400				bup ? 1 :
1401				sortInput ?
1402				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
1403				0;
1404
1405		// If the nodes are siblings, we can do a quick check
1406		} else if ( aup === bup ) {
1407			return siblingCheck( a, b );
1408		}
1409
1410		// Otherwise we need full lists of their ancestors for comparison
1411		cur = a;
1412		while ( (cur = cur.parentNode) ) {
1413			ap.unshift( cur );
1414		}
1415		cur = b;
1416		while ( (cur = cur.parentNode) ) {
1417			bp.unshift( cur );
1418		}
1419
1420		// Walk down the tree looking for a discrepancy
1421		while ( ap[i] === bp[i] ) {
1422			i++;
1423		}
1424
1425		return i ?
1426			// Do a sibling check if the nodes have a common ancestor
1427			siblingCheck( ap[i], bp[i] ) :
1428
1429			// Otherwise nodes in our document sort first
1430			ap[i] === preferredDoc ? -1 :
1431			bp[i] === preferredDoc ? 1 :
1432			0;
1433	};
1434
1435	return document;
1436};
1437
1438Sizzle.matches = function( expr, elements ) {
1439	return Sizzle( expr, null, null, elements );
1440};
1441
1442Sizzle.matchesSelector = function( elem, expr ) {
1443	// Set document vars if needed
1444	if ( ( elem.ownerDocument || elem ) !== document ) {
1445		setDocument( elem );
1446	}
1447
1448	// Make sure that attribute selectors are quoted
1449	expr = expr.replace( rattributeQuotes, "='$1']" );
1450
1451	if ( support.matchesSelector && documentIsHTML &&
1452		!compilerCache[ expr + " " ] &&
1453		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
1454		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
1455
1456		try {
1457			var ret = matches.call( elem, expr );
1458
1459			// IE 9's matchesSelector returns false on disconnected nodes
1460			if ( ret || support.disconnectedMatch ||
1461					// As well, disconnected nodes are said to be in a document
1462					// fragment in IE 9
1463					elem.document && elem.document.nodeType !== 11 ) {
1464				return ret;
1465			}
1466		} catch (e) {}
1467	}
1468
1469	return Sizzle( expr, document, null, [ elem ] ).length > 0;
1470};
1471
1472Sizzle.contains = function( context, elem ) {
1473	// Set document vars if needed
1474	if ( ( context.ownerDocument || context ) !== document ) {
1475		setDocument( context );
1476	}
1477	return contains( context, elem );
1478};
1479
1480Sizzle.attr = function( elem, name ) {
1481	// Set document vars if needed
1482	if ( ( elem.ownerDocument || elem ) !== document ) {
1483		setDocument( elem );
1484	}
1485
1486	var fn = Expr.attrHandle[ name.toLowerCase() ],
1487		// Don't get fooled by Object.prototype properties (jQuery #13807)
1488		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
1489			fn( elem, name, !documentIsHTML ) :
1490			undefined;
1491
1492	return val !== undefined ?
1493		val :
1494		support.attributes || !documentIsHTML ?
1495			elem.getAttribute( name ) :
1496			(val = elem.getAttributeNode(name)) && val.specified ?
1497				val.value :
1498				null;
1499};
1500
1501Sizzle.error = function( msg ) {
1502	throw new Error( "Syntax error, unrecognized expression: " + msg );
1503};
1504
1505/**
1506 * Document sorting and removing duplicates
1507 * @param {ArrayLike} results
1508 */
1509Sizzle.uniqueSort = function( results ) {
1510	var elem,
1511		duplicates = [],
1512		j = 0,
1513		i = 0;
1514
1515	// Unless we *know* we can detect duplicates, assume their presence
1516	hasDuplicate = !support.detectDuplicates;
1517	sortInput = !support.sortStable && results.slice( 0 );
1518	results.sort( sortOrder );
1519
1520	if ( hasDuplicate ) {
1521		while ( (elem = results[i++]) ) {
1522			if ( elem === results[ i ] ) {
1523				j = duplicates.push( i );
1524			}
1525		}
1526		while ( j-- ) {
1527			results.splice( duplicates[ j ], 1 );
1528		}
1529	}
1530
1531	// Clear input after sorting to release objects
1532	// See https://github.com/jquery/sizzle/pull/225
1533	sortInput = null;
1534
1535	return results;
1536};
1537
1538/**
1539 * Utility function for retrieving the text value of an array of DOM nodes
1540 * @param {Array|Element} elem
1541 */
1542getText = Sizzle.getText = function( elem ) {
1543	var node,
1544		ret = "",
1545		i = 0,
1546		nodeType = elem.nodeType;
1547
1548	if ( !nodeType ) {
1549		// If no nodeType, this is expected to be an array
1550		while ( (node = elem[i++]) ) {
1551			// Do not traverse comment nodes
1552			ret += getText( node );
1553		}
1554	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
1555		// Use textContent for elements
1556		// innerText usage removed for consistency of new lines (jQuery #11153)
1557		if ( typeof elem.textContent === "string" ) {
1558			return elem.textContent;
1559		} else {
1560			// Traverse its children
1561			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1562				ret += getText( elem );
1563			}
1564		}
1565	} else if ( nodeType === 3 || nodeType === 4 ) {
1566		return elem.nodeValue;
1567	}
1568	// Do not include comment or processing instruction nodes
1569
1570	return ret;
1571};
1572
1573Expr = Sizzle.selectors = {
1574
1575	// Can be adjusted by the user
1576	cacheLength: 50,
1577
1578	createPseudo: markFunction,
1579
1580	match: matchExpr,
1581
1582	attrHandle: {},
1583
1584	find: {},
1585
1586	relative: {
1587		">": { dir: "parentNode", first: true },
1588		" ": { dir: "parentNode" },
1589		"+": { dir: "previousSibling", first: true },
1590		"~": { dir: "previousSibling" }
1591	},
1592
1593	preFilter: {
1594		"ATTR": function( match ) {
1595			match[1] = match[1].replace( runescape, funescape );
1596
1597			// Move the given value to match[3] whether quoted or unquoted
1598			match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
1599
1600			if ( match[2] === "~=" ) {
1601				match[3] = " " + match[3] + " ";
1602			}
1603
1604			return match.slice( 0, 4 );
1605		},
1606
1607		"CHILD": function( match ) {
1608			/* matches from matchExpr["CHILD"]
1609				1 type (only|nth|...)
1610				2 what (child|of-type)
1611				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1612				4 xn-component of xn+y argument ([+-]?\d*n|)
1613				5 sign of xn-component
1614				6 x of xn-component
1615				7 sign of y-component
1616				8 y of y-component
1617			*/
1618			match[1] = match[1].toLowerCase();
1619
1620			if ( match[1].slice( 0, 3 ) === "nth" ) {
1621				// nth-* requires argument
1622				if ( !match[3] ) {
1623					Sizzle.error( match[0] );
1624				}
1625
1626				// numeric x and y parameters for Expr.filter.CHILD
1627				// remember that false/true cast respectively to 0/1
1628				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
1629				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
1630
1631			// other types prohibit arguments
1632			} else if ( match[3] ) {
1633				Sizzle.error( match[0] );
1634			}
1635
1636			return match;
1637		},
1638
1639		"PSEUDO": function( match ) {
1640			var excess,
1641				unquoted = !match[6] && match[2];
1642
1643			if ( matchExpr["CHILD"].test( match[0] ) ) {
1644				return null;
1645			}
1646
1647			// Accept quoted arguments as-is
1648			if ( match[3] ) {
1649				match[2] = match[4] || match[5] || "";
1650
1651			// Strip excess characters from unquoted arguments
1652			} else if ( unquoted && rpseudo.test( unquoted ) &&
1653				// Get excess from tokenize (recursively)
1654				(excess = tokenize( unquoted, true )) &&
1655				// advance to the next closing parenthesis
1656				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
1657
1658				// excess is a negative index
1659				match[0] = match[0].slice( 0, excess );
1660				match[2] = unquoted.slice( 0, excess );
1661			}
1662
1663			// Return only captures needed by the pseudo filter method (type and argument)
1664			return match.slice( 0, 3 );
1665		}
1666	},
1667
1668	filter: {
1669
1670		"TAG": function( nodeNameSelector ) {
1671			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
1672			return nodeNameSelector === "*" ?
1673				function() { return true; } :
1674				function( elem ) {
1675					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
1676				};
1677		},
1678
1679		"CLASS": function( className ) {
1680			var pattern = classCache[ className + " " ];
1681
1682			return pattern ||
1683				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
1684				classCache( className, function( elem ) {
1685					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
1686				});
1687		},
1688
1689		"ATTR": function( name, operator, check ) {
1690			return function( elem ) {
1691				var result = Sizzle.attr( elem, name );
1692
1693				if ( result == null ) {
1694					return operator === "!=";
1695				}
1696				if ( !operator ) {
1697					return true;
1698				}
1699
1700				result += "";
1701
1702				return operator === "=" ? result === check :
1703					operator === "!=" ? result !== check :
1704					operator === "^=" ? check && result.indexOf( check ) === 0 :
1705					operator === "*=" ? check && result.indexOf( check ) > -1 :
1706					operator === "$=" ? check && result.slice( -check.length ) === check :
1707					operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
1708					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
1709					false;
1710			};
1711		},
1712
1713		"CHILD": function( type, what, argument, first, last ) {
1714			var simple = type.slice( 0, 3 ) !== "nth",
1715				forward = type.slice( -4 ) !== "last",
1716				ofType = what === "of-type";
1717
1718			return first === 1 && last === 0 ?
1719
1720				// Shortcut for :nth-*(n)
1721				function( elem ) {
1722					return !!elem.parentNode;
1723				} :
1724
1725				function( elem, context, xml ) {
1726					var cache, uniqueCache, outerCache, node, nodeIndex, start,
1727						dir = simple !== forward ? "nextSibling" : "previousSibling",
1728						parent = elem.parentNode,
1729						name = ofType && elem.nodeName.toLowerCase(),
1730						useCache = !xml && !ofType,
1731						diff = false;
1732
1733					if ( parent ) {
1734
1735						// :(first|last|only)-(child|of-type)
1736						if ( simple ) {
1737							while ( dir ) {
1738								node = elem;
1739								while ( (node = node[ dir ]) ) {
1740									if ( ofType ?
1741										node.nodeName.toLowerCase() === name :
1742										node.nodeType === 1 ) {
1743
1744										return false;
1745									}
1746								}
1747								// Reverse direction for :only-* (if we haven't yet done so)
1748								start = dir = type === "only" && !start && "nextSibling";
1749							}
1750							return true;
1751						}
1752
1753						start = [ forward ? parent.firstChild : parent.lastChild ];
1754
1755						// non-xml :nth-child(...) stores cache data on `parent`
1756						if ( forward && useCache ) {
1757
1758							// Seek `elem` from a previously-cached index
1759
1760							// ...in a gzip-friendly way
1761							node = parent;
1762							outerCache = node[ expando ] || (node[ expando ] = {});
1763
1764							// Support: IE <9 only
1765							// Defend against cloned attroperties (jQuery gh-1709)
1766							uniqueCache = outerCache[ node.uniqueID ] ||
1767								(outerCache[ node.uniqueID ] = {});
1768
1769							cache = uniqueCache[ type ] || [];
1770							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
1771							diff = nodeIndex && cache[ 2 ];
1772							node = nodeIndex && parent.childNodes[ nodeIndex ];
1773
1774							while ( (node = ++nodeIndex && node && node[ dir ] ||
1775
1776								// Fallback to seeking `elem` from the start
1777								(diff = nodeIndex = 0) || start.pop()) ) {
1778
1779								// When found, cache indexes on `parent` and break
1780								if ( node.nodeType === 1 && ++diff && node === elem ) {
1781									uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
1782									break;
1783								}
1784							}
1785
1786						} else {
1787							// Use previously-cached element index if available
1788							if ( useCache ) {
1789								// ...in a gzip-friendly way
1790								node = elem;
1791								outerCache = node[ expando ] || (node[ expando ] = {});
1792
1793								// Support: IE <9 only
1794								// Defend against cloned attroperties (jQuery gh-1709)
1795								uniqueCache = outerCache[ node.uniqueID ] ||
1796									(outerCache[ node.uniqueID ] = {});
1797
1798								cache = uniqueCache[ type ] || [];
1799								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
1800								diff = nodeIndex;
1801							}
1802
1803							// xml :nth-child(...)
1804							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
1805							if ( diff === false ) {
1806								// Use the same loop as above to seek `elem` from the start
1807								while ( (node = ++nodeIndex && node && node[ dir ] ||
1808									(diff = nodeIndex = 0) || start.pop()) ) {
1809
1810									if ( ( ofType ?
1811										node.nodeName.toLowerCase() === name :
1812										node.nodeType === 1 ) &&
1813										++diff ) {
1814
1815										// Cache the index of each encountered element
1816										if ( useCache ) {
1817											outerCache = node[ expando ] || (node[ expando ] = {});
1818
1819											// Support: IE <9 only
1820											// Defend against cloned attroperties (jQuery gh-1709)
1821											uniqueCache = outerCache[ node.uniqueID ] ||
1822												(outerCache[ node.uniqueID ] = {});
1823
1824											uniqueCache[ type ] = [ dirruns, diff ];
1825										}
1826
1827										if ( node === elem ) {
1828											break;
1829										}
1830									}
1831								}
1832							}
1833						}
1834
1835						// Incorporate the offset, then check against cycle size
1836						diff -= last;
1837						return diff === first || ( diff % first === 0 && diff / first >= 0 );
1838					}
1839				};
1840		},
1841
1842		"PSEUDO": function( pseudo, argument ) {
1843			// pseudo-class names are case-insensitive
1844			// http://www.w3.org/TR/selectors/#pseudo-classes
1845			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
1846			// Remember that setFilters inherits from pseudos
1847			var args,
1848				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
1849					Sizzle.error( "unsupported pseudo: " + pseudo );
1850
1851			// The user may use createPseudo to indicate that
1852			// arguments are needed to create the filter function
1853			// just as Sizzle does
1854			if ( fn[ expando ] ) {
1855				return fn( argument );
1856			}
1857
1858			// But maintain support for old signatures
1859			if ( fn.length > 1 ) {
1860				args = [ pseudo, pseudo, "", argument ];
1861				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
1862					markFunction(function( seed, matches ) {
1863						var idx,
1864							matched = fn( seed, argument ),
1865							i = matched.length;
1866						while ( i-- ) {
1867							idx = indexOf( seed, matched[i] );
1868							seed[ idx ] = !( matches[ idx ] = matched[i] );
1869						}
1870					}) :
1871					function( elem ) {
1872						return fn( elem, 0, args );
1873					};
1874			}
1875
1876			return fn;
1877		}
1878	},
1879
1880	pseudos: {
1881		// Potentially complex pseudos
1882		"not": markFunction(function( selector ) {
1883			// Trim the selector passed to compile
1884			// to avoid treating leading and trailing
1885			// spaces as combinators
1886			var input = [],
1887				results = [],
1888				matcher = compile( selector.replace( rtrim, "$1" ) );
1889
1890			return matcher[ expando ] ?
1891				markFunction(function( seed, matches, context, xml ) {
1892					var elem,
1893						unmatched = matcher( seed, null, xml, [] ),
1894						i = seed.length;
1895
1896					// Match elements unmatched by `matcher`
1897					while ( i-- ) {
1898						if ( (elem = unmatched[i]) ) {
1899							seed[i] = !(matches[i] = elem);
1900						}
1901					}
1902				}) :
1903				function( elem, context, xml ) {
1904					input[0] = elem;
1905					matcher( input, null, xml, results );
1906					// Don't keep the element (issue #299)
1907					input[0] = null;
1908					return !results.pop();
1909				};
1910		}),
1911
1912		"has": markFunction(function( selector ) {
1913			return function( elem ) {
1914				return Sizzle( selector, elem ).length > 0;
1915			};
1916		}),
1917
1918		"contains": markFunction(function( text ) {
1919			text = text.replace( runescape, funescape );
1920			return function( elem ) {
1921				return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
1922			};
1923		}),
1924
1925		// "Whether an element is represented by a :lang() selector
1926		// is based solely on the element's language value
1927		// being equal to the identifier C,
1928		// or beginning with the identifier C immediately followed by "-".
1929		// The matching of C against the element's language value is performed case-insensitively.
1930		// The identifier C does not have to be a valid language name."
1931		// http://www.w3.org/TR/selectors/#lang-pseudo
1932		"lang": markFunction( function( lang ) {
1933			// lang value must be a valid identifier
1934			if ( !ridentifier.test(lang || "") ) {
1935				Sizzle.error( "unsupported lang: " + lang );
1936			}
1937			lang = lang.replace( runescape, funescape ).toLowerCase();
1938			return function( elem ) {
1939				var elemLang;
1940				do {
1941					if ( (elemLang = documentIsHTML ?
1942						elem.lang :
1943						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
1944
1945						elemLang = elemLang.toLowerCase();
1946						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
1947					}
1948				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
1949				return false;
1950			};
1951		}),
1952
1953		// Miscellaneous
1954		"target": function( elem ) {
1955			var hash = window.location && window.location.hash;
1956			return hash && hash.slice( 1 ) === elem.id;
1957		},
1958
1959		"root": function( elem ) {
1960			return elem === docElem;
1961		},
1962
1963		"focus": function( elem ) {
1964			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
1965		},
1966
1967		// Boolean properties
1968		"enabled": function( elem ) {
1969			return elem.disabled === false;
1970		},
1971
1972		"disabled": function( elem ) {
1973			return elem.disabled === true;
1974		},
1975
1976		"checked": function( elem ) {
1977			// In CSS3, :checked should return both checked and selected elements
1978			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1979			var nodeName = elem.nodeName.toLowerCase();
1980			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
1981		},
1982
1983		"selected": function( elem ) {
1984			// Accessing this property makes selected-by-default
1985			// options in Safari work properly
1986			if ( elem.parentNode ) {
1987				elem.parentNode.selectedIndex;
1988			}
1989
1990			return elem.selected === true;
1991		},
1992
1993		// Contents
1994		"empty": function( elem ) {
1995			// http://www.w3.org/TR/selectors/#empty-pseudo
1996			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
1997			//   but not by others (comment: 8; processing instruction: 7; etc.)
1998			// nodeType < 6 works because attributes (2) do not appear as children
1999			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
2000				if ( elem.nodeType < 6 ) {
2001					return false;
2002				}
2003			}
2004			return true;
2005		},
2006
2007		"parent": function( elem ) {
2008			return !Expr.pseudos["empty"]( elem );
2009		},
2010
2011		// Element/input types
2012		"header": function( elem ) {
2013			return rheader.test( elem.nodeName );
2014		},
2015
2016		"input": function( elem ) {
2017			return rinputs.test( elem.nodeName );
2018		},
2019
2020		"button": function( elem ) {
2021			var name = elem.nodeName.toLowerCase();
2022			return name === "input" && elem.type === "button" || name === "button";
2023		},
2024
2025		"text": function( elem ) {
2026			var attr;
2027			return elem.nodeName.toLowerCase() === "input" &&
2028				elem.type === "text" &&
2029
2030				// Support: IE<8
2031				// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
2032				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
2033		},
2034
2035		// Position-in-collection
2036		"first": createPositionalPseudo(function() {
2037			return [ 0 ];
2038		}),
2039
2040		"last": createPositionalPseudo(function( matchIndexes, length ) {
2041			return [ length - 1 ];
2042		}),
2043
2044		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
2045			return [ argument < 0 ? argument + length : argument ];
2046		}),
2047
2048		"even": createPositionalPseudo(function( matchIndexes, length ) {
2049			var i = 0;
2050			for ( ; i < length; i += 2 ) {
2051				matchIndexes.push( i );
2052			}
2053			return matchIndexes;
2054		}),
2055
2056		"odd": createPositionalPseudo(function( matchIndexes, length ) {
2057			var i = 1;
2058			for ( ; i < length; i += 2 ) {
2059				matchIndexes.push( i );
2060			}
2061			return matchIndexes;
2062		}),
2063
2064		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
2065			var i = argument < 0 ? argument + length : argument;
2066			for ( ; --i >= 0; ) {
2067				matchIndexes.push( i );
2068			}
2069			return matchIndexes;
2070		}),
2071
2072		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
2073			var i = argument < 0 ? argument + length : argument;
2074			for ( ; ++i < length; ) {
2075				matchIndexes.push( i );
2076			}
2077			return matchIndexes;
2078		})
2079	}
2080};
2081
2082Expr.pseudos["nth"] = Expr.pseudos["eq"];
2083
2084// Add button/input type pseudos
2085for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
2086	Expr.pseudos[ i ] = createInputPseudo( i );
2087}
2088for ( i in { submit: true, reset: true } ) {
2089	Expr.pseudos[ i ] = createButtonPseudo( i );
2090}
2091
2092// Easy API for creating new setFilters
2093function setFilters() {}
2094setFilters.prototype = Expr.filters = Expr.pseudos;
2095Expr.setFilters = new setFilters();
2096
2097tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
2098	var matched, match, tokens, type,
2099		soFar, groups, preFilters,
2100		cached = tokenCache[ selector + " " ];
2101
2102	if ( cached ) {
2103		return parseOnly ? 0 : cached.slice( 0 );
2104	}
2105
2106	soFar = selector;
2107	groups = [];
2108	preFilters = Expr.preFilter;
2109
2110	while ( soFar ) {
2111
2112		// Comma and first run
2113		if ( !matched || (match = rcomma.exec( soFar )) ) {
2114			if ( match ) {
2115				// Don't consume trailing commas as valid
2116				soFar = soFar.slice( match[0].length ) || soFar;
2117			}
2118			groups.push( (tokens = []) );
2119		}
2120
2121		matched = false;
2122
2123		// Combinators
2124		if ( (match = rcombinators.exec( soFar )) ) {
2125			matched = match.shift();
2126			tokens.push({
2127				value: matched,
2128				// Cast descendant combinators to space
2129				type: match[0].replace( rtrim, " " )
2130			});
2131			soFar = soFar.slice( matched.length );
2132		}
2133
2134		// Filters
2135		for ( type in Expr.filter ) {
2136			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
2137				(match = preFilters[ type ]( match ))) ) {
2138				matched = match.shift();
2139				tokens.push({
2140					value: matched,
2141					type: type,
2142					matches: match
2143				});
2144				soFar = soFar.slice( matched.length );
2145			}
2146		}
2147
2148		if ( !matched ) {
2149			break;
2150		}
2151	}
2152
2153	// Return the length of the invalid excess
2154	// if we're just parsing
2155	// Otherwise, throw an error or return tokens
2156	return parseOnly ?
2157		soFar.length :
2158		soFar ?
2159			Sizzle.error( selector ) :
2160			// Cache the tokens
2161			tokenCache( selector, groups ).slice( 0 );
2162};
2163
2164function toSelector( tokens ) {
2165	var i = 0,
2166		len = tokens.length,
2167		selector = "";
2168	for ( ; i < len; i++ ) {
2169		selector += tokens[i].value;
2170	}
2171	return selector;
2172}
2173
2174function addCombinator( matcher, combinator, base ) {
2175	var dir = combinator.dir,
2176		checkNonElements = base && dir === "parentNode",
2177		doneName = done++;
2178
2179	return combinator.first ?
2180		// Check against closest ancestor/preceding element
2181		function( elem, context, xml ) {
2182			while ( (elem = elem[ dir ]) ) {
2183				if ( elem.nodeType === 1 || checkNonElements ) {
2184					return matcher( elem, context, xml );
2185				}
2186			}
2187		} :
2188
2189		// Check against all ancestor/preceding elements
2190		function( elem, context, xml ) {
2191			var oldCache, uniqueCache, outerCache,
2192				newCache = [ dirruns, doneName ];
2193
2194			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
2195			if ( xml ) {
2196				while ( (elem = elem[ dir ]) ) {
2197					if ( elem.nodeType === 1 || checkNonElements ) {
2198						if ( matcher( elem, context, xml ) ) {
2199							return true;
2200						}
2201					}
2202				}
2203			} else {
2204				while ( (elem = elem[ dir ]) ) {
2205					if ( elem.nodeType === 1 || checkNonElements ) {
2206						outerCache = elem[ expando ] || (elem[ expando ] = {});
2207
2208						// Support: IE <9 only
2209						// Defend against cloned attroperties (jQuery gh-1709)
2210						uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
2211
2212						if ( (oldCache = uniqueCache[ dir ]) &&
2213							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
2214
2215							// Assign to newCache so results back-propagate to previous elements
2216							return (newCache[ 2 ] = oldCache[ 2 ]);
2217						} else {
2218							// Reuse newcache so results back-propagate to previous elements
2219							uniqueCache[ dir ] = newCache;
2220
2221							// A match means we're done; a fail means we have to keep checking
2222							if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
2223								return true;
2224							}
2225						}
2226					}
2227				}
2228			}
2229		};
2230}
2231
2232function elementMatcher( matchers ) {
2233	return matchers.length > 1 ?
2234		function( elem, context, xml ) {
2235			var i = matchers.length;
2236			while ( i-- ) {
2237				if ( !matchers[i]( elem, context, xml ) ) {
2238					return false;
2239				}
2240			}
2241			return true;
2242		} :
2243		matchers[0];
2244}
2245
2246function multipleContexts( selector, contexts, results ) {
2247	var i = 0,
2248		len = contexts.length;
2249	for ( ; i < len; i++ ) {
2250		Sizzle( selector, contexts[i], results );
2251	}
2252	return results;
2253}
2254
2255function condense( unmatched, map, filter, context, xml ) {
2256	var elem,
2257		newUnmatched = [],
2258		i = 0,
2259		len = unmatched.length,
2260		mapped = map != null;
2261
2262	for ( ; i < len; i++ ) {
2263		if ( (elem = unmatched[i]) ) {
2264			if ( !filter || filter( elem, context, xml ) ) {
2265				newUnmatched.push( elem );
2266				if ( mapped ) {
2267					map.push( i );
2268				}
2269			}
2270		}
2271	}
2272
2273	return newUnmatched;
2274}
2275
2276function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
2277	if ( postFilter && !postFilter[ expando ] ) {
2278		postFilter = setMatcher( postFilter );
2279	}
2280	if ( postFinder && !postFinder[ expando ] ) {
2281		postFinder = setMatcher( postFinder, postSelector );
2282	}
2283	return markFunction(function( seed, results, context, xml ) {
2284		var temp, i, elem,
2285			preMap = [],
2286			postMap = [],
2287			preexisting = results.length,
2288
2289			// Get initial elements from seed or context
2290			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
2291
2292			// Prefilter to get matcher input, preserving a map for seed-results synchronization
2293			matcherIn = preFilter && ( seed || !selector ) ?
2294				condense( elems, preMap, preFilter, context, xml ) :
2295				elems,
2296
2297			matcherOut = matcher ?
2298				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
2299				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
2300
2301					// ...intermediate processing is necessary
2302					[] :
2303
2304					// ...otherwise use results directly
2305					results :
2306				matcherIn;
2307
2308		// Find primary matches
2309		if ( matcher ) {
2310			matcher( matcherIn, matcherOut, context, xml );
2311		}
2312
2313		// Apply postFilter
2314		if ( postFilter ) {
2315			temp = condense( matcherOut, postMap );
2316			postFilter( temp, [], context, xml );
2317
2318			// Un-match failing elements by moving them back to matcherIn
2319			i = temp.length;
2320			while ( i-- ) {
2321				if ( (elem = temp[i]) ) {
2322					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
2323				}
2324			}
2325		}
2326
2327		if ( seed ) {
2328			if ( postFinder || preFilter ) {
2329				if ( postFinder ) {
2330					// Get the final matcherOut by condensing this intermediate into postFinder contexts
2331					temp = [];
2332					i = matcherOut.length;
2333					while ( i-- ) {
2334						if ( (elem = matcherOut[i]) ) {
2335							// Restore matcherIn since elem is not yet a final match
2336							temp.push( (matcherIn[i] = elem) );
2337						}
2338					}
2339					postFinder( null, (matcherOut = []), temp, xml );
2340				}
2341
2342				// Move matched elements from seed to results to keep them synchronized
2343				i = matcherOut.length;
2344				while ( i-- ) {
2345					if ( (elem = matcherOut[i]) &&
2346						(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
2347
2348						seed[temp] = !(results[temp] = elem);
2349					}
2350				}
2351			}
2352
2353		// Add elements to results, through postFinder if defined
2354		} else {
2355			matcherOut = condense(
2356				matcherOut === results ?
2357					matcherOut.splice( preexisting, matcherOut.length ) :
2358					matcherOut
2359			);
2360			if ( postFinder ) {
2361				postFinder( null, results, matcherOut, xml );
2362			} else {
2363				push.apply( results, matcherOut );
2364			}
2365		}
2366	});
2367}
2368
2369function matcherFromTokens( tokens ) {
2370	var checkContext, matcher, j,
2371		len = tokens.length,
2372		leadingRelative = Expr.relative[ tokens[0].type ],
2373		implicitRelative = leadingRelative || Expr.relative[" "],
2374		i = leadingRelative ? 1 : 0,
2375
2376		// The foundational matcher ensures that elements are reachable from top-level context(s)
2377		matchContext = addCombinator( function( elem ) {
2378			return elem === checkContext;
2379		}, implicitRelative, true ),
2380		matchAnyContext = addCombinator( function( elem ) {
2381			return indexOf( checkContext, elem ) > -1;
2382		}, implicitRelative, true ),
2383		matchers = [ function( elem, context, xml ) {
2384			var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
2385				(checkContext = context).nodeType ?
2386					matchContext( elem, context, xml ) :
2387					matchAnyContext( elem, context, xml ) );
2388			// Avoid hanging onto element (issue #299)
2389			checkContext = null;
2390			return ret;
2391		} ];
2392
2393	for ( ; i < len; i++ ) {
2394		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
2395			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
2396		} else {
2397			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
2398
2399			// Return special upon seeing a positional matcher
2400			if ( matcher[ expando ] ) {
2401				// Find the next relative operator (if any) for proper handling
2402				j = ++i;
2403				for ( ; j < len; j++ ) {
2404					if ( Expr.relative[ tokens[j].type ] ) {
2405						break;
2406					}
2407				}
2408				return setMatcher(
2409					i > 1 && elementMatcher( matchers ),
2410					i > 1 && toSelector(
2411						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
2412						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
2413					).replace( rtrim, "$1" ),
2414					matcher,
2415					i < j && matcherFromTokens( tokens.slice( i, j ) ),
2416					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
2417					j < len && toSelector( tokens )
2418				);
2419			}
2420			matchers.push( matcher );
2421		}
2422	}
2423
2424	return elementMatcher( matchers );
2425}
2426
2427function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
2428	var bySet = setMatchers.length > 0,
2429		byElement = elementMatchers.length > 0,
2430		superMatcher = function( seed, context, xml, results, outermost ) {
2431			var elem, j, matcher,
2432				matchedCount = 0,
2433				i = "0",
2434				unmatched = seed && [],
2435				setMatched = [],
2436				contextBackup = outermostContext,
2437				// We must always have either seed elements or outermost context
2438				elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
2439				// Use integer dirruns iff this is the outermost matcher
2440				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
2441				len = elems.length;
2442
2443			if ( outermost ) {
2444				outermostContext = context === document || context || outermost;
2445			}
2446
2447			// Add elements passing elementMatchers directly to results
2448			// Support: IE<9, Safari
2449			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
2450			for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
2451				if ( byElement && elem ) {
2452					j = 0;
2453					if ( !context && elem.ownerDocument !== document ) {
2454						setDocument( elem );
2455						xml = !documentIsHTML;
2456					}
2457					while ( (matcher = elementMatchers[j++]) ) {
2458						if ( matcher( elem, context || document, xml) ) {
2459							results.push( elem );
2460							break;
2461						}
2462					}
2463					if ( outermost ) {
2464						dirruns = dirrunsUnique;
2465					}
2466				}
2467
2468				// Track unmatched elements for set filters
2469				if ( bySet ) {
2470					// They will have gone through all possible matchers
2471					if ( (elem = !matcher && elem) ) {
2472						matchedCount--;
2473					}
2474
2475					// Lengthen the array for every element, matched or not
2476					if ( seed ) {
2477						unmatched.push( elem );
2478					}
2479				}
2480			}
2481
2482			// `i` is now the count of elements visited above, and adding it to `matchedCount`
2483			// makes the latter nonnegative.
2484			matchedCount += i;
2485
2486			// Apply set filters to unmatched elements
2487			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
2488			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
2489			// no element matchers and no seed.
2490			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
2491			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
2492			// numerically zero.
2493			if ( bySet && i !== matchedCount ) {
2494				j = 0;
2495				while ( (matcher = setMatchers[j++]) ) {
2496					matcher( unmatched, setMatched, context, xml );
2497				}
2498
2499				if ( seed ) {
2500					// Reintegrate element matches to eliminate the need for sorting
2501					if ( matchedCount > 0 ) {
2502						while ( i-- ) {
2503							if ( !(unmatched[i] || setMatched[i]) ) {
2504								setMatched[i] = pop.call( results );
2505							}
2506						}
2507					}
2508
2509					// Discard index placeholder values to get only actual matches
2510					setMatched = condense( setMatched );
2511				}
2512
2513				// Add matches to results
2514				push.apply( results, setMatched );
2515
2516				// Seedless set matches succeeding multiple successful matchers stipulate sorting
2517				if ( outermost && !seed && setMatched.length > 0 &&
2518					( matchedCount + setMatchers.length ) > 1 ) {
2519
2520					Sizzle.uniqueSort( results );
2521				}
2522			}
2523
2524			// Override manipulation of globals by nested matchers
2525			if ( outermost ) {
2526				dirruns = dirrunsUnique;
2527				outermostContext = contextBackup;
2528			}
2529
2530			return unmatched;
2531		};
2532
2533	return bySet ?
2534		markFunction( superMatcher ) :
2535		superMatcher;
2536}
2537
2538compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
2539	var i,
2540		setMatchers = [],
2541		elementMatchers = [],
2542		cached = compilerCache[ selector + " " ];
2543
2544	if ( !cached ) {
2545		// Generate a function of recursive functions that can be used to check each element
2546		if ( !match ) {
2547			match = tokenize( selector );
2548		}
2549		i = match.length;
2550		while ( i-- ) {
2551			cached = matcherFromTokens( match[i] );
2552			if ( cached[ expando ] ) {
2553				setMatchers.push( cached );
2554			} else {
2555				elementMatchers.push( cached );
2556			}
2557		}
2558
2559		// Cache the compiled function
2560		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
2561
2562		// Save selector and tokenization
2563		cached.selector = selector;
2564	}
2565	return cached;
2566};
2567
2568/**
2569 * A low-level selection function that works with Sizzle's compiled
2570 *  selector functions
2571 * @param {String|Function} selector A selector or a pre-compiled
2572 *  selector function built with Sizzle.compile
2573 * @param {Element} context
2574 * @param {Array} [results]
2575 * @param {Array} [seed] A set of elements to match against
2576 */
2577select = Sizzle.select = function( selector, context, results, seed ) {
2578	var i, tokens, token, type, find,
2579		compiled = typeof selector === "function" && selector,
2580		match = !seed && tokenize( (selector = compiled.selector || selector) );
2581
2582	results = results || [];
2583
2584	// Try to minimize operations if there is only one selector in the list and no seed
2585	// (the latter of which guarantees us context)
2586	if ( match.length === 1 ) {
2587
2588		// Reduce context if the leading compound selector is an ID
2589		tokens = match[0] = match[0].slice( 0 );
2590		if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
2591				support.getById && context.nodeType === 9 && documentIsHTML &&
2592				Expr.relative[ tokens[1].type ] ) {
2593
2594			context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
2595			if ( !context ) {
2596				return results;
2597
2598			// Precompiled matchers will still verify ancestry, so step up a level
2599			} else if ( compiled ) {
2600				context = context.parentNode;
2601			}
2602
2603			selector = selector.slice( tokens.shift().value.length );
2604		}
2605
2606		// Fetch a seed set for right-to-left matching
2607		i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
2608		while ( i-- ) {
2609			token = tokens[i];
2610
2611			// Abort if we hit a combinator
2612			if ( Expr.relative[ (type = token.type) ] ) {
2613				break;
2614			}
2615			if ( (find = Expr.find[ type ]) ) {
2616				// Search, expanding context for leading sibling combinators
2617				if ( (seed = find(
2618					token.matches[0].replace( runescape, funescape ),
2619					rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
2620				)) ) {
2621
2622					// If seed is empty or no tokens remain, we can return early
2623					tokens.splice( i, 1 );
2624					selector = seed.length && toSelector( tokens );
2625					if ( !selector ) {
2626						push.apply( results, seed );
2627						return results;
2628					}
2629
2630					break;
2631				}
2632			}
2633		}
2634	}
2635
2636	// Compile and execute a filtering function if one is not provided
2637	// Provide `match` to avoid retokenization if we modified the selector above
2638	( compiled || compile( selector, match ) )(
2639		seed,
2640		context,
2641		!documentIsHTML,
2642		results,
2643		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
2644	);
2645	return results;
2646};
2647
2648// One-time assignments
2649
2650// Sort stability
2651support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
2652
2653// Support: Chrome 14-35+
2654// Always assume duplicates if they aren't passed to the comparison function
2655support.detectDuplicates = !!hasDuplicate;
2656
2657// Initialize against the default document
2658setDocument();
2659
2660// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2661// Detached nodes confoundingly follow *each other*
2662support.sortDetached = assert(function( div1 ) {
2663	// Should return 1, but returns 4 (following)
2664	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
2665});
2666
2667// Support: IE<8
2668// Prevent attribute/property "interpolation"
2669// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2670if ( !assert(function( div ) {
2671	div.innerHTML = "<a href='#'></a>";
2672	return div.firstChild.getAttribute("href") === "#" ;
2673}) ) {
2674	addHandle( "type|href|height|width", function( elem, name, isXML ) {
2675		if ( !isXML ) {
2676			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
2677		}
2678	});
2679}
2680
2681// Support: IE<9
2682// Use defaultValue in place of getAttribute("value")
2683if ( !support.attributes || !assert(function( div ) {
2684	div.innerHTML = "<input/>";
2685	div.firstChild.setAttribute( "value", "" );
2686	return div.firstChild.getAttribute( "value" ) === "";
2687}) ) {
2688	addHandle( "value", function( elem, name, isXML ) {
2689		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
2690			return elem.defaultValue;
2691		}
2692	});
2693}
2694
2695// Support: IE<9
2696// Use getAttributeNode to fetch booleans when getAttribute lies
2697if ( !assert(function( div ) {
2698	return div.getAttribute("disabled") == null;
2699}) ) {
2700	addHandle( booleans, function( elem, name, isXML ) {
2701		var val;
2702		if ( !isXML ) {
2703			return elem[ name ] === true ? name.toLowerCase() :
2704					(val = elem.getAttributeNode( name )) && val.specified ?
2705					val.value :
2706				null;
2707		}
2708	});
2709}
2710
2711return Sizzle;
2712
2713})( window );
2714
2715
2716
2717jQuery.find = Sizzle;
2718jQuery.expr = Sizzle.selectors;
2719jQuery.expr[ ":" ] = jQuery.expr.pseudos;
2720jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
2721jQuery.text = Sizzle.getText;
2722jQuery.isXMLDoc = Sizzle.isXML;
2723jQuery.contains = Sizzle.contains;
2724
2725
2726
2727var dir = function( elem, dir, until ) {
2728	var matched = [],
2729		truncate = until !== undefined;
2730
2731	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
2732		if ( elem.nodeType === 1 ) {
2733			if ( truncate && jQuery( elem ).is( until ) ) {
2734				break;
2735			}
2736			matched.push( elem );
2737		}
2738	}
2739	return matched;
2740};
2741
2742
2743var siblings = function( n, elem ) {
2744	var matched = [];
2745
2746	for ( ; n; n = n.nextSibling ) {
2747		if ( n.nodeType === 1 && n !== elem ) {
2748			matched.push( n );
2749		}
2750	}
2751
2752	return matched;
2753};
2754
2755
2756var rneedsContext = jQuery.expr.match.needsContext;
2757
2758var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
2759
2760
2761
2762var risSimple = /^.[^:#\[\.,]*$/;
2763
2764// Implement the identical functionality for filter and not
2765function winnow( elements, qualifier, not ) {
2766	if ( jQuery.isFunction( qualifier ) ) {
2767		return jQuery.grep( elements, function( elem, i ) {
2768			/* jshint -W018 */
2769			return !!qualifier.call( elem, i, elem ) !== not;
2770		} );
2771
2772	}
2773
2774	if ( qualifier.nodeType ) {
2775		return jQuery.grep( elements, function( elem ) {
2776			return ( elem === qualifier ) !== not;
2777		} );
2778
2779	}
2780
2781	if ( typeof qualifier === "string" ) {
2782		if ( risSimple.test( qualifier ) ) {
2783			return jQuery.filter( qualifier, elements, not );
2784		}
2785
2786		qualifier = jQuery.filter( qualifier, elements );
2787	}
2788
2789	return jQuery.grep( elements, function( elem ) {
2790		return ( 
2790jQuery.inArray( elem, qualifier ) > -1 ) !== not;
2791	} );
2792}
2793
2794jQuery.filter = function( expr, elems, not ) {
2795	var elem = elems[ 0 ];
2796
2797	if ( not ) {
2798		expr = ":not(" + expr + ")";
2799	}
2800
2801	return elems.length === 1 && elem.nodeType === 1 ?
2802		jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
2803		jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
2804			return elem.nodeType === 1;
2805		} ) );
2806};
2807
2808jQuery.fn.extend( {
2809	find: function( selector ) {
2810		var i,
2811			ret = [],
2812			self = this,
2813			len = self.length;
2814
2815		if ( typeof selector !== "string" ) {
vendor: 5,394 bytes, lines 2816-3018
2816			return this.pushStack( jQuery( selector ).filter( function() {
2817				for ( i = 0; i < len; i++ ) {
2818					if ( jQuery.contains( self[ i ], this ) ) {
2819						return true;
2820					}
2821				}
2822			} ) );
2823		}
2824
2825		for ( i = 0; i < len; i++ ) {
2826			jQuery.find( selector, self[ i ], ret );
2827		}
2828
2829		// Needed because $( selector, context ) becomes $( context ).find( selector )
2830		ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
2831		ret.selector = this.selector ? this.selector + " " + selector : selector;
2832		return ret;
2833	},
2834	filter: function( selector ) {
2835		return this.pushStack( winnow( this, selector || [], false ) );
2836	},
2837	not: function( selector ) {
2838		return this.pushStack( winnow( this, selector || [], true ) );
2839	},
2840	is: function( selector ) {
2841		return !!winnow(
2842			this,
2843
2844			// If this is a positional/relative selector, check membership in the returned set
2845			// so $("p:first").is("p:last") won't return true for a doc with two "p".
2846			typeof selector === "string" && rneedsContext.test( selector ) ?
2847				jQuery( selector ) :
2848				selector || [],
2849			false
2850		).length;
2851	}
2852} );
2853
2854
2855// Initialize a jQuery object
2856
2857
2858// A central reference to the root jQuery(document)
2859var rootjQuery,
2860
2861	// A simple way to check for HTML strings
2862	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
2863	// Strict HTML recognition (#11290: must start with <)
2864	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
2865
2866	init = jQuery.fn.init = function( selector, context, root ) {
2867		var match, elem;
2868
2869		// HANDLE: $(""), $(null), $(undefined), $(false)
2870		if ( !selector ) {
2871			return this;
2872		}
2873
2874		// init accepts an alternate rootjQuery
2875		// so migrate can support jQuery.sub (gh-2101)
2876		root = root || rootjQuery;
2877
2878		// Handle HTML strings
2879		if ( typeof selector === "string" ) {
2880			if ( selector.charAt( 0 ) === "<" &&
2881				selector.charAt( selector.length - 1 ) === ">" &&
2882				selector.length >= 3 ) {
2883
2884				// Assume that strings that start and end with <> are HTML and skip the regex check
2885				match = [ null, selector, null ];
2886
2887			} else {
2888				match = rquickExpr.exec( selector );
2889			}
2890
2891			// Match html or make sure no context is specified for #id
2892			if ( match && ( match[ 1 ] || !context ) ) {
2893
2894				// HANDLE: $(html) -> $(array)
2895				if ( match[ 1 ] ) {
2896					context = context instanceof jQuery ? context[ 0 ] : context;
2897
2898					// scripts is true for back-compat
2899					// Intentionally let the error be thrown if parseHTML is not present
2900					jQuery.merge( this, jQuery.parseHTML(
2901						match[ 1 ],
2902						context && context.nodeType ? context.ownerDocument || context : document,
2903						true
2904					) );
2905
2906					// HANDLE: $(html, props)
2907					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
2908						for ( match in context ) {
2909
2910							// Properties of context are called as methods if possible
2911							if ( jQuery.isFunction( this[ match ] ) ) {
2912								this[ match ]( context[ match ] );
2913
2914							// ...and otherwise set as attributes
2915							} else {
2916								this.attr( match, context[ match ] );
2917							}
2918						}
2919					}
2920
2921					return this;
2922
2923				// HANDLE: $(#id)
2924				} else {
2925					elem = document.getElementById( match[ 2 ] );
2926
2927					// Check parentNode to catch when Blackberry 4.6 returns
2928					// nodes that are no longer in the document #6963
2929					if ( elem && elem.parentNode ) {
2930
2931						// Handle the case where IE and Opera return items
2932						// by name instead of ID
2933						if ( elem.id !== match[ 2 ] ) {
2934							return rootjQuery.find( selector );
2935						}
2936
2937						// Otherwise, we inject the element directly into the jQuery object
2938						this.length = 1;
2939						this[ 0 ] = elem;
2940					}
2941
2942					this.context = document;
2943					this.selector = selector;
2944					return this;
2945				}
2946
2947			// HANDLE: $(expr, $(...))
2948			} else if ( !context || context.jquery ) {
2949				return ( context || root ).find( selector );
2950
2951			// HANDLE: $(expr, context)
2952			// (which is just equivalent to: $(context).find(expr)
2953			} else {
2954				return this.constructor( context ).find( selector );
2955			}
2956
2957		// HANDLE: $(DOMElement)
2958		} else if ( selector.nodeType ) {
2959			this.context = this[ 0 ] = selector;
2960			this.length = 1;
2961			return this;
2962
2963		// HANDLE: $(function)
2964		// Shortcut for document ready
2965		} else if ( jQuery.isFunction( selector ) ) {
2966			return typeof root.ready !== "undefined" ?
2967				root.ready( selector ) :
2968
2969				// Execute immediately if ready is not present
2970				selector( jQuery );
2971		}
2972
2973		if ( selector.selector !== undefined ) {
2974			this.selector = selector.selector;
2975			this.context = selector.context;
2976		}
2977
2978		return jQuery.makeArray( selector, this );
2979	};
2980
2981// Give the init function the jQuery prototype for later instantiation
2982init.prototype = jQuery.fn;
2983
2984// Initialize central reference
2985rootjQuery = jQuery( document );
2986
2987
2988var rparentsprev = /^(?:parents|prev(?:Until|All))/,
2989
2990	// methods guaranteed to produce a unique set when starting from a unique set
2991	guaranteedUnique = {
2992		children: true,
2993		contents: true,
2994		next: true,
2995		prev: true
2996	};
2997
2998jQuery.fn.extend( {
2999	has: function( target ) {
3000		var i,
3001			targets = jQuery( target, this ),
3002			len = targets.length;
3003
3004		return this.filter( function() {
3005			for ( i = 0; i < len; i++ ) {
3006				if ( jQuery.contains( this, targets[ i ] ) ) {
3007					return true;
3008				}
3009			}
3010		} );
3011	},
3012
3013	closest: function( selectors, context ) {
3014		var cur,
3015			i = 0,
3016			l = this.length,
3017			matched = [],
3018			pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
vendor: 12,881 bytes, lines 3019-3527
3019				jQuery( selectors, context || this.context ) :
3020				0;
3021
3022		for ( ; i < l; i++ ) {
3023			for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
3024
3025				// Always skip document fragments
3026				if ( cur.nodeType < 11 && ( pos ?
3027					pos.index( cur ) > -1 :
3028
3029					// Don't pass non-elements to Sizzle
3030					cur.nodeType === 1 &&
3031						jQuery.find.matchesSelector( cur, selectors ) ) ) {
3032
3033					matched.push( cur );
3034					break;
3035				}
3036			}
3037		}
3038
3039		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
3040	},
3041
3042	// Determine the position of an element within
3043	// the matched set of elements
3044	index: function( elem ) {
3045
3046		// No argument, return index in parent
3047		if ( !elem ) {
3048			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
3049		}
3050
3051		// index in selector
3052		if ( typeof elem === "string" ) {
3053			return jQuery.inArray( this[ 0 ], jQuery( elem ) );
3054		}
3055
3056		// Locate the position of the desired element
3057		return jQuery.inArray(
3058
3059			// If it receives a jQuery object, the first element is used
3060			elem.jquery ? elem[ 0 ] : elem, this );
3061	},
3062
3063	add: function( selector, context ) {
3064		return this.pushStack(
3065			jQuery.uniqueSort(
3066				jQuery.merge( this.get(), jQuery( selector, context ) )
3067			)
3068		);
3069	},
3070
3071	addBack: function( selector ) {
3072		return this.add( selector == null ?
3073			this.prevObject : this.prevObject.filter( selector )
3074		);
3075	}
3076} );
3077
3078function sibling( cur, dir ) {
3079	do {
3080		cur = cur[ dir ];
3081	} while ( cur && cur.nodeType !== 1 );
3082
3083	return cur;
3084}
3085
3086jQuery.each( {
3087	parent: function( elem ) {
3088		var parent = elem.parentNode;
3089		return parent && parent.nodeType !== 11 ? parent : null;
3090	},
3091	parents: function( elem ) {
3092		return dir( elem, "parentNode" );
3093	},
3094	parentsUntil: function( elem, i, until ) {
3095		return dir( elem, "parentNode", until );
3096	},
3097	next: function( elem ) {
3098		return sibling( elem, "nextSibling" );
3099	},
3100	prev: function( elem ) {
3101		return sibling( elem, "previousSibling" );
3102	},
3103	nextAll: function( elem ) {
3104		return dir( elem, "nextSibling" );
3105	},
3106	prevAll: function( elem ) {
3107		return dir( elem, "previousSibling" );
3108	},
3109	nextUntil: function( elem, i, until ) {
3110		return dir( elem, "nextSibling", until );
3111	},
3112	prevUntil: function( elem, i, until ) {
3113		return dir( elem, "previousSibling", until );
3114	},
3115	siblings: function( elem ) {
3116		return siblings( ( elem.parentNode || {} ).firstChild, elem );
3117	},
3118	children: function( elem ) {
3119		return siblings( elem.firstChild );
3120	},
3121	contents: function( elem ) {
3122		return jQuery.nodeName( elem, "iframe" ) ?
3123			elem.contentDocument || elem.contentWindow.document :
3124			jQuery.merge( [], elem.childNodes );
3125	}
3126}, function( name, fn ) {
3127	jQuery.fn[ name ] = function( until, selector ) {
3128		var ret = jQuery.map( this, fn, until );
3129
3130		if ( name.slice( -5 ) !== "Until" ) {
3131			selector = until;
3132		}
3133
3134		if ( selector && typeof selector === "string" ) {
3135			ret = jQuery.filter( selector, ret );
3136		}
3137
3138		if ( this.length > 1 ) {
3139
3140			// Remove duplicates
3141			if ( !guaranteedUnique[ name ] ) {
3142				ret = jQuery.uniqueSort( ret );
3143			}
3144
3145			// Reverse order for parents* and prev-derivatives
3146			if ( rparentsprev.test( name ) ) {
3147				ret = ret.reverse();
3148			}
3149		}
3150
3151		return this.pushStack( ret );
3152	};
3153} );
3154var rnotwhite = ( /\S+/g );
3155
3156
3157
3158// Convert String-formatted options into Object-formatted ones
3159function createOptions( options ) {
3160	var object = {};
3161	jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
3162		object[ flag ] = true;
3163	} );
3164	return object;
3165}
3166
3167/*
3168 * Create a callback list using the following parameters:
3169 *
3170 *	options: an optional list of space-separated options that will change how
3171 *			the callback list behaves or a more traditional option object
3172 *
3173 * By default a callback list will act like an event callback list and can be
3174 * "fired" multiple times.
3175 *
3176 * Possible options:
3177 *
3178 *	once:			will ensure the callback list can only be fired once (like a Deferred)
3179 *
3180 *	memory:			will keep track of previous values and will call any callback added
3181 *					after the list has been fired right away with the latest "memorized"
3182 *					values (like a Deferred)
3183 *
3184 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
3185 *
3186 *	stopOnFalse:	interrupt callings when a callback returns false
3187 *
3188 */
3189jQuery.Callbacks = function( options ) {
3190
3191	// Convert options from String-formatted to Object-formatted if needed
3192	// (we check in cache first)
3193	options = typeof options === "string" ?
3194		createOptions( options ) :
3195		jQuery.extend( {}, options );
3196
3197	var // Flag to know if list is currently firing
3198		firing,
3199
3200		// Last fire value for non-forgettable lists
3201		memory,
3202
3203		// Flag to know if list was already fired
3204		fired,
3205
3206		// Flag to prevent firing
3207		locked,
3208
3209		// Actual callback list
3210		list = [],
3211
3212		// Queue of execution data for repeatable lists
3213		queue = [],
3214
3215		// Index of currently firing callback (modified by add/remove as needed)
3216		firingIndex = -1,
3217
3218		// Fire callbacks
3219		fire = function() {
3220
3221			// Enforce single-firing
3222			locked = options.once;
3223
3224			// Execute callbacks for all pending executions,
3225			// respecting firingIndex overrides and runtime changes
3226			fired = firing = true;
3227			for ( ; queue.length; firingIndex = -1 ) {
3228				memory = queue.shift();
3229				while ( ++firingIndex < list.length ) {
3230
3231					// Run callback and check for early termination
3232					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
3233						options.stopOnFalse ) {
3234
3235						// Jump to end and forget the data so .add doesn't re-fire
3236						firingIndex = list.length;
3237						memory = false;
3238					}
3239				}
3240			}
3241
3242			// Forget the data if we're done with it
3243			if ( !options.memory ) {
3244				memory = false;
3245			}
3246
3247			firing = false;
3248
3249			// Clean up if we're done firing for good
3250			if ( locked ) {
3251
3252				// Keep an empty list if we have data for future add calls
3253				if ( memory ) {
3254					list = [];
3255
3256				// Otherwise, this object is spent
3257				} else {
3258					list = "";
3259				}
3260			}
3261		},
3262
3263		// Actual Callbacks object
3264		self = {
3265
3266			// Add a callback or a collection of callbacks to the list
3267			add: function() {
3268				if ( list ) {
3269
3270					// If we have memory from a past run, we should fire after adding
3271					if ( memory && !firing ) {
3272						firingIndex = list.length - 1;
3273						queue.push( memory );
3274					}
3275
3276					( function add( args ) {
3277						jQuery.each( args, function( _, arg ) {
3278							if ( jQuery.isFunction( arg ) ) {
3279								if ( !options.unique || !self.has( arg ) ) {
3280									list.push( arg );
3281								}
3282							} else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
3283
3284								// Inspect recursively
3285								add( arg );
3286							}
3287						} );
3288					} )( arguments );
3289
3290					if ( memory && !firing ) {
3291						fire();
3292					}
3293				}
3294				return this;
3295			},
3296
3297			// Remove a callback from the list
3298			remove: function() {
3299				jQuery.each( arguments, function( _, arg ) {
3300					var index;
3301					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
3302						list.splice( index, 1 );
3303
3304						// Handle firing indexes
3305						if ( index <= firingIndex ) {
3306							firingIndex--;
3307						}
3308					}
3309				} );
3310				return this;
3311			},
3312
3313			// Check if a given callback is in the list.
3314			// If no argument is given, return whether or not list has callbacks attached.
3315			has: function( fn ) {
3316				return fn ?
3317					jQuery.inArray( fn, list ) > -1 :
3318					list.length > 0;
3319			},
3320
3321			// Remove all callbacks from the list
3322			empty: function() {
3323				if ( list ) {
3324					list = [];
3325				}
3326				return this;
3327			},
3328
3329			// Disable .fire and .add
3330			// Abort any current/pending executions
3331			// Clear all callbacks and values
3332			disable: function() {
3333				locked = queue = [];
3334				list = memory = "";
3335				return this;
3336			},
3337			disabled: function() {
3338				return !list;
3339			},
3340
3341			// Disable .fire
3342			// Also disable .add unless we have memory (since it would have no effect)
3343			// Abort any pending executions
3344			lock: function() {
3345				locked = true;
3346				if ( !memory ) {
3347					self.disable();
3348				}
3349				return this;
3350			},
3351			locked: function() {
3352				return !!locked;
3353			},
3354
3355			// Call all callbacks with the given context and arguments
3356			fireWith: function( context, args ) {
3357				if ( !locked ) {
3358					args = args || [];
3359					args = [ context, args.slice ? args.slice() : args ];
3360					queue.push( args );
3361					if ( !firing ) {
3362						fire();
3363					}
3364				}
3365				return this;
3366			},
3367
3368			// Call all the callbacks with the given arguments
3369			fire: function() {
3370				self.fireWith( this, arguments );
3371				return this;
3372			},
3373
3374			// To know if the callbacks have already been called at least once
3375			fired: function() {
3376				return !!fired;
3377			}
3378		};
3379
3380	return self;
3381};
3382
3383
3384jQuery.extend( {
3385
3386	Deferred: function( func ) {
3387		var tuples = [
3388
3389				// action, add listener, listener list, final state
3390				[ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
3391				[ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
3392				[ "notify", "progress", jQuery.Callbacks( "memory" ) ]
3393			],
3394			state = "pending",
3395			promise = {
3396				state: function() {
3397					return state;
3398				},
3399				always: function() {
3400					deferred.done( arguments ).fail( arguments );
3401					return this;
3402				},
3403				then: function( /* fnDone, fnFail, fnProgress */ ) {
3404					var fns = arguments;
3405					return jQuery.Deferred( function( newDefer ) {
3406						jQuery.each( tuples, function( i, tuple ) {
3407							var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
3408
3409							// deferred[ done | fail | progress ] for forwarding actions to newDefer
3410							deferred[ tuple[ 1 ] ]( function() {
3411								var returned = fn && fn.apply( this, arguments );
3412								if ( returned && jQuery.isFunction( returned.promise ) ) {
3413									returned.promise()
3414										.progress( newDefer.notify )
3415										.done( newDefer.resolve )
3416										.fail( newDefer.reject );
3417								} else {
3418									newDefer[ tuple[ 0 ] + "With" ](
3419										this === promise ? newDefer.promise() : this,
3420										fn ? [ returned ] : arguments
3421									);
3422								}
3423							} );
3424						} );
3425						fns = null;
3426					} ).promise();
3427				},
3428
3429				// Get a promise for this deferred
3430				// If obj is provided, the promise aspect is added to the object
3431				promise: function( obj ) {
3432					return obj != null ? jQuery.extend( obj, promise ) : promise;
3433				}
3434			},
3435			deferred = {};
3436
3437		// Keep pipe for back-compat
3438		promise.pipe = promise.then;
3439
3440		// Add list-specific methods
3441		jQuery.each( tuples, function( i, tuple ) {
3442			var list = tuple[ 2 ],
3443				stateString = tuple[ 3 ];
3444
3445			// promise[ done | fail | progress ] = list.add
3446			promise[ tuple[ 1 ] ] = list.add;
3447
3448			// Handle state
3449			if ( stateString ) {
3450				list.add( function() {
3451
3452					// state = [ resolved | rejected ]
3453					state = stateString;
3454
3455				// [ reject_list | resolve_list ].disable; progress_list.lock
3456				}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
3457			}
3458
3459			// deferred[ resolve | reject | notify ]
3460			deferred[ tuple[ 0 ] ] = function() {
3461				deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
3462				return this;
3463			};
3464			deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
3465		} );
3466
3467		// Make the deferred a promise
3468		promise.promise( deferred );
3469
3470		// Call given func if any
3471		if ( func ) {
3472			func.call( deferred, deferred );
3473		}
3474
3475		// All done!
3476		return deferred;
3477	},
3478
3479	// Deferred helper
3480	when: function( subordinate /* , ..., subordinateN */ ) {
3481		var i = 0,
3482			resolveValues = slice.call( arguments ),
3483			length = resolveValues.length,
3484
3485			// the count of uncompleted subordinates
3486			remaining = length !== 1 ||
3487				( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
3488
3489			// the master Deferred.
3490			// If resolveValues consist of only a single Deferred, just use that.
3491			deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
3492
3493			// Update function for both resolve and progress values
3494			updateFunc = function( i, contexts, values ) {
3495				return function( value ) {
3496					contexts[ i ] = this;
3497					values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
3498					if ( values === progressValues ) {
3499						deferred.notifyWith( contexts, values );
3500
3501					} else if ( !( --remaining ) ) {
3502						deferred.resolveWith( contexts, values );
3503					}
3504				};
3505			},
3506
3507			progressValues, progressContexts, resolveContexts;
3508
3509		// add listeners to Deferred subordinates; treat others as resolved
3510		if ( length > 1 ) {
3511			progressValues = new Array( length );
3512			progressContexts = new Array( length );
3513			resolveContexts = new Array( length );
3514			for ( ; i < length; i++ ) {
3515				if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
3516					resolveValues[ i ].promise()
3517						.progress( updateFunc( i, progressContexts, progressValues ) )
3518						.done( updateFunc( i, resolveContexts, resolveValues ) )
3519						.fail( deferred.reject );
3520				} else {
3521					--remaining;
3522				}
3523			}
3524		}
3525
3526		// if we're not waiting on anything, resolve the master
3527		if ( !remaining ) {
vendor: 2,149 bytes, lines 3528-3627
3528			deferred.resolveWith( resolveContexts, resolveValues );
3529		}
3530
3531		return deferred.promise();
3532	}
3533} );
3534
3535
3536// The deferred used on DOM ready
3537var readyList;
3538
3539jQuery.fn.ready = function( fn ) {
3540
3541	// Add the callback
3542	jQuery.ready.promise().done( fn );
3543
3544	return this;
3545};
3546
3547jQuery.extend( {
3548
3549	// Is the DOM ready to be used? Set to true once it occurs.
3550	isReady: false,
3551
3552	// A counter to track how many items to wait for before
3553	// the ready event fires. See #6781
3554	readyWait: 1,
3555
3556	// Hold (or release) the ready event
3557	holdReady: function( hold ) {
3558		if ( hold ) {
3559			jQuery.readyWait++;
3560		} else {
3561			jQuery.ready( true );
3562		}
3563	},
3564
3565	// Handle when the DOM is ready
3566	ready: function( wait ) {
3567
3568		// Abort if there are pending holds or we're already ready
3569		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
3570			return;
3571		}
3572
3573		// Remember that the DOM is ready
3574		jQuery.isReady = true;
3575
3576		// If a normal DOM Ready event fired, decrement, and wait if need be
3577		if ( wait !== true && --jQuery.readyWait > 0 ) {
3578			return;
3579		}
3580
3581		// If there are functions bound, to execute
3582		readyList.resolveWith( document, [ jQuery ] );
3583
3584		// Trigger any bound ready events
3585		if ( jQuery.fn.triggerHandler ) {
3586			jQuery( document ).triggerHandler( "ready" );
3587			jQuery( document ).off( "ready" );
3588		}
3589	}
3590} );
3591
3592/**
3593 * Clean-up method for dom ready events
3594 */
3595function detach() {
3596	if ( document.addEventListener ) {
3597		document.removeEventListener( "DOMContentLoaded", completed );
3598		window.removeEventListener( "load", completed );
3599
3600	} else {
3601		document.detachEvent( "onreadystatechange", completed );
3602		window.detachEvent( "onload", completed );
3603	}
3604}
3605
3606/**
3607 * The ready event handler and self cleanup method
3608 */
3609function completed() {
3610
3611	// readyState === "complete" is good enough for us to call the dom ready in oldIE
3612	if ( document.addEventListener ||
3613		window.event.type === "load" ||
3614		document.readyState === "complete" ) {
3615
3616		detach();
3617		jQuery.ready();
3618	}
3619}
3620
3621jQuery.ready.promise = function( obj ) {
3622	if ( !readyList ) {
3623
3624		readyList = jQuery.Deferred();
3625
3626		// Catch cases where $(document).ready() is called
3627		// after the browser event has already occurred.
3628		// Support: IE6-10
3629		// Older IE sometimes signals "interactive" too soon
3630		if ( document.readyState === "complete" ||
3631			( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
3632
3633			// Handle it asynchronously to allow scripts the opportunity to delay ready
3634			window.setTimeout( jQuery.ready );
3635
3636		// Standards-based browsers support DOMContentLoaded
3637		} else if ( document.addEventListener ) {
3638
3639			// Use the handy event callback
3640			document.addEventListener( "DOMContentLoaded", completed );
3641
3642			// A fallback to window.onload, that will always work
3643			window.addEventListener( "load", completed );
3644
3645		// If IE event model is used
3646		} else {
3647
3648			// Ensure firing before onload, maybe late but safe also for iframes
3649			document.attachEvent( "onreadystatechange", completed );
3650
3651			// A fallback to window.onload, that will always work
3652			window.attachEvent( "onload", completed );
3653
3654			// If IE and not a frame
3655			// continually check to see if the document is ready
3656			var top = false;
3657
3658			try {
3659				top = window.frameElement == null && document.documentElement;
3660			} catch ( e ) {}
3661
3662			if ( top && top.doScroll ) {
3663				( function doScrollCheck() {
3664					if ( !jQuery.isReady ) {
3665
3666						try {
3667
3668							// Use the trick by Diego Perini
3669							// http://javascript.nwbox.com/IEContentLoaded/
3670							top.doScroll( "left" );
3671						} catch ( e ) {
3672							return window.setTimeout( doScrollCheck, 50 );
3673						}
3674
3675						// detach all dom ready events
3676						detach();
3677
3678						// and execute any waiting functions
3679						jQuery.ready();
3680					}
3681				} )();
3682			}
3683		}
3684	}
3685	return readyList.promise( obj );
3686};
3687
3688// Kick off the DOM ready check even if the user does not
3689jQuery.ready.promise();
3690
3691
3692
3693
3694// Support: IE<9
3695// Iteration over object's inherited properties before its own
3696var i;
3697for ( i in jQuery( support ) ) {
3698	break;
3699}
3700support.ownFirst = i === "0";
3701
3702// Note: most support tests are defined in their respective modules.
3703// false until the test is run
3704support.inlineBlockNeedsLayout = false;
3705
3706// Execute ASAP in case we need to set body.style.zoom
3707jQuery( function() {
3708
3709	// Minified: var a,b,c,d
3710	var val, div, body, container;
3711
3712	body = document.getElementsByTagName( "body" )[ 0 ];
3713	if ( !body || !body.style ) {
3714
3715		// Return for frameset docs that don't have a body
3716		return;
3717	}
3718
3719	// Setup
3720	div = document.createElement( "div" );
3721	container = document.createElement( "div" );
3722	container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
3723	body.appendChild( container ).appendChild( div );
3724
3725	if ( typeof div.style.zoom !== "undefined" ) {
3726
3727		// Support: IE<8
3728		// Check if natively block-level elements act like inline-block
3729		// elements when setting their display to 'inline' and giving
3730		// them layout
3731		div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
3732
3733		support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
3734		if ( val ) {
3735
3736			// Prevent IE 6 from affecting layout for positioned elements #11048
3737			// Prevent IE from shrinking the body in IE 7 mode #12869
3738			// Support: IE<8
3739			body.style.zoom = 1;
3740		}
3741	}
3742
3743	body.removeChild( container );
3744} );
3745
3746
3747( function() {
3748	var div = document.createElement( "div" );
3749
3750	// Support: IE<9
3751	support.deleteExpando = true;
3752	try {
3753		delete div.test;
3754	} catch ( e ) {
3755		support.deleteExpando = false;
3756	}
3757
3758	// Null elements to avoid leaks in IE.
3759	div = null;
3760} )();
3761var acceptData = function( elem ) {
3762	var noData = jQuery.noData[ ( elem.nodeName + " " ).toLowerCase() ],
3763		nodeType = +elem.nodeType || 1;
3764
3765	// Do not set data on non-element DOM nodes because it will not be cleared (#8335).
3766	return nodeType !== 1 && nodeType !== 9 ?
3767		false :
3768
3769		// Nodes accept data unless otherwise specified; rejection can be conditional
3770		!noData || noData !== true && elem.getAttribute( "classid" ) === noData;
3771};
3772
3773
3774
3775
3776var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
3777	rmultiDash = /([A-Z])/g;
3778
3779function dataAttr( elem, key, data ) {
3780
3781	// If nothing was found internally, try to fetch any
3782	// data from the HTML5 data-* attribute
3783	if ( data === undefined && elem.nodeType === 1 ) {
3784
3785		var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
3786
3787		data = elem.getAttribute( name );
3788
3789		if ( typeof data === "string" ) {
3790			try {
3791				data = data === "true" ? true :
vendor: 11,186 bytes, lines 3792-4256
3792					data === "false" ? false :
3793					data === "null" ? null :
3794
3795					// Only convert to a number if it doesn't change the string
3796					+data + "" === data ? +data :
3797					rbrace.test( data ) ? jQuery.parseJSON( data ) :
3798					data;
3799			} catch ( e ) {}
3800
3801			// Make sure we set the data so it isn't changed later
3802			jQuery.data( elem, key, data );
3803
3804		} else {
3805			data = undefined;
3806		}
3807	}
3808
3809	return data;
3810}
3811
3812// checks a cache object for emptiness
3813function isEmptyDataObject( obj ) {
3814	var name;
3815	for ( name in obj ) {
3816
3817		// if the public data object is empty, the private is still empty
3818		if ( name === "data" && jQuery.isEmptyObject( obj[ name ] ) ) {
3819			continue;
3820		}
3821		if ( name !== "toJSON" ) {
3822			return false;
3823		}
3824	}
3825
3826	return true;
3827}
3828
3829function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
3830	if ( !acceptData( elem ) ) {
3831		return;
3832	}
3833
3834	var ret, thisCache,
3835		internalKey = jQuery.expando,
3836
3837		// We have to handle DOM nodes and JS objects differently because IE6-7
3838		// can't GC object references properly across the DOM-JS boundary
3839		isNode = elem.nodeType,
3840
3841		// Only DOM nodes need the global jQuery cache; JS object data is
3842		// attached directly to the object so GC can occur automatically
3843		cache = isNode ? jQuery.cache : elem,
3844
3845		// Only defining an ID for JS objects if its cache already exists allows
3846		// the code to shortcut on the same path as a DOM node with no cache
3847		id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
3848
3849	// Avoid doing any more work than we need to when trying to get data on an
3850	// object that has no data at all
3851	if ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&
3852		data === undefined && typeof name === "string" ) {
3853		return;
3854	}
3855
3856	if ( !id ) {
3857
3858		// Only DOM nodes need a new unique ID for each element since their data
3859		// ends up in the global cache
3860		if ( isNode ) {
3861			id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;
3862		} else {
3863			id = internalKey;
3864		}
3865	}
3866
3867	if ( !cache[ id ] ) {
3868
3869		// Avoid exposing jQuery metadata on plain JS objects when the object
3870		// is serialized using JSON.stringify
3871		cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
3872	}
3873
3874	// An object can be passed to jQuery.data instead of a key/value pair; this gets
3875	// shallow copied over onto the existing cache
3876	if ( typeof name === "object" || typeof name === "function" ) {
3877		if ( pvt ) {
3878			cache[ id ] = jQuery.extend( cache[ id ], name );
3879		} else {
3880			cache[ id ].data = jQuery.extend( cache[ id ].data, name );
3881		}
3882	}
3883
3884	thisCache = cache[ id ];
3885
3886	// jQuery data() is stored in a separate object inside the object's internal data
3887	// cache in order to avoid key collisions between internal data and user-defined
3888	// data.
3889	if ( !pvt ) {
3890		if ( !thisCache.data ) {
3891			thisCache.data = {};
3892		}
3893
3894		thisCache = thisCache.data;
3895	}
3896
3897	if ( data !== undefined ) {
3898		thisCache[ jQuery.camelCase( name ) ] = data;
3899	}
3900
3901	// Check for both converted-to-camel and non-converted data property names
3902	// If a data property was specified
3903	if ( typeof name === "string" ) {
3904
3905		// First Try to find as-is property data
3906		ret = thisCache[ name ];
3907
3908		// Test for null|undefined property data
3909		if ( ret == null ) {
3910
3911			// Try to find the camelCased property
3912			ret = thisCache[ jQuery.camelCase( name ) ];
3913		}
3914	} else {
3915		ret = thisCache;
3916	}
3917
3918	return ret;
3919}
3920
3921function internalRemoveData( elem, name, pvt ) {
3922	if ( !acceptData( elem ) ) {
3923		return;
3924	}
3925
3926	var thisCache, i,
3927		isNode = elem.nodeType,
3928
3929		// See jQuery.data for more information
3930		cache = isNode ? jQuery.cache : elem,
3931		id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
3932
3933	// If there is already no cache entry for this object, there is no
3934	// purpose in continuing
3935	if ( !cache[ id ] ) {
3936		return;
3937	}
3938
3939	if ( name ) {
3940
3941		thisCache = pvt ? cache[ id ] : cache[ id ].data;
3942
3943		if ( thisCache ) {
3944
3945			// Support array or space separated string names for data keys
3946			if ( !jQuery.isArray( name ) ) {
3947
3948				// try the string as a key before any manipulation
3949				if ( name in thisCache ) {
3950					name = [ name ];
3951				} else {
3952
3953					// split the camel cased version by spaces unless a key with the spaces exists
3954					name = jQuery.camelCase( name );
3955					if ( name in thisCache ) {
3956						name = [ name ];
3957					} else {
3958						name = name.split( " " );
3959					}
3960				}
3961			} else {
3962
3963				// If "name" is an array of keys...
3964				// When data is initially created, via ("key", "val") signature,
3965				// keys will be converted to camelCase.
3966				// Since there is no way to tell _how_ a key was added, remove
3967				// both plain key and camelCase key. #12786
3968				// This will only penalize the array argument path.
3969				name = name.concat( jQuery.map( name, jQuery.camelCase ) );
3970			}
3971
3972			i = name.length;
3973			while ( i-- ) {
3974				delete thisCache[ name[ i ] ];
3975			}
3976
3977			// If there is no data left in the cache, we want to continue
3978			// and let the cache object itself get destroyed
3979			if ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) {
3980				return;
3981			}
3982		}
3983	}
3984
3985	// See jQuery.data for more information
3986	if ( !pvt ) {
3987		delete cache[ id ].data;
3988
3989		// Don't destroy the parent cache unless the internal data object
3990		// had been the only thing left in it
3991		if ( !isEmptyDataObject( cache[ id ] ) ) {
3992			return;
3993		}
3994	}
3995
3996	// Destroy the cache
3997	if ( isNode ) {
3998		jQuery.cleanData( [ elem ], true );
3999
4000	// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
4001	/* jshint eqeqeq: false */
4002	} else if ( support.deleteExpando || cache != cache.window ) {
4003		/* jshint eqeqeq: true */
4004		delete cache[ id ];
4005
4006	// When all else fails, undefined
4007	} else {
4008		cache[ id ] = undefined;
4009	}
4010}
4011
4012jQuery.extend( {
4013	cache: {},
4014
4015	// The following elements (space-suffixed to avoid Object.prototype collisions)
4016	// throw uncatchable exceptions if you attempt to set expando properties
4017	noData: {
4018		"applet ": true,
4019		"embed ": true,
4020
4021		// ...but Flash objects (which have this classid) *can* handle expandos
4022		"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
4023	},
4024
4025	hasData: function( elem ) {
4026		elem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ];
4027		return !!elem && !isEmptyDataObject( elem );
4028	},
4029
4030	data: function( elem, name, data ) {
4031		return internalData( elem, name, data );
4032	},
4033
4034	removeData: function( elem, name ) {
4035		return internalRemoveData( elem, name );
4036	},
4037
4038	// For internal use only.
4039	_data: function( elem, name, data ) {
4040		return internalData( elem, name, data, true );
4041	},
4042
4043	_removeData: function( elem, name ) {
4044		return internalRemoveData( elem, name, true );
4045	}
4046} );
4047
4048jQuery.fn.extend( {
4049	data: function( key, value ) {
4050		var i, name, data,
4051			elem = this[ 0 ],
4052			attrs = elem && elem.attributes;
4053
4054		// Special expections of .data basically thwart jQuery.access,
4055		// so implement the relevant behavior ourselves
4056
4057		// Gets all values
4058		if ( key === undefined ) {
4059			if ( this.length ) {
4060				data = jQuery.data( elem );
4061
4062				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
4063					i = attrs.length;
4064					while ( i-- ) {
4065
4066						// Support: IE11+
4067						// The attrs elements can be null (#14894)
4068						if ( attrs[ i ] ) {
4069							name = attrs[ i ].name;
4070							if ( name.indexOf( "data-" ) === 0 ) {
4071								name = jQuery.camelCase( name.slice( 5 ) );
4072								dataAttr( elem, name, data[ name ] );
4073							}
4074						}
4075					}
4076					jQuery._data( elem, "parsedAttrs", true );
4077				}
4078			}
4079
4080			return data;
4081		}
4082
4083		// Sets multiple values
4084		if ( typeof key === "object" ) {
4085			return this.each( function() {
4086				jQuery.data( this, key );
4087			} );
4088		}
4089
4090		return arguments.length > 1 ?
4091
4092			// Sets one value
4093			this.each( function() {
4094				jQuery.data( this, key, value );
4095			} ) :
4096
4097			// Gets one value
4098			// Try to fetch any internally stored data first
4099			elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;
4100	},
4101
4102	removeData: function( key ) {
4103		return this.each( function() {
4104			jQuery.removeData( this, key );
4105		} );
4106	}
4107} );
4108
4109
4110jQuery.extend( {
4111	queue: function( elem, type, data ) {
4112		var queue;
4113
4114		if ( elem ) {
4115			type = ( type || "fx" ) + "queue";
4116			queue = jQuery._data( elem, type );
4117
4118			// Speed up dequeue by getting out quickly if this is just a lookup
4119			if ( data ) {
4120				if ( !queue || jQuery.isArray( data ) ) {
4121					queue = jQuery._data( elem, type, jQuery.makeArray( data ) );
4122				} else {
4123					queue.push( data );
4124				}
4125			}
4126			return queue || [];
4127		}
4128	},
4129
4130	dequeue: function( elem, type ) {
4131		type = type || "fx";
4132
4133		var queue = jQuery.queue( elem, type ),
4134			startLength = queue.length,
4135			fn = queue.shift(),
4136			hooks = jQuery._queueHooks( elem, type ),
4137			next = function() {
4138				jQuery.dequeue( elem, type );
4139			};
4140
4141		// If the fx queue is dequeued, always remove the progress sentinel
4142		if ( fn === "inprogress" ) {
4143			fn = queue.shift();
4144			startLength--;
4145		}
4146
4147		if ( fn ) {
4148
4149			// Add a progress sentinel to prevent the fx queue from being
4150			// automatically dequeued
4151			if ( type === "fx" ) {
4152				queue.unshift( "inprogress" );
4153			}
4154
4155			// clear up the last queue stop function
4156			delete hooks.stop;
4157			fn.call( elem, next, hooks );
4158		}
4159
4160		if ( !startLength && hooks ) {
4161			hooks.empty.fire();
4162		}
4163	},
4164
4165	// not intended for public consumption - generates a queueHooks object,
4166	// or returns the current one
4167	_queueHooks: function( elem, type ) {
4168		var key = type + "queueHooks";
4169		return jQuery._data( elem, key ) || jQuery._data( elem, key, {
4170			empty: jQuery.Callbacks( "once memory" ).add( function() {
4171				jQuery._removeData( elem, type + "queue" );
4172				jQuery._removeData( elem, key );
4173			} )
4174		} );
4175	}
4176} );
4177
4178jQuery.fn.extend( {
4179	queue: function( type, data ) {
4180		var setter = 2;
4181
4182		if ( typeof type !== "string" ) {
4183			data = type;
4184			type = "fx";
4185			setter--;
4186		}
4187
4188		if ( arguments.length < setter ) {
4189			return jQuery.queue( this[ 0 ], type );
4190		}
4191
4192		return data === undefined ?
4193			this :
4194			this.each( function() {
4195				var queue = jQuery.queue( this, type, data );
4196
4197				// ensure a hooks for this queue
4198				jQuery._queueHooks( this, type );
4199
4200				if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
4201					jQuery.dequeue( this, type );
4202				}
4203			} );
4204	},
4205	dequeue: function( type ) {
4206		return this.each( function() {
4207			jQuery.dequeue( this, type );
4208		} );
4209	},
4210	clearQueue: function( type ) {
4211		return this.queue( type || "fx", [] );
4212	},
4213
4214	// Get a promise resolved when queues of a certain type
4215	// are emptied (fx is the type by default)
4216	promise: function( type, obj ) {
4217		var tmp,
4218			count = 1,
4219			defer = jQuery.Deferred(),
4220			elements = this,
4221			i = this.length,
4222			resolve = function() {
4223				if ( !( --count ) ) {
4224					defer.resolveWith( elements, [ elements ] );
4225				}
4226			};
4227
4228		if ( typeof type !== "string" ) {
4229			obj = type;
4230			type = undefined;
4231		}
4232		type = type || "fx";
4233
4234		while ( i-- ) {
4235			tmp = jQuery._data( elements[ i ], type + "queueHooks" );
4236			if ( tmp && tmp.empty ) {
4237				count++;
4238				tmp.empty.add( resolve );
4239			}
4240		}
4241		resolve();
4242		return defer.promise( obj );
4243	}
4244} );
4245
4246
4247( function() {
4248	var shrinkWrapBlocksVal;
4249
4250	support.shrinkWrapBlocks = function() {
4251		if ( shrinkWrapBlocksVal != null ) {
4252			return shrinkWrapBlocksVal;
4253		}
4254
4255		// Will be changed later if needed.
4256		shrinkWrapBlocksVal = false;
vendor: 4,171 bytes, lines 4257-4405
4257
4258		// Minified: var b,c,d
4259		var div, body, container;
4260
4261		body = document.getElementsByTagName( "body" )[ 0 ];
4262		if ( !body || !body.style ) {
4263
4264			// Test fired too early or in an unsupported environment, exit.
4265			return;
4266		}
4267
4268		// Setup
4269		div = document.createElement( "div" );
4270		container = document.createElement( "div" );
4271		container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
4272		body.appendChild( container ).appendChild( div );
4273
4274		// Support: IE6
4275		// Check if elements with layout shrink-wrap their children
4276		if ( typeof div.style.zoom !== "undefined" ) {
4277
4278			// Reset CSS: box-sizing; display; margin; border
4279			div.style.cssText =
4280
4281				// Support: Firefox<29, Android 2.3
4282				// Vendor-prefix box-sizing
4283				"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
4284				"box-sizing:content-box;display:block;margin:0;border:0;" +
4285				"padding:1px;width:1px;zoom:1";
4286			div.appendChild( document.createElement( "div" ) ).style.width = "5px";
4287			shrinkWrapBlocksVal = div.offsetWidth !== 3;
4288		}
4289
4290		body.removeChild( container );
4291
4292		return shrinkWrapBlocksVal;
4293	};
4294
4295} )();
4296var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
4297
4298var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
4299
4300
4301var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
4302
4303var isHidden = function( elem, el ) {
4304
4305		// isHidden might be called from jQuery#filter function;
4306		// in that case, element will be second argument
4307		elem = el || elem;
4308		return jQuery.css( elem, "display" ) === "none" ||
4309			!jQuery.contains( elem.ownerDocument, elem );
4310	};
4311
4312
4313
4314function adjustCSS( elem, prop, valueParts, tween ) {
4315	var adjusted,
4316		scale = 1,
4317		maxIterations = 20,
4318		currentValue = tween ?
4319			function() { return tween.cur(); } :
4320			function() { return jQuery.css( elem, prop, "" ); },
4321		initial = currentValue(),
4322		unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
4323
4324		// Starting value computation is required for potential unit mismatches
4325		initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
4326			rcssNum.exec( jQuery.css( elem, prop ) );
4327
4328	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
4329
4330		// Trust units reported by jQuery.css
4331		unit = unit || initialInUnit[ 3 ];
4332
4333		// Make sure we update the tween properties later on
4334		valueParts = valueParts || [];
4335
4336		// Iteratively approximate from a nonzero starting point
4337		initialInUnit = +initial || 1;
4338
4339		do {
4340
4341			// If previous iteration zeroed out, double until we get *something*.
4342			// Use string for doubling so we don't accidentally see scale as unchanged below
4343			scale = scale || ".5";
4344
4345			// Adjust and apply
4346			initialInUnit = initialInUnit / scale;
4347			jQuery.style( elem, prop, initialInUnit + unit );
4348
4349		// Update scale, tolerating zero or NaN from tween.cur()
4350		// Break the loop if scale is unchanged or perfect, or if we've just had enough.
4351		} while (
4352			scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
4353		);
4354	}
4355
4356	if ( valueParts ) {
4357		initialInUnit = +initialInUnit || +initial || 0;
4358
4359		// Apply relative offset (+=/-=) if specified
4360		adjusted = valueParts[ 1 ] ?
4361			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
4362			+valueParts[ 2 ];
4363		if ( tween ) {
4364			tween.unit = unit;
4365			tween.start = initialInUnit;
4366			tween.end = adjusted;
4367		}
4368	}
4369	return adjusted;
4370}
4371
4372
4373// Multifunctional method to get and set values of a collection
4374// The value/s can optionally be executed if it's a function
4375var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
4376	var i = 0,
4377		length = elems.length,
4378		bulk = key == null;
4379
4380	// Sets many values
4381	if ( jQuery.type( key ) === "object" ) {
4382		chainable = true;
4383		for ( i in key ) {
4384			access( elems, fn, i, key[ i ], true, emptyGet, raw );
4385		}
4386
4387	// Sets one value
4388	} else if ( value !== undefined ) {
4389		chainable = true;
4390
4391		if ( !jQuery.isFunction( value ) ) {
4392			raw = true;
4393		}
4394
4395		if ( bulk ) {
4396
4397			// Bulk operations run against the entire set
4398			if ( raw ) {
4399				fn.call( elems, value );
4400				fn = null;
4401
4402			// ...except when executing function values
4403			} else {
4404				bulk = fn;
4405				fn = function( elem, key, value ) {
4406					return bulk.call( jQuery( elem ), value );
4407				};
4408			}
4409		}
4410
4411		if ( fn ) {
4412			for ( ; i < length; i++ ) {
4413				fn(
4414					elems[ i ],
4415					key,
4416					raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) )
4417				);
4418			}
4419		}
4420	}
4421
4422	return chainable ?
4423		elems :
4424
4425		// Gets
4426		bulk ?
4427			fn.call( elems ) :
4428			length ? fn( elems[ 0 ], key ) : emptyGet;
4429};
4430var rcheckableType = ( /^(?:checkbox|radio)$/i );
4431
4432var rtagName = ( /<([\w:-]+)/ );
4433
4434var rscriptType = ( /^$|\/(?:java|ecma)script/i );
4435
4436var rleadingWhitespace = ( /^\s+/ );
4437
4438var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" +
4439		"details|dialog|figcaption|figure|footer|header|hgroup|main|" +
4440		"mark|meter|nav|output|picture|progress|section|summary|template|time|video";
4441
4442
4443
4444function createSafeFragment( document ) {
4445	var list = nodeNames.split( "|" ),
4446		safeFrag = document.createDocumentFragment();
4447
4448	if ( safeFrag.createElement ) {
4449		while ( list.length ) {
4450			safeFrag.createElement(
4451				list.pop()
4452			);
4453		}
4454	}
4455	return safeFrag;
4456}
4457
4458
4459( function() {
4460	var div = document.createElement( "div" ),
4461		fragment = document.createDocumentFragment(),
4462		input = document.createElement( "input" );
4463
4464	// Setup
4465	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
4466
4467	// IE strips leading whitespace when .innerHTML is used
4468	support.leadingWhitespace = div.firstChild.nodeType === 3;
4469
4470	// Make sure that tbody elements aren't automatically inserted
4471	// IE will insert them into empty tables
4472	support.tbody = !div.getElementsByTagName( "tbody" ).length;
4473
4474	// Make sure that link elements get serialized correctly by innerHTML
4475	// This requires a wrapper element in IE
4476	support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;
4477
4478	// Makes sure cloning an html5 element does not cause problems
4479	// Where outerHTML is undefined, this still works
4480	support.html5Clone =
4481		document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";
4482
4483	// Check if a disconnected checkbox will retain its checked
4484	// value of true after appended to the DOM (IE6/7)
4485	input.type = "checkbox";
4486	input.checked = true;
4487	fragment.appendChild( input );
4488	support.appendChecked = input.checked;
4489
4490	// Make sure textarea (and checkbox) defaultValue is properly cloned
4491	// Support: IE6-IE11+
4492	div.innerHTML = "<textarea>x</textarea>";
4493	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
4494
4495	// #11217 - WebKit loses check when the name is after the checked attribute
4496	fragment.appendChild( div );
4497
4498	// Support: Windows Web Apps (WWA)
4499	// `name` and `type` must use .setAttribute for WWA (#14901)
4500	input = document.createElement( "input" );
4501	input.setAttribute( "type", "radio" );
4502	input.setAttribute( "checked", "checked" );
4503	input.setAttribute( "name", "t" );
4504
4505	div.appendChild( input );
4506
4507	// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
4508	// old WebKit doesn't clone checked state correctly in fragments
4509	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
4510
4511	// Support: IE<9
4512	// Cloned elements keep attachEvent handlers, we use addEventListener on IE9+
4513	support.noCloneEvent = !!div.addEventListener;
4514
4515	// Support: IE<9
4516	// Since attributes and properties are the same in IE,
4517	// cleanData must set properties to undefined rather than use removeAttribute
4518	div[ jQuery.expando ] = 1;
4519	support.attributes = !div.getAttribute( jQuery.expando );
4520} )();
4521
4522
4523// We have to close these tags to support XHTML (#13200)
4524var wrapMap = {
4525	option: [ 1, "<select multiple='multiple'>", "</select>" ],
4526	legend: [ 1, "<fieldset>", "</fieldset>" ],
4527	area: [ 1, "<map>", "</map>" ],
4528
4529	// Support: IE8
4530	param: [ 1, "<object>", "</object>" ],
4531	thead: [ 1, "<table>", "</table>" ],
4532	tr: [ 2, "<table><tbody>", "</tbody></table>" ],
4533	col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
4534	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
4535
4536	// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
4537	// unless wrapped in a div with non-breaking characters in front of it.
4538	_default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
4539};
4540
4541// Support: IE8-IE9
4542wrapMap.optgroup = wrapMap.option;
4543
4544wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
4545wrapMap.th = wrapMap.td;
4546
4547
4548function getAll( context, tag ) {
4549	var elems, elem,
4550		i = 0,
4551		found = typeof context.getElementsByTagName !== "undefined" ?
4552			context.getElementsByTagName( tag || "*" ) :
4553			typeof context.querySelectorAll !== "undefined" ?
4554				context.querySelectorAll( tag || "*" ) :
4555				undefined;
4556
4557	if ( !found ) {
4558		for ( found = [], elems = context.childNodes || context;
4559			( elem = elems[ i ] ) != null;
4560			i++
4561		) {
4562			if ( !tag || jQuery.nodeName( elem, tag ) ) {
4563				found.push( elem );
4564			} else {
4565				jQuery.merge( found, getAll( elem, tag ) );
4566			}
4567		}
4568	}
4569
4570	return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
4571		jQuery.merge( [ context ], found ) :
4572		found;
4573}
4574
4575
4576// Mark scripts as having already been evaluated
4577function setGlobalEval( elems, refElements ) {
4578	var elem,
4579		i = 0;
4580	for ( ; ( elem = elems[ i ] ) != null; i++ ) {
4581		jQuery._data(
4582			elem,
4583			"globalEval",
4584			!refElements || jQuery._data( refElements[ i ], "globalEval" )
4585		);
4586	}
4587}
4588
4589
vendor: 45,546 bytes, lines 4590-6222
4590var rhtml = /<|&#?\w+;/,
4591	rtbody = /<tbody/i;
4592
4593function fixDefaultChecked( elem ) {
4594	if ( rcheckableType.test( elem.type ) ) {
4595		elem.defaultChecked = elem.checked;
4596	}
4597}
4598
4599function buildFragment( elems, context, scripts, selection, ignored ) {
4600	var j, elem, contains,
4601		tmp, tag, tbody, wrap,
4602		l = elems.length,
4603
4604		// Ensure a safe fragment
4605		safe = createSafeFragment( context ),
4606
4607		nodes = [],
4608		i = 0;
4609
4610	for ( ; i < l; i++ ) {
4611		elem = elems[ i ];
4612
4613		if ( elem || elem === 0 ) {
4614
4615			// Add nodes directly
4616			if ( jQuery.type( elem ) === "object" ) {
4617				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
4618
4619			// Convert non-html into a text node
4620			} else if ( !rhtml.test( elem ) ) {
4621				nodes.push( context.createTextNode( elem ) );
4622
4623			// Convert html into DOM nodes
4624			} else {
4625				tmp = tmp || safe.appendChild( context.createElement( "div" ) );
4626
4627				// Deserialize a standard representation
4628				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
4629				wrap = wrapMap[ tag ] || wrapMap._default;
4630
4631				tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
4632
4633				// Descend through wrappers to the right content
4634				j = wrap[ 0 ];
4635				while ( j-- ) {
4636					tmp = tmp.lastChild;
4637				}
4638
4639				// Manually add leading whitespace removed by IE
4640				if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
4641					nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );
4642				}
4643
4644				// Remove IE's autoinserted <tbody> from table fragments
4645				if ( !support.tbody ) {
4646
4647					// String was a <table>, *may* have spurious <tbody>
4648					elem = tag === "table" && !rtbody.test( elem ) ?
4649						tmp.firstChild :
4650
4651						// String was a bare <thead> or <tfoot>
4652						wrap[ 1 ] === "<table>" && !rtbody.test( elem ) ?
4653							tmp :
4654							0;
4655
4656					j = elem && elem.childNodes.length;
4657					while ( j-- ) {
4658						if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) &&
4659							!tbody.childNodes.length ) {
4660
4661							elem.removeChild( tbody );
4662						}
4663					}
4664				}
4665
4666				jQuery.merge( nodes, tmp.childNodes );
4667
4668				// Fix #12392 for WebKit and IE > 9
4669				tmp.textContent = "";
4670
4671				// Fix #12392 for oldIE
4672				while ( tmp.firstChild ) {
4673					tmp.removeChild( tmp.firstChild );
4674				}
4675
4676				// Remember the top-level container for proper cleanup
4677				tmp = safe.lastChild;
4678			}
4679		}
4680	}
4681
4682	// Fix #11356: Clear elements from fragment
4683	if ( tmp ) {
4684		safe.removeChild( tmp );
4685	}
4686
4687	// Reset defaultChecked for any radios and checkboxes
4688	// about to be appended to the DOM in IE 6/7 (#8060)
4689	if ( !support.appendChecked ) {
4690		jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
4691	}
4692
4693	i = 0;
4694	while ( ( elem = nodes[ i++ ] ) ) {
4695
4696		// Skip elements already in the context collection (trac-4087)
4697		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
4698			if ( ignored ) {
4699				ignored.push( elem );
4700			}
4701
4702			continue;
4703		}
4704
4705		contains = jQuery.contains( elem.ownerDocument, elem );
4706
4707		// Append to fragment
4708		tmp = getAll( safe.appendChild( elem ), "script" );
4709
4710		// Preserve script evaluation history
4711		if ( contains ) {
4712			setGlobalEval( tmp );
4713		}
4714
4715		// Capture executables
4716		if ( scripts ) {
4717			j = 0;
4718			while ( ( elem = tmp[ j++ ] ) ) {
4719				if ( rscriptType.test( elem.type || "" ) ) {
4720					scripts.push( elem );
4721				}
4722			}
4723		}
4724	}
4725
4726	tmp = null;
4727
4728	return safe;
4729}
4730
4731
4732( function() {
4733	var i, eventName,
4734		div = document.createElement( "div" );
4735
4736	// Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)
4737	for ( i in { submit: true, change: true, focusin: true } ) {
4738		eventName = "on" + i;
4739
4740		if ( !( support[ i ] = eventName in window ) ) {
4741
4742			// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
4743			div.setAttribute( eventName, "t" );
4744			support[ i ] = div.attributes[ eventName ].expando === false;
4745		}
4746	}
4747
4748	// Null elements to avoid leaks in IE.
4749	div = null;
4750} )();
4751
4752
4753var rformElems = /^(?:input|select|textarea)$/i,
4754	rkeyEvent = /^key/,
4755	rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
4756	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
4757	rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
4758
4759function returnTrue() {
4760	return true;
4761}
4762
4763function returnFalse() {
4764	return false;
4765}
4766
4767// Support: IE9
4768// See #13393 for more info
4769function safeActiveElement() {
4770	try {
4771		return document.activeElement;
4772	} catch ( err ) { }
4773}
4774
4775function on( elem, types, selector, data, fn, one ) {
4776	var origFn, type;
4777
4778	// Types can be a map of types/handlers
4779	if ( typeof types === "object" ) {
4780
4781		// ( types-Object, selector, data )
4782		if ( typeof selector !== "string" ) {
4783
4784			// ( types-Object, data )
4785			data = data || selector;
4786			selector = undefined;
4787		}
4788		for ( type in types ) {
4789			on( elem, type, selector, data, types[ type ], one );
4790		}
4791		return elem;
4792	}
4793
4794	if ( data == null && fn == null ) {
4795
4796		// ( types, fn )
4797		fn = selector;
4798		data = selector = undefined;
4799	} else if ( fn == null ) {
4800		if ( typeof selector === "string" ) {
4801
4802			// ( types, selector, fn )
4803			fn = data;
4804			data = undefined;
4805		} else {
4806
4807			// ( types, data, fn )
4808			fn = data;
4809			data = selector;
4810			selector = undefined;
4811		}
4812	}
4813	if ( fn === false ) {
4814		fn = returnFalse;
4815	} else if ( !fn ) {
4816		return elem;
4817	}
4818
4819	if ( one === 1 ) {
4820		origFn = fn;
4821		fn = function( event ) {
4822
4823			// Can use an empty set, since event contains the info
4824			jQuery().off( event );
4825			return origFn.apply( this, arguments );
4826		};
4827
4828		// Use same guid so caller can remove using origFn
4829		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
4830	}
4831	return elem.each( function() {
4832		jQuery.event.add( this, types, fn, data, selector );
4833	} );
4834}
4835
4836/*
4837 * Helper functions for managing events -- not part of the public interface.
4838 * Props to Dean Edwards' addEvent library for many of the ideas.
4839 */
4840jQuery.event = {
4841
4842	global: {},
4843
4844	add: function( elem, types, handler, data, selector ) {
4845		var tmp, events, t, handleObjIn,
4846			special, eventHandle, handleObj,
4847			handlers, type, namespaces, origType,
4848			elemData = jQuery._data( elem );
4849
4850		// Don't attach events to noData or text/comment nodes (but allow plain objects)
4851		if ( !elemData ) {
4852			return;
4853		}
4854
4855		// Caller can pass in an object of custom data in lieu of the handler
4856		if ( handler.handler ) {
4857			handleObjIn = handler;
4858			handler = handleObjIn.handler;
4859			selector = handleObjIn.selector;
4860		}
4861
4862		// Make sure that the handler has a unique ID, used to find/remove it later
4863		if ( !handler.guid ) {
4864			handler.guid = jQuery.guid++;
4865		}
4866
4867		// Init the element's event structure and main handler, if this is the first
4868		if ( !( events = elemData.events ) ) {
4869			events = elemData.events = {};
4870		}
4871		if ( !( eventHandle = elemData.handle ) ) {
4872			eventHandle = elemData.handle = function( e ) {
4873
4874				// Discard the second event of a jQuery.event.trigger() and
4875				// when an event is called after a page has unloaded
4876				return typeof jQuery !== "undefined" &&
4877					( !e || jQuery.event.triggered !== e.type ) ?
4878					jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
4879					undefined;
4880			};
4881
4882			// Add elem as a property of the handle fn to prevent a memory leak
4883			// with IE non-native events
4884			eventHandle.elem = elem;
4885		}
4886
4887		// Handle multiple events separated by a space
4888		types = ( types || "" ).match( rnotwhite ) || [ "" ];
4889		t = types.length;
4890		while ( t-- ) {
4891			tmp = rtypenamespace.exec( types[ t ] ) || [];
4892			type = origType = tmp[ 1 ];
4893			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
4894
4895			// There *must* be a type, no attaching namespace-only handlers
4896			if ( !type ) {
4897				continue;
4898			}
4899
4900			// If event changes its type, use the special event handlers for the changed type
4901			special = jQuery.event.special[ type ] || {};
4902
4903			// If selector defined, determine special event api type, otherwise given type
4904			type = ( selector ? special.delegateType : special.bindType ) || type;
4905
4906			// Update special based on newly reset type
4907			special = jQuery.event.special[ type ] || {};
4908
4909			// handleObj is passed to all event handlers
4910			handleObj = jQuery.extend( {
4911				type: type,
4912				origType: origType,
4913				data: data,
4914				handler: handler,
4915				guid: handler.guid,
4916				selector: selector,
4917				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
4918				namespace: namespaces.join( "." )
4919			}, handleObjIn );
4920
4921			// Init the event handler queue if we're the first
4922			if ( !( handlers = events[ type ] ) ) {
4923				handlers = events[ type ] = [];
4924				handlers.delegateCount = 0;
4925
4926				// Only use addEventListener/attachEvent if the special events handler returns false
4927				if ( !special.setup ||
4928					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
4929
4930					// Bind the global event handler to the element
4931					if ( elem.addEventListener ) {
4932						elem.addEventListener( type, eventHandle, false );
4933
4934					} else if ( elem.attachEvent ) {
4935						elem.attachEvent( "on" + type, eventHandle );
4936					}
4937				}
4938			}
4939
4940			if ( special.add ) {
4941				special.add.call( elem, handleObj );
4942
4943				if ( !handleObj.handler.guid ) {
4944					handleObj.handler.guid = handler.guid;
4945				}
4946			}
4947
4948			// Add to the element's handler list, delegates in front
4949			if ( selector ) {
4950				handlers.splice( handlers.delegateCount++, 0, handleObj );
4951			} else {
4952				handlers.push( handleObj );
4953			}
4954
4955			// Keep track of which events have ever been used, for event optimization
4956			jQuery.event.global[ type ] = true;
4957		}
4958
4959		// Nullify elem to prevent memory leaks in IE
4960		elem = null;
4961	},
4962
4963	// Detach an event or set of events from an element
4964	remove: function( elem, types, handler, selector, mappedTypes ) {
4965		var j, handleObj, tmp,
4966			origCount, t, events,
4967			special, handlers, type,
4968			namespaces, origType,
4969			elemData = jQuery.hasData( elem ) && jQuery._data( elem );
4970
4971		if ( !elemData || !( events = elemData.events ) ) {
4972			return;
4973		}
4974
4975		// Once for each type.namespace in types; type may be omitted
4976		types = ( types || "" ).match( rnotwhite ) || [ "" ];
4977		t = types.length;
4978		while ( t-- ) {
4979			tmp = rtypenamespace.exec( types[ t ] ) || [];
4980			type = origType = tmp[ 1 ];
4981			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
4982
4983			// Unbind all events (on this namespace, if provided) for the element
4984			if ( !type ) {
4985				for ( type in events ) {
4986					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
4987				}
4988				continue;
4989			}
4990
4991			special = jQuery.event.special[ type ] || {};
4992			type = ( selector ? special.delegateType : special.bindType ) || type;
4993			handlers = events[ type ] || [];
4994			tmp = tmp[ 2 ] &&
4995				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
4996
4997			// Remove matching events
4998			origCount = j = handlers.length;
4999			while ( j-- ) {
5000				handleObj = handlers[ j ];
5001
5002				if ( ( mappedTypes || origType === handleObj.origType ) &&
5003					( !handler || handler.guid === handleObj.guid ) &&
5004					( !tmp || tmp.test( handleObj.namespace ) ) &&
5005					( !selector || selector === handleObj.selector ||
5006						selector === "**" && handleObj.selector ) ) {
5007					handlers.splice( j, 1 );
5008
5009					if ( handleObj.selector ) {
5010						handlers.delegateCount--;
5011					}
5012					if ( special.remove ) {
5013						special.remove.call( elem, handleObj );
5014					}
5015				}
5016			}
5017
5018			// Remove generic event handler if we removed something and no more handlers exist
5019			// (avoids potential for endless recursion during removal of special event handlers)
5020			if ( origCount && !handlers.length ) {
5021				if ( !special.teardown ||
5022					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
5023
5024					jQuery.removeEvent( elem, type, elemData.handle );
5025				}
5026
5027				delete events[ type ];
5028			}
5029		}
5030
5031		// Remove the expando if it's no longer used
5032		if ( jQuery.isEmptyObject( events ) ) {
5033			delete elemData.handle;
5034
5035			// removeData also checks for emptiness and clears the expando if empty
5036			// so use it instead of delete
5037			jQuery._removeData( elem, "events" );
5038		}
5039	},
5040
5041	trigger: function( event, data, elem, onlyHandlers ) {
5042		var handle, ontype, cur,
5043			bubbleType, special, tmp, i,
5044			eventPath = [ elem || document ],
5045			type = hasOwn.call( event, "type" ) ? event.type : event,
5046			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
5047
5048		cur = tmp = elem = elem || document;
5049
5050		// Don't do events on text and comment nodes
5051		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
5052			return;
5053		}
5054
5055		// focus/blur morphs to focusin/out; ensure we're not firing them right now
5056		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
5057			return;
5058		}
5059
5060		if ( type.indexOf( "." ) > -1 ) {
5061
5062			// Namespaced trigger; create a regexp to match event type in handle()
5063			namespaces = type.split( "." );
5064			type = namespaces.shift();
5065			namespaces.sort();
5066		}
5067		ontype = type.indexOf( ":" ) < 0 && "on" + type;
5068
5069		// Caller can pass in a jQuery.Event object, Object, or just an event type string
5070		event = event[ jQuery.expando ] ?
5071			event :
5072			new jQuery.Event( type, typeof event === "object" && event );
5073
5074		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
5075		event.isTrigger = onlyHandlers ? 2 : 3;
5076		event.namespace = namespaces.join( "." );
5077		event.rnamespace = event.namespace ?
5078			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
5079			null;
5080
5081		// Clean up the event in case it is being reused
5082		event.result = undefined;
5083		if ( !event.target ) {
5084			event.target = elem;
5085		}
5086
5087		// Clone any incoming data and prepend the event, creating the handler arg list
5088		data = data == null ?
5089			[ event ] :
5090			jQuery.makeArray( data, [ event ] );
5091
5092		// Allow special events to draw outside the lines
5093		special = jQuery.event.special[ type ] || {};
5094		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
5095			return;
5096		}
5097
5098		// Determine event propagation path in advance, per W3C events spec (#9951)
5099		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
5100		if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
5101
5102			bubbleType = special.delegateType || type;
5103			if ( !rfocusMorph.test( bubbleType + type ) ) {
5104				cur = cur.parentNode;
5105			}
5106			for ( ; cur; cur = cur.parentNode ) {
5107				eventPath.push( cur );
5108				tmp = cur;
5109			}
5110
5111			// Only add window if we got to document (e.g., not plain obj or detached DOM)
5112			if ( tmp === ( elem.ownerDocument || document ) ) {
5113				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
5114			}
5115		}
5116
5117		// Fire handlers on the event path
5118		i = 0;
5119		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
5120
5121			event.type = i > 1 ?
5122				bubbleType :
5123				special.bindType || type;
5124
5125			// jQuery handler
5126			handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] &&
5127				jQuery._data( cur, "handle" );
5128
5129			if ( handle ) {
5130				handle.apply( cur, data );
5131			}
5132
5133			// Native handler
5134			handle = ontype && cur[ ontype ];
5135			if ( handle && handle.apply && acceptData( cur ) ) {
5136				event.result = handle.apply( cur, data );
5137				if ( event.result === false ) {
5138					event.preventDefault();
5139				}
5140			}
5141		}
5142		event.type = type;
5143
5144		// If nobody prevented the default action, do it now
5145		if ( !onlyHandlers && !event.isDefaultPrevented() ) {
5146
5147			if (
5148				( !special._default ||
5149				 special._default.apply( eventPath.pop(), data ) === false
5150				) && acceptData( elem )
5151			) {
5152
5153				// Call a native DOM method on the target with the same name name as the event.
5154				// Can't use an .isFunction() check here because IE6/7 fails that test.
5155				// Don't do default actions on window, that's where global variables be (#6170)
5156				if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
5157
5158					// Don't re-trigger an onFOO event when we call its FOO() method
5159					tmp = elem[ ontype ];
5160
5161					if ( tmp ) {
5162						elem[ ontype ] = null;
5163					}
5164
5165					// Prevent re-triggering of the same event, since we already bubbled it above
5166					jQuery.event.triggered = type;
5167					try {
5168						elem[ type ]();
5169					} catch ( e ) {
5170
5171						// IE<9 dies on focus/blur to hidden element (#1486,#12518)
5172						// only reproducible on winXP IE8 native, not IE9 in IE8 mode
5173					}
5174					jQuery.event.triggered = undefined;
5175
5176					if ( tmp ) {
5177						elem[ ontype ] = tmp;
5178					}
5179				}
5180			}
5181		}
5182
5183		return event.result;
5184	},
5185
5186	dispatch: function( event ) {
5187
5188		// Make a writable jQuery.Event from the native event object
5189		event = jQuery.event.fix( event );
5190
5191		var i, j, ret, matched, handleObj,
5192			handlerQueue = [],
5193			args = slice.call( arguments ),
5194			handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
5195			special = jQuery.event.special[ event.type ] || {};
5196
5197		// Use the fix-ed jQuery.Event rather than the (read-only) native event
5198		args[ 0 ] = event;
5199		event.delegateTarget = this;
5200
5201		// Call the preDispatch hook for the mapped type, and let it bail if desired
5202		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
5203			return;
5204		}
5205
5206		// Determine handlers
5207		handlerQueue = jQuery.event.handlers.call( this, event, handlers );
5208
5209		// Run delegates first; they may want to stop propagation beneath us
5210		i = 0;
5211		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
5212			event.currentTarget = matched.elem;
5213
5214			j = 0;
5215			while ( ( handleObj = matched.handlers[ j++ ] ) &&
5216				!event.isImmediatePropagationStopped() ) {
5217
5218				// Triggered event must either 1) have no namespace, or 2) have namespace(s)
5219				// a subset or equal to those in the bound event (both can have no namespace).
5220				if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
5221
5222					event.handleObj = handleObj;
5223					event.data = handleObj.data;
5224
5225					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
5226						handleObj.handler ).apply( matched.elem, args );
5227
5228					if ( ret !== undefined ) {
5229						if ( ( event.result = ret ) === false ) {
5230							event.preventDefault();
5231							event.stopPropagation();
5232						}
5233					}
5234				}
5235			}
5236		}
5237
5238		// Call the postDispatch hook for the mapped type
5239		if ( special.postDispatch ) {
5240			special.postDispatch.call( this, event );
5241		}
5242
5243		return event.result;
5244	},
5245
5246	handlers: function( event, handlers ) {
5247		var i, matches, sel, handleObj,
5248			handlerQueue = [],
5249			delegateCount = handlers.delegateCount,
5250			cur = event.target;
5251
5252		// Support (at least): Chrome, IE9
5253		// Find delegate handlers
5254		// Black-hole SVG <use> instance trees (#13180)
5255		//
5256		// Support: Firefox<=42+
5257		// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
5258		if ( delegateCount && cur.nodeType &&
5259			( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
5260
5261			/* jshint eqeqeq: false */
5262			for ( ; cur != this; cur = cur.parentNode || this ) {
5263				/* jshint eqeqeq: true */
5264
5265				// Don't check non-elements (#13208)
5266				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
5267				if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
5268					matches = [];
5269					for ( i = 0; i < delegateCount; i++ ) {
5270						handleObj = handlers[ i ];
5271
5272						// Don't conflict with Object.prototype properties (#13203)
5273						sel = handleObj.selector + " ";
5274
5275						if ( matches[ sel ] === undefined ) {
5276							matches[ sel ] = handleObj.needsContext ?
5277								jQuery( sel, this ).index( cur ) > -1 :
5278								jQuery.find( sel, this, null, [ cur ] ).length;
5279						}
5280						if ( matches[ sel ] ) {
5281							matches.push( handleObj );
5282						}
5283					}
5284					if ( matches.length ) {
5285						handlerQueue.push( { elem: cur, handlers: matches } );
5286					}
5287				}
5288			}
5289		}
5290
5291		// Add the remaining (directly-bound) handlers
5292		if ( delegateCount < handlers.length ) {
5293			handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
5294		}
5295
5296		return handlerQueue;
5297	},
5298
5299	fix: function( event ) {
5300		if ( event[ jQuery.expando ] ) {
5301			return event;
5302		}
5303
5304		// Create a writable copy of the event object and normalize some properties
5305		var i, prop, copy,
5306			type = event.type,
5307			originalEvent = event,
5308			fixHook = this.fixHooks[ type ];
5309
5310		if ( !fixHook ) {
5311			this.fixHooks[ type ] = fixHook =
5312				rmouseEvent.test( type ) ? this.mouseHooks :
5313				rkeyEvent.test( type ) ? this.keyHooks :
5314				{};
5315		}
5316		copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
5317
5318		event = new jQuery.Event( originalEvent );
5319
5320		i = copy.length;
5321		while ( i-- ) {
5322			prop = copy[ i ];
5323			event[ prop ] = originalEvent[ prop ];
5324		}
5325
5326		// Support: IE<9
5327		// Fix target property (#1925)
5328		if ( !event.target ) {
5329			event.target = originalEvent.srcElement || document;
5330		}
5331
5332		// Support: Safari 6-8+
5333		// Target should not be a text node (#504, #13143)
5334		if ( event.target.nodeType === 3 ) {
5335			event.target = event.target.parentNode;
5336		}
5337
5338		// Support: IE<9
5339		// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
5340		event.metaKey = !!event.metaKey;
5341
5342		return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
5343	},
5344
5345	// Includes some event props shared by KeyEvent and MouseEvent
5346	props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +
5347		"metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ),
5348
5349	fixHooks: {},
5350
5351	keyHooks: {
5352		props: "char charCode key keyCode".split( " " ),
5353		filter: function( event, original ) {
5354
5355			// Add which for key events
5356			if ( event.which == null ) {
5357				event.which = original.charCode != null ? original.charCode : original.keyCode;
5358			}
5359
5360			return event;
5361		}
5362	},
5363
5364	mouseHooks: {
5365		props: ( "button buttons clientX clientY fromElement offsetX offsetY " +
5366			"pageX pageY screenX screenY toElement" ).split( " " ),
5367		filter: function( event, original ) {
5368			var body, eventDoc, doc,
5369				button = original.button,
5370				fromElement = original.fromElement;
5371
5372			// Calculate pageX/Y if missing and clientX/Y available
5373			if ( event.pageX == null && original.clientX != null ) {
5374				eventDoc = event.target.ownerDocument || document;
5375				doc = eventDoc.documentElement;
5376				body = eventDoc.body;
5377
5378				event.pageX = original.clientX +
5379					( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
5380					( doc && doc.clientLeft || body && body.clientLeft || 0 );
5381				event.pageY = original.clientY +
5382					( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) -
5383					( doc && doc.clientTop  || body && body.clientTop  || 0 );
5384			}
5385
5386			// Add relatedTarget, if necessary
5387			if ( !event.relatedTarget && fromElement ) {
5388				event.relatedTarget = fromElement === event.target ?
5389					original.toElement :
5390					fromElement;
5391			}
5392
5393			// Add which for click: 1 === left; 2 === middle; 3 === right
5394			// Note: button is not normalized, so don't use it
5395			if ( !event.which && button !== undefined ) {
5396				event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
5397			}
5398
5399			return event;
5400		}
5401	},
5402
5403	special: {
5404		load: {
5405
5406			// Prevent triggered image.load events from bubbling to window.load
5407			noBubble: true
5408		},
5409		focus: {
5410
5411			// Fire native event if possible so blur/focus sequence is correct
5412			trigger: function() {
5413				if ( this !== safeActiveElement() && this.focus ) {
5414					try {
5415						this.focus();
5416						return false;
5417					} catch ( e ) {
5418
5419						// Support: IE<9
5420						// If we error on focus to hidden element (#1486, #12518),
5421						// let .trigger() run the handlers
5422					}
5423				}
5424			},
5425			delegateType: "focusin"
5426		},
5427		blur: {
5428			trigger: function() {
5429				if ( this === safeActiveElement() && this.blur ) {
5430					this.blur();
5431					return false;
5432				}
5433			},
5434			delegateType: "focusout"
5435		},
5436		click: {
5437
5438			// For checkbox, fire native event so checked state will be right
5439			trigger: function() {
5440				if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
5441					this.click();
5442					return false;
5443				}
5444			},
5445
5446			// For cross-browser consistency, don't fire native .click() on links
5447			_default: function( event ) {
5448				return jQuery.nodeName( event.target, "a" );
5449			}
5450		},
5451
5452		beforeunload: {
5453			postDispatch: function( event ) {
5454
5455				// Support: Firefox 20+
5456				// Firefox doesn't alert if the returnValue field is not set.
5457				if ( event.result !== undefined && event.originalEvent ) {
5458					event.originalEvent.returnValue = event.result;
5459				}
5460			}
5461		}
5462	},
5463
5464	// Piggyback on a donor event to simulate a different one
5465	simulate: function( type, elem, event ) {
5466		var e = jQuery.extend(
5467			new jQuery.Event(),
5468			event,
5469			{
5470				type: type,
5471				isSimulated: true
5472
5473				// Previously, `originalEvent: {}` was set here, so stopPropagation call
5474				// would not be triggered on donor event, since in our own
5475				// jQuery.event.stopPropagation function we had a check for existence of
5476				// originalEvent.stopPropagation method, so, consequently it would be a noop.
5477				//
5478				// Guard for simulated events was moved to jQuery.event.stopPropagation function
5479				// since `originalEvent` should point to the original event for the
5480				// constancy with other events and for more focused logic
5481			}
5482		);
5483
5484		jQuery.event.trigger( e, null, elem );
5485
5486		if ( e.isDefaultPrevented() ) {
5487			event.preventDefault();
5488		}
5489	}
5490};
5491
5492jQuery.removeEvent = document.removeEventListener ?
5493	function( elem, type, handle ) {
5494
5495		// This "if" is needed for plain objects
5496		if ( elem.removeEventListener ) {
5497			elem.removeEventListener( type, handle );
5498		}
5499	} :
5500	function( elem, type, handle ) {
5501		var name = "on" + type;
5502
5503		if ( elem.detachEvent ) {
5504
5505			// #8545, #7054, preventing memory leaks for custom events in IE6-8
5506			// detachEvent needed property on element, by name of that event,
5507			// to properly expose it to GC
5508			if ( typeof elem[ name ] === "undefined" ) {
5509				elem[ name ] = null;
5510			}
5511
5512			elem.detachEvent( name, handle );
5513		}
5514	};
5515
5516jQuery.Event = function( src, props ) {
5517
5518	// Allow instantiation without the 'new' keyword
5519	if ( !( this instanceof jQuery.Event ) ) {
5520		return new jQuery.Event( src, props );
5521	}
5522
5523	// Event object
5524	if ( src && src.type ) {
5525		this.originalEvent = src;
5526		this.type = src.type;
5527
5528		// Events bubbling up the document may have been marked as prevented
5529		// by a handler lower down the tree; reflect the correct value.
5530		this.isDefaultPrevented = src.defaultPrevented ||
5531				src.defaultPrevented === undefined &&
5532
5533				// Support: IE < 9, Android < 4.0
5534				src.returnValue === false ?
5535			returnTrue :
5536			returnFalse;
5537
5538	// Event type
5539	} else {
5540		this.type = src;
5541	}
5542
5543	// Put explicitly provided properties onto the event object
5544	if ( props ) {
5545		jQuery.extend( this, props );
5546	}
5547
5548	// Create a timestamp if incoming event doesn't have one
5549	this.timeStamp = src && src.timeStamp || jQuery.now();
5550
5551	// Mark it as fixed
5552	this[ jQuery.expando ] = true;
5553};
5554
5555// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
5556// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
5557jQuery.Event.prototype = {
5558	constructor: jQuery.Event,
5559	isDefaultPrevented: returnFalse,
5560	isPropagationStopped: returnFalse,
5561	isImmediatePropagationStopped: returnFalse,
5562
5563	preventDefault: function() {
5564		var e = this.originalEvent;
5565
5566		this.isDefaultPrevented = returnTrue;
5567		if ( !e ) {
5568			return;
5569		}
5570
5571		// If preventDefault exists, run it on the original event
5572		if ( e.preventDefault ) {
5573			e.preventDefault();
5574
5575		// Support: IE
5576		// Otherwise set the returnValue property of the original event to false
5577		} else {
5578			e.returnValue = false;
5579		}
5580	},
5581	stopPropagation: function() {
5582		var e = this.originalEvent;
5583
5584		this.isPropagationStopped = returnTrue;
5585
5586		if ( !e || this.isSimulated ) {
5587			return;
5588		}
5589
5590		// If stopPropagation exists, run it on the original event
5591		if ( e.stopPropagation ) {
5592			e.stopPropagation();
5593		}
5594
5595		// Support: IE
5596		// Set the cancelBubble property of the original event to true
5597		e.cancelBubble = true;
5598	},
5599	stopImmediatePropagation: function() {
5600		var e = this.originalEvent;
5601
5602		this.isImmediatePropagationStopped = returnTrue;
5603
5604		if ( e && e.stopImmediatePropagation ) {
5605			e.stopImmediatePropagation();
5606		}
5607
5608		this.stopPropagation();
5609	}
5610};
5611
5612// Create mouseenter/leave events using mouseover/out and event-time checks
5613// so that event delegation works in jQuery.
5614// Do the same for pointerenter/pointerleave and pointerover/pointerout
5615//
5616// Support: Safari 7 only
5617// Safari sends mouseenter too often; see:
5618// https://code.google.com/p/chromium/issues/detail?id=470258
5619// for the description of the bug (it existed in older Chrome versions as well).
5620jQuery.each( {
5621	mouseenter: "mouseover",
5622	mouseleave: "mouseout",
5623	pointerenter: "pointerover",
5624	pointerleave: "pointerout"
5625}, function( orig, fix ) {
5626	jQuery.event.special[ orig ] = {
5627		delegateType: fix,
5628		bindType: fix,
5629
5630		handle: function( event ) {
5631			var ret,
5632				target = this,
5633				related = event.relatedTarget,
5634				handleObj = event.handleObj;
5635
5636			// For mouseenter/leave call the handler if related is outside the target.
5637			// NB: No relatedTarget if the mouse left/entered the browser window
5638			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
5639				event.type = handleObj.origType;
5640				ret = handleObj.handler.apply( this, arguments );
5641				event.type = fix;
5642			}
5643			return ret;
5644		}
5645	};
5646} );
5647
5648// IE submit delegation
5649if ( !support.submit ) {
5650
5651	jQuery.event.special.submit = {
5652		setup: function() {
5653
5654			// Only need this for delegated form submit events
5655			if ( jQuery.nodeName( this, "form" ) ) {
5656				return false;
5657			}
5658
5659			// Lazy-add a submit handler when a descendant form may potentially be submitted
5660			jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
5661
5662				// Node name check avoids a VML-related crash in IE (#9807)
5663				var elem = e.target,
5664					form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ?
5665
5666						// Support: IE <=8
5667						// We use jQuery.prop instead of elem.form
5668						// to allow fixing the IE8 delegated submit issue (gh-2332)
5669						// by 3rd party polyfills/workarounds.
5670						jQuery.prop( elem, "form" ) :
5671						undefined;
5672
5673				if ( form && !jQuery._data( form, "submit" ) ) {
5674					jQuery.event.add( form, "submit._submit", function( event ) {
5675						event._submitBubble = true;
5676					} );
5677					jQuery._data( form, "submit", true );
5678				}
5679			} );
5680
5681			// return undefined since we don't need an event listener
5682		},
5683
5684		postDispatch: function( event ) {
5685
5686			// If form was submitted by the user, bubble the event up the tree
5687			if ( event._submitBubble ) {
5688				delete event._submitBubble;
5689				if ( this.parentNode && !event.isTrigger ) {
5690					jQuery.event.simulate( "submit", this.parentNode, event );
5691				}
5692			}
5693		},
5694
5695		teardown: function() {
5696
5697			// Only need this for delegated form submit events
5698			if ( jQuery.nodeName( this, "form" ) ) {
5699				return false;
5700			}
5701
5702			// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
5703			jQuery.event.remove( this, "._submit" );
5704		}
5705	};
5706}
5707
5708// IE change delegation and checkbox/radio fix
5709if ( !support.change ) {
5710
5711	jQuery.event.special.change = {
5712
5713		setup: function() {
5714
5715			if ( rformElems.test( this.nodeName ) ) {
5716
5717				// IE doesn't fire change on a check/radio until blur; trigger it on click
5718				// after a propertychange. Eat the blur-change in special.change.handle.
5719				// This still fires onchange a second time for check/radio after blur.
5720				if ( this.type === "checkbox" || this.type === "radio" ) {
5721					jQuery.event.add( this, "propertychange._change", function( event ) {
5722						if ( event.originalEvent.propertyName === "checked" ) {
5723							this._justChanged = true;
5724						}
5725					} );
5726					jQuery.event.add( this, "click._change", function( event ) {
5727						if ( this._justChanged && !event.isTrigger ) {
5728							this._justChanged = false;
5729						}
5730
5731						// Allow triggered, simulated change events (#11500)
5732						jQuery.event.simulate( "change", this, event );
5733					} );
5734				}
5735				return false;
5736			}
5737
5738			// Delegated event; lazy-add a change handler on descendant inputs
5739			jQuery.event.add( this, "beforeactivate._change", function( e ) {
5740				var elem = e.target;
5741
5742				if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "change" ) ) {
5743					jQuery.event.add( elem, "change._change", function( event ) {
5744						if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
5745							jQuery.event.simulate( "change", this.parentNode, event );
5746						}
5747					} );
5748					jQuery._data( elem, "change", true );
5749				}
5750			} );
5751		},
5752
5753		handle: function( event ) {
5754			var elem = event.target;
5755
5756			// Swallow native change events from checkbox/radio, we already triggered them above
5757			if ( this !== elem || event.isSimulated || event.isTrigger ||
5758				( elem.type !== "radio" && elem.type !== "checkbox" ) ) {
5759
5760				return event.handleObj.handler.apply( this, arguments );
5761			}
5762		},
5763
5764		teardown: function() {
5765			jQuery.event.remove( this, "._change" );
5766
5767			return !rformElems.test( this.nodeName );
5768		}
5769	};
5770}
5771
5772// Support: Firefox
5773// Firefox doesn't have focus(in | out) events
5774// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
5775//
5776// Support: Chrome, Safari
5777// focus(in | out) events fire after focus & blur events,
5778// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
5779// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
5780if ( !support.focusin ) {
5781	jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
5782
5783		// Attach a single capturing handler on the document while someone wants focusin/focusout
5784		var handler = function( event ) {
5785			jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
5786		};
5787
5788		jQuery.event.special[ fix ] = {
5789			setup: function() {
5790				var doc = this.ownerDocument || this,
5791					attaches = jQuery._data( doc, fix );
5792
5793				if ( !attaches ) {
5794					doc.addEventListener( orig, handler, true );
5795				}
5796				jQuery._data( doc, fix, ( attaches || 0 ) + 1 );
5797			},
5798			teardown: function() {
5799				var doc = this.ownerDocument || this,
5800					attaches = jQuery._data( doc, fix ) - 1;
5801
5802				if ( !attaches ) {
5803					doc.removeEventListener( orig, handler, true );
5804					jQuery._removeData( doc, fix );
5805				} else {
5806					jQuery._data( doc, fix, attaches );
5807				}
5808			}
5809		};
5810	} );
5811}
5812
5813jQuery.fn.extend( {
5814
5815	on: function( types, selector, data, fn ) {
5816		return on( this, types, selector, data, fn );
5817	},
5818	one: function( types, selector, data, fn ) {
5819		return on( this, types, selector, data, fn, 1 );
5820	},
5821	off: function( types, selector, fn ) {
5822		var handleObj, type;
5823		if ( types && types.preventDefault && types.handleObj ) {
5824
5825			// ( event )  dispatched jQuery.Event
5826			handleObj = types.handleObj;
5827			jQuery( types.delegateTarget ).off(
5828				handleObj.namespace ?
5829					handleObj.origType + "." + handleObj.namespace :
5830					handleObj.origType,
5831				handleObj.selector,
5832				handleObj.handler
5833			);
5834			return this;
5835		}
5836		if ( typeof types === "object" ) {
5837
5838			// ( types-object [, selector] )
5839			for ( type in types ) {
5840				this.off( type, selector, types[ type ] );
5841			}
5842			return this;
5843		}
5844		if ( selector === false || typeof selector === "function" ) {
5845
5846			// ( types [, fn] )
5847			fn = selector;
5848			selector = undefined;
5849		}
5850		if ( fn === false ) {
5851			fn = returnFalse;
5852		}
5853		return this.each( function() {
5854			jQuery.event.remove( this, types, fn, selector );
5855		} );
5856	},
5857
5858	trigger: function( type, data ) {
5859		return this.each( function() {
5860			jQuery.event.trigger( type, data, this );
5861		} );
5862	},
5863	triggerHandler: function( type, data ) {
5864		var elem = this[ 0 ];
5865		if ( elem ) {
5866			return jQuery.event.trigger( type, data, elem, true );
5867		}
5868	}
5869} );
5870
5871
5872var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
5873	rnoshimcache = new RegExp( "<(?:" + nodeNames + ")[\\s/>]", "i" ),
5874	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
5875
5876	// Support: IE 10-11, Edge 10240+
5877	// In IE/Edge using regex groups here causes severe slowdowns.
5878	// See https://connect.microsoft.com/IE/feedback/details/1736512/
5879	rnoInnerhtml = /<script|<style|<link/i,
5880
5881	// checked="checked" or checked
5882	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5883	rscriptTypeMasked = /^true\/(.*)/,
5884	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
5885	safeFragment = createSafeFragment( document ),
5886	fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) );
5887
5888// Support: IE<8
5889// Manipulating tables requires a tbody
5890function manipulationTarget( elem, content ) {
5891	return jQuery.nodeName( elem, "table" ) &&
5892		jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
5893
5894		elem.getElementsByTagName( "tbody" )[ 0 ] ||
5895			elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) :
5896		elem;
5897}
5898
5899// Replace/restore the type attribute of script elements for safe DOM manipulation
5900function disableScript( elem ) {
5901	elem.type = ( jQuery.find.attr( elem, "type" ) !== null ) + "/" + elem.type;
5902	return elem;
5903}
5904function restoreScript( elem ) {
5905	var match = rscriptTypeMasked.exec( elem.type );
5906	if ( match ) {
5907		elem.type = match[ 1 ];
5908	} else {
5909		elem.removeAttribute( "type" );
5910	}
5911	return elem;
5912}
5913
5914function cloneCopyEvent( src, dest ) {
5915	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
5916		return;
5917	}
5918
5919	var type, i, l,
5920		oldData = jQuery._data( src ),
5921		curData = jQuery._data( dest, oldData ),
5922		events = oldData.events;
5923
5924	if ( events ) {
5925		delete curData.handle;
5926		curData.events = {};
5927
5928		for ( type in events ) {
5929			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
5930				jQuery.event.add( dest, type, events[ type ][ i ] );
5931			}
5932		}
5933	}
5934
5935	// make the cloned public data object a copy from the original
5936	if ( curData.data ) {
5937		curData.data = jQuery.extend( {}, curData.data );
5938	}
5939}
5940
5941function fixCloneNodeIssues( src, dest ) {
5942	var nodeName, e, data;
5943
5944	// We do not need to do anything for non-Elements
5945	if ( dest.nodeType !== 1 ) {
5946		return;
5947	}
5948
5949	nodeName = dest.nodeName.toLowerCase();
5950
5951	// IE6-8 copies events bound via attachEvent when using cloneNode.
5952	if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
5953		data = jQuery._data( dest );
5954
5955		for ( e in data.events ) {
5956			jQuery.removeEvent( dest, e, data.handle );
5957		}
5958
5959		// Event data gets referenced instead of copied if the expando gets copied too
5960		dest.removeAttribute( jQuery.expando );
5961	}
5962
5963	// IE blanks contents when cloning scripts, and tries to evaluate newly-set text
5964	if ( nodeName === "script" && dest.text !== src.text ) {
5965		disableScript( dest ).text = src.text;
5966		restoreScript( dest );
5967
5968	// IE6-10 improperly clones children of object elements using classid.
5969	// IE10 throws NoModificationAllowedError if parent is null, #12132.
5970	} else if ( nodeName === "object" ) {
5971		if ( dest.parentNode ) {
5972			dest.outerHTML = src.outerHTML;
5973		}
5974
5975		// This path appears unavoidable for IE9. When cloning an object
5976		// element in IE9, the outerHTML strategy above is not sufficient.
5977		// If the src has innerHTML and the destination does not,
5978		// copy the src.innerHTML into the dest.innerHTML. #10324
5979		if ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {
5980			dest.innerHTML = src.innerHTML;
5981		}
5982
5983	} else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
5984
5985		// IE6-8 fails to persist the checked state of a cloned checkbox
5986		// or radio button. Worse, IE6-7 fail to give the cloned element
5987		// a checked appearance if the defaultChecked value isn't also set
5988
5989		dest.defaultChecked = dest.checked = src.checked;
5990
5991		// IE6-7 get confused and end up setting the value of a cloned
5992		// checkbox/radio button to an empty string instead of "on"
5993		if ( dest.value !== src.value ) {
5994			dest.value = src.value;
5995		}
5996
5997	// IE6-8 fails to return the selected option to the default selected
5998	// state when cloning options
5999	} else if ( nodeName === "option" ) {
6000		dest.defaultSelected = dest.selected = src.defaultSelected;
6001
6002	// IE6-8 fails to set the defaultValue to the correct value when
6003	// cloning other types of input fields
6004	} else if ( nodeName === "input" || nodeName === "textarea" ) {
6005		dest.defaultValue = src.defaultValue;
6006	}
6007}
6008
6009function domManip( collection, args, callback, ignored ) {
6010
6011	// Flatten any nested arrays
6012	args = concat.apply( [], args );
6013
6014	var first, node, hasScripts,
6015		scripts, doc, fragment,
6016		i = 0,
6017		l = collection.length,
6018		iNoClone = l - 1,
6019		value = args[ 0 ],
6020		isFunction = jQuery.isFunction( value );
6021
6022	// We can't cloneNode fragments that contain checked, in WebKit
6023	if ( isFunction ||
6024			( l > 1 && typeof value === "string" &&
6025				!support.checkClone && rchecked.test( value ) ) ) {
6026		return collection.each( function( index ) {
6027			var self = collection.eq( index );
6028			if ( isFunction ) {
6029				args[ 0 ] = value.call( this, index, self.html() );
6030			}
6031			domManip( self, args, callback, ignored );
6032		} );
6033	}
6034
6035	if ( l ) {
6036		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
6037		first = fragment.firstChild;
6038
6039		if ( fragment.childNodes.length === 1 ) {
6040			fragment = first;
6041		}
6042
6043		// Require either new content or an interest in ignored elements to invoke the callback
6044		if ( first || ignored ) {
6045			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
6046			hasScripts = scripts.length;
6047
6048			// Use the original fragment for the last item
6049			// instead of the first because it can end up
6050			// being emptied incorrectly in certain situations (#8070).
6051			for ( ; i < l; i++ ) {
6052				node = fragment;
6053
6054				if ( i !== iNoClone ) {
6055					node = jQuery.clone( node, true, true );
6056
6057					// Keep references to cloned scripts for later restoration
6058					if ( hasScripts ) {
6059
6060						// Support: Android<4.1, PhantomJS<2
6061						// push.apply(_, arraylike) throws on ancient WebKit
6062						jQuery.merge( scripts, getAll( node, "script" ) );
6063					}
6064				}
6065
6066				callback.call( collection[ i ], node, i );
6067			}
6068
6069			if ( hasScripts ) {
6070				doc = scripts[ scripts.length - 1 ].ownerDocument;
6071
6072				// Reenable scripts
6073				jQuery.map( scripts, restoreScript );
6074
6075				// Evaluate executable scripts on first document insertion
6076				for ( i = 0; i < hasScripts; i++ ) {
6077					node = scripts[ i ];
6078					if ( rscriptType.test( node.type || "" ) &&
6079						!jQuery._data( node, "globalEval" ) &&
6080						jQuery.contains( doc, node ) ) {
6081
6082						if ( node.src ) {
6083
6084							// Optional AJAX dependency, but won't run scripts if not present
6085							if ( jQuery._evalUrl ) {
6086								jQuery._evalUrl( node.src );
6087							}
6088						} else {
6089							jQuery.globalEval(
6090								( node.text || node.textContent || node.innerHTML || "" )
6091									.replace( rcleanScript, "" )
6092							);
6093						}
6094					}
6095				}
6096			}
6097
6098			// Fix #11809: Avoid leaking memory
6099			fragment = first = null;
6100		}
6101	}
6102
6103	return collection;
6104}
6105
6106function remove( elem, selector, keepData ) {
6107	var node,
6108		elems = selector ? jQuery.filter( selector, elem ) : elem,
6109		i = 0;
6110
6111	for ( ; ( node = elems[ i ] ) != null; i++ ) {
6112
6113		if ( !keepData && node.nodeType === 1 ) {
6114			jQuery.cleanData( getAll( node ) );
6115		}
6116
6117		if ( node.parentNode ) {
6118			if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
6119				setGlobalEval( getAll( node, "script" ) );
6120			}
6121			node.parentNode.removeChild( node );
6122		}
6123	}
6124
6125	return elem;
6126}
6127
6128jQuery.extend( {
6129	htmlPrefilter: function( html ) {
6130		return html.replace( rxhtmlTag, "<$1></$2>" );
6131	},
6132
6133	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
6134		var destElements, node, clone, i, srcElements,
6135			inPage = jQuery.contains( elem.ownerDocument, elem );
6136
6137		if ( support.html5Clone || jQuery.isXMLDoc( elem ) ||
6138			!rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
6139
6140			clone = elem.cloneNode( true );
6141
6142		// IE<=8 does not properly clone detached, unknown element nodes
6143		} else {
6144			fragmentDiv.innerHTML = elem.outerHTML;
6145			fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
6146		}
6147
6148		if ( ( !support.noCloneEvent || !support.noCloneChecked ) &&
6149				( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) {
6150
6151			// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
6152			destElements = getAll( clone );
6153			srcElements = getAll( elem );
6154
6155			// Fix all IE cloning issues
6156			for ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) {
6157
6158				// Ensure that the destination node is not null; Fixes #9587
6159				if ( destElements[ i ] ) {
6160					fixCloneNodeIssues( node, destElements[ i ] );
6161				}
6162			}
6163		}
6164
6165		// Copy the events from the original to the clone
6166		if ( dataAndEvents ) {
6167			if ( deepDataAndEvents ) {
6168				srcElements = srcElements || getAll( elem );
6169				destElements = destElements || getAll( clone );
6170
6171				for ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) {
6172					cloneCopyEvent( node, destElements[ i ] );
6173				}
6174			} else {
6175				cloneCopyEvent( elem, clone );
6176			}
6177		}
6178
6179		// Preserve script evaluation history
6180		destElements = getAll( clone, "script" );
6181		if ( destElements.length > 0 ) {
6182			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
6183		}
6184
6185		destElements = srcElements = node = null;
6186
6187		// Return the cloned set
6188		return clone;
6189	},
6190
6191	cleanData: function( elems, /* internal */ forceAcceptData ) {
6192		var elem, type, id, data,
6193			i = 0,
6194			internalKey = jQuery.expando,
6195			cache = jQuery.cache,
6196			attributes = support.attributes,
6197			special = jQuery.event.special;
6198
6199		for ( ; ( elem = elems[ i ] ) != null; i++ ) {
6200			if ( forceAcceptData || acceptData( elem ) ) {
6201
6202				id = elem[ internalKey ];
6203				data = id && cache[ id ];
6204
6205				if ( data ) {
6206					if ( data.events ) {
6207						for ( type in data.events ) {
6208							if ( special[ type ] ) {
6209								jQuery.event.remove( elem, type );
6210
6211							// This is a shortcut to avoid jQuery.event.remove's overhead
6212							} else {
6213								jQuery.removeEvent( elem, type, data.handle );
6214							}
6215						}
6216					}
6217
6218					// Remove cache only if it was not already removed by jQuery.event.remove
6219					if ( cache[ id ] ) {
6220
6221						delete cache[ id ];
6222
6223						// Support: IE<9
6224						// IE does not allow us to delete expando properties from nodes
6225						// IE creates expando attributes along with the property
6226						// IE does not have a removeAttribute function on Document nodes
6227						if ( !attributes && typeof elem.removeAttribute !== "undefined" ) {
6228							elem.removeAttribute( internalKey );
6229
6230						// Webkit & Blink performance suffers when deleting properties
6231						// from DOM nodes, so set to undefined instead
6232						// https://code.google.com/p/chromium/issues/detail?id=378607
6233						} else {
6234							elem[ internalKey ] = undefined;
6235						}
6236
6237						deletedIds.push( id );
6238					}
6239				}
6240			}
6241		}
6242	}
6243} );
6244
6245jQuery.fn.extend( {
6246
6247	// Keep domManip exposed until 3.0 (gh-2225)
6248	domManip: domManip,
6249
6250	detach: function( selector ) {
6251		return remove( this, selector, true );
6252	},
6253
6254	remove: function( selector ) {
6255		return remove( this, selector );
6256	},
6257
6258	text: function( value ) {
6259		return access( this, function( value ) {
6260			return value === undefined ?
6261				jQuery.text( this ) :
6262				this.empty().append(
6263					( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value )
6264				);
6265		}, null, value, arguments.length );
6266	},
6267
6268	append: function() {
6269		return domManip( this, arguments, function( elem ) {
6270			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6271				var target = manipulationTarget( this, elem );
6272				target.appendChild( elem );
6273			}
6274		} );
6275	},
6276
vendor: 4,288 bytes, lines 6277-6450
6277	prepend: function() {
6278		return domManip( this, arguments, function( elem ) {
6279			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6280				var target = manipulationTarget( this, elem );
6281				target.insertBefore( elem, target.firstChild );
6282			}
6283		} );
6284	},
6285
6286	before: function() {
6287		return domManip( this, arguments, function( elem ) {
6288			if ( this.parentNode ) {
6289				this.parentNode.insertBefore( elem, this );
6290			}
6291		} );
6292	},
6293
6294	after: function() {
6295		return domManip( this, arguments, function( elem ) {
6296			if ( this.parentNode ) {
6297				this.parentNode.insertBefore( elem, this.nextSibling );
6298			}
6299		} );
6300	},
6301
6302	empty: function() {
6303		var elem,
6304			i = 0;
6305
6306		for ( ; ( elem = this[ i ] ) != null; i++ ) {
6307
6308			// Remove element nodes and prevent memory leaks
6309			if ( elem.nodeType === 1 ) {
6310				jQuery.cleanData( getAll( elem, false ) );
6311			}
6312
6313			// Remove any remaining nodes
6314			while ( elem.firstChild ) {
6315				elem.removeChild( elem.firstChild );
6316			}
6317
6318			// If this is a select, ensure that it displays empty (#12336)
6319			// Support: IE<9
6320			if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
6321				elem.options.length = 0;
6322			}
6323		}
6324
6325		return this;
6326	},
6327
6328	clone: function( dataAndEvents, deepDataAndEvents ) {
6329		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
6330		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
6331
6332		return this.map( function() {
6333			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
6334		} );
6335	},
6336
6337	html: function( value ) {
6338		return access( this, function( value ) {
6339			var elem = this[ 0 ] || {},
6340				i = 0,
6341				l = this.length;
6342
6343			if ( value === undefined ) {
6344				return elem.nodeType === 1 ?
6345					elem.innerHTML.replace( rinlinejQuery, "" ) :
6346					undefined;
6347			}
6348
6349			// See if we can take a shortcut and just use innerHTML
6350			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
6351				( support.htmlSerialize || !rnoshimcache.test( value )  ) &&
6352				( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
6353				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
6354
6355				value = jQuery.htmlPrefilter( value );
6356
6357				try {
6358					for ( ; i < l; i++ ) {
6359
6360						// Remove element nodes and prevent memory leaks
6361						elem = this[ i ] || {};
6362						if ( elem.nodeType === 1 ) {
6363							jQuery.cleanData( getAll( elem, false ) );
6364							elem.innerHTML = value;
6365						}
6366					}
6367
6368					elem = 0;
6369
6370				// If using innerHTML throws an exception, use the fallback method
6371				} catch ( e ) {}
6372			}
6373
6374			if ( elem ) {
6375				this.empty().append( value );
6376			}
6377		}, null, value, arguments.length );
6378	},
6379
6380	replaceWith: function() {
6381		var ignored = [];
6382
6383		// Make the changes, replacing each non-ignored context element with the new content
6384		return domManip( this, arguments, function( elem ) {
6385			var parent = this.parentNode;
6386
6387			if ( jQuery.inArray( this, ignored ) < 0 ) {
6388				jQuery.cleanData( getAll( this ) );
6389				if ( parent ) {
6390					parent.replaceChild( elem, this );
6391				}
6392			}
6393
6394		// Force callback invocation
6395		}, ignored );
6396	}
6397} );
6398
6399jQuery.each( {
6400	appendTo: "append",
6401	prependTo: "prepend",
6402	insertBefore: "before",
6403	insertAfter: "after",
6404	replaceAll: "replaceWith"
6405}, function( name, original ) {
6406	jQuery.fn[ name ] = function( selector ) {
6407		var elems,
6408			i = 0,
6409			ret = [],
6410			insert = jQuery( selector ),
6411			last = insert.length - 1;
6412
6413		for ( ; i <= last; i++ ) {
6414			elems = i === last ? this : this.clone( true );
6415			jQuery( insert[ i ] )[ original ]( elems );
6416
6417			// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
6418			push.apply( ret, elems.get() );
6419		}
6420
6421		return this.pushStack( ret );
6422	};
6423} );
6424
6425
6426var iframe,
6427	elemdisplay = {
6428
6429		// Support: Firefox
6430		// We have to pre-define these values for FF (#10227)
6431		HTML: "block",
6432		BODY: "block"
6433	};
6434
6435/**
6436 * Retrieve the actual display of a element
6437 * @param {String} name nodeName of the element
6438 * @param {Object} doc Document object
6439 */
6440
6441// Called only from within defaultDisplay
6442function actualDisplay( name, doc ) {
6443	var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
6444
6445		display = jQuery.css( elem[ 0 ], "display" );
6446
6447	// We don't have any data stored on the element,
6448	// so use "detach" method as fast way to get rid of the element
6449	elem.detach();
6450
6451	return display;
6452}
6453
6454/**
6455 * Try to determine the default display value of an element
6456 * @param {String} nodeName
6457 */
6458function defaultDisplay( nodeName ) {
6459	var doc = document,
6460		display = elemdisplay[ nodeName ];
6461
6462	if ( !display ) {
6463		display = actualDisplay( nodeName, doc );
6464
6465		// If the simple way fails, read from inside an iframe
6466		if ( display === "none" || !display ) {
6467
6468			// Use the already-created iframe if possible
6469			iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
6470				.appendTo( doc.documentElement );
6471
6472			// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
6473			doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
6474
6475			// Support: IE
6476			doc.write();
6477			doc.close();
6478
6479			display = actualDisplay( nodeName, doc );
6480			iframe.detach();
6481		}
6482
6483		// Store the correct default display
6484		elemdisplay[ nodeName ] = display;
6485	}
6486
6487	return display;
6488}
6489var rmargin = ( /^margin/ );
6490
6491var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
6492
6493var swap = function( elem, options, callback, args ) {
6494	var ret, name,
6495		old = {};
6496
6497	// Remember the old values, and insert the new ones
6498	for ( name in options ) {
6499		old[ name ] = elem.style[ name ];
6500		elem.style[ name ] = options[ name ];
6501	}
6502
6503	ret = callback.apply( elem, args || [] );
6504
6505	// Revert the old values
6506	for ( name in options ) {
6507		elem.style[ name ] = old[ name ];
6508	}
6509
6510	return ret;
6511};
6512
6513
6514var documentElement = document.documentElement;
6515
6516
6517
6518( function() {
6519	var pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal,
6520		reliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal,
6521		container = document.createElement( "div" ),
6522		div = document.createElement( "div" );
6523
6524	// Finish early in limited (non-browser) environments
6525	if ( !div.style ) {
6526		return;
6527	}
6528
6529	div.style.cssText = "float:left;opacity:.5";
6530
6531	// Support: IE<9
6532	// Make sure that element opacity exists (as opposed to filter)
6533	support.opacity = div.style.opacity === "0.5";
6534
6535	// Verify style float existence
6536	// (IE uses styleFloat instead of cssFloat)
6537	support.cssFloat = !!div.style.cssFloat;
6538
6539	div.style.backgroundClip = "content-box";
6540	div.cloneNode( true ).style.backgroundClip = "";
6541	support.clearCloneStyle = div.style.backgroundClip === "content-box";
6542
6543	container = document.createElement( "div" );
6544	container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
6545		"padding:0;margin-top:1px;position:absolute";
6546	div.innerHTML = "";
6547	container.appendChild( div );
6548
6549	// Support: Firefox<29, Android 2.3
6550	// Vendor-prefix box-sizing
6551	support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" ||
6552		div.style.WebkitBoxSizing === "";
6553
6554	jQuery.extend( support, {
6555		reliableHiddenOffsets: function() {
6556			if ( pixelPositionVal == null ) {
6557				computeStyleTests();
6558			}
6559			return reliableHiddenOffsetsVal;
6560		},
6561
6562		boxSizingReliable: function() {
6563
6564			// We're checking for pixelPositionVal here instead of boxSizingReliableVal
6565			// since that compresses better and they're computed together anyway.
6566			if ( pixelPositionVal == null ) {
6567				computeStyleTests();
6568			}
6569			return boxSizingReliableVal;
6570		},
6571
6572		pixelMarginRight: function() {
6573
6574			// Support: Android 4.0-4.3
6575			if ( pixelPositionVal == null ) {
6576				computeStyleTests();
6577			}
6578			return pixelMarginRightVal;
6579		},
6580
6581		pixelPosition: function() {
6582			if ( pixelPositionVal == null ) {
6583				computeStyleTests();
6584			}
6585			return pixelPositionVal;
6586		},
6587
6588		reliableMarginRight: function() {
6589
6590			// Support: Android 2.3
6591			if ( pixelPositionVal == null ) {
6592				computeStyleTests();
6593			}
6594			return reliableMarginRightVal;
6595		},
6596
6597		reliableMarginLeft: function() {
6598
6599			// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
6600			if ( pixelPositionVal == null ) {
6601				computeStyleTests();
6602			}
6603			return reliableMarginLeftVal;
6604		}
6605	} );
6606
6607	function computeStyleTests() {
6608		var contents, divStyle,
6609			documentElement = document.documentElement;
6610
6611		// Setup
6612		documentElement.appendChild( container );
6613
6614		div.style.cssText =
6615
6616			// Support: Android 2.3
6617			// Vendor-prefix box-sizing
6618			"-webkit-box-sizing:border-box;box-sizing:border-box;" +
6619			"position:relative;display:block;" +
6620			"margin:auto;border:1px;padding:1px;" +
6621			"top:1%;width:50%";
6622
6623		// Support: IE<9
6624		// Assume reasonable values in the absence of getComputedStyle
6625		pixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false;
6626		pixelMarginRightVal = reliableMarginRightVal = true;
6627
6628		// Check for getComputedStyle so that this code is not run in IE<9.
6629		if ( window.getComputedStyle ) {
6630			divStyle = window.getComputedStyle( div );
6631			pixelPositionVal = ( divStyle || {} ).top !== "1%";
6632			reliableMarginLeftVal = ( divStyle || {} ).marginLeft === "2px";
6633			boxSizingReliableVal = ( divStyle || { width: "4px" } ).width === "4px";
6634
6635			// Support: Android 4.0 - 4.3 only
6636			// Some styles come back with percentage values, even though they shouldn't
6637			div.style.marginRight = "50%";
6638			pixelMarginRightVal = ( divStyle || { marginRight: "4px" } ).marginRight === "4px";
6639
6640			// Support: Android 2.3 only
6641			// Div with explicit width and no margin-right incorrectly
6642			// gets computed margin-right based on width of container (#3333)
6643			// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
6644			contents = div.appendChild( document.createElement( "div" ) );
6645
6646			// Reset CSS: box-sizing; display; margin; border; padding
6647			contents.style.cssText = div.style.cssText =
6648
6649				// Support: Android 2.3
6650				// Vendor-prefix box-sizing
6651				"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
6652				"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
6653			contents.style.marginRight = contents.style.width = "0";
6654			div.style.width = "1px";
6655
6656			reliableMarginRightVal =
6657				!parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );
6658
6659			div.removeChild( contents );
6660		}
6661
6662		// Support: IE6-8
6663		// First check that getClientRects works as expected
6664		// Check if table cells still have offsetWidth/Height when they are set
6665		// to display:none and there are still other visible table cells in a
6666		// table row; if so, offsetWidth/Height are not reliable for use when
6667		// determining if an element has been hidden directly using
6668		// display:none (it is still safe to use offsets if a parent element is
6669		// hidden; don safety goggles and see bug #4512 for more information).
6670		div.style.display = "none";
6671		reliableHiddenOffsetsVal = div.getClientRects().length === 0;
6672		if ( reliableHiddenOffsetsVal ) {
6673			div.style.display = "";
6674			div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
6675			div.childNodes[ 0 ].style.borderCollapse = "separate";
6676			contents = div.getElementsByTagName( "td" );
6677			contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";
6678			reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
6679			if ( reliableHiddenOffsetsVal ) {
6680				contents[ 0 ].style.display = "";
6681				contents[ 1 ].style.display = "none";
6682				reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
6683			}
6684		}
6685
6686		// Teardown
6687		documentElement.removeChild( container );
6688	}
6689
6690} )();
6691
6692
6693var getStyles, curCSS,
6694	rposition = /^(top|right|bottom|left)$/;
6695
6696if ( window.getComputedStyle ) {
6697	getStyles = function( elem ) {
6698
6699		// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
6700		// IE throws on elements created in popups
6701		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
6702		var view = elem.ownerDocument.defaultView;
6703
6704		if ( !view || !view.opener ) {
6705			view = window;
6706		}
6707
6708		return view.getComputedStyle( elem );
6709	};
6710
6711	curCSS = function( elem, name, computed ) {
6712		var width, minWidth, maxWidth, ret,
6713			style = elem.style;
6714
6715		computed = computed || getStyles( elem );
6716
6717		// getPropertyValue is only needed for .css('filter') in IE9, see #12537
6718		ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
6719
6720		// Support: Opera 12.1x only
6721		// Fall back to style even without computed
6722		// computed is undefined for elems on document fragments
6723		if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
6724			ret = jQuery.style( elem, name );
6725		}
6726
6727		if ( computed ) {
6728
6729			// A tribute to the "awesome hack by Dean Edwards"
6730			// Chrome < 17 and Safari 5.0 uses "computed value"
6731			// instead of "used value" for margin-right
6732			// Safari 5.1.7 (at least) returns percentage for a larger set of values,
6733			// but width seems to be reliably pixels
6734			// this is against the CSSOM draft spec:
6735			// http://dev.w3.org/csswg/cssom/#resolved-values
6736			if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
6737
6738				// Remember the original values
6739				width = style.width;
6740				minWidth = style.minWidth;
6741				maxWidth = style.maxWidth;
6742
6743				// Put in the new values to get a computed value out
6744				style.minWidth = style.maxWidth = style.width = ret;
6745				ret = computed.width;
6746
6747				// Revert the changed values
6748				style.width = width;
6749				style.minWidth = minWidth;
6750				style.maxWidth = maxWidth;
6751			}
6752		}
6753
vendor: 4,152 bytes, lines 6754-6916
6754		// Support: IE
6755		// IE returns zIndex value as an integer.
6756		return ret === undefined ?
6757			ret :
6758			ret + "";
6759	};
6760} else if ( documentElement.currentStyle ) {
6761	getStyles = function( elem ) {
6762		return elem.currentStyle;
6763	};
6764
6765	curCSS = function( elem, name, computed ) {
6766		var left, rs, rsLeft, ret,
6767			style = elem.style;
6768
6769		computed = computed || getStyles( elem );
6770		ret = computed ? computed[ name ] : undefined;
6771
6772		// Avoid setting ret to empty string here
6773		// so we don't default to auto
6774		if ( ret == null && style && style[ name ] ) {
6775			ret = style[ name ];
6776		}
6777
6778		// From the awesome hack by Dean Edwards
6779		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
6780
6781		// If we're not dealing with a regular pixel number
6782		// but a number that has a weird ending, we need to convert it to pixels
6783		// but not position css attributes, as those are
6784		// proportional to the parent element instead
6785		// and we can't measure the parent instead because it
6786		// might trigger a "stacking dolls" problem
6787		if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
6788
6789			// Remember the original values
6790			left = style.left;
6791			rs = elem.runtimeStyle;
6792			rsLeft = rs && rs.left;
6793
6794			// Put in the new values to get a computed value out
6795			if ( rsLeft ) {
6796				rs.left = elem.currentStyle.left;
6797			}
6798			style.left = name === "fontSize" ? "1em" : ret;
6799			ret = style.pixelLeft + "px";
6800
6801			// Revert the changed values
6802			style.left = left;
6803			if ( rsLeft ) {
6804				rs.left = rsLeft;
6805			}
6806		}
6807
6808		// Support: IE
6809		// IE returns zIndex value as an integer.
6810		return ret === undefined ?
6811			ret :
6812			ret + "" || "auto";
6813	};
6814}
6815
6816
6817
6818
6819function addGetHookIf( conditionFn, hookFn ) {
6820
6821	// Define the hook, we'll check on the first run if it's really needed.
6822	return {
6823		get: function() {
6824			if ( conditionFn() ) {
6825
6826				// Hook not needed (or it's not possible to use it due
6827				// to missing dependency), remove it.
6828				delete this.get;
6829				return;
6830			}
6831
6832			// Hook needed; redefine it so that the support test is not executed again.
6833			return ( this.get = hookFn ).apply( this, arguments );
6834		}
6835	};
6836}
6837
6838
6839var
6840
6841		ralpha = /alpha\([^)]*\)/i,
6842	ropacity = /opacity\s*=\s*([^)]*)/i,
6843
6844	// swappable if display is none or starts with table except
6845	// "table", "table-cell", or "table-caption"
6846	// see here for display values:
6847	// https://developer.mozilla.org/en-US/docs/CSS/display
6848	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6849	rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
6850
6851	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6852	cssNormalTransform = {
6853		letterSpacing: "0",
6854		fontWeight: "400"
6855	},
6856
6857	cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
6858	emptyStyle = document.createElement( "div" ).style;
6859
6860
6861// return a css property mapped to a potentially vendor prefixed property
6862function vendorPropName( name ) {
6863
6864	// shortcut for names that are not vendor prefixed
6865	if ( name in emptyStyle ) {
6866		return name;
6867	}
6868
6869	// check for vendor prefixed names
6870	var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),
6871		i = cssPrefixes.length;
6872
6873	while ( i-- ) {
6874		name = cssPrefixes[ i ] + capName;
6875		if ( name in emptyStyle ) {
6876			return name;
6877		}
6878	}
6879}
6880
6881function showHide( elements, show ) {
6882	var display, elem, hidden,
6883		values = [],
6884		index = 0,
6885		length = elements.length;
6886
6887	for ( ; index < length; index++ ) {
6888		elem = elements[ index ];
6889		if ( !elem.style ) {
6890			continue;
6891		}
6892
6893		values[ index ] = jQuery._data( elem, "olddisplay" );
6894		display = elem.style.display;
6895		if ( show ) {
6896
6897			// Reset the inline display of this element to learn if it is
6898			// being hidden by cascaded rules or not
6899			if ( !values[ index ] && display === "none" ) {
6900				elem.style.display = "";
6901			}
6902
6903			// Set elements which have been overridden with display: none
6904			// in a stylesheet to whatever the default browser style is
6905			// for such an element
6906			if ( elem.style.display === "" && isHidden( elem ) ) {
6907				values[ index ] =
6908					jQuery._data( elem, "olddisplay", defaultDisplay( elem.nodeName ) );
6909			}
6910		} else {
6911			hidden = isHidden( elem );
6912
6913			if ( display && display !== "none" || !hidden ) {
6914				jQuery._data(
6915					elem,
6916					"olddisplay",
vendor: 6,043 bytes, lines 6917-7128
6917					hidden ? display : jQuery.css( elem, "display" )
6918				);
6919			}
6920		}
6921	}
6922
6923	// Set the display of most of the elements in a second loop
6924	// to avoid the constant reflow
6925	for ( index = 0; index < length; index++ ) {
6926		elem = elements[ index ];
6927		if ( !elem.style ) {
6928			continue;
6929		}
6930		if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
6931			elem.style.display = show ? values[ index ] || "" : "none";
6932		}
6933	}
6934
6935	return elements;
6936}
6937
6938function setPositiveNumber( elem, value, subtract ) {
6939	var matches = rnumsplit.exec( value );
6940	return matches ?
6941
6942		// Guard against undefined "subtract", e.g., when used as in cssHooks
6943		Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
6944		value;
6945}
6946
6947function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
6948	var i = extra === ( isBorderBox ? "border" : "content" ) ?
6949
6950		// If we already have the right measurement, avoid augmentation
6951		4 :
6952
6953		// Otherwise initialize for horizontal or vertical properties
6954		name === "width" ? 1 : 0,
6955
6956		val = 0;
6957
6958	for ( ; i < 4; i += 2 ) {
6959
6960		// both box models exclude margin, so add it if we want it
6961		if ( extra === "margin" ) {
6962			val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
6963		}
6964
6965		if ( isBorderBox ) {
6966
6967			// border-box includes padding, so remove it if we want content
6968			if ( extra === "content" ) {
6969				val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
6970			}
6971
6972			// at this point, extra isn't border nor margin, so remove border
6973			if ( extra !== "margin" ) {
6974				val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6975			}
6976		} else {
6977
6978			// at this point, extra isn't content, so add padding
6979			val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
6980
6981			// at this point, extra isn't content nor padding, so add border
6982			if ( extra !== "padding" ) {
6983				val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6984			}
6985		}
6986	}
6987
6988	return val;
6989}
6990
6991function getWidthOrHeight( elem, name, extra ) {
6992
6993	// Start with offset property, which is equivalent to the border-box value
6994	var valueIsBorderBox = true,
6995		val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
6996		styles = getStyles( elem ),
6997		isBorderBox = support.boxSizing &&
6998			jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
6999
7000	// some non-html elements return undefined for offsetWidth, so check for null/undefined
7001	// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
7002	// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
7003	if ( val <= 0 || val == null ) {
7004
7005		// Fall back to computed then uncomputed css if necessary
7006		val = curCSS( elem, name, styles );
7007		if ( val < 0 || val == null ) {
7008			val = elem.style[ name ];
7009		}
7010
7011		// Computed unit is not pixels. Stop here and return.
7012		if ( rnumnonpx.test( val ) ) {
7013			return val;
7014		}
7015
7016		// we need the check for style in case a browser which returns unreliable values
7017		// for getComputedStyle silently falls back to the reliable elem.style
7018		valueIsBorderBox = isBorderBox &&
7019			( support.boxSizingReliable() || val === elem.style[ name ] );
7020
7021		// Normalize "", auto, and prepare for extra
7022		val = parseFloat( val ) || 0;
7023	}
7024
7025	// use the active box-sizing model to add/subtract irrelevant styles
7026	return ( val +
7027		augmentWidthOrHeight(
7028			elem,
7029			name,
7030			extra || ( isBorderBox ? "border" : "content" ),
7031			valueIsBorderBox,
7032			styles
7033		)
7034	) + "px";
7035}
7036
7037jQuery.extend( {
7038
7039	// Add in style property hooks for overriding the default
7040	// behavior of getting and setting a style property
7041	cssHooks: {
7042		opacity: {
7043			get: function( elem, computed ) {
7044				if ( computed ) {
7045
7046					// We should always get a number back from opacity
7047					var ret = curCSS( elem, "opacity" );
7048					return ret === "" ? "1" : ret;
7049				}
7050			}
7051		}
7052	},
7053
7054	// Don't automatically add "px" to these possibly-unitless properties
7055	cssNumber: {
7056		"animationIterationCount": true,
7057		"columnCount": true,
7058		"fillOpacity": true,
7059		"flexGrow": true,
7060		"flexShrink": true,
7061		"fontWeight": true,
7062		"lineHeight": true,
7063		"opacity": true,
7064		"order": true,
7065		"orphans": true,
7066		"widows": true,
7067		"zIndex": true,
7068		"zoom": true
7069	},
7070
7071	// Add in properties whose names you wish to fix before
7072	// setting or getting the value
7073	cssProps: {
7074
7075		// normalize float css property
7076		"float": support.cssFloat ? "cssFloat" : "styleFloat"
7077	},
7078
7079	// Get and set the style property on a DOM Node
7080	style: function( elem, name, value, extra ) {
7081
7082		// Don't set styles on text and comment nodes
7083		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
7084			return;
7085		}
7086
7087		// Make sure that we're working with the right name
7088		var ret, type, hooks,
7089			origName = jQuery.camelCase( name ),
7090			style = elem.style;
7091
7092		name = jQuery.cssProps[ origName ] ||
7093			( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
7094
7095		// gets hook for the prefixed version
7096		// followed by the unprefixed version
7097		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
7098
7099		// Check if we're setting a value
7100		if ( value !== undefined ) {
7101			type = typeof value;
7102
7103			// Convert "+=" or "-=" to relative numbers (#7345)
7104			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
7105				value = adjustCSS( elem, name, ret );
7106
7107				// Fixes bug #9237
7108				type = "number";
7109			}
7110
7111			// Make sure that null and NaN values aren't set. See: #7116
7112			if ( value == null || value !== value ) {
7113				return;
7114			}
7115
7116			// If a number was passed in, add the unit (except for certain CSS properties)
7117			if ( type === "number" ) {
7118				value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
7119			}
7120
7121			// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
7122			// but it would mean to define eight
7123			// (for every problematic property) identical functions
7124			if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
7125				style[ name ] = "inherit";
7126			}
7127
7128			// If a hook was provided, use that value, otherwise just set the specified value
vendor: 4,586 bytes, lines 7129-7284
7129			if ( !hooks || !( "set" in hooks ) ||
7130				( value = hooks.set( elem, value, extra ) ) !== undefined ) {
7131
7132				// Support: IE
7133				// Swallow errors from 'invalid' CSS values (#5509)
7134				try {
7135					style[ name ] = value;
7136				} catch ( e ) {}
7137			}
7138
7139		} else {
7140
7141			// If a hook was provided get the non-computed value from there
7142			if ( hooks && "get" in hooks &&
7143				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
7144
7145				return ret;
7146			}
7147
7148			// Otherwise just get the value from the style object
7149			return style[ name ];
7150		}
7151	},
7152
7153	css: function( elem, name, extra, styles ) {
7154		var num, val, hooks,
7155			origName = jQuery.camelCase( name );
7156
7157		// Make sure that we're working with the right name
7158		name = jQuery.cssProps[ origName ] ||
7159			( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
7160
7161		// gets hook for the prefixed version
7162		// followed by the unprefixed version
7163		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
7164
7165		// If a hook was provided get the computed value from there
7166		if ( hooks && "get" in hooks ) {
7167			val = hooks.get( elem, true, extra );
7168		}
7169
7170		// Otherwise, if a way to get the computed value exists, use that
7171		if ( val === undefined ) {
7172			val = curCSS( elem, name, styles );
7173		}
7174
7175		//convert "normal" to computed value
7176		if ( val === "normal" && name in cssNormalTransform ) {
7177			val = cssNormalTransform[ name ];
7178		}
7179
7180		// Return, converting to number if forced or a qualifier was provided and val looks numeric
7181		if ( extra === "" || extra ) {
7182			num = parseFloat( val );
7183			return extra === true || isFinite( num ) ? num || 0 : val;
7184		}
7185		return val;
7186	}
7187} );
7188
7189jQuery.each( [ "height", "width" ], function( i, name ) {
7190	jQuery.cssHooks[ name ] = {
7191		get: function( elem, computed, extra ) {
7192			if ( computed ) {
7193
7194				// certain elements can have dimension info if we invisibly show them
7195				// however, it must have a current display style that would benefit from this
7196				return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
7197					elem.offsetWidth === 0 ?
7198						swap( elem, cssShow, function() {
7199							return getWidthOrHeight( elem, name, extra );
7200						} ) :
7201						getWidthOrHeight( elem, name, extra );
7202			}
7203		},
7204
7205		set: function( elem, value, extra ) {
7206			var styles = extra && getStyles( elem );
7207			return setPositiveNumber( elem, value, extra ?
7208				augmentWidthOrHeight(
7209					elem,
7210					name,
7211					extra,
7212					support.boxSizing &&
7213						jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
7214					styles
7215				) : 0
7216			);
7217		}
7218	};
7219} );
7220
7221if ( !support.opacity ) {
7222	jQuery.cssHooks.opacity = {
7223		get: function( elem, computed ) {
7224
7225			// IE uses filters for opacity
7226			return ropacity.test( ( computed && elem.currentStyle ?
7227				elem.currentStyle.filter :
7228				elem.style.filter ) || "" ) ?
7229					( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
7230					computed ? "1" : "";
7231		},
7232
7233		set: function( elem, value ) {
7234			var style = elem.style,
7235				currentStyle = elem.currentStyle,
7236				opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
7237				filter = currentStyle && currentStyle.filter || style.filter || "";
7238
7239			// IE has trouble with opacity if it does not have layout
7240			// Force it by setting the zoom level
7241			style.zoom = 1;
7242
7243			// if setting opacity to 1, and no other filters exist -
7244			// attempt to remove filter attribute #6652
7245			// if value === "", then remove inline opacity #12685
7246			if ( ( value >= 1 || value === "" ) &&
7247					jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
7248					style.removeAttribute ) {
7249
7250				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
7251				// if "filter:" is present at all, clearType is disabled, we want to avoid this
7252				// style.removeAttribute is IE Only, but so apparently is this code path...
7253				style.removeAttribute( "filter" );
7254
7255				// if there is no filter style applied in a css rule
7256				// or unset inline opacity, we are done
7257				if ( value === "" || currentStyle && !currentStyle.filter ) {
7258					return;
7259				}
7260			}
7261
7262			// otherwise, set new filter values
7263			style.filter = ralpha.test( filter ) ?
7264				filter.replace( ralpha, opacity ) :
7265				filter + " " + opacity;
7266		}
7267	};
7268}
7269
7270jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
7271	function( elem, computed ) {
7272		if ( computed ) {
7273			return swap( elem, { "display": "inline-block" },
7274				curCSS, [ elem, "marginRight" ] );
7275		}
7276	}
7277);
7278
7279jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
7280	function( elem, computed ) {
7281		if ( computed ) {
7282			return (
7283				parseFloat( curCSS( elem, "marginLeft" ) ) ||
7284
vendor: 4,625 bytes, lines 7285-7463
7285				// Support: IE<=11+
7286				// Running getBoundingClientRect on a disconnected node in IE throws an error
7287				// Support: IE8 only
7288				// getClientRects() errors on disconnected elems
7289				( jQuery.contains( elem.ownerDocument, elem ) ?
7290					elem.getBoundingClientRect().left -
7291						swap( elem, { marginLeft: 0 }, function() {
7292							return elem.getBoundingClientRect().left;
7293						} ) :
7294					0
7295				)
7296			) + "px";
7297		}
7298	}
7299);
7300
7301// These hooks are used by animate to expand properties
7302jQuery.each( {
7303	margin: "",
7304	padding: "",
7305	border: "Width"
7306}, function( prefix, suffix ) {
7307	jQuery.cssHooks[ prefix + suffix ] = {
7308		expand: function( value ) {
7309			var i = 0,
7310				expanded = {},
7311
7312				// assumes a single number if not a string
7313				parts = typeof value === "string" ? value.split( " " ) : [ value ];
7314
7315			for ( ; i < 4; i++ ) {
7316				expanded[ prefix + cssExpand[ i ] + suffix ] =
7317					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
7318			}
7319
7320			return expanded;
7321		}
7322	};
7323
7324	if ( !rmargin.test( prefix ) ) {
7325		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
7326	}
7327} );
7328
7329jQuery.fn.extend( {
7330	css: function( name, value ) {
7331		return access( this, function( elem, name, value ) {
7332			var styles, len,
7333				map = {},
7334				i = 0;
7335
7336			if ( jQuery.isArray( name ) ) {
7337				styles = getStyles( elem );
7338				len = name.length;
7339
7340				for ( ; i < len; i++ ) {
7341					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
7342				}
7343
7344				return map;
7345			}
7346
7347			return value !== undefined ?
7348				jQuery.style( elem, name, value ) :
7349				jQuery.css( elem, name );
7350		}, name, value, arguments.length > 1 );
7351	},
7352	show: function() {
7353		return showHide( this, true );
7354	},
7355	hide: function() {
7356		return showHide( this );
7357	},
7358	toggle: function( state ) {
7359		if ( typeof state === "boolean" ) {
7360			return state ? this.show() : this.hide();
7361		}
7362
7363		return this.each( function() {
7364			if ( isHidden( this ) ) {
7365				jQuery( this ).show();
7366			} else {
7367				jQuery( this ).hide();
7368			}
7369		} );
7370	}
7371} );
7372
7373
7374function Tween( elem, options, prop, end, easing ) {
7375	return new Tween.prototype.init( elem, options, prop, end, easing );
7376}
7377jQuery.Tween = Tween;
7378
7379Tween.prototype = {
7380	constructor: Tween,
7381	init: function( elem, options, prop, end, easing, unit ) {
7382		this.elem = elem;
7383		this.prop = prop;
7384		this.easing = easing || jQuery.easing._default;
7385		this.options = options;
7386		this.start = this.now = this.cur();
7387		this.end = end;
7388		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
7389	},
7390	cur: function() {
7391		var hooks = Tween.propHooks[ this.prop ];
7392
7393		return hooks && hooks.get ?
7394			hooks.get( this ) :
7395			Tween.propHooks._default.get( this );
7396	},
7397	run: function( percent ) {
7398		var eased,
7399			hooks = Tween.propHooks[ this.prop ];
7400
7401		if ( this.options.duration ) {
7402			this.pos = eased = jQuery.easing[ this.easing ](
7403				percent, this.options.duration * percent, 0, 1, this.options.duration
7404			);
7405		} else {
7406			this.pos = eased = percent;
7407		}
7408		this.now = ( this.end - this.start ) * eased + this.start;
7409
7410		if ( this.options.step ) {
7411			this.options.step.call( this.elem, this.now, this );
7412		}
7413
7414		if ( hooks && hooks.set ) {
7415			hooks.set( this );
7416		} else {
7417			Tween.propHooks._default.set( this );
7418		}
7419		return this;
7420	}
7421};
7422
7423Tween.prototype.init.prototype = Tween.prototype;
7424
7425Tween.propHooks = {
7426	_default: {
7427		get: function( tween ) {
7428			var result;
7429
7430			// Use a property on the element directly when it is not a DOM element,
7431			// or when there is no matching style property that exists.
7432			if ( tween.elem.nodeType !== 1 ||
7433				tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
7434				return tween.elem[ tween.prop ];
7435			}
7436
7437			// passing an empty string as a 3rd parameter to .css will automatically
7438			// attempt a parseFloat and fallback to a string if the parse fails
7439			// so, simple values such as "10px" are parsed to Float.
7440			// complex values such as "rotate(1rad)" are returned as is.
7441			result = jQuery.css( tween.elem, tween.prop, "" );
7442
7443			// Empty strings, null, undefined and "auto" are converted to 0.
7444			return !result || result === "auto" ? 0 : result;
7445		},
7446		set: function( tween ) {
7447
7448			// use step hook for back compat - use cssHook if its there - use .style if its
7449			// available and use plain properties where available
7450			if ( jQuery.fx.step[ tween.prop ] ) {
7451				jQuery.fx.step[ tween.prop ]( tween );
7452			} else if ( tween.elem.nodeType === 1 &&
7453				( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
7454					jQuery.cssHooks[ tween.prop ] ) ) {
7455				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
7456			} else {
7457				tween.elem[ tween.prop ] = tween.now;
7458			}
7459		}
7460	}
7461};
7462
7463// Support: IE <=9
vendor: 5,654 bytes, lines 7464-7680
7464// Panic based approach to setting things on disconnected nodes
7465
7466Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
7467	set: function( tween ) {
7468		if ( tween.elem.nodeType && tween.elem.parentNode ) {
7469			tween.elem[ tween.prop ] = tween.now;
7470		}
7471	}
7472};
7473
7474jQuery.easing = {
7475	linear: function( p ) {
7476		return p;
7477	},
7478	swing: function( p ) {
7479		return 0.5 - Math.cos( p * Math.PI ) / 2;
7480	},
7481	_default: "swing"
7482};
7483
7484jQuery.fx = Tween.prototype.init;
7485
7486// Back Compat <1.8 extension point
7487jQuery.fx.step = {};
7488
7489
7490
7491
7492var
7493	fxNow, timerId,
7494	rfxtypes = /^(?:toggle|show|hide)$/,
7495	rrun = /queueHooks$/;
7496
7497// Animations created synchronously will run synchronously
7498function createFxNow() {
7499	window.setTimeout( function() {
7500		fxNow = undefined;
7501	} );
7502	return ( fxNow = jQuery.now() );
7503}
7504
7505// Generate parameters to create a standard animation
7506function genFx( type, includeWidth ) {
7507	var which,
7508		attrs = { height: type },
7509		i = 0;
7510
7511	// if we include width, step value is 1 to do all cssExpand values,
7512	// if we don't include width, step value is 2 to skip over Left and Right
7513	includeWidth = includeWidth ? 1 : 0;
7514	for ( ; i < 4 ; i += 2 - includeWidth ) {
7515		which = cssExpand[ i ];
7516		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
7517	}
7518
7519	if ( includeWidth ) {
7520		attrs.opacity = attrs.width = type;
7521	}
7522
7523	return attrs;
7524}
7525
7526function createTween( value, prop, animation ) {
7527	var tween,
7528		collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
7529		index = 0,
7530		length = collection.length;
7531	for ( ; index < length; index++ ) {
7532		if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
7533
7534			// we're done with this property
7535			return tween;
7536		}
7537	}
7538}
7539
7540function defaultPrefilter( elem, props, opts ) {
7541	/* jshint validthis: true */
7542	var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
7543		anim = this,
7544		orig = {},
7545		style = elem.style,
7546		hidden = elem.nodeType && isHidden( elem ),
7547		dataShow = jQuery._data( elem, "fxshow" );
7548
7549	// handle queue: false promises
7550	if ( !opts.queue ) {
7551		hooks = jQuery._queueHooks( elem, "fx" );
7552		if ( hooks.unqueued == null ) {
7553			hooks.unqueued = 0;
7554			oldfire = hooks.empty.fire;
7555			hooks.empty.fire = function() {
7556				if ( !hooks.unqueued ) {
7557					oldfire();
7558				}
7559			};
7560		}
7561		hooks.unqueued++;
7562
7563		anim.always( function() {
7564
7565			// doing this makes sure that the complete handler will be called
7566			// before this completes
7567			anim.always( function() {
7568				hooks.unqueued--;
7569				if ( !jQuery.queue( elem, "fx" ).length ) {
7570					hooks.empty.fire();
7571				}
7572			} );
7573		} );
7574	}
7575
7576	// height/width overflow pass
7577	if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
7578
7579		// Make sure that nothing sneaks out
7580		// Record all 3 overflow attributes because IE does not
7581		// change the overflow attribute when overflowX and
7582		// overflowY are set to the same value
7583		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
7584
7585		// Set display property to inline-block for height/width
7586		// animations on inline elements that are having width/height animated
7587		display = jQuery.css( elem, "display" );
7588
7589		// Test default display if display is currently "none"
7590		checkDisplay = display === "none" ?
7591			jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
7592
7593		if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
7594
7595			// inline-level elements accept inline-block;
7596			// block-level elements need to be inline with layout
7597			if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
7598				style.display = "inline-block";
7599			} else {
7600				style.zoom = 1;
7601			}
7602		}
7603	}
7604
7605	if ( opts.overflow ) {
7606		style.overflow = "hidden";
7607		if ( !support.shrinkWrapBlocks() ) {
7608			anim.always( function() {
7609				style.overflow = opts.overflow[ 0 ];
7610				style.overflowX = opts.overflow[ 1 ];
7611				style.overflowY = opts.overflow[ 2 ];
7612			} );
7613		}
7614	}
7615
7616	// show/hide pass
7617	for ( prop in props ) {
7618		value = props[ prop ];
7619		if ( rfxtypes.exec( value ) ) {
7620			delete props[ prop ];
7621			toggle = toggle || value === "toggle";
7622			if ( value === ( hidden ? "hide" : "show" ) ) {
7623
7624				// If there is dataShow left over from a stopped hide or show
7625				// and we are going to proceed with show, we should pretend to be hidden
7626				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
7627					hidden = true;
7628				} else {
7629					continue;
7630				}
7631			}
7632			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
7633
7634		// Any non-fx value stops us from restoring the original display value
7635		} else {
7636			display = undefined;
7637		}
7638	}
7639
7640	if ( !jQuery.isEmptyObject( orig ) ) {
7641		if ( dataShow ) {
7642			if ( "hidden" in dataShow ) {
7643				hidden = dataShow.hidden;
7644			}
7645		} else {
7646			dataShow = jQuery._data( elem, "fxshow", {} );
7647		}
7648
7649		// store state if its toggle - enables .stop().toggle() to "reverse"
7650		if ( toggle ) {
7651			dataShow.hidden = !hidden;
7652		}
7653		if ( hidden ) {
7654			jQuery( elem ).show();
7655		} else {
7656			anim.done( function() {
7657				jQuery( elem ).hide();
7658			} );
7659		}
7660		anim.done( function() {
7661			var prop;
7662			jQuery._removeData( elem, "fxshow" );
7663			for ( prop in orig ) {
7664				jQuery.style( elem, prop, orig[ prop ] );
7665			}
7666		} );
7667		for ( prop in orig ) {
7668			tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
7669
7670			if ( !( prop in dataShow ) ) {
7671				dataShow[ prop ] = tween.start;
7672				if ( hidden ) {
7673					tween.end = tween.start;
7674					tween.start = prop === "width" || prop === "height" ? 1 : 0;
7675				}
7676			}
7677		}
7678
7679	// If this is a noop like .hide().hide(), restore an overwritten display value
7680	} else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : dis
vendor: 10,851 bytes, lines 7680-8112
7680play ) === "inline" ) {
7681		style.display = display;
7682	}
7683}
7684
7685function propFilter( props, specialEasing ) {
7686	var index, name, easing, value, hooks;
7687
7688	// camelCase, specialEasing and expand cssHook pass
7689	for ( index in props ) {
7690		name = jQuery.camelCase( index );
7691		easing = specialEasing[ name ];
7692		value = props[ index ];
7693		if ( jQuery.isArray( value ) ) {
7694			easing = value[ 1 ];
7695			value = props[ index ] = value[ 0 ];
7696		}
7697
7698		if ( index !== name ) {
7699			props[ name ] = value;
7700			delete props[ index ];
7701		}
7702
7703		hooks = jQuery.cssHooks[ name ];
7704		if ( hooks && "expand" in hooks ) {
7705			value = hooks.expand( value );
7706			delete props[ name ];
7707
7708			// not quite $.extend, this wont overwrite keys already present.
7709			// also - reusing 'index' from above because we have the correct "name"
7710			for ( index in value ) {
7711				if ( !( index in props ) ) {
7712					props[ index ] = value[ index ];
7713					specialEasing[ index ] = easing;
7714				}
7715			}
7716		} else {
7717			specialEasing[ name ] = easing;
7718		}
7719	}
7720}
7721
7722function Animation( elem, properties, options ) {
7723	var result,
7724		stopped,
7725		index = 0,
7726		length = Animation.prefilters.length,
7727		deferred = jQuery.Deferred().always( function() {
7728
7729			// don't match elem in the :animated selector
7730			delete tick.elem;
7731		} ),
7732		tick = function() {
7733			if ( stopped ) {
7734				return false;
7735			}
7736			var currentTime = fxNow || createFxNow(),
7737				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
7738
7739				// Support: Android 2.3
7740				// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
7741				temp = remaining / animation.duration || 0,
7742				percent = 1 - temp,
7743				index = 0,
7744				length = animation.tweens.length;
7745
7746			for ( ; index < length ; index++ ) {
7747				animation.tweens[ index ].run( percent );
7748			}
7749
7750			deferred.notifyWith( elem, [ animation, percent, remaining ] );
7751
7752			if ( percent < 1 && length ) {
7753				return remaining;
7754			} else {
7755				deferred.resolveWith( elem, [ animation ] );
7756				return false;
7757			}
7758		},
7759		animation = deferred.promise( {
7760			elem: elem,
7761			props: jQuery.extend( {}, properties ),
7762			opts: jQuery.extend( true, {
7763				specialEasing: {},
7764				easing: jQuery.easing._default
7765			}, options ),
7766			originalProperties: properties,
7767			originalOptions: options,
7768			startTime: fxNow || createFxNow(),
7769			duration: options.duration,
7770			tweens: [],
7771			createTween: function( prop, end ) {
7772				var tween = jQuery.Tween( elem, animation.opts, prop, end,
7773						animation.opts.specialEasing[ prop ] || animation.opts.easing );
7774				animation.tweens.push( tween );
7775				return tween;
7776			},
7777			stop: function( gotoEnd ) {
7778				var index = 0,
7779
7780					// if we are going to the end, we want to run all the tweens
7781					// otherwise we skip this part
7782					length = gotoEnd ? animation.tweens.length : 0;
7783				if ( stopped ) {
7784					return this;
7785				}
7786				stopped = true;
7787				for ( ; index < length ; index++ ) {
7788					animation.tweens[ index ].run( 1 );
7789				}
7790
7791				// resolve when we played the last frame
7792				// otherwise, reject
7793				if ( gotoEnd ) {
7794					deferred.notifyWith( elem, [ animation, 1, 0 ] );
7795					deferred.resolveWith( elem, [ animation, gotoEnd ] );
7796				} else {
7797					deferred.rejectWith( elem, [ animation, gotoEnd ] );
7798				}
7799				return this;
7800			}
7801		} ),
7802		props = animation.props;
7803
7804	propFilter( props, animation.opts.specialEasing );
7805
7806	for ( ; index < length ; index++ ) {
7807		result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
7808		if ( result ) {
7809			if ( jQuery.isFunction( result.stop ) ) {
7810				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
7811					jQuery.proxy( result.stop, result );
7812			}
7813			return result;
7814		}
7815	}
7816
7817	jQuery.map( props, createTween, animation );
7818
7819	if ( jQuery.isFunction( animation.opts.start ) ) {
7820		animation.opts.start.call( elem, animation );
7821	}
7822
7823	jQuery.fx.timer(
7824		jQuery.extend( tick, {
7825			elem: elem,
7826			anim: animation,
7827			queue: animation.opts.queue
7828		} )
7829	);
7830
7831	// attach callbacks from options
7832	return animation.progress( animation.opts.progress )
7833		.done( animation.opts.done, animation.opts.complete )
7834		.fail( animation.opts.fail )
7835		.always( animation.opts.always );
7836}
7837
7838jQuery.Animation = jQuery.extend( Animation, {
7839
7840	tweeners: {
7841		"*": [ function( prop, value ) {
7842			var tween = this.createTween( prop, value );
7843			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
7844			return tween;
7845		} ]
7846	},
7847
7848	tweener: function( props, callback ) {
7849		if ( jQuery.isFunction( props ) ) {
7850			callback = props;
7851			props = [ "*" ];
7852		} else {
7853			props = props.match( rnotwhite );
7854		}
7855
7856		var prop,
7857			index = 0,
7858			length = props.length;
7859
7860		for ( ; index < length ; index++ ) {
7861			prop = props[ index ];
7862			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
7863			Animation.tweeners[ prop ].unshift( callback );
7864		}
7865	},
7866
7867	prefilters: [ defaultPrefilter ],
7868
7869	prefilter: function( callback, prepend ) {
7870		if ( prepend ) {
7871			Animation.prefilters.unshift( callback );
7872		} else {
7873			Animation.prefilters.push( callback );
7874		}
7875	}
7876} );
7877
7878jQuery.speed = function( speed, easing, fn ) {
7879	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
7880		complete: fn || !fn && easing ||
7881			jQuery.isFunction( speed ) && speed,
7882		duration: speed,
7883		easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
7884	};
7885
7886	opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
7887		opt.duration in jQuery.fx.speeds ?
7888			jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
7889
7890	// normalize opt.queue - true/undefined/null -> "fx"
7891	if ( opt.queue == null || opt.queue === true ) {
7892		opt.queue = "fx";
7893	}
7894
7895	// Queueing
7896	opt.old = opt.complete;
7897
7898	opt.complete = function() {
7899		if ( jQuery.isFunction( opt.old ) ) {
7900			opt.old.call( this );
7901		}
7902
7903		if ( opt.queue ) {
7904			jQuery.dequeue( this, opt.queue );
7905		}
7906	};
7907
7908	return opt;
7909};
7910
7911jQuery.fn.extend( {
7912	fadeTo: function( speed, to, easing, callback ) {
7913
7914		// show any hidden elements after setting opacity to 0
7915		return this.filter( isHidden ).css( "opacity", 0 ).show()
7916
7917			// animate to the value specified
7918			.end().animate( { opacity: to }, speed, easing, callback );
7919	},
7920	animate: function( prop, speed, easing, callback ) {
7921		var empty = jQuery.isEmptyObject( prop ),
7922			optall = jQuery.speed( speed, easing, callback ),
7923			doAnimation = function() {
7924
7925				// Operate on a copy of prop so per-property easing won't be lost
7926				var anim = Animation( this, jQuery.extend( {}, prop ), optall );
7927
7928				// Empty animations, or finishing resolves immediately
7929				if ( empty || jQuery._data( this, "finish" ) ) {
7930					anim.stop( true );
7931				}
7932			};
7933			doAnimation.finish = doAnimation;
7934
7935		return empty || optall.queue === false ?
7936			this.each( doAnimation ) :
7937			this.queue( optall.queue, doAnimation );
7938	},
7939	stop: function( type, clearQueue, gotoEnd ) {
7940		var stopQueue = function( hooks ) {
7941			var stop = hooks.stop;
7942			delete hooks.stop;
7943			stop( gotoEnd );
7944		};
7945
7946		if ( typeof type !== "string" ) {
7947			gotoEnd = clearQueue;
7948			clearQueue = type;
7949			type = undefined;
7950		}
7951		if ( clearQueue && type !== false ) {
7952			this.queue( type || "fx", [] );
7953		}
7954
7955		return this.each( function() {
7956			var dequeue = true,
7957				index = type != null && type + "queueHooks",
7958				timers = jQuery.timers,
7959				data = jQuery._data( this );
7960
7961			if ( index ) {
7962				if ( data[ index ] && data[ index ].stop ) {
7963					stopQueue( data[ index ] );
7964				}
7965			} else {
7966				for ( index in data ) {
7967					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
7968						stopQueue( data[ index ] );
7969					}
7970				}
7971			}
7972
7973			for ( index = timers.length; index--; ) {
7974				if ( timers[ index ].elem === this &&
7975					( type == null || timers[ index ].queue === type ) ) {
7976
7977					timers[ index ].anim.stop( gotoEnd );
7978					dequeue = false;
7979					timers.splice( index, 1 );
7980				}
7981			}
7982
7983			// start the next in the queue if the last step wasn't forced
7984			// timers currently will call their complete callbacks, which will dequeue
7985			// but only if they were gotoEnd
7986			if ( dequeue || !gotoEnd ) {
7987				jQuery.dequeue( this, type );
7988			}
7989		} );
7990	},
7991	finish: function( type ) {
7992		if ( type !== false ) {
7993			type = type || "fx";
7994		}
7995		return this.each( function() {
7996			var index,
7997				data = jQuery._data( this ),
7998				queue = data[ type + "queue" ],
7999				hooks = data[ type + "queueHooks" ],
8000				timers = jQuery.timers,
8001				length = queue ? queue.length : 0;
8002
8003			// enable finishing flag on private data
8004			data.finish = true;
8005
8006			// empty the queue first
8007			jQuery.queue( this, type, [] );
8008
8009			if ( hooks && hooks.stop ) {
8010				hooks.stop.call( this, true );
8011			}
8012
8013			// look for any active animations, and finish them
8014			for ( index = timers.length; index--; ) {
8015				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
8016					timers[ index ].anim.stop( true );
8017					timers.splice( index, 1 );
8018				}
8019			}
8020
8021			// look for any animations in the old queue and finish them
8022			for ( index = 0; index < length; index++ ) {
8023				if ( queue[ index ] && queue[ index ].finish ) {
8024					queue[ index ].finish.call( this );
8025				}
8026			}
8027
8028			// turn off finishing flag
8029			delete data.finish;
8030		} );
8031	}
8032} );
8033
8034jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
8035	var cssFn = jQuery.fn[ name ];
8036	jQuery.fn[ name ] = function( speed, easing, callback ) {
8037		return speed == null || typeof speed === "boolean" ?
8038			cssFn.apply( this, arguments ) :
8039			this.animate( genFx( name, true ), speed, easing, callback );
8040	};
8041} );
8042
8043// Generate shortcuts for custom animations
8044jQuery.each( {
8045	slideDown: genFx( "show" ),
8046	slideUp: genFx( "hide" ),
8047	slideToggle: genFx( "toggle" ),
8048	fadeIn: { opacity: "show" },
8049	fadeOut: { opacity: "hide" },
8050	fadeToggle: { opacity: "toggle" }
8051}, function( name, props ) {
8052	jQuery.fn[ name ] = function( speed, easing, callback ) {
8053		return this.animate( props, speed, easing, callback );
8054	};
8055} );
8056
8057jQuery.timers = [];
8058jQuery.fx.tick = function() {
8059	var timer,
8060		timers = jQuery.timers,
8061		i = 0;
8062
8063	fxNow = jQuery.now();
8064
8065	for ( ; i < timers.length; i++ ) {
8066		timer = timers[ i ];
8067
8068		// Checks the timer has not already been removed
8069		if ( !timer() && timers[ i ] === timer ) {
8070			timers.splice( i--, 1 );
8071		}
8072	}
8073
8074	if ( !timers.length ) {
8075		jQuery.fx.stop();
8076	}
8077	fxNow = undefined;
8078};
8079
8080jQuery.fx.timer = function( timer ) {
8081	jQuery.timers.push( timer );
8082	if ( timer() ) {
8083		jQuery.fx.start();
8084	} else {
8085		jQuery.timers.pop();
8086	}
8087};
8088
8089jQuery.fx.interval = 13;
8090
8091jQuery.fx.start = function() {
8092	if ( !timerId ) {
8093		timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
8094	}
8095};
8096
8097jQuery.fx.stop = function() {
8098	window.clearInterval( timerId );
8099	timerId = null;
8100};
8101
8102jQuery.fx.speeds = {
8103	slow: 600,
8104	fast: 200,
8105
8106	// Default speed
8107	_default: 400
8108};
8109
8110
8111// Based off of the plugin by Clint Helfers, with permission.
8112// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
8113jQuery.fn.delay = function( time, type ) {
8114	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
8115	type = type || "fx";
8116
8117	return this.queue( type, function( next, hooks ) {
8118		var timeout = window.setTimeout( next, time );
8119		hooks.stop = function() {
8120			window.clearTimeout( timeout );
8121		};
8122	} );
8123};
8124
8125
8126( function() {
8127	var a,
8128		input = document.createElement( "input" ),
8129		div = document.createElement( "div" ),
8130		select = document.createElement( "select" ),
8131		opt = select.appendChild( document.createElement( "option" ) );
8132
8133	// Setup
8134	div = document.createElement( "div" );
8135	div.setAttribute( "className", "t" );
8136	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
8137	a = div.getElementsByTagName( "a" )[ 0 ];
8138
8139	// Support: Windows Web Apps (WWA)
8140	// `type` must use .setAttribute for WWA (#14901)
8141	input.setAttribute( "type", "checkbox" );
8142	div.appendChild( input );
8143
8144	a = div.getElementsByTagName( "a" )[ 0 ];
8145
8146	// First batch of tests.
8147	a.style.cssText = "top:1px";
8148
8149	// Test setAttribute on camelCase class.
8150	// If it works, we need attrFixes when doing get/setAttribute (ie6/7)
vendor: 2,696 bytes, lines 8151-8252
8151	support.getSetAttribute = div.className !== "t";
8152
8153	// Get the style information from getAttribute
8154	// (IE uses .cssText instead)
8155	support.style = /top/.test( a.getAttribute( "style" ) );
8156
8157	// Make sure that URLs aren't manipulated
8158	// (IE normalizes it by default)
8159	support.hrefNormalized = a.getAttribute( "href" ) === "/a";
8160
8161	// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
8162	support.checkOn = !!input.value;
8163
8164	// Make sure that a selected-by-default option has a working selected property.
8165	// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
8166	support.optSelected = opt.selected;
8167
8168	// Tests for enctype support on a form (#6743)
8169	support.enctype = !!document.createElement( "form" ).enctype;
8170
8171	// Make sure that the options inside disabled selects aren't marked as disabled
8172	// (WebKit marks them as disabled)
8173	select.disabled = true;
8174	support.optDisabled = !opt.disabled;
8175
8176	// Support: IE8 only
8177	// Check if we can trust getAttribute("value")
8178	input = document.createElement( "input" );
8179	input.setAttribute( "value", "" );
8180	support.input = input.getAttribute( "value" ) === "";
8181
8182	// Check if an input maintains its value after becoming a radio
8183	input.value = "t";
8184	input.setAttribute( "type", "radio" );
8185	support.radioValue = input.value === "t";
8186} )();
8187
8188
8189var rreturn = /\r/g,
8190	rspaces = /[\x20\t\r\n\f]+/g;
8191
8192jQuery.fn.extend( {
8193	val: function( value ) {
8194		var hooks, ret, isFunction,
8195			elem = this[ 0 ];
8196
8197		if ( !arguments.length ) {
8198			if ( elem ) {
8199				hooks = jQuery.valHooks[ elem.type ] ||
8200					jQuery.valHooks[ elem.nodeName.toLowerCase() ];
8201
8202				if (
8203					hooks &&
8204					"get" in hooks &&
8205					( ret = hooks.get( elem, "value" ) ) !== undefined
8206				) {
8207					return ret;
8208				}
8209
8210				ret = elem.value;
8211
8212				return typeof ret === "string" ?
8213
8214					// handle most common string cases
8215					ret.replace( rreturn, "" ) :
8216
8217					// handle cases where value is null/undef or number
8218					ret == null ? "" : ret;
8219			}
8220
8221			return;
8222		}
8223
8224		isFunction = jQuery.isFunction( value );
8225
8226		return this.each( function( i ) {
8227			var val;
8228
8229			if ( this.nodeType !== 1 ) {
8230				return;
8231			}
8232
8233			if ( isFunction ) {
8234				val = value.call( this, i, jQuery( this ).val() );
8235			} else {
8236				val = value;
8237			}
8238
8239			// Treat null/undefined as ""; convert numbers to string
8240			if ( val == null ) {
8241				val = "";
8242			} else if ( typeof val === "number" ) {
8243				val += "";
8244			} else if ( jQuery.isArray( val ) ) {
8245				val = jQuery.map( val, function( value ) {
8246					return value == null ? "" : value + "";
8247				} );
8248			}
8249
8250			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
8251
8252			// If set returns undefined, fall back to normal setting
vendor: 4,648 bytes, lines 8253-8443
8253			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
8254				this.value = val;
8255			}
8256		} );
8257	}
8258} );
8259
8260jQuery.extend( {
8261	valHooks: {
8262		option: {
8263			get: function( elem ) {
8264				var val = jQuery.find.attr( elem, "value" );
8265				return val != null ?
8266					val :
8267
8268					// Support: IE10-11+
8269					// option.text throws exceptions (#14686, #14858)
8270					// Strip and collapse whitespace
8271					// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
8272					jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
8273			}
8274		},
8275		select: {
8276			get: function( elem ) {
8277				var value, option,
8278					options = elem.options,
8279					index = elem.selectedIndex,
8280					one = elem.type === "select-one" || index < 0,
8281					values = one ? null : [],
8282					max = one ? index + 1 : options.length,
8283					i = index < 0 ?
8284						max :
8285						one ? index : 0;
8286
8287				// Loop through all the selected options
8288				for ( ; i < max; i++ ) {
8289					option = options[ i ];
8290
8291					// oldIE doesn't update selected after form reset (#2551)
8292					if ( ( option.selected || i === index ) &&
8293
8294							// Don't return options that are disabled or in a disabled optgroup
8295							( support.optDisabled ?
8296								!option.disabled :
8297								option.getAttribute( "disabled" ) === null ) &&
8298							( !option.parentNode.disabled ||
8299								!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
8300
8301						// Get the specific value for the option
8302						value = jQuery( option ).val();
8303
8304						// We don't need an array for one selects
8305						if ( one ) {
8306							return value;
8307						}
8308
8309						// Multi-Selects return an array
8310						values.push( value );
8311					}
8312				}
8313
8314				return values;
8315			},
8316
8317			set: function( elem, value ) {
8318				var optionSet, option,
8319					options = elem.options,
8320					values = jQuery.makeArray( value ),
8321					i = options.length;
8322
8323				while ( i-- ) {
8324					option = options[ i ];
8325
8326					if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) {
8327
8328						// Support: IE6
8329						// When new option element is added to select box we need to
8330						// force reflow of newly added node in order to workaround delay
8331						// of initialization properties
8332						try {
8333							option.selected = optionSet = true;
8334
8335						} catch ( _ ) {
8336
8337							// Will be executed only in IE6
8338							option.scrollHeight;
8339						}
8340
8341					} else {
8342						option.selected = false;
8343					}
8344				}
8345
8346				// Force browsers to behave consistently when non-matching value is set
8347				if ( !optionSet ) {
8348					elem.selectedIndex = -1;
8349				}
8350
8351				return options;
8352			}
8353		}
8354	}
8355} );
8356
8357// Radios and checkboxes getter/setter
8358jQuery.each( [ "radio", "checkbox" ], function() {
8359	jQuery.valHooks[ this ] = {
8360		set: function( elem, value ) {
8361			if ( jQuery.isArray( value ) ) {
8362				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
8363			}
8364		}
8365	};
8366	if ( !support.checkOn ) {
8367		jQuery.valHooks[ this ].get = function( elem ) {
8368			return elem.getAttribute( "value" ) === null ? "on" : elem.value;
8369		};
8370	}
8371} );
8372
8373
8374
8375
8376var nodeHook, boolHook,
8377	attrHandle = jQuery.expr.attrHandle,
8378	ruseDefault = /^(?:checked|selected)$/i,
8379	getSetAttribute = support.getSetAttribute,
8380	getSetInput = support.input;
8381
8382jQuery.fn.extend( {
8383	attr: function( name, value ) {
8384		return access( this, jQuery.attr, name, value, arguments.length > 1 );
8385	},
8386
8387	removeAttr: function( name ) {
8388		return this.each( function() {
8389			jQuery.removeAttr( this, name );
8390		} );
8391	}
8392} );
8393
8394jQuery.extend( {
8395	attr: function( elem, name, value ) {
8396		var ret, hooks,
8397			nType = elem.nodeType;
8398
8399		// Don't get/set attributes on text, comment and attribute nodes
8400		if ( nType === 3 || nType === 8 || nType === 2 ) {
8401			return;
8402		}
8403
8404		// Fallback to prop when attributes are not supported
8405		if ( typeof elem.getAttribute === "undefined" ) {
8406			return jQuery.prop( elem, name, value );
8407		}
8408
8409		// All attributes are lowercase
8410		// Grab necessary hook if one is defined
8411		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
8412			name = name.toLowerCase();
8413			hooks = jQuery.attrHooks[ name ] ||
8414				( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
8415		}
8416
8417		if ( value !== undefined ) {
8418			if ( value === null ) {
8419				jQuery.removeAttr( elem, name );
8420				return;
8421			}
8422
8423			if ( hooks && "set" in hooks &&
8424				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
8425				return ret;
8426			}
8427
8428			elem.setAttribute( name, value + "" );
8429			return value;
8430		}
8431
8432		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
8433			return ret;
8434		}
8435
8436		ret = jQuery.find.attr( elem, name );
8437
8438		// Non-existent attributes return null, we normalize to undefined
8439		return ret == null ? undefined : ret;
8440	},
8441
8442	attrHooks: {
8443		type: {
vendor: 4,457 bytes, lines 8444-8610
8444			set: function( elem, value ) {
8445				if ( !support.radioValue && value === "radio" &&
8446					jQuery.nodeName( elem, "input" ) ) {
8447
8448					// Setting the type on a radio button after the value resets the value in IE8-9
8449					// Reset value to default in case type is set after value during creation
8450					var val = elem.value;
8451					elem.setAttribute( "type", value );
8452					if ( val ) {
8453						elem.value = val;
8454					}
8455					return value;
8456				}
8457			}
8458		}
8459	},
8460
8461	removeAttr: function( elem, value ) {
8462		var name, propName,
8463			i = 0,
8464			attrNames = value && value.match( rnotwhite );
8465
8466		if ( attrNames && elem.nodeType === 1 ) {
8467			while ( ( name = attrNames[ i++ ] ) ) {
8468				propName = jQuery.propFix[ name ] || name;
8469
8470				// Boolean attributes get special treatment (#10870)
8471				if ( jQuery.expr.match.bool.test( name ) ) {
8472
8473					// Set corresponding property to false
8474					if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
8475						elem[ propName ] = false;
8476
8477					// Support: IE<9
8478					// Also clear defaultChecked/defaultSelected (if appropriate)
8479					} else {
8480						elem[ jQuery.camelCase( "default-" + name ) ] =
8481							elem[ propName ] = false;
8482					}
8483
8484				// See #9699 for explanation of this approach (setting first, then removal)
8485				} else {
8486					jQuery.attr( elem, name, "" );
8487				}
8488
8489				elem.removeAttribute( getSetAttribute ? name : propName );
8490			}
8491		}
8492	}
8493} );
8494
8495// Hooks for boolean attributes
8496boolHook = {
8497	set: function( elem, value, name ) {
8498		if ( value === false ) {
8499
8500			// Remove boolean attributes when set to false
8501			jQuery.removeAttr( elem, name );
8502		} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
8503
8504			// IE<8 needs the *property* name
8505			elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
8506
8507		} else {
8508
8509			// Support: IE<9
8510			// Use defaultChecked and defaultSelected for oldIE
8511			elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
8512		}
8513		return name;
8514	}
8515};
8516
8517jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
8518	var getter = attrHandle[ name ] || jQuery.find.attr;
8519
8520	if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
8521		attrHandle[ name ] = function( elem, name, isXML ) {
8522			var ret, handle;
8523			if ( !isXML ) {
8524
8525				// Avoid an infinite loop by temporarily removing this function from the getter
8526				handle = attrHandle[ name ];
8527				attrHandle[ name ] = ret;
8528				ret = getter( elem, name, isXML ) != null ?
8529					name.toLowerCase() :
8530					null;
8531				attrHandle[ name ] = handle;
8532			}
8533			return ret;
8534		};
8535	} else {
8536		attrHandle[ name ] = function( elem, name, isXML ) {
8537			if ( !isXML ) {
8538				return elem[ jQuery.camelCase( "default-" + name ) ] ?
8539					name.toLowerCase() :
8540					null;
8541			}
8542		};
8543	}
8544} );
8545
8546// fix oldIE attroperties
8547if ( !getSetInput || !getSetAttribute ) {
8548	jQuery.attrHooks.value = {
8549		set: function( elem, value, name ) {
8550			if ( jQuery.nodeName( elem, "input" ) ) {
8551
8552				// Does not return so that setAttribute is also used
8553				elem.defaultValue = value;
8554			} else {
8555
8556				// Use nodeHook if defined (#1954); otherwise setAttribute is fine
8557				return nodeHook && nodeHook.set( elem, value, name );
8558			}
8559		}
8560	};
8561}
8562
8563// IE6/7 do not support getting/setting some attributes with get/setAttribute
8564if ( !getSetAttribute ) {
8565
8566	// Use this for any attribute in IE6/7
8567	// This fixes almost every IE6/7 issue
8568	nodeHook = {
8569		set: function( elem, value, name ) {
8570
8571			// Set the existing or create a new attribute node
8572			var ret = elem.getAttributeNode( name );
8573			if ( !ret ) {
8574				elem.setAttributeNode(
8575					( ret = elem.ownerDocument.createAttribute( name ) )
8576				);
8577			}
8578
8579			ret.value = value += "";
8580
8581			// Break association with cloned elements by also using setAttribute (#9646)
8582			if ( name === "value" || value === elem.getAttribute( name ) ) {
8583				return value;
8584			}
8585		}
8586	};
8587
8588	// Some attributes are constructed with empty-string values when not defined
8589	attrHandle.id = attrHandle.name = attrHandle.coords =
8590		function( elem, name, isXML ) {
8591			var ret;
8592			if ( !isXML ) {
8593				return ( ret = elem.getAttributeNode( name ) ) && ret.value !== "" ?
8594					ret.value :
8595					null;
8596			}
8597		};
8598
8599	// Fixing value retrieval on a button requires this module
8600	jQuery.valHooks.button = {
8601		get: function( elem, name ) {
8602			var ret = elem.getAttributeNode( name );
8603			if ( ret && ret.specified ) {
8604				return ret.value;
8605			}
8606		},
8607		set: nodeHook.set
8608	};
8609
8610	// Set contenteditable to false on removals(#10429)
8611	// Setting to empty string throws an error as an invalid value
8612	jQuery.attrHooks.contenteditable = {
8613		set: function( elem, value, name ) {
8614			nodeHook.set( elem, value === "" ? false : value, name );
8615		}
8616	};
8617
8618	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
8619	// This is for removals
8620	jQuery.each( [ "width", "height" ], function( i, name ) {
8621		jQuery.attrHooks[ name ] = {
8622			set: function( elem, value ) {
8623				if ( value === "" ) {
8624					elem.setAttribute( name, "auto" );
8625					return value;
8626				}
8627			}
8628		};
8629	} );
8630}
8631
8632if ( !support.style ) {
8633	jQuery.attrHooks.style = {
8634		get: function( elem ) {
8635
8636			// Return undefined in the case of empty string
8637			// Note: IE uppercases css property names, but if we were to .toLowerCase()
8638			// .cssText, that would destroy case sensitivity in URL's, like in "background"
8639			return elem.style.cssText || undefined;
8640		},
8641		set: function( elem, value ) {
8642			return ( elem.style.cssText = value + "" );
8643		}
8644	};
8645}
8646
8647
8648
8649
8650var rfocusable = /^(?:input|select|textarea|button|object)$/i,
8651	rclickable = /^(?:a|area)$/i;
8652
8653jQuery.fn.extend( {
8654	prop: function( name, value ) {
8655		return access( this, jQuery.prop, name, value, arguments.length > 1 );
8656	},
8657
8658	removeProp: function( name ) {
8659		name = jQuery.propFix[ name ] || name;
8660		return this.each( function() {
8661
8662			// try/catch handles cases where IE balks (such as removing a property on window)
8663			try {
8664				this[ name ] = undefined;
8665				delete this[ name ];
8666			} catch ( e ) {}
8667		} );
8668	}
8669} );
8670
8671jQuery.extend( {
8672	prop: function( elem, name, value ) {
8673		var ret, hooks,
8674			nType = elem.nodeType;
8675
8676		// Don't get/set properties on text, comment and attribute nodes
8677		if ( nType === 3 || nType === 8 || nType === 2 ) {
8678			return;
8679		}
8680
8681		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
8682
8683			// Fix name and attach hooks
8684			name = jQuery.propFix[ name ] || name;
8685			hooks = jQuery.propHooks[ name ];
8686		}
8687
8688		if ( value !== undefined ) {
8689			if ( hooks && "set" in hooks &&
8690				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
8691				return ret;
8692			}
8693
8694			return ( elem[ name ] = value );
8695		}
8696
8697		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
8698			return ret;
8699		}
8700
8701		return elem[ name ];
8702	},
8703
8704	propHooks: {
8705		tabIndex: {
8706			get: function( elem ) {
8707
8708				// elem.tabIndex doesn't always return the
8709				// correct value when it hasn't been explicitly set
8710				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
8711				// Use proper attribute retrieval(#12072)
8712				var tabindex = jQuery.find.attr( elem, "tabindex" );
8713
8714				return tabindex ?
8715					parseInt( tabindex, 10 ) :
8716					rfocusable.test( elem.nodeName ) ||
8717						rclickable.test( elem.nodeName ) && elem.href ?
8718							0 :
8719							-1;
8720			}
8721		}
8722	},
8723
8724	propFix: {
8725		"for": "htmlFor",
8726		"class": "className"
8727	}
8728} );
8729
8730// Some attributes require a special call on IE
8731// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
8732if ( !support.hrefNormalized ) {
8733
8734	// href/src property should get the full normalized URL (#10299/#12915)
8735	jQuery.each( [ "href", "src" ], function( i, name ) {
8736		jQuery.propHooks[ name ] = {
8737			get: function( elem ) {
8738				return elem.getAttribute( name, 4 );
8739			}
8740		};
8741	} );
8742}
8743
8744// Support: Safari, IE9+
8745// Accessing the selectedIndex property
8746// forces the browser to respect setting selected
8747// on the option
8748// The getter ensures a default option is selected
8749// when in an optgroup
8750if ( !support.optSelected ) {
8751	jQuery.propHooks.selected = {
8752		get: function( elem ) {
8753			var parent = elem.parentNode;
8754
8755			if ( parent ) {
8756				parent.selectedIndex;
8757
8758				// Make sure that it also works with optgroups, see #5701
8759				if ( parent.parentNode ) {
8760					parent.parentNode.selectedIndex;
8761				}
8762			}
8763			return null;
8764		},
8765		set: function( elem ) {
8766			var parent = elem.parentNode;
8767			if ( parent ) {
8768				parent.selectedIndex;
8769
8770				if ( parent.parentNode ) {
8771					parent.parentNode.selectedIndex;
8772				}
8773			}
8774		}
8775	};
8776}
8777
8778jQuery.each( [
8779	"tabIndex",
8780	"readOnly",
8781	"maxLength",
8782	"cellSpacing",
8783	"cellPadding",
8784	"rowSpan",
8785	"colSpan",
8786	"useMap",
8787	"frameBorder",
8788	"contentEditable"
8789], function() {
8790	jQuery.propFix[ this.toLowerCase() ] = this;
8791} );
8792
8793// IE6/7 call enctype encoding
8794if ( !support.enctype ) {
8795	jQuery.propFix.enctype = "encoding";
8796}
8797
8798
8799
8800
8801var rclass = /[\t\r\n\f]/g;
8802
8803function getClass( elem ) {
8804	return jQuery.attr( elem, "class" ) || "";
8805}
8806
8807jQuery.fn.extend( {
8808	addClass: function( value ) {
8809		var classes, elem, cur, curValue, clazz, j, finalValue,
8810			i = 0;
8811
8812		if ( jQuery.isFunction( value ) ) {
8813			return this.each( function( j ) {
8814				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
8815			} );
8816		}
8817
8818		if ( typeof value === "string" && value ) {
8819			classes = value.match( rnotwhite ) || [];
8820
8821			while ( ( elem = this[ i++ ] ) ) {
8822				curValue = getClass( elem );
8823				cur = elem.nodeType === 1 &&
8824					( " " + curValue + " " ).replace( rclass, " " );
8825
8826				if ( cur ) {
8827					j = 0;
8828					while ( ( clazz = classes[ j++ ] ) ) {
8829						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
8830							cur += clazz + " ";
8831						}
8832					}
8833
8834					// only assign if different to avoid unneeded rendering.
8835					finalValue = jQuery.trim( cur );
8836					if ( curValue !== finalValue ) {
8837						jQuery.attr( elem, "class", finalValue );
8838					}
8839				}
8840			}
8841		}
8842
8843		return this;
8844	},
8845
8846	removeClass: function( value ) {
8847		var classes, elem, cur, curValue, clazz, j, finalValue,
8848			i = 0;
8849
8850		if ( jQuery.isFunction( value ) ) {
8851			return this.each( function( j ) {
8852				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
8853			} );
8854		}
8855
8856		if ( !arguments.length ) {
8857			return this.attr( "class", "" );
8858		}
8859
8860		if ( typeof value === "string" && value ) {
8861			classes = value.match( rnotwhite ) || [];
8862
8863			while ( ( elem = this[ i++ ] ) ) {
8864				curValue = getClass( elem );
8865
8866				// This expression is here for better compressibility (see addClass)
8867				cur = elem.nodeType === 1 &&
8868					( " " + curValue + " " ).replace( rclass, " " );
8869
8870				if ( cur ) {
8871					j = 0;
8872					while ( ( clazz = classes[ j++ ] ) ) {
8873
8874						// Remove *all* instances
8875						while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
8876							cur = cur.replace( " " + clazz + " ", " " );
8877						}
8878					}
8879
8880					// Only assign if different to avoid unneeded rendering.
8881					finalValue = jQuery.trim( cur );
8882					if ( curValue !== finalValue ) {
8883						jQuery.attr( elem, "class", finalValue );
8884					}
8885				}
8886			}
8887		}
8888
8889		return this;
8890	},
8891
8892	toggleClass: function( value, stateVal ) {
8893		var type = typeof value;
8894
8895		if ( typeof stateVal === "boolean" && type === "string" ) {
8896			return stateVal ? this.addClass( value ) : this.removeClass( value );
8897		}
8898
8899		if ( jQuery.isFunction( value ) ) {
8900			return this.each( function( i ) {
8901				jQuery( this ).toggleClass(
8902					value.call( this, i, getClass( this ), stateVal ),
8903					stateVal
8904				);
8905			} );
8906		}
8907
8908		return this.each( function() {
8909			var className, i, self, classNames;
8910
8911			if ( type === "string" ) {
8912
8913				// Toggle individual class names
8914				i = 0;
8915				self = jQuery( this );
8916				classNames = value.match( rnotwhite ) || [];
8917
8918				while ( ( className = classNames[ i++ ] ) ) {
8919
8920					// Check each className given, space separated list
8921					if ( self.hasClass( className ) ) {
8922						self.removeClass( className );
8923					} else {
8924						self.addClass( className );
8925					}
8926				}
8927
8928			// Toggle whole class name
8929			} else if ( value === undefined || type === "boolean" ) {
8930				className = getClass( this );
8931				if ( className ) {
8932
8933					// store className if set
8934					jQuery._data( this, "__className__", className );
8935				}
8936
8937				// If the element has a class name or if we're passed "false",
8938				// then remove the whole classname (if there was one, the above saved it).
8939				// Otherwise bring back whatever was previously saved (if anything),
8940				// falling back to the empty string if nothing was stored.
8941				jQuery.attr( this, "class",
8942					className || value === false ?
8943					"" :
8944					jQuery._data( this, "__className__" ) || ""
8945				);
8946			}
8947		} );
8948	},
8949
8950	hasClass: function( selector ) {
8951		var className, elem,
8952			i = 0;
8953
8954		className = " " + selector + " ";
8955		while ( ( elem = this[ i++ ] ) ) {
8956			if ( elem.nodeType === 1 &&
8957				( " " + getClass( elem ) + " " ).replace( rclass, " " )
8958					.indexOf( className ) > -1
8959			) {
8960				return true;
8961			}
8962		}
8963
8964		return false;
8965	}
8966} );
8967
8968
8969
8970
8971// Return jQuery for attributes-only inclusion
8972
8973
8974jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " +
8975	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
8976	"change select submit keydown keypress keyup error contextmenu" ).split( " " ),
8977	function( i, name ) {
8978
8979	// Handle event binding
8980	jQuery.fn[ name ] = function( data, fn ) {
8981		return arguments.length > 0 ?
8982			this.on( name, null, data, fn ) :
8983			this.trigger( name );
8984	};
8985} );
8986
8987jQuery.fn.extend( {
8988	hover: function( fnOver, fnOut ) {
8989		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
8990	}
8991} );
8992
8993
8994var location = window.location;
8995
8996var nonce = jQuery.now();
8997
8998var rquery = ( /\?/ );
8999
9000
9001
9002var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
9003
9004jQuery.parseJSON = function( data ) {
9005
9006	// Attempt to parse using the native JSON parser first
9007	if ( window.JSON && window.JSON.parse ) {
9008
9009		// Support: Android 2.3
9010		// Workaround failure to string-cast null input
9011		return window.JSON.parse( data + "" );
9012	}
9013
9014	var requireNonComma,
9015		depth = null,
9016		str = jQuery.trim( data + "" );
9017
9018	// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
9019	// after removing valid tokens
9020	return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {
9021
9022		// Force termination if we see a misplaced comma
9023		if ( requireNonComma && comma ) {
9024			depth = 0;
9025		}
9026
9027		// Perform no more replacements after returning to outermost depth
9028		if ( depth === 0 ) {
9029			return token;
9030		}
9031
9032		// Commas must not follow "[", "{", or ","
9033		requireNonComma = open || comma;
9034
9035		// Determine new depth
9036		// array/object open ("[" or "{"): depth += true - false (increment)
9037		// array/object close ("]" or "}"): depth += false - true (decrement)
9038		// other cases ("," or primitive): depth += true - true (numeric cast)
9039		depth += !close - !open;
9040
9041		// Remove this token
9042		return "";
9043	} ) ) ?
9044		( Function( "return " + str ) )() :
9045		jQuery.error( "Invalid JSON: " + data );
9046};
9047
9048
9049// Cross-browser xml parsing
vendor: 10,393 bytes, lines 9050-9455
9050jQuery.parseXML = function( data ) {
9051	var xml, tmp;
9052	if ( !data || typeof data !== "string" ) {
9053		return null;
9054	}
9055	try {
9056		if ( window.DOMParser ) { // Standard
9057			tmp = new window.DOMParser();
9058			xml = tmp.parseFromString( data, "text/xml" );
9059		} else { // IE
9060			xml = new window.ActiveXObject( "Microsoft.XMLDOM" );
9061			xml.async = "false";
9062			xml.loadXML( data );
9063		}
9064	} catch ( e ) {
9065		xml = undefined;
9066	}
9067	if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
9068		jQuery.error( "Invalid XML: " + data );
9069	}
9070	return xml;
9071};
9072
9073
9074var
9075	rhash = /#.*$/,
9076	rts = /([?&])_=[^&]*/,
9077
9078	// IE leaves an \r character at EOL
9079	rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
9080
9081	// #7653, #8125, #8152: local protocol detection
9082	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
9083	rnoContent = /^(?:GET|HEAD)$/,
9084	rprotocol = /^\/\//,
9085	rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
9086
9087	/* Prefilters
9088	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
9089	 * 2) These are called:
9090	 *    - BEFORE asking for a transport
9091	 *    - AFTER param serialization (s.data is a string if s.processData is true)
9092	 * 3) key is the dataType
9093	 * 4) the catchall symbol "*" can be used
9094	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
9095	 */
9096	prefilters = {},
9097
9098	/* Transports bindings
9099	 * 1) key is the dataType
9100	 * 2) the catchall symbol "*" can be used
9101	 * 3) selection will start with transport dataType and THEN go to "*" if needed
9102	 */
9103	transports = {},
9104
9105	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
9106	allTypes = "*/".concat( "*" ),
9107
9108	// Document location
9109	ajaxLocation = location.href,
9110
9111	// Segment location into parts
9112	ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
9113
9114// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
9115function addToPrefiltersOrTransports( structure ) {
9116
9117	// dataTypeExpression is optional and defaults to "*"
9118	return function( dataTypeExpression, func ) {
9119
9120		if ( typeof dataTypeExpression !== "string" ) {
9121			func = dataTypeExpression;
9122			dataTypeExpression = "*";
9123		}
9124
9125		var dataType,
9126			i = 0,
9127			dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
9128
9129		if ( jQuery.isFunction( func ) ) {
9130
9131			// For each dataType in the dataTypeExpression
9132			while ( ( dataType = dataTypes[ i++ ] ) ) {
9133
9134				// Prepend if requested
9135				if ( dataType.charAt( 0 ) === "+" ) {
9136					dataType = dataType.slice( 1 ) || "*";
9137					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
9138
9139				// Otherwise append
9140				} else {
9141					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
9142				}
9143			}
9144		}
9145	};
9146}
9147
9148// Base inspection function for prefilters and transports
9149function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
9150
9151	var inspected = {},
9152		seekingTransport = ( structure === transports );
9153
9154	function inspect( dataType ) {
9155		var selected;
9156		inspected[ dataType ] = true;
9157		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
9158			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
9159			if ( typeof dataTypeOrTransport === "string" &&
9160				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
9161
9162				options.dataTypes.unshift( dataTypeOrTransport );
9163				inspect( dataTypeOrTransport );
9164				return false;
9165			} else if ( seekingTransport ) {
9166				return !( selected = dataTypeOrTransport );
9167			}
9168		} );
9169		return selected;
9170	}
9171
9172	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
9173}
9174
9175// A special extend for ajax options
9176// that takes "flat" options (not to be deep extended)
9177// Fixes #9887
9178function ajaxExtend( target, src ) {
9179	var deep, key,
9180		flatOptions = jQuery.ajaxSettings.flatOptions || {};
9181
9182	for ( key in src ) {
9183		if ( src[ key ] !== undefined ) {
9184			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
9185		}
9186	}
9187	if ( deep ) {
9188		jQuery.extend( true, target, deep );
9189	}
9190
9191	return target;
9192}
9193
9194/* Handles responses to an ajax request:
9195 * - finds the right dataType (mediates between content-type and expected dataType)
9196 * - returns the corresponding response
9197 */
9198function ajaxHandleResponses( s, jqXHR, responses ) {
9199	var firstDataType, ct, finalDataType, type,
9200		contents = s.contents,
9201		dataTypes = s.dataTypes;
9202
9203	// Remove auto dataType and get content-type in the process
9204	while ( dataTypes[ 0 ] === "*" ) {
9205		dataTypes.shift();
9206		if ( ct === undefined ) {
9207			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
9208		}
9209	}
9210
9211	// Check if we're dealing with a known content-type
9212	if ( ct ) {
9213		for ( type in contents ) {
9214			if ( contents[ type ] && contents[ type ].test( ct ) ) {
9215				dataTypes.unshift( type );
9216				break;
9217			}
9218		}
9219	}
9220
9221	// Check to see if we have a response for the expected dataType
9222	if ( dataTypes[ 0 ] in responses ) {
9223		finalDataType = dataTypes[ 0 ];
9224	} else {
9225
9226		// Try convertible dataTypes
9227		for ( type in responses ) {
9228			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
9229				finalDataType = type;
9230				break;
9231			}
9232			if ( !firstDataType ) {
9233				firstDataType = type;
9234			}
9235		}
9236
9237		// Or just use first one
9238		finalDataType = finalDataType || firstDataType;
9239	}
9240
9241	// If we found a dataType
9242	// We add the dataType to the list if needed
9243	// and return the corresponding response
9244	if ( finalDataType ) {
9245		if ( finalDataType !== dataTypes[ 0 ] ) {
9246			dataTypes.unshift( finalDataType );
9247		}
9248		return responses[ finalDataType ];
9249	}
9250}
9251
9252/* Chain conversions given the request and the original response
9253 * Also sets the responseXXX fields on the jqXHR instance
9254 */
9255function ajaxConvert( s, response, jqXHR, isSuccess ) {
9256	var conv2, current, conv, tmp, prev,
9257		converters = {},
9258
9259		// Work with a copy of dataTypes in case we need to modify it for conversion
9260		dataTypes = s.dataTypes.slice();
9261
9262	// Create converters map with lowercased keys
9263	if ( dataTypes[ 1 ] ) {
9264		for ( conv in s.converters ) {
9265			converters[ conv.toLowerCase() ] = s.converters[ conv ];
9266		}
9267	}
9268
9269	current = dataTypes.shift();
9270
9271	// Convert to each sequential dataType
9272	while ( current ) {
9273
9274		if ( s.responseFields[ current ] ) {
9275			jqXHR[ s.responseFields[ current ] ] = response;
9276		}
9277
9278		// Apply the dataFilter if provided
9279		if ( !prev && isSuccess && s.dataFilter ) {
9280			response = s.dataFilter( response, s.dataType );
9281		}
9282
9283		prev = current;
9284		current = dataTypes.shift();
9285
9286		if ( current ) {
9287
9288			// There's only work to do if current dataType is non-auto
9289			if ( current === "*" ) {
9290
9291				current = prev;
9292
9293			// Convert response if prev dataType is non-auto and differs from current
9294			} else if ( prev !== "*" && prev !== current ) {
9295
9296				// Seek a direct converter
9297				conv = converters[ prev + " " + current ] || converters[ "* " + current ];
9298
9299				// If none found, seek a pair
9300				if ( !conv ) {
9301					for ( conv2 in converters ) {
9302
9303						// If conv2 outputs current
9304						tmp = conv2.split( " " );
9305						if ( tmp[ 1 ] === current ) {
9306
9307							// If prev can be converted to accepted input
9308							conv = converters[ prev + " " + tmp[ 0 ] ] ||
9309								converters[ "* " + tmp[ 0 ] ];
9310							if ( conv ) {
9311
9312								// Condense equivalence converters
9313								if ( conv === true ) {
9314									conv = converters[ conv2 ];
9315
9316								// Otherwise, insert the intermediate dataType
9317								} else if ( converters[ conv2 ] !== true ) {
9318									current = tmp[ 0 ];
9319									dataTypes.unshift( tmp[ 1 ] );
9320								}
9321								break;
9322							}
9323						}
9324					}
9325				}
9326
9327				// Apply converter (if not an equivalence)
9328				if ( conv !== true ) {
9329
9330					// Unless errors are allowed to bubble, catch and return them
9331					if ( conv && s[ "throws" ] ) { // jscs:ignore requireDotNotation
9332						response = conv( response );
9333					} else {
9334						try {
9335							response = conv( response );
9336						} catch ( e ) {
9337							return {
9338								state: "parsererror",
9339								error: conv ? e : "No conversion from " + prev + " to " + current
9340							};
9341						}
9342					}
9343				}
9344			}
9345		}
9346	}
9347
9348	return { state: "success", data: response };
9349}
9350
9351jQuery.extend( {
9352
9353	// Counter for holding the number of active queries
9354	active: 0,
9355
9356	// Last-Modified header cache for next request
9357	lastModified: {},
9358	etag: {},
9359
9360	ajaxSettings: {
9361		url: ajaxLocation,
9362		type: "GET",
9363		isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
9364		global: true,
9365		processData: true,
9366		async: true,
9367		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
9368		/*
9369		timeout: 0,
9370		data: null,
9371		dataType: null,
9372		username: null,
9373		password: null,
9374		cache: null,
9375		throws: false,
9376		traditional: false,
9377		headers: {},
9378		*/
9379
9380		accepts: {
9381			"*": allTypes,
9382			text: "text/plain",
9383			html: "text/html",
9384			xml: "application/xml, text/xml",
9385			json: "application/json, text/javascript"
9386		},
9387
9388		contents: {
9389			xml: /\bxml\b/,
9390			html: /\bhtml/,
9391			json: /\bjson\b/
9392		},
9393
9394		responseFields: {
9395			xml: "responseXML",
9396			text: "responseText",
9397			json: "responseJSON"
9398		},
9399
9400		// Data converters
9401		// Keys separate source (or catchall "*") and destination types with a single space
9402		converters: {
9403
9404			// Convert anything to text
9405			"* text": String,
9406
9407			// Text to html (true = no transformation)
9408			"text html": true,
9409
9410			// Evaluate text as a json expression
9411			"text json": jQuery.parseJSON,
9412
9413			// Parse text as xml
9414			"text xml": jQuery.parseXML
9415		},
9416
9417		// For options that shouldn't be deep extended:
9418		// you can add your own custom options here if
9419		// and when you create one that shouldn't be
9420		// deep extended (see ajaxExtend)
9421		flatOptions: {
9422			url: true,
9423			context: true
9424		}
9425	},
9426
9427	// Creates a full fledged settings object into target
9428	// with both ajaxSettings and settings fields.
9429	// If target is omitted, writes into ajaxSettings.
9430	ajaxSetup: function( target, settings ) {
9431		return settings ?
9432
9433			// Building a settings object
9434			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
9435
9436			// Extending ajaxSettings
9437			ajaxExtend( jQuery.ajaxSettings, target );
9438	},
9439
9440	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
9441	ajaxTransport: addToPrefiltersOrTransports( transports ),
9442
9443	// Main method
9444	ajax: function( url, options ) {
9445
9446		// If url is an object, simulate pre-1.5 signature
9447		if ( typeof url === "object" ) {
9448			options = url;
9449			url = undefined;
9450		}
9451
9452		// Force options to be an object
9453		options = options || {};
9454
9455		var
vendor: 5,146 bytes, lines 9456-9646
9456
9457			// Cross-domain detection vars
9458			parts,
9459
9460			// Loop variable
9461			i,
9462
9463			// URL without anti-cache param
9464			cacheURL,
9465
9466			// Response headers as string
9467			responseHeadersString,
9468
9469			// timeout handle
9470			timeoutTimer,
9471
9472			// To know if global events are to be dispatched
9473			fireGlobals,
9474
9475			transport,
9476
9477			// Response headers
9478			responseHeaders,
9479
9480			// Create the final options object
9481			s = jQuery.ajaxSetup( {}, options ),
9482
9483			// Callbacks context
9484			callbackContext = s.context || s,
9485
9486			// Context for global events is callbackContext if it is a DOM node or jQuery collection
9487			globalEventContext = s.context &&
9488				( callbackContext.nodeType || callbackContext.jquery ) ?
9489					jQuery( callbackContext ) :
9490					jQuery.event,
9491
9492			// Deferreds
9493			deferred = jQuery.Deferred(),
9494			completeDeferred = jQuery.Callbacks( "once memory" ),
9495
9496			// Status-dependent callbacks
9497			statusCode = s.statusCode || {},
9498
9499			// Headers (they are sent all at once)
9500			requestHeaders = {},
9501			requestHeadersNames = {},
9502
9503			// The jqXHR state
9504			state = 0,
9505
9506			// Default abort message
9507			strAbort = "canceled",
9508
9509			// Fake xhr
9510			jqXHR = {
9511				readyState: 0,
9512
9513				// Builds headers hashtable if needed
9514				getResponseHeader: function( key ) {
9515					var match;
9516					if ( state === 2 ) {
9517						if ( !responseHeaders ) {
9518							responseHeaders = {};
9519							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
9520								responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
9521							}
9522						}
9523						match = responseHeaders[ key.toLowerCase() ];
9524					}
9525					return match == null ? null : match;
9526				},
9527
9528				// Raw string
9529				getAllResponseHeaders: function() {
9530					return state === 2 ? responseHeadersString : null;
9531				},
9532
9533				// Caches the header
9534				setRequestHeader: function( name, value ) {
9535					var lname = name.toLowerCase();
9536					if ( !state ) {
9537						name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
9538						requestHeaders[ name ] = value;
9539					}
9540					return this;
9541				},
9542
9543				// Overrides response content-type header
9544				overrideMimeType: function( type ) {
9545					if ( !state ) {
9546						s.mimeType = type;
9547					}
9548					return this;
9549				},
9550
9551				// Status-dependent callbacks
9552				statusCode: function( map ) {
9553					var code;
9554					if ( map ) {
9555						if ( state < 2 ) {
9556							for ( code in map ) {
9557
9558								// Lazy-add the new callback in a way that preserves old ones
9559								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
9560							}
9561						} else {
9562
9563							// Execute the appropriate callbacks
9564							jqXHR.always( map[ jqXHR.status ] );
9565						}
9566					}
9567					return this;
9568				},
9569
9570				// Cancel the request
9571				abort: function( statusText ) {
9572					var finalText = statusText || strAbort;
9573					if ( transport ) {
9574						transport.abort( finalText );
9575					}
9576					done( 0, finalText );
9577					return this;
9578				}
9579			};
9580
9581		// Attach deferreds
9582		deferred.promise( jqXHR ).complete = completeDeferred.add;
9583		jqXHR.success = jqXHR.done;
9584		jqXHR.error = jqXHR.fail;
9585
9586		// Remove hash character (#7531: and string promotion)
9587		// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
9588		// Handle falsy url in the settings object (#10093: consistency with old signature)
9589		// We also use the url parameter if available
9590		s.url = ( ( url || s.url || ajaxLocation ) + "" )
9591			.replace( rhash, "" )
9592			.replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
9593
9594		// Alias method option to type as per ticket #12004
9595		s.type = options.method || options.type || s.method || s.type;
9596
9597		// Extract dataTypes list
9598		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
9599
9600		// A cross-domain request is in order when we have a protocol:host:port mismatch
9601		if ( s.crossDomain == null ) {
9602			parts = rurl.exec( s.url.toLowerCase() );
9603			s.crossDomain = !!( parts &&
9604				( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
9605					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
9606						( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
9607			);
9608		}
9609
9610		// Convert data if not already a string
9611		if ( s.data && s.processData && typeof s.data !== "string" ) {
9612			s.data = jQuery.param( s.data, s.traditional );
9613		}
9614
9615		// Apply prefilters
9616		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
9617
9618		// If request was aborted inside a prefilter, stop there
9619		if ( state === 2 ) {
9620			return jqXHR;
9621		}
9622
9623		// We can fire global events as of now if asked to
9624		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
9625		fireGlobals = jQuery.event && s.global;
9626
9627		// Watch for a new set of requests
9628		if ( fireGlobals && jQuery.active++ === 0 ) {
9629			jQuery.event.trigger( "ajaxStart" );
9630		}
9631
9632		// Uppercase the type
9633		s.type = s.type.toUpperCase();
9634
9635		// Determine if request has content
9636		s.hasContent = !rnoContent.test( s.type );
9637
9638		// Save the URL in case we're toying with the If-Modified-Since
9639		// and/or If-None-Match header later on
9640		cacheURL = s.url;
9641
9642		// More options handling for requests with no content
9643		if ( !s.hasContent ) {
9644
9645			// If data is available, append data to url
9646			if ( s.data ) {
vendor: 8,244 bytes, lines 9647-9986
9647				cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
9648
9649				// #9682: remove data so that it's not used in an eventual retry
9650				delete s.data;
9651			}
9652
9653			// Add anti-cache in url if needed
9654			if ( s.cache === false ) {
9655				s.url = rts.test( cacheURL ) ?
9656
9657					// If there is already a '_' parameter, set its value
9658					cacheURL.replace( rts, "$1_=" + nonce++ ) :
9659
9660					// Otherwise add one to the end
9661					cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
9662			}
9663		}
9664
9665		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9666		if ( s.ifModified ) {
9667			if ( jQuery.lastModified[ cacheURL ] ) {
9668				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
9669			}
9670			if ( jQuery.etag[ cacheURL ] ) {
9671				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
9672			}
9673		}
9674
9675		// Set the correct header, if data is being sent
9676		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
9677			jqXHR.setRequestHeader( "Content-Type", s.contentType );
9678		}
9679
9680		// Set the Accepts header for the server, depending on the dataType
9681		jqXHR.setRequestHeader(
9682			"Accept",
9683			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
9684				s.accepts[ s.dataTypes[ 0 ] ] +
9685					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
9686				s.accepts[ "*" ]
9687		);
9688
9689		// Check for headers option
9690		for ( i in s.headers ) {
9691			jqXHR.setRequestHeader( i, s.headers[ i ] );
9692		}
9693
9694		// Allow custom headers/mimetypes and early abort
9695		if ( s.beforeSend &&
9696			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
9697
9698			// Abort if not done already and return
9699			return jqXHR.abort();
9700		}
9701
9702		// aborting is no longer a cancellation
9703		strAbort = "abort";
9704
9705		// Install callbacks on deferreds
9706		for ( i in { success: 1, error: 1, complete: 1 } ) {
9707			jqXHR[ i ]( s[ i ] );
9708		}
9709
9710		// Get transport
9711		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
9712
9713		// If no transport, we auto-abort
9714		if ( !transport ) {
9715			done( -1, "No Transport" );
9716		} else {
9717			jqXHR.readyState = 1;
9718
9719			// Send global event
9720			if ( fireGlobals ) {
9721				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
9722			}
9723
9724			// If request was aborted inside ajaxSend, stop there
9725			if ( state === 2 ) {
9726				return jqXHR;
9727			}
9728
9729			// Timeout
9730			if ( s.async && s.timeout > 0 ) {
9731				timeoutTimer = window.setTimeout( function() {
9732					jqXHR.abort( "timeout" );
9733				}, s.timeout );
9734			}
9735
9736			try {
9737				state = 1;
9738				transport.send( requestHeaders, done );
9739			} catch ( e ) {
9740
9741				// Propagate exception as error if not done
9742				if ( state < 2 ) {
9743					done( -1, e );
9744
9745				// Simply rethrow otherwise
9746				} else {
9747					throw e;
9748				}
9749			}
9750		}
9751
9752		// Callback for when everything is done
9753		function done( status, nativeStatusText, responses, headers ) {
9754			var isSuccess, success, error, response, modified,
9755				statusText = nativeStatusText;
9756
9757			// Called once
9758			if ( state === 2 ) {
9759				return;
9760			}
9761
9762			// State is "done" now
9763			state = 2;
9764
9765			// Clear timeout if it exists
9766			if ( timeoutTimer ) {
9767				window.clearTimeout( timeoutTimer );
9768			}
9769
9770			// Dereference transport for early garbage collection
9771			// (no matter how long the jqXHR object will be used)
9772			transport = undefined;
9773
9774			// Cache response headers
9775			responseHeadersString = headers || "";
9776
9777			// Set readyState
9778			jqXHR.readyState = status > 0 ? 4 : 0;
9779
9780			// Determine if successful
9781			isSuccess = status >= 200 && status < 300 || status === 304;
9782
9783			// Get response data
9784			if ( responses ) {
9785				response = ajaxHandleResponses( s, jqXHR, responses );
9786			}
9787
9788			// Convert no matter what (that way responseXXX fields are always set)
9789			response = ajaxConvert( s, response, jqXHR, isSuccess );
9790
9791			// If successful, handle type chaining
9792			if ( isSuccess ) {
9793
9794				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9795				if ( s.ifModified ) {
9796					modified = jqXHR.getResponseHeader( "Last-Modified" );
9797					if ( modified ) {
9798						jQuery.lastModified[ cacheURL ] = modified;
9799					}
9800					modified = jqXHR.getResponseHeader( "etag" );
9801					if ( modified ) {
9802						jQuery.etag[ cacheURL ] = modified;
9803					}
9804				}
9805
9806				// if no content
9807				if ( status === 204 || s.type === "HEAD" ) {
9808					statusText = "nocontent";
9809
9810				// if not modified
9811				} else if ( status === 304 ) {
9812					statusText = "notmodified";
9813
9814				// If we have data, let's convert it
9815				} else {
9816					statusText = response.state;
9817					success = response.data;
9818					error = response.error;
9819					isSuccess = !error;
9820				}
9821			} else {
9822
9823				// We extract error from statusText
9824				// then normalize statusText and status for non-aborts
9825				error = statusText;
9826				if ( status || !statusText ) {
9827					statusText = "error";
9828					if ( status < 0 ) {
9829						status = 0;
9830					}
9831				}
9832			}
9833
9834			// Set data for the fake xhr object
9835			jqXHR.status = status;
9836			jqXHR.statusText = ( nativeStatusText || statusText ) + "";
9837
9838			// Success/Error
9839			if ( isSuccess ) {
9840				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
9841			} else {
9842				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
9843			}
9844
9845			// Status-dependent callbacks
9846			jqXHR.statusCode( statusCode );
9847			statusCode = undefined;
9848
9849			if ( fireGlobals ) {
9850				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
9851					[ jqXHR, s, isSuccess ? success : error ] );
9852			}
9853
9854			// Complete
9855			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
9856
9857			if ( fireGlobals ) {
9858				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
9859
9860				// Handle the global AJAX counter
9861				if ( !( --jQuery.active ) ) {
9862					jQuery.event.trigger( "ajaxStop" );
9863				}
9864			}
9865		}
9866
9867		return jqXHR;
9868	},
9869
9870	getJSON: function( url, data, callback ) {
9871		return jQuery.get( url, data, callback, "json" );
9872	},
9873
9874	getScript: function( url, callback ) {
9875		return jQuery.get( url, undefined, callback, "script" );
9876	}
9877} );
9878
9879jQuery.each( [ "get", "post" ], function( i, method ) {
9880	jQuery[ method ] = function( url, data, callback, type ) {
9881
9882		// shift arguments if data argument was omitted
9883		if ( jQuery.isFunction( data ) ) {
9884			type = type || callback;
9885			callback = data;
9886			data = undefined;
9887		}
9888
9889		// The url can be an options object (which then must have .url)
9890		return jQuery.ajax( jQuery.extend( {
9891			url: url,
9892			type: method,
9893			dataType: type,
9894			data: data,
9895			success: callback
9896		}, jQuery.isPlainObject( url ) && url ) );
9897	};
9898} );
9899
9900
9901jQuery._evalUrl = function( url ) {
9902	return jQuery.ajax( {
9903		url: url,
9904
9905		// Make this explicit, since user can override this through ajaxSetup (#11264)
9906		type: "GET",
9907		dataType: "script",
9908		cache: true,
9909		async: false,
9910		global: false,
9911		"throws": true
9912	} );
9913};
9914
9915
9916jQuery.fn.extend( {
9917	wrapAll: function( html ) {
9918		if ( jQuery.isFunction( html ) ) {
9919			return this.each( function( i ) {
9920				jQuery( this ).wrapAll( html.call( this, i ) );
9921			} );
9922		}
9923
9924		if ( this[ 0 ] ) {
9925
9926			// The elements to wrap the target around
9927			var wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
9928
9929			if ( this[ 0 ].parentNode ) {
9930				wrap.insertBefore( this[ 0 ] );
9931			}
9932
9933			wrap.map( function() {
9934				var elem = this;
9935
9936				while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
9937					elem = elem.firstChild;
9938				}
9939
9940				return elem;
9941			} ).append( this );
9942		}
9943
9944		return this;
9945	},
9946
9947	wrapInner: function( html ) {
9948		if ( jQuery.isFunction( html ) ) {
9949			return this.each( function( i ) {
9950				jQuery( this ).wrapInner( html.call( this, i ) );
9951			} );
9952		}
9953
9954		return this.each( function() {
9955			var self = jQuery( this ),
9956				contents = self.contents();
9957
9958			if ( contents.length ) {
9959				contents.wrapAll( html );
9960
9961			} else {
9962				self.append( html );
9963			}
9964		} );
9965	},
9966
9967	wrap: function( html ) {
9968		var isFunction = jQuery.isFunction( html );
9969
9970		return this.each( function( i ) {
9971			jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
9972		} );
9973	},
9974
9975	unwrap: function() {
9976		return this.parent().each( function() {
9977			if ( !jQuery.nodeName( this, "body" ) ) {
9978				jQuery( this ).replaceWith( this.childNodes );
9979			}
9980		} ).end();
9981	}
9982} );
9983
9984
9985function getDisplay( elem ) {
9986	return elem.style && elem.style.display || jQuery.css( elem, "dis
9986play" );
9987}
9988
9989function filterHidden( elem ) {
9990
9991	// Disconnected elements are considered hidden
9992	if ( !jQuery.contains( elem.ownerDocument || document, elem ) ) {
9993		return true;
9994	}
9995	while ( elem && elem.nodeType === 1 ) {
9996		if ( getDisplay( elem ) === "none" || elem.type === "hidden" ) {
9997			return true;
9998		}
9999		elem = elem.parentNode;
10000	}
10001	return false;
10002}
10003
10004jQuery.expr.filters.hidden = function( elem ) {
10005
10006	// Support: Opera <= 12.12
10007	// Opera reports offsetWidths and offsetHeights less than zero on some elements
10008	return support.reliableHiddenOffsets() ?
10009		( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&
10010			!elem.getClientRects().length ) :
10011			filterHidden( elem );
10012};
10013
10014jQuery.expr.filters.visible = function( elem ) {
10015	return !jQuery.expr.filters.hidden( elem );
10016};
10017
10018
10019
10020
10021var r20 = /%20/g,
10022	rbracket = /\[\]$/,
10023	rCRLF = /\r?\n/g,
10024	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
10025	rsubmittable = /^(?:input|select|textarea|keygen)/i;
10026
10027function buildParams( prefix, obj, traditional, add ) {
10028	var name;
10029
10030	if ( jQuery.isArray( obj ) ) {
10031
10032		// Serialize array item.
10033		jQuery.each( obj, function( i, v ) {
10034			if ( traditional || rbracket.test( prefix ) ) {
10035
10036				// Treat each array item as a scalar.
10037				add( prefix, v );
10038
10039			} else {
10040
10041				// Item is non-scalar (array or object), encode its numeric index.
10042				buildParams(
10043					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
10044					v,
10045					traditional,
10046					add
10047				);
10048			}
10049		} );
10050
10051	} else if ( !traditional && jQuery.type( obj ) === "object" ) {
10052
10053		// Serialize object item.
10054		for ( name in obj ) {
10055			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
10056		}
10057
10058	} else {
10059
10060		// Serialize scalar item.
10061		add( prefix, obj );
10062	}
10063}
10064
10065// Serialize an array of form elements or a set of
10066// key/values into a query string
10067jQuery.param = function( a, traditional ) {
10068	var prefix,
10069		s = [],
10070		add = function( key, value ) {
10071
10072			// If value is a function, invoke it and return its value
10073			value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
10074			s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
10075		};
10076
10077	// Set traditional to true for jQuery <= 1.3.2 behavior.
10078	if ( traditional === undefined ) {
10079		traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
10080	}
10081
10082	// If an array was passed in, assume that it is an array of form elements.
10083	if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
10084
10085		// Serialize the form elements
10086		jQuery.each( a, function() {
10087			add( this.name, this.value );
10088		} );
10089
10090	} else {
10091
10092		// If traditional, encode the "old" way (the way 1.3.2 or older
10093		// did it), otherwise encode params recursively.
10094		for ( prefix in a ) {
10095			buildParams( prefix, a[ prefix ], traditional, add );
10096		}
10097	}
10098
10099	// Return the resulting serialization
10100	return s.join( "&" ).replace( r20, "+" );
10101};
10102
10103jQuery.fn.extend( {
10104	serialize: function() {
10105		return jQuery.param( this.serializeArray() );
10106	},
10107	serializeArray: function() {
10108		return this.map( function() {
10109
10110			// Can add propHook for "elements" to filter or add form elements
10111			var elements = jQuery.prop( this, "elements" );
10112			return elements ? jQuery.makeArray( elements ) : this;
10113		} )
10114		.filter( function() {
10115			var type = this.type;
10116
10117			// Use .is(":disabled") so that fieldset[disabled] works
10118			return this.name && !jQuery( this ).is( ":disabled" ) &&
10119				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
10120				( this.checked || !rcheckableType.test( type ) );
10121		} )
10122		.map( function( i, elem ) {
10123			var val = jQuery( this ).val();
10124
10125			return val == null ?
10126				null :
10127				jQuery.isArray( val ) ?
10128					jQuery.map( val, function( val ) {
10129						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
10130					} ) :
10131					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
10132		} ).get();
10133	}
10134} );
10135
10136
10137// Create the request object
10138// (This is still attached to ajaxSettings for backward compatibility)
10139jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
10140
10141	// Support: IE6-IE8
10142	function() {
10143
10144		// XHR cannot access local files, always use ActiveX for that case
10145		if ( this.isLocal ) {
10146			return createActiveXHR();
10147		}
10148
vendor: 22,565 bytes, lines 10149-10969
10149		// Support: IE 9-11
10150		// IE seems to error on cross-domain PATCH requests when ActiveX XHR
10151		// is used. In IE 9+ always use the native XHR.
10152		// Note: this condition won't catch Edge as it doesn't define
10153		// document.documentMode but it also doesn't support ActiveX so it won't
10154		// reach this code.
10155		if ( document.documentMode > 8 ) {
10156			return createStandardXHR();
10157		}
10158
10159		// Support: IE<9
10160		// oldIE XHR does not support non-RFC2616 methods (#13240)
10161		// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx
10162		// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
10163		// Although this check for six methods instead of eight
10164		// since IE also does not support "trace" and "connect"
10165		return /^(get|post|head|put|delete|options)$/i.test( this.type ) &&
10166			createStandardXHR() || createActiveXHR();
10167	} :
10168
10169	// For all other browsers, use the standard XMLHttpRequest object
10170	createStandardXHR;
10171
10172var xhrId = 0,
10173	xhrCallbacks = {},
10174	xhrSupported = jQuery.ajaxSettings.xhr();
10175
10176// Support: IE<10
10177// Open requests must be manually aborted on unload (#5280)
10178// See https://support.microsoft.com/kb/2856746 for more info
10179if ( window.attachEvent ) {
10180	window.attachEvent( "onunload", function() {
10181		for ( var key in xhrCallbacks ) {
10182			xhrCallbacks[ key ]( undefined, true );
10183		}
10184	} );
10185}
10186
10187// Determine support properties
10188support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
10189xhrSupported = support.ajax = !!xhrSupported;
10190
10191// Create transport if the browser can provide an xhr
10192if ( xhrSupported ) {
10193
10194	jQuery.ajaxTransport( function( options ) {
10195
10196		// Cross domain only allowed if supported through XMLHttpRequest
10197		if ( !options.crossDomain || support.cors ) {
10198
10199			var callback;
10200
10201			return {
10202				send: function( headers, complete ) {
10203					var i,
10204						xhr = options.xhr(),
10205						id = ++xhrId;
10206
10207					// Open the socket
10208					xhr.open(
10209						options.type,
10210						options.url,
10211						options.async,
10212						options.username,
10213						options.password
10214					);
10215
10216					// Apply custom fields if provided
10217					if ( options.xhrFields ) {
10218						for ( i in options.xhrFields ) {
10219							xhr[ i ] = options.xhrFields[ i ];
10220						}
10221					}
10222
10223					// Override mime type if needed
10224					if ( options.mimeType && xhr.overrideMimeType ) {
10225						xhr.overrideMimeType( options.mimeType );
10226					}
10227
10228					// X-Requested-With header
10229					// For cross-domain requests, seeing as conditions for a preflight are
10230					// akin to a jigsaw puzzle, we simply never set it to be sure.
10231					// (it can always be set on a per-request basis or even using ajaxSetup)
10232					// For same-domain requests, won't change header if already provided.
10233					if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
10234						headers[ "X-Requested-With" ] = "XMLHttpRequest";
10235					}
10236
10237					// Set headers
10238					for ( i in headers ) {
10239
10240						// Support: IE<9
10241						// IE's ActiveXObject throws a 'Type Mismatch' exception when setting
10242						// request header to a null-value.
10243						//
10244						// To keep consistent with other XHR implementations, cast the value
10245						// to string and ignore `undefined`.
10246						if ( headers[ i ] !== undefined ) {
10247							xhr.setRequestHeader( i, headers[ i ] + "" );
10248						}
10249					}
10250
10251					// Do send the request
10252					// This may raise an exception which is actually
10253					// handled in jQuery.ajax (so no try/catch here)
10254					xhr.send( ( options.hasContent && options.data ) || null );
10255
10256					// Listener
10257					callback = function( _, isAbort ) {
10258						var status, statusText, responses;
10259
10260						// Was never called and is aborted or complete
10261						if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
10262
10263							// Clean up
10264							delete xhrCallbacks[ id ];
10265							callback = undefined;
10266							xhr.onreadystatechange = jQuery.noop;
10267
10268							// Abort manually if needed
10269							if ( isAbort ) {
10270								if ( xhr.readyState !== 4 ) {
10271									xhr.abort();
10272								}
10273							} else {
10274								responses = {};
10275								status = xhr.status;
10276
10277								// Support: IE<10
10278								// Accessing binary-data responseText throws an exception
10279								// (#11426)
10280								if ( typeof xhr.responseText === "string" ) {
10281									responses.text = xhr.responseText;
10282								}
10283
10284								// Firefox throws an exception when accessing
10285								// statusText for faulty cross-domain requests
10286								try {
10287									statusText = xhr.statusText;
10288								} catch ( e ) {
10289
10290									// We normalize with Webkit giving an empty statusText
10291									statusText = "";
10292								}
10293
10294								// Filter status for non standard behaviors
10295
10296								// If the request is local and we have data: assume a success
10297								// (success with no data won't get notified, that's the best we
10298								// can do given current implementations)
10299								if ( !status && options.isLocal && !options.crossDomain ) {
10300									status = responses.text ? 200 : 404;
10301
10302								// IE - #1450: sometimes returns 1223 when it should be 204
10303								} else if ( status === 1223 ) {
10304									status = 204;
10305								}
10306							}
10307						}
10308
10309						// Call complete if needed
10310						if ( responses ) {
10311							complete( status, statusText, responses, xhr.getAllResponseHeaders() );
10312						}
10313					};
10314
10315					// Do send the request
10316					// `xhr.send` may raise an exception, but it will be
10317					// handled in jQuery.ajax (so no try/catch here)
10318					if ( !options.async ) {
10319
10320						// If we're in sync mode we fire the callback
10321						callback();
10322					} else if ( xhr.readyState === 4 ) {
10323
10324						// (IE6 & IE7) if it's in cache and has been
10325						// retrieved directly we need to fire the callback
10326						window.setTimeout( callback );
10327					} else {
10328
10329						// Register the callback, but delay it in case `xhr.send` throws
10330						// Add to the list of active xhr callbacks
10331						xhr.onreadystatechange = xhrCallbacks[ id ] = callback;
10332					}
10333				},
10334
10335				abort: function() {
10336					if ( callback ) {
10337						callback( undefined, true );
10338					}
10339				}
10340			};
10341		}
10342	} );
10343}
10344
10345// Functions to create xhrs
10346function createStandardXHR() {
10347	try {
10348		return new window.XMLHttpRequest();
10349	} catch ( e ) {}
10350}
10351
10352function createActiveXHR() {
10353	try {
10354		return new window.ActiveXObject( "Microsoft.XMLHTTP" );
10355	} catch ( e ) {}
10356}
10357
10358
10359
10360
10361// Install script dataType
10362jQuery.ajaxSetup( {
10363	accepts: {
10364		script: "text/javascript, application/javascript, " +
10365			"application/ecmascript, application/x-ecmascript"
10366	},
10367	contents: {
10368		script: /\b(?:java|ecma)script\b/
10369	},
10370	converters: {
10371		"text script": function( text ) {
10372			jQuery.globalEval( text );
10373			return text;
10374		}
10375	}
10376} );
10377
10378// Handle cache's special case and global
10379jQuery.ajaxPrefilter( "script", function( s ) {
10380	if ( s.cache === undefined ) {
10381		s.cache = false;
10382	}
10383	if ( s.crossDomain ) {
10384		s.type = "GET";
10385		s.global = false;
10386	}
10387} );
10388
10389// Bind script tag hack transport
10390jQuery.ajaxTransport( "script", function( s ) {
10391
10392	// This transport only deals with cross domain requests
10393	if ( s.crossDomain ) {
10394
10395		var script,
10396			head = document.head || jQuery( "head" )[ 0 ] || document.documentElement;
10397
10398		return {
10399
10400			send: function( _, callback ) {
10401
10402				script = document.createElement( "script" );
10403
10404				script.async = true;
10405
10406				if ( s.scriptCharset ) {
10407					script.charset = s.scriptCharset;
10408				}
10409
10410				script.src = s.url;
10411
10412				// Attach handlers for all browsers
10413				script.onload = script.onreadystatechange = function( _, isAbort ) {
10414
10415					if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
10416
10417						// Handle memory leak in IE
10418						script.onload = script.onreadystatechange = null;
10419
10420						// Remove the script
10421						if ( script.parentNode ) {
10422							script.parentNode.removeChild( script );
10423						}
10424
10425						// Dereference the script
10426						script = null;
10427
10428						// Callback if not abort
10429						if ( !isAbort ) {
10430							callback( 200, "success" );
10431						}
10432					}
10433				};
10434
10435				// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
10436				// Use native DOM manipulation to avoid our domManip AJAX trickery
10437				head.insertBefore( script, head.firstChild );
10438			},
10439
10440			abort: function() {
10441				if ( script ) {
10442					script.onload( undefined, true );
10443				}
10444			}
10445		};
10446	}
10447} );
10448
10449
10450
10451
10452var oldCallbacks = [],
10453	rjsonp = /(=)\?(?=&|$)|\?\?/;
10454
10455// Default jsonp settings
10456jQuery.ajaxSetup( {
10457	jsonp: "callback",
10458	jsonpCallback: function() {
10459		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
10460		this[ callback ] = true;
10461		return callback;
10462	}
10463} );
10464
10465// Detect, normalize options and install callbacks for jsonp requests
10466jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
10467
10468	var callbackName, overwritten, responseContainer,
10469		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
10470			"url" :
10471			typeof s.data === "string" &&
10472				( s.contentType || "" )
10473					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
10474				rjsonp.test( s.data ) && "data"
10475		);
10476
10477	// Handle iff the expected data type is "jsonp" or we have a parameter to set
10478	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
10479
10480		// Get callback name, remembering preexisting value associated with it
10481		callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
10482			s.jsonpCallback() :
10483			s.jsonpCallback;
10484
10485		// Insert callback into url or form data
10486		if ( jsonProp ) {
10487			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
10488		} else if ( s.jsonp !== false ) {
10489			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
10490		}
10491
10492		// Use data converter to retrieve json after script execution
10493		s.converters[ "script json" ] = function() {
10494			if ( !responseContainer ) {
10495				jQuery.error( callbackName + " was not called" );
10496			}
10497			return responseContainer[ 0 ];
10498		};
10499
10500		// force json dataType
10501		s.dataTypes[ 0 ] = "json";
10502
10503		// Install callback
10504		overwritten = window[ callbackName ];
10505		window[ callbackName ] = function() {
10506			responseContainer = arguments;
10507		};
10508
10509		// Clean-up function (fires after converters)
10510		jqXHR.always( function() {
10511
10512			// If previous value didn't exist - remove it
10513			if ( overwritten === undefined ) {
10514				jQuery( window ).removeProp( callbackName );
10515
10516			// Otherwise restore preexisting value
10517			} else {
10518				window[ callbackName ] = overwritten;
10519			}
10520
10521			// Save back as free
10522			if ( s[ callbackName ] ) {
10523
10524				// make sure that re-using the options doesn't screw things around
10525				s.jsonpCallback = originalSettings.jsonpCallback;
10526
10527				// save the callback name for future use
10528				oldCallbacks.push( callbackName );
10529			}
10530
10531			// Call if it was a function and we have a response
10532			if ( responseContainer && jQuery.isFunction( overwritten ) ) {
10533				overwritten( responseContainer[ 0 ] );
10534			}
10535
10536			responseContainer = overwritten = undefined;
10537		} );
10538
10539		// Delegate to script
10540		return "script";
10541	}
10542} );
10543
10544
10545
10546
10547// data: string of html
10548// context (optional): If specified, the fragment will be created in this context,
10549// defaults to document
10550// keepScripts (optional): If true, will include scripts passed in the html string
10551jQuery.parseHTML = function( data, context, keepScripts ) {
10552	if ( !data || typeof data !== "string" ) {
10553		return null;
10554	}
10555	if ( typeof context === "boolean" ) {
10556		keepScripts = context;
10557		context = false;
10558	}
10559	context = context || document;
10560
10561	var parsed = rsingleTag.exec( data ),
10562		scripts = !keepScripts && [];
10563
10564	// Single tag
10565	if ( parsed ) {
10566		return [ context.createElement( parsed[ 1 ] ) ];
10567	}
10568
10569	parsed = buildFragment( [ data ], context, scripts );
10570
10571	if ( scripts && scripts.length ) {
10572		jQuery( scripts ).remove();
10573	}
10574
10575	return jQuery.merge( [], parsed.childNodes );
10576};
10577
10578
10579// Keep a copy of the old load method
10580var _load = jQuery.fn.load;
10581
10582/**
10583 * Load a url into a page
10584 */
10585jQuery.fn.load = function( url, params, callback ) {
10586	if ( typeof url !== "string" && _load ) {
10587		return _load.apply( this, arguments );
10588	}
10589
10590	var selector, type, response,
10591		self = this,
10592		off = url.indexOf( " " );
10593
10594	if ( off > -1 ) {
10595		selector = jQuery.trim( url.slice( off, url.length ) );
10596		url = url.slice( 0, off );
10597	}
10598
10599	// If it's a function
10600	if ( jQuery.isFunction( params ) ) {
10601
10602		// We assume that it's the callback
10603		callback = params;
10604		params = undefined;
10605
10606	// Otherwise, build a param string
10607	} else if ( params && typeof params === "object" ) {
10608		type = "POST";
10609	}
10610
10611	// If we have elements to modify, make the request
10612	if ( self.length > 0 ) {
10613		jQuery.ajax( {
10614			url: url,
10615
10616			// If "type" variable is undefined, then "GET" method will be used.
10617			// Make value of this field explicit since
10618			// user can override it through ajaxSetup method
10619			type: type || "GET",
10620			dataType: "html",
10621			data: params
10622		} ).done( function( responseText ) {
10623
10624			// Save response for use in complete callback
10625			response = arguments;
10626
10627			self.html( selector ?
10628
10629				// If a selector was specified, locate the right elements in a dummy div
10630				// Exclude scripts to avoid IE 'Permission Denied' errors
10631				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
10632
10633				// Otherwise use the full result
10634				responseText );
10635
10636		// If the request succeeds, this function gets "data", "status", "jqXHR"
10637		// but they are ignored because response was set above.
10638		// If it fails, this function gets "jqXHR", "status", "error"
10639		} ).always( callback && function( jqXHR, status ) {
10640			self.each( function() {
10641				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
10642			} );
10643		} );
10644	}
10645
10646	return this;
10647};
10648
10649
10650
10651
10652// Attach a bunch of functions for handling common AJAX events
10653jQuery.each( [
10654	"ajaxStart",
10655	"ajaxStop",
10656	"ajaxComplete",
10657	"ajaxError",
10658	"ajaxSuccess",
10659	"ajaxSend"
10660], function( i, type ) {
10661	jQuery.fn[ type ] = function( fn ) {
10662		return this.on( type, fn );
10663	};
10664} );
10665
10666
10667
10668
10669jQuery.expr.filters.animated = function( elem ) {
10670	return jQuery.grep( jQuery.timers, function( fn ) {
10671		return elem === fn.elem;
10672	} ).length;
10673};
10674
10675
10676
10677
10678
10679/**
10680 * Gets a window from an element
10681 */
10682function getWindow( elem ) {
10683	return jQuery.isWindow( elem ) ?
10684		elem :
10685		elem.nodeType === 9 ?
10686			elem.defaultView || elem.parentWindow :
10687			false;
10688}
10689
10690jQuery.offset = {
10691	setOffset: function( elem, options, i ) {
10692		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
10693			position = jQuery.css( elem, "position" ),
10694			curElem = jQuery( elem ),
10695			props = {};
10696
10697		// set position first, in-case top/left are set even on static elem
10698		if ( position === "static" ) {
10699			elem.style.position = "relative";
10700		}
10701
10702		curOffset = curElem.offset();
10703		curCSSTop = jQuery.css( elem, "top" );
10704		curCSSLeft = jQuery.css( elem, "left" );
10705		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
10706			jQuery.inArray( "auto", [ curCSSTop, curCSSLeft ] ) > -1;
10707
10708		// need to be able to calculate position if either top or left
10709		// is auto and position is either absolute or fixed
10710		if ( calculatePosition ) {
10711			curPosition = curElem.position();
10712			curTop = curPosition.top;
10713			curLeft = curPosition.left;
10714		} else {
10715			curTop = parseFloat( curCSSTop ) || 0;
10716			curLeft = parseFloat( curCSSLeft ) || 0;
10717		}
10718
10719		if ( jQuery.isFunction( options ) ) {
10720
10721			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
10722			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
10723		}
10724
10725		if ( options.top != null ) {
10726			props.top = ( options.top - curOffset.top ) + curTop;
10727		}
10728		if ( options.left != null ) {
10729			props.left = ( options.left - curOffset.left ) + curLeft;
10730		}
10731
10732		if ( "using" in options ) {
10733			options.using.call( elem, props );
10734		} else {
10735			curElem.css( props );
10736		}
10737	}
10738};
10739
10740jQuery.fn.extend( {
10741	offset: function( options ) {
10742		if ( arguments.length ) {
10743			return options === undefined ?
10744				this :
10745				this.each( function( i ) {
10746					jQuery.offset.setOffset( this, options, i );
10747				} );
10748		}
10749
10750		var docElem, win,
10751			box = { top: 0, left: 0 },
10752			elem = this[ 0 ],
10753			doc = elem && elem.ownerDocument;
10754
10755		if ( !doc ) {
10756			return;
10757		}
10758
10759		docElem = doc.documentElement;
10760
10761		// Make sure it's not a disconnected DOM node
10762		if ( !jQuery.contains( docElem, elem ) ) {
10763			return box;
10764		}
10765
10766		// If we don't have gBCR, just use 0,0 rather than error
10767		// BlackBerry 5, iOS 3 (original iPhone)
10768		if ( typeof elem.getBoundingClientRect !== "undefined" ) {
10769			box = elem.getBoundingClientRect();
10770		}
10771		win = getWindow( doc );
10772		return {
10773			top: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),
10774			left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
10775		};
10776	},
10777
10778	position: function() {
10779		if ( !this[ 0 ] ) {
10780			return;
10781		}
10782
10783		var offsetParent, offset,
10784			parentOffset = { top: 0, left: 0 },
10785			elem = this[ 0 ];
10786
10787		// Fixed elements are offset from window (parentOffset = {top:0, left: 0},
10788		// because it is its only offset parent
10789		if ( jQuery.css( elem, "position" ) === "fixed" ) {
10790
10791			// we assume that getBoundingClientRect is available when computed position is fixed
10792			offset = elem.getBoundingClientRect();
10793		} else {
10794
10795			// Get *real* offsetParent
10796			offsetParent = this.offsetParent();
10797
10798			// Get correct offsets
10799			offset = this.offset();
10800			if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
10801				parentOffset = offsetParent.offset();
10802			}
10803
10804			// Add offsetParent borders
10805			parentOffset.top  += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
10806			parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
10807		}
10808
10809		// Subtract parent offsets and element margins
10810		// note: when an element has margin: auto the offsetLeft and marginLeft
10811		// are the same in Safari causing offset.left to incorrectly be 0
10812		return {
10813			top:  offset.top  - parentOffset.top - jQuery.css( elem, "marginTop", true ),
10814			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
10815		};
10816	},
10817
10818	offsetParent: function() {
10819		return this.map( function() {
10820			var offsetParent = this.offsetParent;
10821
10822			while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) &&
10823				jQuery.css( offsetParent, "position" ) === "static" ) ) {
10824				offsetParent = offsetParent.offsetParent;
10825			}
10826			return offsetParent || documentElement;
10827		} );
10828	}
10829} );
10830
10831// Create scrollLeft and scrollTop methods
10832jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
10833	var top = /Y/.test( prop );
10834
10835	jQuery.fn[ method ] = function( val ) {
10836		return access( this, function( elem, method, val ) {
10837			var win = getWindow( elem );
10838
10839			if ( val === undefined ) {
10840				return win ? ( prop in win ) ? win[ prop ] :
10841					win.document.documentElement[ method ] :
10842					elem[ method ];
10843			}
10844
10845			if ( win ) {
10846				win.scrollTo(
10847					!top ? val : jQuery( win ).scrollLeft(),
10848					top ? val : jQuery( win ).scrollTop()
10849				);
10850
10851			} else {
10852				elem[ method ] = val;
10853			}
10854		}, method, val, arguments.length, null );
10855	};
10856} );
10857
10858// Support: Safari<7-8+, Chrome<37-44+
10859// Add the top/left cssHooks using jQuery.fn.position
10860// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
10861// getComputedStyle returns percent when specified for top/left/bottom/right
10862// rather than make the css module depend on the offset module, we just check for it here
10863jQuery.each( [ "top", "left" ], function( i, prop ) {
10864	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
10865		function( elem, computed ) {
10866			if ( computed ) {
10867				computed = curCSS( elem, prop );
10868
10869				// if curCSS returns percentage, fallback to offset
10870				return rnumnonpx.test( computed ) ?
10871					jQuery( elem ).position()[ prop ] + "px" :
10872					computed;
10873			}
10874		}
10875	);
10876} );
10877
10878
10879// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
10880jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
10881	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
10882	function( defaultExtra, funcName ) {
10883
10884		// margin is only for outerHeight, outerWidth
10885		jQuery.fn[ funcName ] = function( margin, value ) {
10886			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
10887				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
10888
10889			return access( this, function( elem, type, value ) {
10890				var doc;
10891
10892				if ( jQuery.isWindow( elem ) ) {
10893
10894					// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
10895					// isn't a whole lot we can do. See pull request at this URL for discussion:
10896					// https://github.com/jquery/jquery/pull/764
10897					return elem.document.documentElement[ "client" + name ];
10898				}
10899
10900				// Get document width or height
10901				if ( elem.nodeType === 9 ) {
10902					doc = elem.documentElement;
10903
10904					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
10905					// whichever is greatest
10906					// unfortunately, this causes bug #3838 in IE6/8 only,
10907					// but there is currently no good, small way to fix it.
10908					return Math.max(
10909						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
10910						elem.body[ "offset" + name ], doc[ "offset" + name ],
10911						doc[ "client" + name ]
10912					);
10913				}
10914
10915				return value === undefined ?
10916
10917					// Get width or height on the element, requesting but not forcing parseFloat
10918					jQuery.css( elem, type, extra ) :
10919
10920					// Set width or height on the element
10921					jQuery.style( elem, type, value, extra );
10922			}, type, chainable ? margin : undefined, chainable, null );
10923		};
10924	} );
10925} );
10926
10927
10928jQuery.fn.extend( {
10929
10930	bind: function( types, data, fn ) {
10931		return this.on( types, null, data, fn );
10932	},
10933	unbind: function( types, fn ) {
10934		return this.off( types, null, fn );
10935	},
10936
10937	delegate: function( selector, types, data, fn ) {
10938		return this.on( types, selector, data, fn );
10939	},
10940	undelegate: function( selector, types, fn ) {
10941
10942		// ( namespace ) or ( selector, types [, fn] )
10943		return arguments.length === 1 ?
10944			this.off( selector, "**" ) :
10945			this.off( types, selector || "**", fn );
10946	}
10947} );
10948
10949// The number of elements contained in the matched element set
10950jQuery.fn.size = function() {
10951	return this.length;
10952};
10953
10954jQuery.fn.andSelf = jQuery.fn.addBack;
10955
10956
10957
10958
10959// Register as a named AMD module, since jQuery can be concatenated with other
10960// files that may use define, but not via a proper concatenation script that
10961// understands anonymous AMD modules. A named AMD is safest and most robust
10962// way to register. Lowercase jquery is used because AMD module names are
10963// derived from file names, and jQuery is normally delivered in a lowercase
10964// file name. Do this after creating the global so that if an AMD module wants
10965// to call noConflict to hide this version of jQuery, it will work.
10966
10967// Note that for maximum portability, libraries that are not jQuery should
10968// declare themselves as anonymous modules, and avoid setting a global if an
10969// AMD loader is present. jQuery is a special case. For more information, see
10970// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
10971
10972if ( typeof define === "function" && define.amd ) {
10973	define( "jquery", [], function() {
10974		return jQuery;
10975	} );
10976}
10977
10978
10979
10980var
10981
10982	// Map over jQuery in case of overwrite
10983	_jQuery = window.jQuery,
10984
10985	// Map over the $ in case of overwrite
10986	_$ = window.$;
10987
10988jQuery.noConflict = function( deep ) {
10989	if ( window.$ === jQuery ) {
10990		window.$ = _$;
10991	}
10992
10993	if ( deep && window.jQuery === jQuery ) {
10994		window.jQuery = _jQuery;
10995	}
10996
10997	return jQuery;
10998};
10999
11000// Expose jQuery and $ identifiers, even in
11001// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
11002// and CommonJS for browser emulators (#13566)
11003if ( !noGlobal ) {
11004	window.jQuery = window.$ = jQuery;
11005}
11006
11007return jQuery;
11008}));
11009
11010/**
11011 * Cookie plugin
11012 *
11013 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
11014 * Dual licensed under the MIT and GPL licenses:
11015 * http://www.opensource.org/licenses/mit-license.php
11016 * http://www.gnu.org/licenses/gpl.html
11017 *
11018 */
11019
11020/**
11021 * Create a cookie with the given name and value and other optional parameters.
11022 *
11023 * @example $.cookie('the_cookie', 'the_value');
11024 * @desc Set the value of a cookie.
11025 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
11026 * @desc Create a cookie with all available options.
11027 * @example $.cookie('the_cookie', 'the_value');
11028 * @desc Create a session cookie.
11029 * @example $.cookie('the_cookie', null);
11030 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
11031 *       used when the cookie was set.
11032 *
11033 * @param String name The name of the cookie.
11034 * @param String value The value of the cookie.
11035 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
11036 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
11037 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
11038 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
11039 *                             when the the browser exits.
11040 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
11041 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
11042 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
11043 *                        require a secure protocol (like HTTPS).
11044 * @type undefined
11045 *
11046 * @name $.cookie
11047 * @cat Plugins/Cookie
11048 * @author Klaus Hartl/[email protected]
11049 */
11050
11051/**
11052 * Get the value of a cookie with the given name.
11053 *
11054 * @example $.cookie('the_cookie');
11055 * @desc Get the value of a cookie.
11056 *
11057 * @param String name The name of the cookie.
11058 * @return The value of the cookie.
11059 * @type String
11060 *
11061 * @name $.cookie
11062 * @cat Plugins/Cookie
11063 * @author Klaus Hartl/[email protected]
11064 */
11065jQuery.cookie = function(name, value, options) {
11066    if (typeof value != 'undefined') { // name and value given, set cookie
11067        options = options || {};
11068        if (value === null) {
11069            value = '';
11070            options.expires = -1;
11071        }
11072        var expires = '';
11073        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
11074            var date;
11075            if (typeof options.expires == 'number') {
11076                date = new Date();
11077                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
11078            } else {
11079                date = options.expires;
11080            }
11081            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
11082        }
11083        // CAUTION: Needed to parenthesize options.path and options.domain
11084        // in the following expressions, otherwise they evaluate to undefined
11085        // in the packed version for some reason...
11086        var path = options.path ? '; path=' + (options.path) : '';
11087        var domain = options.domain ? '; domain=' + (options.domain) : '';
11088        var secure = options.secure ? '; secure' : '';
11089        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
11090    } else { // only name given, get cookie
11091        var cookieValue = null;
11092        if (document.cookie && document.cookie != '') {
11093            var cookies = document.cookie.split(';');
11094            for (var i = 0; i < cookies.length; i++) {
11095                var cookie = jQuery.trim(cookies[i]);
11096                // Does this cookie string begin with the name we want?
11097                if (cookie.substring(0, name.length + 1) == (name + '=')) {
11098                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
11099                    break;
11100                }
11101            }
11102        }
11103        return cookieValue;
11104    }
11105};
11106/**
11107* jquery-match-height master by @liabru
11108* http://brm.io/jquery-match-height/
11109* License: MIT
11110*/
11111
11112;(function(factory) { // eslint-disable-line no-extra-semi
11113    'use strict';
11114    if (typeof define === 'function' && define.amd) {
11115        // AMD
11116        define(['jquery'], factory);
11117    } else if (typeof module !== 'undefined' && module.exports) {
11118        // CommonJS
11119        module.exports = factory(require('jquery'));
11120    } else {
11121        // Global
11122        factory(jQuery);
11123    }
11124})(function($) {
11125    /*
11126    *  internal
11127    */
11128
11129    var _previousResizeWidth = -1,
11130        _updateTimeout = -1;
11131
11132    /*
11133    *  _parse
11134    *  value parse utility function
11135    */
11136
11137    var _parse = function(value) {
11138        // parse value and convert NaN to 0
11139        return parseFloat(value) || 0;
11140    };
11141
11142    /*
11143    *  _rows
11144    *  utility function returns array of jQuery selections representing each row
11145    *  (as displayed after float wrapping applied by browser)
11146    */
11147
11148    var _rows = function(elements) {
11149        var tolerance = 1,
11150            $elements = $(elements),
11151            lastTop = null,
11152            rows = [];
11153
11154        // group elements by their top position
11155        $elements.each(function(){
11156            var $that = $(this),
11157                top = $that.offset().top - _parse($that.css('margin-top')),
11158                lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
11159
11160            if (lastRow === null) {
11161                // first item on the row, so just push it
11162                rows.push($that);
11163            } else {
11164                // if the row top is the same, add to the row group
11165                if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
11166                    rows[rows.length - 1] = lastRow.add($that);
11167                } else {
11168                    // otherwise start a new row group
11169                    rows.push($that);
11170                }
11171            }
11172
11173            // keep track of the last row top
11174            lastTop = top;
11175        });
11176
11177        return rows;
11178    };
11179
11180    /*
11181    *  _parseOptions
11182    *  handle plugin options
11183    */
11184
11185    var _parseOptions = function(options) {
11186        var opts = {
11187            byRow: true,
11188            property: 'height',
11189            target: null,
11190            remove: false
11191        };
11192
11193        if (typeof options === 'object') {
11194            return $.extend(opts, options);
11195        }
11196
11197        if (typeof options === 'boolean') {
11198            opts.byRow = options;
11199        } else if (options === 'remove') {
11200            opts.remove = true;
11201        }
11202
11203        return opts;
11204    };
11205
11206    /*
11207    *  matchHeight
11208    *  plugin definition
11209    */
11210
11211    var matchHeight = $.fn.matchHeight = function(options) {
11212        var opts = _parseOptions(options);
11213
11214        // handle remove
11215        if (opts.remove) {
11216            var that = this;
11217
11218            // remove fixed height from all selected elements
11219            this.css(opts.property, '');
11220
11221            // remove selected elements from all groups
11222            $.each(matchHeight._groups, function(key, group) {
11223                group.elements = group.elements.not(that);
11224            });
11225
11226            // TODO: cleanup empty groups
11227
11228            return this;
11229        }
11230
11231        if (this.length <= 1 && !opts.target) {
11232            return this;
11233        }
11234
11235        // keep track of this group so we can re-apply later on load and resize events
11236        matchHeight._groups.push({
11237            elements: this,
11238            options: opts
11239        });
11240
11241        // match each element's height to the tallest element in the selection
11242        matchHeight._apply(this, opts);
11243
11244        return this;
11245    };
11246
11247    /*
11248    *  plugin global options
11249    */
11250
11251    matchHeight.version = 'master';
11252    matchHeight._groups = [];
11253    matchHeight._throttle = 80;
11254    matchHeight._maintainScroll = false;
vendor: 7,934 bytes, lines 11255-11490
11255    matchHeight._beforeUpdate = null;
11256    matchHeight._afterUpdate = null;
11257    matchHeight._rows = _rows;
11258    matchHeight._parse = _parse;
11259    matchHeight._parseOptions = _parseOptions;
11260
11261    /*
11262    *  matchHeight._apply
11263    *  apply matchHeight to given elements
11264    */
11265
11266    matchHeight._apply = function(elements, options) {
11267        var opts = _parseOptions(options),
11268            $elements = $(elements),
11269            rows = [$elements];
11270
11271        // take note of scroll position
11272        var scrollTop = $(window).scrollTop(),
11273            htmlHeight = $('html').outerHeight(true);
11274
11275        // get hidden parents
11276        var $hiddenParents = $elements.parents().filter(':hidden');
11277
11278        // cache the original inline style
11279        $hiddenParents.each(function() {
11280            var $that = $(this);
11281            $that.data('style-cache', $that.attr('style'));
11282        });
11283
11284        // temporarily must force hidden parents visible
11285        $hiddenParents.css('display', 'block');
11286
11287        // get rows if using byRow, otherwise assume one row
11288        if (opts.byRow && !opts.target) {
11289
11290            // must first force an arbitrary equal height so floating elements break evenly
11291            $elements.each(function() {
11292                var $that = $(this),
11293                    display = $that.css('display');
11294
11295                // temporarily force a usable display value
11296                if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
11297                    display = 'block';
11298                }
11299
11300                // cache the original inline style
11301                $that.data('style-cache', $that.attr('style'));
11302
11303                $that.css({
11304                    'display': display,
11305                    'padding-top': '0',
11306                    'padding-bottom': '0',
11307                    'margin-top': '0',
11308                    'margin-bottom': '0',
11309                    'border-top-width': '0',
11310                    'border-bottom-width': '0',
11311                    'height': '100px',
11312                    'overflow': 'hidden'
11313                });
11314            });
11315
11316            // get the array of rows (based on element top position)
11317            rows = _rows($elements);
11318
11319            // revert original inline styles
11320            $elements.each(function() {
11321                var $that = $(this);
11322                $that.attr('style', $that.data('style-cache') || '');
11323            });
11324        }
11325
11326        $.each(rows, function(key, row) {
11327            var $row = $(row),
11328                targetHeight = 0;
11329
11330            if (!opts.target) {
11331                // skip apply to rows with only one item
11332                if (opts.byRow && $row.length <= 1) {
11333                    $row.css(opts.property, '');
11334                    return;
11335                }
11336
11337                // iterate the row and find the max height
11338                $row.each(function(){
11339                    var $that = $(this),
11340                        style = $that.attr('style'),
11341                        display = $that.css('display');
11342
11343                    // temporarily force a usable display value
11344                    if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
11345                        display = 'block';
11346                    }
11347
11348                    // ensure we get the correct actual height (and not a previously set height value)
11349                    var css = { 'display': display };
11350                    css[opts.property] = '';
11351                    $that.css(css);
11352
11353                    // find the max height (including padding, but not margin)
11354                    if ($that.outerHeight(false) > targetHeight) {
11355                        targetHeight = $that.outerHeight(false);
11356                    }
11357
11358                    // revert styles
11359                    if (style) {
11360                        $that.attr('style', style);
11361                    } else {
11362                        $that.css('display', '');
11363                    }
11364                });
11365            } else {
11366                // if target set, use the height of the target element
11367                targetHeight = opts.target.outerHeight(false);
11368            }
11369
11370            // iterate the row and apply the height to all elements
11371            $row.each(function(){
11372                var $that = $(this),
11373                    verticalPadding = 0;
11374
11375                // don't apply to a target
11376                if (opts.target && $that.is(opts.target)) {
11377                    return;
11378                }
11379
11380                // handle padding and border correctly (required when not using border-box)
11381                if ($that.css('box-sizing') !== 'border-box') {
11382                    verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
11383                    verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
11384                }
11385
11386                // set the height (accounting for padding and border)
11387                $that.css(opts.property, (targetHeight - verticalPadding) + 'px');
11388            });
11389        });
11390
11391        // revert hidden parents
11392        $hiddenParents.each(function() {
11393            var $that = $(this);
11394            $that.attr('style', $that.data('style-cache') || null);
11395        });
11396
11397        // restore scroll position if enabled
11398        if (matchHeight._maintainScroll) {
11399            $(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
11400        }
11401
11402        return this;
11403    };
11404
11405    /*
11406    *  matchHeight._applyDataApi
11407    *  applies matchHeight to all elements with a data-match-height attribute
11408    */
11409
11410    matchHeight._applyDataApi = function() {
11411        var groups = {};
11412
11413        // generate groups by their groupId set by elements using data-match-height
11414        $('[data-match-height], [data-mh]').each(function() {
11415            var $this = $(this),
11416                groupId = $this.attr('data-mh') || $this.attr('data-match-height');
11417
11418            if (groupId in groups) {
11419                groups[groupId] = groups[groupId].add($this);
11420            } else {
11421                groups[groupId] = $this;
11422            }
11423        });
11424
11425        // apply matchHeight to each group
11426        $.each(groups, function() {
11427            this.matchHeight(true);
11428        });
11429    };
11430
11431    /*
11432    *  matchHeight._update
11433    *  updates matchHeight on all current groups with their correct options
11434    */
11435
11436    var _update = function(event) {
11437        if (matchHeight._beforeUpdate) {
11438            matchHeight._beforeUpdate(event, matchHeight._groups);
11439        }
11440
11441        $.each(matchHeight._groups, function() {
11442            matchHeight._apply(this.elements, this.options);
11443        });
11444
11445        if (matchHeight._afterUpdate) {
11446            matchHeight._afterUpdate(event, matchHeight._groups);
11447        }
11448    };
11449
11450    matchHeight._update = function(throttle, event) {
11451        // prevent update if fired from a resize event
11452        // where the viewport width hasn't actually changed
11453        // fixes an event looping bug in IE8
11454        if (event && event.type === 'resize') {
11455            var windowWidth = $(window).width();
11456            if (windowWidth === _previousResizeWidth) {
11457                return;
11458            }
11459            _previousResizeWidth = windowWidth;
11460        }
11461
11462        // throttle updates
11463        if (!throttle) {
11464            _update(event);
11465        } else if (_updateTimeout === -1) {
11466            _updateTimeout = setTimeout(function() {
11467                _update(event);
11468                _updateTimeout = -1;
11469            }, matchHeight._throttle);
11470        }
11471    };
11472
11473    /*
11474    *  bind events
11475    */
11476
11477    // apply on DOM ready event
11478    $(matchHeight._applyDataApi);
11479
11480    // update heights on load and resize events
11481    $(window).bind('load', function(event) {
11482        matchHeight._update(false, event);
11483    });
11484
11485    // throttled update heights on resize events
11486    $(window).bind('resize orientationchange', function(event) {
11487        matchHeight._update(true, event);
11488    });
11489
11490});
vendor: 23,216 bytes, lines 11491-12437
11491/**
11492 * Owl Carousel v2.3.4
11493 * Copyright 2013-2018 David Deutsch
11494 * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
11495 */
11496/**
11497 * Owl carousel
11498 * @version 2.3.4
11499 * @author Bartosz Wojciechowski
11500 * @author David Deutsch
11501 * @license The MIT License (MIT)
11502 * @todo Lazy Load Icon
11503 * @todo prevent animationend bubling
11504 * @todo itemsScaleUp
11505 * @todo Test Zepto
11506 * @todo stagePadding calculate wrong active classes
11507 */
11508;(function($, window, document, undefined) {
11509
11510	/**
11511	 * Creates a carousel.
11512	 * @class The Owl Carousel.
11513	 * @public
11514	 * @param {HTMLElement|jQuery} element - The element to create the carousel for.
11515	 * @param {Object} [options] - The options
11516	 */
11517	function Owl(element, options) {
11518
11519		/**
11520		 * Current settings for the carousel.
11521		 * @public
11522		 */
11523		this.settings = null;
11524
11525		/**
11526		 * Current options set by the caller including defaults.
11527		 * @public
11528		 */
11529		this.options = $.extend({}, Owl.Defaults, options);
11530
11531		/**
11532		 * Plugin element.
11533		 * @public
11534		 */
11535		this.$element = $(element);
11536
11537		/**
11538		 * Proxied event handlers.
11539		 * @protected
11540		 */
11541		this._handlers = {};
11542
11543		/**
11544		 * References to the running plugins of this carousel.
11545		 * @protected
11546		 */
11547		this._plugins = {};
11548
11549		/**
11550		 * Currently suppressed events to prevent them from being retriggered.
11551		 * @protected
11552		 */
11553		this._supress = {};
11554
11555		/**
11556		 * Absolute current position.
11557		 * @protected
11558		 */
11559		this._current = null;
11560
11561		/**
11562		 * Animation speed in milliseconds.
11563		 * @protected
11564		 */
11565		this._speed = null;
11566
11567		/**
11568		 * Coordinates of all items in pixel.
11569		 * @todo The name of this member is missleading.
11570		 * @protected
11571		 */
11572		this._coordinates = [];
11573
11574		/**
11575		 * Current breakpoint.
11576		 * @todo Real media queries would be nice.
11577		 * @protected
11578		 */
11579		this._breakpoint = null;
11580
11581		/**
11582		 * Current width of the plugin element.
11583		 */
11584		this._width = null;
11585
11586		/**
11587		 * All real items.
11588		 * @protected
11589		 */
11590		this._items = [];
11591
11592		/**
11593		 * All cloned items.
11594		 * @protected
11595		 */
11596		this._clones = [];
11597
11598		/**
11599		 * Merge values of all items.
11600		 * @todo Maybe this could be part of a plugin.
11601		 * @protected
11602		 */
11603		this._mergers = [];
11604
11605		/**
11606		 * Widths of all items.
11607		 */
11608		this._widths = [];
11609
11610		/**
11611		 * Invalidated parts within the update process.
11612		 * @protected
11613		 */
11614		this._invalidated = {};
11615
11616		/**
11617		 * Ordered list of workers for the update process.
11618		 * @protected
11619		 */
11620		this._pipe = [];
11621
11622		/**
11623		 * Current state information for the drag operation.
11624		 * @todo #261
11625		 * @protected
11626		 */
11627		this._drag = {
11628			time: null,
11629			target: null,
11630			pointer: null,
11631			stage: {
11632				start: null,
11633				current: null
11634			},
11635			direction: null
11636		};
11637
11638		/**
11639		 * Current state information and their tags.
11640		 * @type {Object}
11641		 * @protected
11642		 */
11643		this._states = {
11644			current: {},
11645			tags: {
11646				'initializing': [ 'busy' ],
11647				'animating': [ 'busy' ],
11648				'dragging': [ 'interacting' ]
11649			}
11650		};
11651
11652		$.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) {
11653			this._handlers[handler] = $.proxy(this[handler], this);
11654		}, this));
11655
11656		$.each(Owl.Plugins, $.proxy(function(key, plugin) {
11657			this._plugins[key.charAt(0).toLowerCase() + key.slice(1)]
11658				= new plugin(this);
11659		}, this));
11660
11661		$.each(Owl.Workers, $.proxy(function(priority, worker) {
11662			this._pipe.push({
11663				'filter': worker.filter,
11664				'run': $.proxy(worker.run, this)
11665			});
11666		}, this));
11667
11668		this.setup();
11669		this.initialize();
11670	}
11671
11672	/**
11673	 * Default options for the carousel.
11674	 * @public
11675	 */
11676	Owl.Defaults = {
11677		items: 3,
11678		loop: false,
11679		center: false,
11680		rewind: false,
11681		checkVisibility: true,
11682
11683		mouseDrag: true,
11684		touchDrag: true,
11685		pullDrag: true,
11686		freeDrag: false,
11687
11688		margin: 0,
11689		stagePadding: 0,
11690
11691		merge: false,
11692		mergeFit: true,
11693		autoWidth: false,
11694
11695		startPosition: 0,
11696		rtl: false,
11697
11698		smartSpeed: 250,
11699		fluidSpeed: false,
11700		dragEndSpeed: false,
11701
11702		responsive: {},
11703		responsiveRefreshRate: 200,
11704		responsiveBaseElement: window,
11705
11706		fallbackEasing: 'swing',
11707		slideTransition: '',
11708
11709		info: false,
11710
11711		nestedItemSelector: false,
11712		itemElement: 'div',
11713		stageElement: 'div',
11714
11715		refreshClass: 'owl-refresh',
11716		loadedClass: 'owl-loaded',
11717		loadingClass: 'owl-loading',
11718		rtlClass: 'owl-rtl',
11719		responsiveClass: 'owl-responsive',
11720		dragClass: 'owl-drag',
11721		itemClass: 'owl-item',
11722		stageClass: 'owl-stage',
11723		stageOuterClass: 'owl-stage-outer',
11724		grabClass: 'owl-grab'
11725	};
11726
11727	/**
11728	 * Enumeration for width.
11729	 * @public
11730	 * @readonly
11731	 * @enum {String}
11732	 */
11733	Owl.Width = {
11734		Default: 'default',
11735		Inner: 'inner',
11736		Outer: 'outer'
11737	};
11738
11739	/**
11740	 * Enumeration for types.
11741	 * @public
11742	 * @readonly
11743	 * @enum {String}
11744	 */
11745	Owl.Type = {
11746		Event: 'event',
11747		State: 'state'
11748	};
11749
11750	/**
11751	 * Contains all registered plugins.
11752	 * @public
11753	 */
11754	Owl.Plugins = {};
11755
11756	/**
11757	 * List of workers involved in the update process.
11758	 */
11759	Owl.Workers = [ {
11760		filter: [ 'width', 'settings' ],
11761		run: function() {
11762			this._width = this.$element.width();
11763		}
11764	}, {
11765		filter: [ 'width', 'items', 'settings' ],
11766		run: function(cache) {
11767			cache.current = this._items && this._items[this.relative(this._current)];
11768		}
11769	}, {
11770		filter: [ 'items', 'settings' ],
11771		run: function() {
11772			this.$stage.children('.cloned').remove();
11773		}
11774	}, {
11775		filter: [ 'width', 'items', 'settings' ],
11776		run: function(cache) {
11777			var margin = this.settings.margin || '',
11778				grid = !this.settings.autoWidth,
11779				rtl = this.settings.rtl,
11780				css = {
11781					'width': 'auto',
11782					'margin-left': rtl ? margin : '',
11783					'margin-right': rtl ? '' : margin
11784				};
11785
11786			!grid && this.$stage.children().css(css);
11787
11788			cache.css = css;
11789		}
11790	}, {
11791		filter: [ 'width', 'items', 'settings' ],
11792		run: function(cache) {
11793			var width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin,
11794				merge = null,
11795				iterator = this._items.length,
11796				grid = !this.settings.autoWidth,
11797				widths = [];
11798
11799			cache.items = {
11800				merge: false,
11801				width: width
11802			};
11803
11804			while (iterator--) {
11805				merge = this._mergers[iterator];
11806				merge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge;
11807
11808				cache.items.merge = merge > 1 || cache.items.merge;
11809
11810				widths[iterator] = !grid ? this._items[iterator].width() : width * merge;
11811			}
11812
11813			this._widths = widths;
11814		}
11815	}, {
11816		filter: [ 'items', 'settings' ],
11817		run: function() {
11818			var clones = [],
11819				items = this._items,
11820				settings = this.settings,
11821				// TODO: Should be computed from number of min width items in stage
11822				view = Math.max(settings.items * 2, 4),
11823				size = Math.ceil(items.length / 2) * 2,
11824				repeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0,
11825				append = '',
11826				prepend = '';
11827
11828			repeat /= 2;
11829
11830			while (repeat > 0) {
11831				// Switch to only using appended clones
11832				clones.push(this.normalize(clones.length / 2, true));
11833				append = append + items[clones[clones.length - 1]][0].outerHTML;
11834				clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));
11835				prepend = items[clones[clones.length - 1]][0].outerHTML + prepend;
11836				repeat -= 1;
11837			}
11838
11839			this._clones = clones;
11840
11841			$(append).addClass('cloned').appendTo(this.$stage);
11842			$(prepend).addClass('cloned').prependTo(this.$stage);
11843		}
11844	}, {
11845		filter: [ 'width', 'items', 'settings' ],
11846		run: function() {
11847			var rtl = this.settings.rtl ? 1 : -1,
11848				size = this._clones.length + this._items.length,
11849				iterator = -1,
11850				previous = 0,
11851				current = 0,
11852				coordinates = [];
11853
11854			while (++iterator < size) {
11855				previous = coordinates[iterator - 1] || 0;
11856				current = this._widths[this.relative(iterator)] + this.settings.margin;
11857				coordinates.push(previous + current * rtl);
11858			}
11859
11860			this._coordinates = coordinates;
11861		}
11862	}, {
11863		filter: [ 'width', 'items', 'settings' ],
11864		run: function() {
11865			var padding = this.settings.stagePadding,
11866				coordinates = this._coordinates,
11867				css = {
11868					'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,
11869					'padding-left': padding || '',
11870					'padding-right': padding || ''
11871				};
11872
11873			this.$stage.css(css);
11874		}
11875	}, {
11876		filter: [ 'width', 'items', 'settings' ],
11877		run: function(cache) {
11878			var iterator = this._coordinates.length,
11879				grid = !this.settings.autoWidth,
11880				items = this.$stage.children();
11881
11882			if (grid && cache.items.merge) {
11883				while (iterator--) {
11884					cache.css.width = this._widths[this.relative(iterator)];
11885					items.eq(iterator).css(cache.css);
11886				}
11887			} else if (grid) {
11888				cache.css.width = cache.items.width;
11889				items.css(cache.css);
11890			}
11891		}
11892	}, {
11893		filter: [ 'items' ],
11894		run: function() {
11895			this._coordinates.length < 1 && this.$stage.removeAttr('style');
11896		}
11897	}, {
11898		filter: [ 'width', 'items', 'settings' ],
11899		run: function(cache) {
11900			cache.current = cache.current ? this.$stage.children().index(cache.current) : 0;
11901			cache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current));
11902			this.reset(cache.current);
11903		}
11904	}, {
11905		filter: [ 'position' ],
11906		run: function() {
11907			this.animate(this.coordinates(this._current));
11908		}
11909	}, {
11910		filter: [ 'width', 'position', 'items', 'settings' ],
11911		run: function() {
11912			var rtl = this.settings.rtl ? 1 : -1,
11913				padding = this.settings.stagePadding * 2,
11914				begin = this.coordinates(this.current()) + padding,
11915				end = begin + this.width() * rtl,
11916				inner, outer, matches = [], i, n;
11917
11918			for (i = 0, n = this._coordinates.length; i < n; i++) {
11919				inner = this._coordinates[i - 1] || 0;
11920				outer = Math.abs(this._coordinates[i]) + padding * rtl;
11921
11922				if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end)))
11923					|| (this.op(outer, '<', begin) && this.op(outer, '>', end))) {
11924					matches.push(i);
11925				}
11926			}
11927
11928			this.$stage.children('.active').removeClass('active');
11929			this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active');
11930
11931			this.$stage.children('.center').removeClass('center');
11932			if (this.settings.center) {
11933				this.$stage.children().eq(this.current()).addClass('center');
11934			}
11935		}
11936	} ];
11937
11938	/**
11939	 * Create the stage DOM element
11940	 */
11941	Owl.prototype.initializeStage = function() {
11942		this.$stage = this.$element.find('.' + this.settings.stageClass);
11943
11944		// if the stage is already in the DOM, grab it and skip stage initialization
11945		if (this.$stage.length) {
11946			return;
11947		}
11948
11949		this.$element.addClass(this.options.loadingClass);
11950
11951		// create stage
11952		this.$stage = $('<' + this.settings.stageElement + '>', {
11953			"class": this.settings.stageClass
11954		}).wrap( $( '<div/>', {
11955			"class": this.settings.stageOuterClass
11956		}));
11957
11958		// append stage
11959		this.$element.append(this.$stage.parent());
11960	};
11961
11962	/**
11963	 * Create item DOM elements
11964	 */
11965	Owl.prototype.initializeItems = function() {
11966		var $items = this.$element.find('.owl-item');
11967
11968		// if the items are already in the DOM, grab them and skip item initialization
11969		if ($items.length) {
11970			this._items = $items.get().map(function(item) {
11971				return $(item);
11972			});
11973
11974			this._mergers = this._items.map(function() {
11975				return 1;
11976			});
11977
11978			this.refresh();
11979
11980			return;
11981		}
11982
11983		// append content
11984		this.replace(this.$element.children().not(this.$stage.parent()));
11985
11986		// check visibility
11987		if (this.isVisible()) {
11988			// update view
11989			this.refresh();
11990		} else {
11991			// invalidate width
11992			this.invalidate('width');
11993		}
11994
11995		this.$element
11996			.removeClass(this.options.loadingClass)
11997			.addClass(this.options.loadedClass);
11998	};
11999
12000	/**
12001	 * Initializes the carousel.
12002	 * @protected
12003	 */
12004	Owl.prototype.initialize = function() {
12005		this.enter('initializing');
12006		this.trigger('initialize');
12007
12008		this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl);
12009
12010		if (this.settings.autoWidth && !this.is('pre-loading')) {
12011			var imgs, nestedSelector, width;
12012			imgs = this.$element.find('img');
12013			nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;
12014			width = this.$element.children(nestedSelector).width();
12015
12016			if (imgs.length && width <= 0) {
12017				this.preloadAutoWidthImages(imgs);
12018			}
12019		}
12020
12021		this.initializeStage();
12022		this.initializeItems();
12023
12024		// register event handlers
12025		this.registerEventHandlers();
12026
12027		this.leave('initializing');
12028		this.trigger('initialized');
12029	};
12030
12031	/**
12032	 * @returns {Boolean} visibility of $element
12033	 *                    if you know the carousel will always be visible you can set `checkVisibility` to `false` to
12034	 *                    prevent the expensive browser layout forced reflow the $element.is(':visible') does
12035	 */
12036	Owl.prototype.isVisible = function() {
12037		return this.settings.checkVisibility
12038			? this.$element.is(':visible')
12039			: true;
12040	};
12041
12042	/**
12043	 * Setups the current settings.
12044	 * @todo Remove responsive classes. Why should adaptive designs be brought into IE8?
12045	 * @todo Support for media queries by using `matchMedia` would be nice.
12046	 * @public
12047	 */
12048	Owl.prototype.setup = function() {
12049		var viewport = this.viewport(),
12050			overwrites = this.options.responsive,
12051			match = -1,
12052			settings = null;
12053
12054		if (!overwrites) {
12055			settings = $.extend({}, this.options);
12056		} else {
12057			$.each(overwrites, function(breakpoint) {
12058				if (breakpoint <= viewport && breakpoint > match) {
12059					match = Number(breakpoint);
12060				}
12061			});
12062
12063			settings = $.extend({}, this.options, overwrites[match]);
12064			if (typeof settings.stagePadding === 'function') {
12065				settings.stagePadding = settings.stagePadding();
12066			}
12067			delete settings.responsive;
12068
12069			// responsive class
12070			if (settings.responsiveClass) {
12071				this.$element.attr('class',
12072					this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match)
12073				);
12074			}
12075		}
12076
12077		this.trigger('change', { property: { name: 'settings', value: settings } });
12078		this._breakpoint = match;
12079		this.settings = settings;
12080		this.invalidate('settings');
12081		this.trigger('changed', { property: { name: 'settings', value: this.settings } });
12082	};
12083
12084	/**
12085	 * Updates option logic if necessery.
12086	 * @protected
12087	 */
12088	Owl.prototype.optionsLogic = function() {
12089		if (this.settings.autoWidth) {
12090			this.settings.stagePadding = false;
12091			this.settings.merge = false;
12092		}
12093	};
12094
12095	/**
12096	 * Prepares an item before add.
12097	 * @todo Rename event parameter `content` to `item`.
12098	 * @protected
12099	 * @returns {jQuery|HTMLElement} - The item container.
12100	 */
12101	Owl.prototype.prepare = function(item) {
12102		var event = this.trigger('prepare', { content: item });
12103
12104		if (!event.data) {
12105			event.data = $('<' + this.settings.itemElement + '/>')
12106				.addClass(this.options.itemClass).append(item)
12107		}
12108
12109		this.trigger('prepared', { content: event.data });
12110
12111		return event.data;
12112	};
12113
12114	/**
12115	 * Updates the view.
12116	 * @public
12117	 */
12118	Owl.prototype.update = function() {
12119		var i = 0,
12120			n = this._pipe.length,
12121			filter = $.proxy(function(p) { return this[p] }, this._invalidated),
12122			cache = {};
12123
12124		while (i < n) {
12125			if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) {
12126				this._pipe[i].run(cache);
12127			}
12128			i++;
12129		}
12130
12131		this._invalidated = {};
12132
12133		!this.is('valid') && this.enter('valid');
12134	};
12135
12136	/**
12137	 * Gets the width of the view.
12138	 * @public
12139	 * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return.
12140	 * @returns {Number} - The width of the view in pixel.
12141	 */
12142	Owl.prototype.width = function(dimension) {
12143		dimension = dimension || Owl.Width.Default;
12144		switch (dimension) {
12145			case Owl.Width.Inner:
12146			case Owl.Width.Outer:
12147				return this._width;
12148			default:
12149				return this._width - this.settings.stagePadding * 2 + this.settings.margin;
12150		}
12151	};
12152
12153	/**
12154	 * Refreshes the carousel primarily for adaptive purposes.
12155	 * @public
12156	 */
12157	Owl.prototype.refresh = function() {
12158		this.enter('refreshing');
12159		this.trigger('refresh');
12160
12161		this.setup();
12162
12163		this.optionsLogic();
12164
12165		this.$element.addClass(this.options.refreshClass);
12166
12167		this.update();
12168
12169		this.$element.removeClass(this.options.refreshClass);
12170
12171		this.leave('refreshing');
12172		this.trigger('refreshed');
12173	};
12174
12175	/**
12176	 * Checks window `resize` event.
12177	 * @protected
12178	 */
12179	Owl.prototype.onThrottledResize = function() {
12180		window.clearTimeout(this.resizeTimer);
12181		this.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate);
12182	};
12183
12184	/**
12185	 * Checks window `resize` event.
12186	 * @protected
12187	 */
12188	Owl.prototype.onResize = function() {
12189		if (!this._items.length) {
12190			return false;
12191		}
12192
12193		if (this._width === this.$element.width()) {
12194			return false;
12195		}
12196
12197		if (!this.isVisible()) {
12198			return false;
12199		}
12200
12201		this.enter('resizing');
12202
12203		if (this.trigger('resize').isDefaultPrevented()) {
12204			this.leave('resizing');
12205			return false;
12206		}
12207
12208		this.invalidate('width');
12209
12210		this.refresh();
12211
12212		this.leave('resizing');
12213		this.trigger('resized');
12214	};
12215
12216	/**
12217	 * Registers event handlers.
12218	 * @todo Check `msPointerEnabled`
12219	 * @todo #261
12220	 * @protected
12221	 */
12222	Owl.prototype.registerEventHandlers = function() {
12223		if ($.support.transition) {
12224			this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this));
12225		}
12226
12227		if (this.settings.responsive !== false) {
12228			this.on(window, 'resize', this._handlers.onThrottledResize);
12229		}
12230
12231		if (this.settings.mouseDrag) {
12232			this.$element.addClass(this.options.dragClass);
12233			this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this));
12234			this.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false });
12235		}
12236
12237		if (this.settings.touchDrag){
12238			this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this));
12239			this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this));
12240		}
12241	};
12242
12243	/**
12244	 * Handles `touchstart` and `mousedown` events.
12245	 * @todo Horizontal swipe threshold as option
12246	 * @todo #261
12247	 * @protected
12248	 * @param {Event} event - The event arguments.
12249	 */
12250	Owl.prototype.onDragStart = function(event) {
12251		var stage = null;
12252
12253		if (event.which === 3) {
12254			return;
12255		}
12256
12257		if ($.support.transform) {
12258			stage = this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(',');
12259			stage = {
12260				x: stage[stage.length === 16 ? 12 : 4],
12261				y: stage[stage.length === 16 ? 13 : 5]
12262			};
12263		} else {
12264			stage = this.$stage.position();
12265			stage = {
12266				x: this.settings.rtl ?
12267					stage.left + this.$stage.width() - this.width() + this.settings.margin :
12268					stage.left,
12269				y: stage.top
12270			};
12271		}
12272
12273		if (this.is('animating')) {
12274			$.support.transform ? this.animate(stage.x) : this.$stage.stop()
12275			this.invalidate('position');
12276		}
12277
12278		this.$element.toggleClass(this.options.grabClass, event.type === 'mousedown');
12279
12280		this.speed(0);
12281
12282		this._drag.time = new Date().getTime();
12283		this._drag.target = $(event.target);
12284		this._drag.stage.start = stage;
12285		this._drag.stage.current = stage;
12286		this._drag.pointer = this.pointer(event);
12287
12288		$(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this));
12289
12290		$(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) {
12291			var delta = this.difference(this._drag.pointer, this.pointer(event));
12292
12293			$(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this));
12294
12295			if (Math.abs(delta.x) < Math.abs(delta.y) && this.is('valid')) {
12296				return;
12297			}
12298
12299			event.preventDefault();
12300
12301			this.enter('dragging');
12302			this.trigger('drag');
12303		}, this));
12304	};
12305
12306	/**
12307	 * Handles the `touchmove` and `mousemove` events.
12308	 * @todo #261
12309	 * @protected
12310	 * @param {Event} event - The event arguments.
12311	 */
12312	Owl.prototype.onDragMove = function(event) {
12313		var minimum = null,
12314			maximum = null,
12315			pull = null,
12316			delta = this.difference(this._drag.pointer, this.pointer(event)),
12317			stage = this.difference(this._drag.stage.start, delta);
12318
12319		if (!this.is('dragging')) {
12320			return;
12321		}
12322
12323		event.preventDefault();
12324
12325		if (this.settings.loop) {
12326			minimum = this.coordinates(this.minimum());
12327			maximum = this.coordinates(this.maximum() + 1) - minimum;
12328			stage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum;
12329		} else {
12330			minimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());
12331			maximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());
12332			pull = this.settings.pullDrag ? -1 * delta.x / 5 : 0;
12333			stage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull);
12334		}
12335
12336		this._drag.stage.current = stage;
12337
12338		this.animate(stage.x);
12339	};
12340
12341	/**
12342	 * Handles the `touchend` and `mouseup` events.
12343	 * @todo #261
12344	 * @todo Threshold for click event
12345	 * @protected
12346	 * @param {Event} event - The event arguments.
12347	 */
12348	Owl.prototype.onDragEnd = function(event) {
12349		var delta = this.difference(this._drag.pointer, this.pointer(event)),
12350			stage = this._drag.stage.current,
12351			direction = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right';
12352
12353		$(document).off('.owl.core');
12354
12355		this.$element.removeClass(this.options.grabClass);
12356
12357		if (delta.x !== 0 && this.is('dragging') || !this.is('valid')) {
12358			this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);
12359			this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction));
12360			this.invalidate('position');
12361			this.update();
12362
12363			this._drag.direction = direction;
12364
12365			if (Math.abs(delta.x) > 3 || new Date().getTime() - this._drag.time > 300) {
12366				this._drag.target.one('click.owl.core', function() { return false; });
12367			}
12368		}
12369
12370		if (!this.is('dragging')) {
12371			return;
12372		}
12373
12374		this.leave('dragging');
12375		this.trigger('dragged');
12376	};
12377
12378	/**
12379	 * Gets absolute position of the closest item for a coordinate.
12380	 * @todo Setting `freeDrag` makes `closest` not reusable. See #165.
12381	 * @protected
12382	 * @param {Number} coordinate - The coordinate in pixel.
12383	 * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`.
12384	 * @return {Number} - The absolute position of the closest item.
12385	 */
12386	Owl.prototype.closest = function(coordinate, direction) {
12387		var position = -1,
12388			pull = 30,
12389			width = this.width(),
12390			coordinates = this.coordinates();
12391
12392		if (!this.settings.freeDrag) {
12393			// check closest item
12394			$.each(coordinates, $.proxy(function(index, value) {
12395				// on a left pull, check on current index
12396				if (direction === 'left' && coordinate > value - pull && coordinate < value + pull) {
12397					position = index;
12398				// on a right pull, check on previous index
12399				// to do so, subtract width from value and set position = index + 1
12400				} else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) {
12401					position = index + 1;
12402				} else if (this.op(coordinate, '<', value)
12403					&& this.op(coordinate, '>', coordinates[index + 1] !== undefined ? coordinates[index + 1] : value - width)) {
12404					position = direction === 'left' ? index + 1 : index;
12405				}
12406				return position === -1;
12407			}, this));
12408		}
12409
12410		if (!this.settings.loop) {
12411			// non loop boundries
12412			if (this.op(coordinate, '>', coordinates[this.minimum()])) {
12413				position = coordinate = this.minimum();
12414			} else if (this.op(coordinate, '<', coordinates[this.maximum()])) {
12415				position = coordinate = this.maximum();
12416			}
12417		}
12418
12419		return position;
12420	};
12421
12422	/**
12423	 * Animates the stage.
12424	 * @todo #270
12425	 * @public
12426	 * @param {Number} coordinate - The coordinate in pixels.
12427	 */
12428	Owl.prototype.animate = function(coordinate) {
12429		var animate = this.speed() > 0;
12430
12431		this.is('animating') && this.onTransitionEnd();
12432
12433		if (animate) {
12434			this.enter('animating');
12435			this.trigger('translate');
12436		}
12437
vendor: 10,524 bytes, lines 12438-12805
12438		if ($.support.transform3d && $.support.transition) {
12439			this.$stage.css({
12440				transform: 'translate3d(' + coordinate + 'px,0px,0px)',
12441				transition: (this.speed() / 1000) + 's' + (
12442					this.settings.slideTransition ? ' ' + this.settings.slideTransition : ''
12443				)
12444			});
12445		} else if (animate) {
12446			this.$stage.animate({
12447				left: coordinate + 'px'
12448			}, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this));
12449		} else {
12450			this.$stage.css({
12451				left: coordinate + 'px'
12452			});
12453		}
12454	};
12455
12456	/**
12457	 * Checks whether the carousel is in a specific state or not.
12458	 * @param {String} state - The state to check.
12459	 * @returns {Boolean} - The flag which indicates if the carousel is busy.
12460	 */
12461	Owl.prototype.is = function(state) {
12462		return this._states.current[state] && this._states.current[state] > 0;
12463	};
12464
12465	/**
12466	 * Sets the absolute position of the current item.
12467	 * @public
12468	 * @param {Number} [position] - The new absolute position or nothing to leave it unchanged.
12469	 * @returns {Number} - The absolute position of the current item.
12470	 */
12471	Owl.prototype.current = function(position) {
12472		if (position === undefined) {
12473			return this._current;
12474		}
12475
12476		if (this._items.length === 0) {
12477			return undefined;
12478		}
12479
12480		position = this.normalize(position);
12481
12482		if (this._current !== position) {
12483			var event = this.trigger('change', { property: { name: 'position', value: position } });
12484
12485			if (event.data !== undefined) {
12486				position = this.normalize(event.data);
12487			}
12488
12489			this._current = position;
12490
12491			this.invalidate('position');
12492
12493			this.trigger('changed', { property: { name: 'position', value: this._current } });
12494		}
12495
12496		return this._current;
12497	};
12498
12499	/**
12500	 * Invalidates the given part of the update routine.
12501	 * @param {String} [part] - The part to invalidate.
12502	 * @returns {Array.<String>} - The invalidated parts.
12503	 */
12504	Owl.prototype.invalidate = function(part) {
12505		if ($.type(part) === 'string') {
12506			this._invalidated[part] = true;
12507			this.is('valid') && this.leave('valid');
12508		}
12509		return $.map(this._invalidated, function(v, i) { return i });
12510	};
12511
12512	/**
12513	 * Resets the absolute position of the current item.
12514	 * @public
12515	 * @param {Number} position - The absolute position of the new item.
12516	 */
12517	Owl.prototype.reset = function(position) {
12518		position = this.normalize(position);
12519
12520		if (position === undefined) {
12521			return;
12522		}
12523
12524		this._speed = 0;
12525		this._current = position;
12526
12527		this.suppress([ 'translate', 'translated' ]);
12528
12529		this.animate(this.coordinates(position));
12530
12531		this.release([ 'translate', 'translated' ]);
12532	};
12533
12534	/**
12535	 * Normalizes an absolute or a relative position of an item.
12536	 * @public
12537	 * @param {Number} position - The absolute or relative position to normalize.
12538	 * @param {Boolean} [relative=false] - Whether the given position is relative or not.
12539	 * @returns {Number} - The normalized position.
12540	 */
12541	Owl.prototype.normalize = function(position, relative) {
12542		var n = this._items.length,
12543			m = relative ? 0 : this._clones.length;
12544
12545		if (!this.isNumeric(position) || n < 1) {
12546			position = undefined;
12547		} else if (position < 0 || position >= n + m) {
12548			position = ((position - m / 2) % n + n) % n + m / 2;
12549		}
12550
12551		return position;
12552	};
12553
12554	/**
12555	 * Converts an absolute position of an item into a relative one.
12556	 * @public
12557	 * @param {Number} position - The absolute position to convert.
12558	 * @returns {Number} - The converted position.
12559	 */
12560	Owl.prototype.relative = function(position) {
12561		position -= this._clones.length / 2;
12562		return this.normalize(position, true);
12563	};
12564
12565	/**
12566	 * Gets the maximum position for the current item.
12567	 * @public
12568	 * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
12569	 * @returns {Number}
12570	 */
12571	Owl.prototype.maximum = function(relative) {
12572		var settings = this.settings,
12573			maximum = this._coordinates.length,
12574			iterator,
12575			reciprocalItemsWidth,
12576			elementWidth;
12577
12578		if (settings.loop) {
12579			maximum = this._clones.length / 2 + this._items.length - 1;
12580		} else if (settings.autoWidth || settings.merge) {
12581			iterator = this._items.length;
12582			if (iterator) {
12583				reciprocalItemsWidth = this._items[--iterator].width();
12584				elementWidth = this.$element.width();
12585				while (iterator--) {
12586					reciprocalItemsWidth += this._items[iterator].width() + this.settings.margin;
12587					if (reciprocalItemsWidth > elementWidth) {
12588						break;
12589					}
12590				}
12591			}
12592			maximum = iterator + 1;
12593		} else if (settings.center) {
12594			maximum = this._items.length - 1;
12595		} else {
12596			maximum = this._items.length - settings.items;
12597		}
12598
12599		if (relative) {
12600			maximum -= this._clones.length / 2;
12601		}
12602
12603		return Math.max(maximum, 0);
12604	};
12605
12606	/**
12607	 * Gets the minimum position for the current item.
12608	 * @public
12609	 * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
12610	 * @returns {Number}
12611	 */
12612	Owl.prototype.minimum = function(relative) {
12613		return relative ? 0 : this._clones.length / 2;
12614	};
12615
12616	/**
12617	 * Gets an item at the specified relative position.
12618	 * @public
12619	 * @param {Number} [position] - The relative position of the item.
12620	 * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given.
12621	 */
12622	Owl.prototype.items = function(position) {
12623		if (position === undefined) {
12624			return this._items.slice();
12625		}
12626
12627		position = this.normalize(position, true);
12628		return this._items[position];
12629	};
12630
12631	/**
12632	 * Gets an item at the specified relative position.
12633	 * @public
12634	 * @param {Number} [position] - The relative position of the item.
12635	 * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given.
12636	 */
12637	Owl.prototype.mergers = function(position) {
12638		if (position === undefined) {
12639			return this._mergers.slice();
12640		}
12641
12642		position = this.normalize(position, true);
12643		return this._mergers[position];
12644	};
12645
12646	/**
12647	 * Gets the absolute positions of clones for an item.
12648	 * @public
12649	 * @param {Number} [position] - The relative position of the item.
12650	 * @returns {Array.<Number>} - The absolute positions of clones for the item or all if no position was given.
12651	 */
12652	Owl.prototype.clones = function(position) {
12653		var odd = this._clones.length / 2,
12654			even = odd + this._items.length,
12655			map = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 };
12656
12657		if (position === undefined) {
12658			return $.map(this._clones, function(v, i) { return map(i) });
12659		}
12660
12661		return $.map(this._clones, function(v, i) { return v === position ? map(i) : null });
12662	};
12663
12664	/**
12665	 * Sets the current animation speed.
12666	 * @public
12667	 * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged.
12668	 * @returns {Number} - The current animation speed in milliseconds.
12669	 */
12670	Owl.prototype.speed = function(speed) {
12671		if (speed !== undefined) {
12672			this._speed = speed;
12673		}
12674
12675		return this._speed;
12676	};
12677
12678	/**
12679	 * Gets the coordinate of an item.
12680	 * @todo The name of this method is missleanding.
12681	 * @public
12682	 * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`.
12683	 * @returns {Number|Array.<Number>} - The coordinate of the item in pixel or all coordinates.
12684	 */
12685	Owl.prototype.coordinates = function(position) {
12686		var multiplier = 1,
12687			newPosition = position - 1,
12688			coordinate;
12689
12690		if (position === undefined) {
12691			return $.map(this._coordinates, $.proxy(function(coordinate, index) {
12692				return this.coordinates(index);
12693			}, this));
12694		}
12695
12696		if (this.settings.center) {
12697			if (this.settings.rtl) {
12698				multiplier = -1;
12699				newPosition = position + 1;
12700			}
12701
12702			coordinate = this._coordinates[position];
12703			coordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier;
12704		} else {
12705			coordinate = this._coordinates[newPosition] || 0;
12706		}
12707
12708		coordinate = Math.ceil(coordinate);
12709
12710		return coordinate;
12711	};
12712
12713	/**
12714	 * Calculates the speed for a translation.
12715	 * @protected
12716	 * @param {Number} from - The absolute position of the start item.
12717	 * @param {Number} to - The absolute position of the target item.
12718	 * @param {Number} [factor=undefined] - The time factor in milliseconds.
12719	 * @returns {Number} - The time in milliseconds for the translation.
12720	 */
12721	Owl.prototype.duration = function(from, to, factor) {
12722		if (factor === 0) {
12723			return 0;
12724		}
12725
12726		return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed));
12727	};
12728
12729	/**
12730	 * Slides to the specified item.
12731	 * @public
12732	 * @param {Number} position - The position of the item.
12733	 * @param {Number} [speed] - The time in milliseconds for the transition.
12734	 */
12735	Owl.prototype.to = function(position, speed) {
12736		var current = this.current(),
12737			revert = null,
12738			distance = position - this.relative(current),
12739			direction = (distance > 0) - (distance < 0),
12740			items = this._items.length,
12741			minimum = this.minimum(),
12742			maximum = this.maximum();
12743
12744		if (this.settings.loop) {
12745			if (!this.settings.rewind && Math.abs(distance) > items / 2) {
12746				distance += direction * -1 * items;
12747			}
12748
12749			position = current + distance;
12750			revert = ((position - minimum) % items + items) % items + minimum;
12751
12752			if (revert !== position && revert - distance <= maximum && revert - distance > 0) {
12753				current = revert - distance;
12754				position = revert;
12755				this.reset(current);
12756			}
12757		} else if (this.settings.rewind) {
12758			maximum += 1;
12759			position = (position % maximum + maximum) % maximum;
12760		} else {
12761			position = Math.max(minimum, Math.min(maximum, position));
12762		}
12763
12764		this.speed(this.duration(current, position, speed));
12765		this.current(position);
12766
12767		if (this.isVisible()) {
12768			this.update();
12769		}
12770	};
12771
12772	/**
12773	 * Slides to the next item.
12774	 * @public
12775	 * @param {Number} [speed] - The time in milliseconds for the transition.
12776	 */
12777	Owl.prototype.next = function(speed) {
12778		speed = speed || false;
12779		this.to(this.relative(this.current()) + 1, speed);
12780	};
12781
12782	/**
12783	 * Slides to the previous item.
12784	 * @public
12785	 * @param {Number} [speed] - The time in milliseconds for the transition.
12786	 */
12787	Owl.prototype.prev = function(speed) {
12788		speed = speed || false;
12789		this.to(this.relative(this.current()) - 1, speed);
12790	};
12791
12792	/**
12793	 * Handles the end of an animation.
12794	 * @protected
12795	 * @param {Event} event - The event arguments.
12796	 */
12797	Owl.prototype.onTransitionEnd = function(event) {
12798
12799		// if css2 animation then event object is undefined
12800		if (event !== undefined) {
12801			event.stopPropagation();
12802
12803			// Catch only owl-stage transitionEnd event
12804			if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) {
12805				return false;
vendor: 22,957 bytes, lines 12806-13654
12806			}
12807		}
12808
12809		this.leave('animating');
12810		this.trigger('translated');
12811	};
12812
12813	/**
12814	 * Gets viewport width.
12815	 * @protected
12816	 * @return {Number} - The width in pixel.
12817	 */
12818	Owl.prototype.viewport = function() {
12819		var width;
12820		if (this.options.responsiveBaseElement !== window) {
12821			width = $(this.options.responsiveBaseElement).width();
12822		} else if (window.innerWidth) {
12823			width = window.innerWidth;
12824		} else if (document.documentElement && document.documentElement.clientWidth) {
12825			width = document.documentElement.clientWidth;
12826		} else {
12827			console.warn('Can not detect viewport width.');
12828		}
12829		return width;
12830	};
12831
12832	/**
12833	 * Replaces the current content.
12834	 * @public
12835	 * @param {HTMLElement|jQuery|String} content - The new content.
12836	 */
12837	Owl.prototype.replace = function(content) {
12838		this.$stage.empty();
12839		this._items = [];
12840
12841		if (content) {
12842			content = (content instanceof jQuery) ? content : $(content);
12843		}
12844
12845		if (this.settings.nestedItemSelector) {
12846			content = content.find('.' + this.settings.nestedItemSelector);
12847		}
12848
12849		content.filter(function() {
12850			return this.nodeType === 1;
12851		}).each($.proxy(function(index, item) {
12852			item = this.prepare(item);
12853			this.$stage.append(item);
12854			this._items.push(item);
12855			this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
12856		}, this));
12857
12858		this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);
12859
12860		this.invalidate('items');
12861	};
12862
12863	/**
12864	 * Adds an item.
12865	 * @todo Use `item` instead of `content` for the event arguments.
12866	 * @public
12867	 * @param {HTMLElement|jQuery|String} content - The item content to add.
12868	 * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.
12869	 */
12870	Owl.prototype.add = function(content, position) {
12871		var current = this.relative(this._current);
12872
12873		position = position === undefined ? this._items.length : this.normalize(position, true);
12874		content = content instanceof jQuery ? content : $(content);
12875
12876		this.trigger('add', { content: content, position: position });
12877
12878		content = this.prepare(content);
12879
12880		if (this._items.length === 0 || position === this._items.length) {
12881			this._items.length === 0 && this.$stage.append(content);
12882			this._items.length !== 0 && this._items[position - 1].after(content);
12883			this._items.push(content);
12884			this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
12885		} else {
12886			this._items[position].before(content);
12887			this._items.splice(position, 0, content);
12888			this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
12889		}
12890
12891		this._items[current] && this.reset(this._items[current].index());
12892
12893		this.invalidate('items');
12894
12895		this.trigger('added', { content: content, position: position });
12896	};
12897
12898	/**
12899	 * Removes an item by its position.
12900	 * @todo Use `item` instead of `content` for the event arguments.
12901	 * @public
12902	 * @param {Number} position - The relative position of the item to remove.
12903	 */
12904	Owl.prototype.remove = function(position) {
12905		position = this.normalize(position, true);
12906
12907		if (position === undefined) {
12908			return;
12909		}
12910
12911		this.trigger('remove', { content: this._items[position], position: position });
12912
12913		this._items[position].remove();
12914		this._items.splice(position, 1);
12915		this._mergers.splice(position, 1);
12916
12917		this.invalidate('items');
12918
12919		this.trigger('removed', { content: null, position: position });
12920	};
12921
12922	/**
12923	 * Preloads images with auto width.
12924	 * @todo Replace by a more generic approach
12925	 * @protected
12926	 */
12927	Owl.prototype.preloadAutoWidthImages = function(images) {
12928		images.each($.proxy(function(i, element) {
12929			this.enter('pre-loading');
12930			element = $(element);
12931			$(new Image()).one('load', $.proxy(function(e) {
12932				element.attr('src', e.target.src);
12933				element.css('opacity', 1);
12934				this.leave('pre-loading');
12935				!this.is('pre-loading') && !this.is('initializing') && this.refresh();
12936			}, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina'));
12937		}, this));
12938	};
12939
12940	/**
12941	 * Destroys the carousel.
12942	 * @public
12943	 */
12944	Owl.prototype.destroy = function() {
12945
12946		this.$element.off('.owl.core');
12947		this.$stage.off('.owl.core');
12948		$(document).off('.owl.core');
12949
12950		if (this.settings.responsive !== false) {
12951			window.clearTimeout(this.resizeTimer);
12952			this.off(window, 'resize', this._handlers.onThrottledResize);
12953		}
12954
12955		for (var i in this._plugins) {
12956			this._plugins[i].destroy();
12957		}
12958
12959		this.$stage.children('.cloned').remove();
12960
12961		this.$stage.unwrap();
12962		this.$stage.children().contents().unwrap();
12963		this.$stage.children().unwrap();
12964		this.$stage.remove();
12965		this.$element
12966			.removeClass(this.options.refreshClass)
12967			.removeClass(this.options.loadingClass)
12968			.removeClass(this.options.loadedClass)
12969			.removeClass(this.options.rtlClass)
12970			.removeClass(this.options.dragClass)
12971			.removeClass(this.options.grabClass)
12972			.attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), ''))
12973			.removeData('owl.carousel');
12974	};
12975
12976	/**
12977	 * Operators to calculate right-to-left and left-to-right.
12978	 * @protected
12979	 * @param {Number} [a] - The left side operand.
12980	 * @param {String} [o] - The operator.
12981	 * @param {Number} [b] - The right side operand.
12982	 */
12983	Owl.prototype.op = function(a, o, b) {
12984		var rtl = this.settings.rtl;
12985		switch (o) {
12986			case '<':
12987				return rtl ? a > b : a < b;
12988			case '>':
12989				return rtl ? a < b : a > b;
12990			case '>=':
12991				return rtl ? a <= b : a >= b;
12992			case '<=':
12993				return rtl ? a >= b : a <= b;
12994			default:
12995				break;
12996		}
12997	};
12998
12999	/**
13000	 * Attaches to an internal event.
13001	 * @protected
13002	 * @param {HTMLElement} element - The event source.
13003	 * @param {String} event - The event name.
13004	 * @param {Function} listener - The event handler to attach.
13005	 * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not.
13006	 */
13007	Owl.prototype.on = function(element, event, listener, capture) {
13008		if (element.addEventListener) {
13009			element.addEventListener(event, listener, capture);
13010		} else if (element.attachEvent) {
13011			element.attachEvent('on' + event, listener);
13012		}
13013	};
13014
13015	/**
13016	 * Detaches from an internal event.
13017	 * @protected
13018	 * @param {HTMLElement} element - The event source.
13019	 * @param {String} event - The event name.
13020	 * @param {Function} listener - The attached event handler to detach.
13021	 * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not.
13022	 */
13023	Owl.prototype.off = function(element, event, listener, capture) {
13024		if (element.removeEventListener) {
13025			element.removeEventListener(event, listener, capture);
13026		} else if (element.detachEvent) {
13027			element.detachEvent('on' + event, listener);
13028		}
13029	};
13030
13031	/**
13032	 * Triggers a public event.
13033	 * @todo Remove `status`, `relatedTarget` should be used instead.
13034	 * @protected
13035	 * @param {String} name - The event name.
13036	 * @param {*} [data=null] - The event data.
13037	 * @param {String} [namespace=carousel] - The event namespace.
13038	 * @param {String} [state] - The state which is associated with the event.
13039	 * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not.
13040	 * @returns {Event} - The event arguments.
13041	 */
13042	Owl.prototype.trigger = function(name, data, namespace, state, enter) {
13043		var status = {
13044			item: { count: this._items.length, index: this.current() }
13045		}, handler = $.camelCase(
13046			$.grep([ 'on', name, namespace ], function(v) { return v })
13047				.join('-').toLowerCase()
13048		), event = $.Event(
13049			[ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(),
13050			$.extend({ relatedTarget: this }, status, data)
13051		);
13052
13053		if (!this._supress[name]) {
13054			$.each(this._plugins, function(name, plugin) {
13055				if (plugin.onTrigger) {
13056					plugin.onTrigger(event);
13057				}
13058			});
13059
13060			this.register({ type: Owl.Type.Event, name: name });
13061			this.$element.trigger(event);
13062
13063			if (this.settings && typeof this.settings[handler] === 'function') {
13064				this.settings[handler].call(this, event);
13065			}
13066		}
13067
13068		return event;
13069	};
13070
13071	/**
13072	 * Enters a state.
13073	 * @param name - The state name.
13074	 */
13075	Owl.prototype.enter = function(name) {
13076		$.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
13077			if (this._states.current[name] === undefined) {
13078				this._states.current[name] = 0;
13079			}
13080
13081			this._states.current[name]++;
13082		}, this));
13083	};
13084
13085	/**
13086	 * Leaves a state.
13087	 * @param name - The state name.
13088	 */
13089	Owl.prototype.leave = function(name) {
13090		$.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
13091			this._states.current[name]--;
13092		}, this));
13093	};
13094
13095	/**
13096	 * Registers an event or state.
13097	 * @public
13098	 * @param {Object} object - The event or state to register.
13099	 */
13100	Owl.prototype.register = function(object) {
13101		if (object.type === Owl.Type.Event) {
13102			if (!$.event.special[object.name]) {
13103				$.event.special[object.name] = {};
13104			}
13105
13106			if (!$.event.special[object.name].owl) {
13107				var _default = $.event.special[object.name]._default;
13108				$.event.special[object.name]._default = function(e) {
13109					if (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) {
13110						return _default.apply(this, arguments);
13111					}
13112					return e.namespace && e.namespace.indexOf('owl') > -1;
13113				};
13114				$.event.special[object.name].owl = true;
13115			}
13116		} else if (object.type === Owl.Type.State) {
13117			if (!this._states.tags[object.name]) {
13118				this._states.tags[object.name] = object.tags;
13119			} else {
13120				this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);
13121			}
13122
13123			this._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) {
13124				return $.inArray(tag, this._states.tags[object.name]) === i;
13125			}, this));
13126		}
13127	};
13128
13129	/**
13130	 * Suppresses events.
13131	 * @protected
13132	 * @param {Array.<String>} events - The events to suppress.
13133	 */
13134	Owl.prototype.suppress = function(events) {
13135		$.each(events, $.proxy(function(index, event) {
13136			this._supress[event] = true;
13137		}, this));
13138	};
13139
13140	/**
13141	 * Releases suppressed events.
13142	 * @protected
13143	 * @param {Array.<String>} events - The events to release.
13144	 */
13145	Owl.prototype.release = function(events) {
13146		$.each(events, $.proxy(function(index, event) {
13147			delete this._supress[event];
13148		}, this));
13149	};
13150
13151	/**
13152	 * Gets unified pointer coordinates from event.
13153	 * @todo #261
13154	 * @protected
13155	 * @param {Event} - The `mousedown` or `touchstart` event.
13156	 * @returns {Object} - Contains `x` and `y` coordinates of current pointer position.
13157	 */
13158	Owl.prototype.pointer = function(event) {
13159		var result = { x: null, y: null };
13160
13161		event = event.originalEvent || event || window.event;
13162
13163		event = event.touches && event.touches.length ?
13164			event.touches[0] : event.changedTouches && event.changedTouches.length ?
13165				event.changedTouches[0] : event;
13166
13167		if (event.pageX) {
13168			result.x = event.pageX;
13169			result.y = event.pageY;
13170		} else {
13171			result.x = event.clientX;
13172			result.y = event.clientY;
13173		}
13174
13175		return result;
13176	};
13177
13178	/**
13179	 * Determines if the input is a Number or something that can be coerced to a Number
13180	 * @protected
13181	 * @param {Number|String|Object|Array|Boolean|RegExp|Function|Symbol} - The input to be tested
13182	 * @returns {Boolean} - An indication if the input is a Number or can be coerced to a Number
13183	 */
13184	Owl.prototype.isNumeric = function(number) {
13185		return !isNaN(parseFloat(number));
13186	};
13187
13188	/**
13189	 * Gets the difference of two vectors.
13190	 * @todo #261
13191	 * @protected
13192	 * @param {Object} - The first vector.
13193	 * @param {Object} - The second vector.
13194	 * @returns {Object} - The difference.
13195	 */
13196	Owl.prototype.difference = function(first, second) {
13197		return {
13198			x: first.x - second.x,
13199			y: first.y - second.y
13200		};
13201	};
13202
13203	/**
13204	 * The jQuery Plugin for the Owl Carousel
13205	 * @todo Navigation plugin `next` and `prev`
13206	 * @public
13207	 */
13208	$.fn.owlCarousel = function(option) {
13209		var args = Array.prototype.slice.call(arguments, 1);
13210
13211		return this.each(function() {
13212			var $this = $(this),
13213				data = $this.data('owl.carousel');
13214
13215			if (!data) {
13216				data = new Owl(this, typeof option == 'object' && option);
13217				$this.data('owl.carousel', data);
13218
13219				$.each([
13220					'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'
13221				], function(i, event) {
13222					data.register({ type: Owl.Type.Event, name: event });
13223					data.$element.on(event + '.owl.carousel.core', $.proxy(function(e) {
13224						if (e.namespace && e.relatedTarget !== this) {
13225							this.suppress([ event ]);
13226							data[event].apply(this, [].slice.call(arguments, 1));
13227							this.release([ event ]);
13228						}
13229					}, data));
13230				});
13231			}
13232
13233			if (typeof option == 'string' && option.charAt(0) !== '_') {
13234				data[option].apply(data, args);
13235			}
13236		});
13237	};
13238
13239	/**
13240	 * The constructor for the jQuery Plugin
13241	 * @public
13242	 */
13243	$.fn.owlCarousel.Constructor = Owl;
13244
13245})(window.Zepto || window.jQuery, window, document);
13246
13247/**
13248 * AutoRefresh Plugin
13249 * @version 2.3.4
13250 * @author Artus Kolanowski
13251 * @author David Deutsch
13252 * @license The MIT License (MIT)
13253 */
13254;(function($, window, document, undefined) {
13255
13256	/**
13257	 * Creates the auto refresh plugin.
13258	 * @class The Auto Refresh Plugin
13259	 * @param {Owl} carousel - The Owl Carousel
13260	 */
13261	var AutoRefresh = function(carousel) {
13262		/**
13263		 * Reference to the core.
13264		 * @protected
13265		 * @type {Owl}
13266		 */
13267		this._core = carousel;
13268
13269		/**
13270		 * Refresh interval.
13271		 * @protected
13272		 * @type {number}
13273		 */
13274		this._interval = null;
13275
13276		/**
13277		 * Whether the element is currently visible or not.
13278		 * @protected
13279		 * @type {Boolean}
13280		 */
13281		this._visible = null;
13282
13283		/**
13284		 * All event handlers.
13285		 * @protected
13286		 * @type {Object}
13287		 */
13288		this._handlers = {
13289			'initialized.owl.carousel': $.proxy(function(e) {
13290				if (e.namespace && this._core.settings.autoRefresh) {
13291					this.watch();
13292				}
13293			}, this)
13294		};
13295
13296		// set default options
13297		this._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options);
13298
13299		// register event handlers
13300		this._core.$element.on(this._handlers);
13301	};
13302
13303	/**
13304	 * Default options.
13305	 * @public
13306	 */
13307	AutoRefresh.Defaults = {
13308		autoRefresh: true,
13309		autoRefreshInterval: 500
13310	};
13311
13312	/**
13313	 * Watches the element.
13314	 */
13315	AutoRefresh.prototype.watch = function() {
13316		if (this._interval) {
13317			return;
13318		}
13319
13320		this._visible = this._core.isVisible();
13321		this._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);
13322	};
13323
13324	/**
13325	 * Refreshes the element.
13326	 */
13327	AutoRefresh.prototype.refresh = function() {
13328		if (this._core.isVisible() === this._visible) {
13329			return;
13330		}
13331
13332		this._visible = !this._visible;
13333
13334		this._core.$element.toggleClass('owl-hidden', !this._visible);
13335
13336		this._visible && (this._core.invalidate('width') && this._core.refresh());
13337	};
13338
13339	/**
13340	 * Destroys the plugin.
13341	 */
13342	AutoRefresh.prototype.destroy = function() {
13343		var handler, property;
13344
13345		window.clearInterval(this._interval);
13346
13347		for (handler in this._handlers) {
13348			this._core.$element.off(handler, this._handlers[handler]);
13349		}
13350		for (property in Object.getOwnPropertyNames(this)) {
13351			typeof this[property] != 'function' && (this[property] = null);
13352		}
13353	};
13354
13355	$.fn.owlCarousel.Constructor.Plugins.AutoRefresh = AutoRefresh;
13356
13357})(window.Zepto || window.jQuery, window, document);
13358
13359/**
13360 * Lazy Plugin
13361 * @version 2.3.4
13362 * @author Bartosz Wojciechowski
13363 * @author David Deutsch
13364 * @license The MIT License (MIT)
13365 */
13366;(function($, window, document, undefined) {
13367
13368	/**
13369	 * Creates the lazy plugin.
13370	 * @class The Lazy Plugin
13371	 * @param {Owl} carousel - The Owl Carousel
13372	 */
13373	var Lazy = function(carousel) {
13374
13375		/**
13376		 * Reference to the core.
13377		 * @protected
13378		 * @type {Owl}
13379		 */
13380		this._core = carousel;
13381
13382		/**
13383		 * Already loaded items.
13384		 * @protected
13385		 * @type {Array.<jQuery>}
13386		 */
13387		this._loaded = [];
13388
13389		/**
13390		 * Event handlers.
13391		 * @protected
13392		 * @type {Object}
13393		 */
13394		this._handlers = {
13395			'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e) {
13396				if (!e.namespace) {
13397					return;
13398				}
13399
13400				if (!this._core.settings || !this._core.settings.lazyLoad) {
13401					return;
13402				}
13403
13404				if ((e.property && e.property.name == 'position') || e.type == 'initialized') {
13405					var settings = this._core.settings,
13406						n = (settings.center && Math.ceil(settings.items / 2) || settings.items),
13407						i = ((settings.center && n * -1) || 0),
13408						position = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i,
13409						clones = this._core.clones().length,
13410						load = $.proxy(function(i, v) { this.load(v) }, this);
13411					//TODO: Need documentation for this new option
13412					if (settings.lazyLoadEager > 0) {
13413						n += settings.lazyLoadEager;
13414						// If the carousel is looping also preload images that are to the "left"
13415						if (settings.loop) {
13416              position -= settings.lazyLoadEager;
13417              n++;
13418            }
13419					}
13420
13421					while (i++ < n) {
13422						this.load(clones / 2 + this._core.relative(position));
13423						clones && $.each(this._core.clones(this._core.relative(position)), load);
13424						position++;
13425					}
13426				}
13427			}, this)
13428		};
13429
13430		// set the default options
13431		this._core.options = $.extend({}, Lazy.Defaults, this._core.options);
13432
13433		// register event handler
13434		this._core.$element.on(this._handlers);
13435	};
13436
13437	/**
13438	 * Default options.
13439	 * @public
13440	 */
13441	Lazy.Defaults = {
13442		lazyLoad: false,
13443		lazyLoadEager: 0
13444	};
13445
13446	/**
13447	 * Loads all resources of an item at the specified position.
13448	 * @param {Number} position - The absolute position of the item.
13449	 * @protected
13450	 */
13451	Lazy.prototype.load = function(position) {
13452		var $item = this._core.$stage.children().eq(position),
13453			$elements = $item && $item.find('.owl-lazy');
13454
13455		if (!$elements || $.inArray($item.get(0), this._loaded) > -1) {
13456			return;
13457		}
13458
13459		$elements.each($.proxy(function(index, element) {
13460			var $element = $(element), image,
13461                url = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src') || $element.attr('data-srcset');
13462
13463			this._core.trigger('load', { element: $element, url: url }, 'lazy');
13464
13465			if ($element.is('img')) {
13466				$element.one('load.owl.lazy', $.proxy(function() {
13467					$element.css('opacity', 1);
13468					this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
13469				}, this)).attr('src', url);
13470            } else if ($element.is('source')) {
13471                $element.one('load.owl.lazy', $.proxy(function() {
13472                    this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
13473                }, this)).attr('srcset', url);
13474			} else {
13475				image = new Image();
13476				image.onload = $.proxy(function() {
13477					$element.css({
13478						'background-image': 'url("' + url + '")',
13479						'opacity': '1'
13480					});
13481					this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
13482				}, this);
13483				image.src = url;
13484			}
13485		}, this));
13486
13487		this._loaded.push($item.get(0));
13488	};
13489
13490	/**
13491	 * Destroys the plugin.
13492	 * @public
13493	 */
13494	Lazy.prototype.destroy = function() {
13495		var handler, property;
13496
13497		for (handler in this.handlers) {
13498			this._core.$element.off(handler, this.handlers[handler]);
13499		}
13500		for (property in Object.getOwnPropertyNames(this)) {
13501			typeof this[property] != 'function' && (this[property] = null);
13502		}
13503	};
13504
13505	$.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy;
13506
13507})(window.Zepto || window.jQuery, window, document);
13508
13509/**
13510 * AutoHeight Plugin
13511 * @version 2.3.4
13512 * @author Bartosz Wojciechowski
13513 * @author David Deutsch
13514 * @license The MIT License (MIT)
13515 */
13516;(function($, window, document, undefined) {
13517
13518	/**
13519	 * Creates the auto height plugin.
13520	 * @class The Auto Height Plugin
13521	 * @param {Owl} carousel - The Owl Carousel
13522	 */
13523	var AutoHeight = function(carousel) {
13524		/**
13525		 * Reference to the core.
13526		 * @protected
13527		 * @type {Owl}
13528		 */
13529		this._core = carousel;
13530
13531		this._previousHeight = null;
13532
13533		/**
13534		 * All event handlers.
13535		 * @protected
13536		 * @type {Object}
13537		 */
13538		this._handlers = {
13539			'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) {
13540				if (e.namespace && this._core.settings.autoHeight) {
13541					this.update();
13542				}
13543			}, this),
13544			'changed.owl.carousel': $.proxy(function(e) {
13545				if (e.namespace && this._core.settings.autoHeight && e.property.name === 'position'){
13546					this.update();
13547				}
13548			}, this),
13549			'loaded.owl.lazy': $.proxy(function(e) {
13550				if (e.namespace && this._core.settings.autoHeight
13551					&& e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) {
13552					this.update();
13553				}
13554			}, this)
13555		};
13556
13557		// set default options
13558		this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options);
13559
13560		// register event handlers
13561		this._core.$element.on(this._handlers);
13562		this._intervalId = null;
13563		var refThis = this;
13564
13565		// These changes have been taken from a PR by gavrochelegnou proposed in #1575
13566		// and have been made compatible with the latest jQuery version
13567		$(window).on('load', function() {
13568			if (refThis._core.settings.autoHeight) {
13569				refThis.update();
13570			}
13571		});
13572
13573		// Autoresize the height of the carousel when window is resized
13574		// When carousel has images, the height is dependent on the width
13575		// and should also change on resize
13576		$(window).resize(function() {
13577			if (refThis._core.settings.autoHeight) {
13578				if (refThis._intervalId != null) {
13579					clearTimeout(refThis._intervalId);
13580				}
13581
13582				refThis._intervalId = setTimeout(function() {
13583					refThis.update();
13584				}, 250);
13585			}
13586		});
13587
13588	};
13589
13590	/**
13591	 * Default options.
13592	 * @public
13593	 */
13594	AutoHeight.Defaults = {
13595		autoHeight: false,
13596		autoHeightClass: 'owl-height'
13597	};
13598
13599	/**
13600	 * Updates the view.
13601	 */
13602	AutoHeight.prototype.update = function() {
13603		var start = this._core._current,
13604			end = start + this._core.settings.items,
13605			lazyLoadEnabled = this._core.settings.lazyLoad,
13606			visible = this._core.$stage.children().toArray().slice(start, end),
13607			heights = [],
13608			maxheight = 0;
13609
13610		$.each(visible, function(index, item) {
13611			heights.push($(item).height());
13612		});
13613
13614		maxheight = Math.max.apply(null, heights);
13615
13616		if (maxheight <= 1 && lazyLoadEnabled && this._previousHeight) {
13617			maxheight = this._previousHeight;
13618		}
13619
13620		this._previousHeight = maxheight;
13621
13622		this._core.$stage.parent()
13623			.height(maxheight)
13624			.addClass(this._core.settings.autoHeightClass);
13625	};
13626
13627	AutoHeight.prototype.destroy = function() {
13628		var handler, property;
13629
13630		for (handler in this._handlers) {
13631			this._core.$element.off(handler, this._handlers[handler]);
13632		}
13633		for (property in Object.getOwnPropertyNames(this)) {
13634			typeof this[property] !== 'function' && (this[property] = null);
13635		}
13636	};
13637
13638	$.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight;
13639
13640})(window.Zepto || window.jQuery, window, document);
13641
13642/**
13643 * Video Plugin
13644 * @version 2.3.4
13645 * @author Bartosz Wojciechowski
13646 * @author David Deutsch
13647 * @license The MIT License (MIT)
13648 */
13649;(function($, window, document, undefined) {
13650
13651	/**
13652	 * Creates the video plugin.
13653	 * @class The Video Plugin
13654	 * @param {Owl} carousel - The Owl Carousel
vendor: 5,347 bytes, lines 13655-13852
13655	 */
13656	var Video = function(carousel) {
13657		/**
13658		 * Reference to the core.
13659		 * @protected
13660		 * @type {Owl}
13661		 */
13662		this._core = carousel;
13663
13664		/**
13665		 * Cache all video URLs.
13666		 * @protected
13667		 * @type {Object}
13668		 */
13669		this._videos = {};
13670
13671		/**
13672		 * Current playing item.
13673		 * @protected
13674		 * @type {jQuery}
13675		 */
13676		this._playing = null;
13677
13678		/**
13679		 * All event handlers.
13680		 * @todo The cloned content removale is too late
13681		 * @protected
13682		 * @type {Object}
13683		 */
13684		this._handlers = {
13685			'initialized.owl.carousel': $.proxy(function(e) {
13686				if (e.namespace) {
13687					this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });
13688				}
13689			}, this),
13690			'resize.owl.carousel': $.proxy(function(e) {
13691				if (e.namespace && this._core.settings.video && this.isInFullScreen()) {
13692					e.preventDefault();
13693				}
13694			}, this),
13695			'refreshed.owl.carousel': $.proxy(function(e) {
13696				if (e.namespace && this._core.is('resizing')) {
13697					this._core.$stage.find('.cloned .owl-video-frame').remove();
13698				}
13699			}, this),
13700			'changed.owl.carousel': $.proxy(function(e) {
13701				if (e.namespace && e.property.name === 'position' && this._playing) {
13702					this.stop();
13703				}
13704			}, this),
13705			'prepared.owl.carousel': $.proxy(function(e) {
13706				if (!e.namespace) {
13707					return;
13708				}
13709
13710				var $element = $(e.content).find('.owl-video');
13711
13712				if ($element.length) {
13713					$element.css('display', 'none');
13714					this.fetch($element, $(e.content));
13715				}
13716			}, this)
13717		};
13718
13719		// set default options
13720		this._core.options = $.extend({}, Video.Defaults, this._core.options);
13721
13722		// register event handlers
13723		this._core.$element.on(this._handlers);
13724
13725		this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {
13726			this.play(e);
13727		}, this));
13728	};
13729
13730	/**
13731	 * Default options.
13732	 * @public
13733	 */
13734	Video.Defaults = {
13735		video: false,
13736		videoHeight: false,
13737		videoWidth: false
13738	};
13739
13740	/**
13741	 * Gets the video ID and the type (YouTube/Vimeo/vzaar only).
13742	 * @protected
13743	 * @param {jQuery} target - The target containing the video data.
13744	 * @param {jQuery} item - The item containing the video.
13745	 */
13746	Video.prototype.fetch = function(target, item) {
13747			var type = (function() {
13748					if (target.attr('data-vimeo-id')) {
13749						return 'vimeo';
13750					} else if (target.attr('data-vzaar-id')) {
13751						return 'vzaar'
13752					} else {
13753						return 'youtube';
13754					}
13755				})(),
13756				id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'),
13757				width = target.attr('data-width') || this._core.settings.videoWidth,
13758				height = target.attr('data-height') || this._core.settings.videoHeight,
13759				url = target.attr('href');
13760
13761		if (url) {
13762
13763			/*
13764					Parses the id's out of the following urls (and probably more):
13765					https://www.youtube.com/watch?v=:id
13766					https://youtu.be/:id
13767					https://vimeo.com/:id
13768					https://vimeo.com/channels/:channel/:id
13769					https://vimeo.com/groups/:group/videos/:id
13770					https://app.vzaar.com/videos/:id
13771
13772					Visual example: https://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F
13773			*/
13774
13775			id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
13776
13777			if (id[3].indexOf('youtu') > -1) {
13778				type = 'youtube';
13779			} else if (id[3].indexOf('vimeo') > -1) {
13780				type = 'vimeo';
13781			} else if (id[3].indexOf('vzaar') > -1) {
13782				type = 'vzaar';
13783			} else {
13784				throw new Error('Video URL not supported.');
13785			}
13786			id = id[6];
13787		} else {
13788			throw new Error('Missing video URL.');
13789		}
13790
13791		this._videos[url] = {
13792			type: type,
13793			id: id,
13794			width: width,
13795			height: height
13796		};
13797
13798		item.attr('data-video', url);
13799
13800		this.thumbnail(target, this._videos[url]);
13801	};
13802
13803	/**
13804	 * Creates video thumbnail.
13805	 * @protected
13806	 * @param {jQuery} target - The target containing the video data.
13807	 * @param {Object} info - The video info object.
13808	 * @see `fetch`
13809	 */
13810	Video.prototype.thumbnail = function(target, video) {
13811		var tnLink,
13812			icon,
13813			path,
13814			dimensions = video.width && video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;' : '',
13815			customTn = target.find('img'),
13816			srcType = 'src',
13817			lazyClass = '',
13818			settings = this._core.settings,
13819			create = function(path) {
13820				icon = '<div class="owl-video-play-icon"></div>';
13821
13822				if (settings.lazyLoad) {
13823					tnLink = $('<div/>',{
13824						"class": 'owl-video-tn ' + lazyClass,
13825						"srcType": path
13826					});
13827				} else {
13828					tnLink = $( '<div/>', {
13829						"class": "owl-video-tn",
13830						"style": 'opacity:1;background-image:url(' + path + ')'
13831					});
13832				}
13833				target.after(tnLink);
13834				target.after(icon);
13835			};
13836
13837		// wrap video content into owl-video-wrapper div
13838		target.wrap( $( '<div/>', {
13839			"class": "owl-video-wrapper",
13840			"style": dimensions
13841		}));
13842
13843		if (this._core.settings.lazyLoad) {
13844			srcType = 'data-src';
13845			lazyClass = 'owl-lazy';
13846		}
13847
13848		// custom thumbnail
13849		if (customTn.length) {
13850			create(customTn.attr(srcType));
13851			customTn.remove();
13852			return false;
vendor: 15,908 bytes, lines 13853-14490
13853		}
13854
13855		if (video.type === 'youtube') {
13856			path = "//img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
13857			create(path);
13858		} else if (video.type === 'vimeo') {
13859			$.ajax({
13860				type: 'GET',
13861				url: '//vimeo.com/api/v2/video/' + video.id + '.json',
13862				jsonp: 'callback',
13863				dataType: 'jsonp',
13864				success: function(data) {
13865					path = data[0].thumbnail_large;
13866					create(path);
13867				}
13868			});
13869		} else if (video.type === 'vzaar') {
13870			$.ajax({
13871				type: 'GET',
13872				url: '//vzaar.com/api/videos/' + video.id + '.json',
13873				jsonp: 'callback',
13874				dataType: 'jsonp',
13875				success: function(data) {
13876					path = data.framegrab_url;
13877					create(path);
13878				}
13879			});
13880		}
13881	};
13882
13883	/**
13884	 * Stops the current video.
13885	 * @public
13886	 */
13887	Video.prototype.stop = function() {
13888		this._core.trigger('stop', null, 'video');
13889		this._playing.find('.owl-video-frame').remove();
13890		this._playing.removeClass('owl-video-playing');
13891		this._playing = null;
13892		this._core.leave('playing');
13893		this._core.trigger('stopped', null, 'video');
13894	};
13895
13896	/**
13897	 * Starts the current video.
13898	 * @public
13899	 * @param {Event} event - The event arguments.
13900	 */
13901	Video.prototype.play = function(event) {
13902		var target = $(event.target),
13903			item = target.closest('.' + this._core.settings.itemClass),
13904			video = this._videos[item.attr('data-video')],
13905			width = video.width || '100%',
13906			height = video.height || this._core.$stage.height(),
13907			html,
13908			iframe;
13909
13910		if (this._playing) {
13911			return;
13912		}
13913
13914		this._core.enter('playing');
13915		this._core.trigger('play', null, 'video');
13916
13917		item = this._core.items(this._core.relative(item.index()));
13918
13919		this._core.reset(item.index());
13920
13921		html = $( '<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>' );
13922		html.attr( 'height', height );
13923		html.attr( 'width', width );
13924		if (video.type === 'youtube') {
13925			html.attr( 'src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&rel=0&v=' + video.id );
13926		} else if (video.type === 'vimeo') {
13927			html.attr( 'src', '//player.vimeo.com/video/' + video.id + '?autoplay=1' );
13928		} else if (video.type === 'vzaar') {
13929			html.attr( 'src', '//view.vzaar.com/' + video.id + '/player?autoplay=true' );
13930		}
13931
13932		iframe = $(html).wrap( '<div class="owl-video-frame" />' ).insertAfter(item.find('.owl-video'));
13933
13934		this._playing = item.addClass('owl-video-playing');
13935	};
13936
13937	/**
13938	 * Checks whether an video is currently in full screen mode or not.
13939	 * @todo Bad style because looks like a readonly method but changes members.
13940	 * @protected
13941	 * @returns {Boolean}
13942	 */
13943	Video.prototype.isInFullScreen = function() {
13944		var element = document.fullscreenElement || document.mozFullScreenElement ||
13945				document.webkitFullscreenElement;
13946
13947		return element && $(element).parent().hasClass('owl-video-frame');
13948	};
13949
13950	/**
13951	 * Destroys the plugin.
13952	 */
13953	Video.prototype.destroy = function() {
13954		var handler, property;
13955
13956		this._core.$element.off('click.owl.video');
13957
13958		for (handler in this._handlers) {
13959			this._core.$element.off(handler, this._handlers[handler]);
13960		}
13961		for (property in Object.getOwnPropertyNames(this)) {
13962			typeof this[property] != 'function' && (this[property] = null);
13963		}
13964	};
13965
13966	$.fn.owlCarousel.Constructor.Plugins.Video = Video;
13967
13968})(window.Zepto || window.jQuery, window, document);
13969
13970/**
13971 * Animate Plugin
13972 * @version 2.3.4
13973 * @author Bartosz Wojciechowski
13974 * @author David Deutsch
13975 * @license The MIT License (MIT)
13976 */
13977;(function($, window, document, undefined) {
13978
13979	/**
13980	 * Creates the animate plugin.
13981	 * @class The Navigation Plugin
13982	 * @param {Owl} scope - The Owl Carousel
13983	 */
13984	var Animate = function(scope) {
13985		this.core = scope;
13986		this.core.options = $.extend({}, Animate.Defaults, this.core.options);
13987		this.swapping = true;
13988		this.previous = undefined;
13989		this.next = undefined;
13990
13991		this.handlers = {
13992			'change.owl.carousel': $.proxy(function(e) {
13993				if (e.namespace && e.property.name == 'position') {
13994					this.previous = this.core.current();
13995					this.next = e.property.value;
13996				}
13997			}, this),
13998			'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {
13999				if (e.namespace) {
14000					this.swapping = e.type == 'translated';
14001				}
14002			}, this),
14003			'translate.owl.carousel': $.proxy(function(e) {
14004				if (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) {
14005					this.swap();
14006				}
14007			}, this)
14008		};
14009
14010		this.core.$element.on(this.handlers);
14011	};
14012
14013	/**
14014	 * Default options.
14015	 * @public
14016	 */
14017	Animate.Defaults = {
14018		animateOut: false,
14019		animateIn: false
14020	};
14021
14022	/**
14023	 * Toggles the animation classes whenever an translations starts.
14024	 * @protected
14025	 * @returns {Boolean|undefined}
14026	 */
14027	Animate.prototype.swap = function() {
14028
14029		if (this.core.settings.items !== 1) {
14030			return;
14031		}
14032
14033		if (!$.support.animation || !$.support.transition) {
14034			return;
14035		}
14036
14037		this.core.speed(0);
14038
14039		var left,
14040			clear = $.proxy(this.clear, this),
14041			previous = this.core.$stage.children().eq(this.previous),
14042			next = this.core.$stage.children().eq(this.next),
14043			incoming = this.core.settings.animateIn,
14044			outgoing = this.core.settings.animateOut;
14045
14046		if (this.core.current() === this.previous) {
14047			return;
14048		}
14049
14050		if (outgoing) {
14051			left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
14052			previous.one($.support.animation.end, clear)
14053				.css( { 'left': left + 'px' } )
14054				.addClass('animated owl-animated-out')
14055				.addClass(outgoing);
14056		}
14057
14058		if (incoming) {
14059			next.one($.support.animation.end, clear)
14060				.addClass('animated owl-animated-in')
14061				.addClass(incoming);
14062		}
14063	};
14064
14065	Animate.prototype.clear = function(e) {
14066		$(e.target).css( { 'left': '' } )
14067			.removeClass('animated owl-animated-out owl-animated-in')
14068			.removeClass(this.core.settings.animateIn)
14069			.removeClass(this.core.settings.animateOut);
14070		this.core.onTransitionEnd();
14071	};
14072
14073	/**
14074	 * Destroys the plugin.
14075	 * @public
14076	 */
14077	Animate.prototype.destroy = function() {
14078		var handler, property;
14079
14080		for (handler in this.handlers) {
14081			this.core.$element.off(handler, this.handlers[handler]);
14082		}
14083		for (property in Object.getOwnPropertyNames(this)) {
14084			typeof this[property] != 'function' && (this[property] = null);
14085		}
14086	};
14087
14088	$.fn.owlCarousel.Constructor.Plugins.Animate = Animate;
14089
14090})(window.Zepto || window.jQuery, window, document);
14091
14092/**
14093 * Autoplay Plugin
14094 * @version 2.3.4
14095 * @author Bartosz Wojciechowski
14096 * @author Artus Kolanowski
14097 * @author David Deutsch
14098 * @author Tom De Caluwé
14099 * @license The MIT License (MIT)
14100 */
14101;(function($, window, document, undefined) {
14102
14103	/**
14104	 * Creates the autoplay plugin.
14105	 * @class The Autoplay Plugin
14106	 * @param {Owl} scope - The Owl Carousel
14107	 */
14108	var Autoplay = function(carousel) {
14109		/**
14110		 * Reference to the core.
14111		 * @protected
14112		 * @type {Owl}
14113		 */
14114		this._core = carousel;
14115
14116		/**
14117		 * The autoplay timeout id.
14118		 * @type {Number}
14119		 */
14120		this._call = null;
14121
14122		/**
14123		 * Depending on the state of the plugin, this variable contains either
14124		 * the start time of the timer or the current timer value if it's
14125		 * paused. Since we start in a paused state we initialize the timer
14126		 * value.
14127		 * @type {Number}
14128		 */
14129		this._time = 0;
14130
14131		/**
14132		 * Stores the timeout currently used.
14133		 * @type {Number}
14134		 */
14135		this._timeout = 0;
14136
14137		/**
14138		 * Indicates whenever the autoplay is paused.
14139		 * @type {Boolean}
14140		 */
14141		this._paused = true;
14142
14143		/**
14144		 * All event handlers.
14145		 * @protected
14146		 * @type {Object}
14147		 */
14148		this._handlers = {
14149			'changed.owl.carousel': $.proxy(function(e) {
14150				if (e.namespace && e.property.name === 'settings') {
14151					if (this._core.settings.autoplay) {
14152						this.play();
14153					} else {
14154						this.stop();
14155					}
14156				} else if (e.namespace && e.property.name === 'position' && this._paused) {
14157					// Reset the timer. This code is triggered when the position
14158					// of the carousel was changed through user interaction.
14159					this._time = 0;
14160				}
14161			}, this),
14162			'initialized.owl.carousel': $.proxy(function(e) {
14163				if (e.namespace && this._core.settings.autoplay) {
14164					this.play();
14165				}
14166			}, this),
14167			'play.owl.autoplay': $.proxy(function(e, t, s) {
14168				if (e.namespace) {
14169					this.play(t, s);
14170				}
14171			}, this),
14172			'stop.owl.autoplay': $.proxy(function(e) {
14173				if (e.namespace) {
14174					this.stop();
14175				}
14176			}, this),
14177			'mouseover.owl.autoplay': $.proxy(function() {
14178				if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
14179					this.pause();
14180				}
14181			}, this),
14182			'mouseleave.owl.autoplay': $.proxy(function() {
14183				if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
14184					this.play();
14185				}
14186			}, this),
14187			'touchstart.owl.core': $.proxy(function() {
14188				if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
14189					this.pause();
14190				}
14191			}, this),
14192			'touchend.owl.core': $.proxy(function() {
14193				if (this._core.settings.autoplayHoverPause) {
14194					this.play();
14195				}
14196			}, this)
14197		};
14198
14199		// register event handlers
14200		this._core.$element.on(this._handlers);
14201
14202		// set default options
14203		this._core.options = $.extend({}, Autoplay.Defaults, this._core.options);
14204	};
14205
14206	/**
14207	 * Default options.
14208	 * @public
14209	 */
14210	Autoplay.Defaults = {
14211		autoplay: false,
14212		autoplayTimeout: 5000,
14213		autoplayHoverPause: false,
14214		autoplaySpeed: false
14215	};
14216
14217	/**
14218	 * Transition to the next slide and set a timeout for the next transition.
14219	 * @private
14220	 * @param {Number} [speed] - The animation speed for the animations.
14221	 */
14222	Autoplay.prototype._next = function(speed) {
14223		this._call = window.setTimeout(
14224			$.proxy(this._next, this, speed),
14225			this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()
14226		);
14227
14228		if (this._core.is('interacting') || document.hidden) {
14229			return;
14230		}
14231		this._core.next(speed || this._core.settings.autoplaySpeed);
14232	}
14233
14234	/**
14235	 * Reads the current timer value when the timer is playing.
14236	 * @public
14237	 */
14238	Autoplay.prototype.read = function() {
14239		return new Date().getTime() - this._time;
14240	};
14241
14242	/**
14243	 * Starts the autoplay.
14244	 * @public
14245	 * @param {Number} [timeout] - The interval before the next animation starts.
14246	 * @param {Number} [speed] - The animation speed for the animations.
14247	 */
14248	Autoplay.prototype.play = function(timeout, speed) {
14249		var elapsed;
14250
14251		if (!this._core.is('rotating')) {
14252			this._core.enter('rotating');
14253		}
14254
14255		timeout = timeout || this._core.settings.autoplayTimeout;
14256
14257		// Calculate the elapsed time since the last transition. If the carousel
14258		// wasn't playing this calculation will yield zero.
14259		elapsed = Math.min(this._time % (this._timeout || timeout), timeout);
14260
14261		if (this._paused) {
14262			// Start the clock.
14263			this._time = this.read();
14264			this._paused = false;
14265		} else {
14266			// Clear the active timeout to allow replacement.
14267			window.clearTimeout(this._call);
14268		}
14269
14270		// Adjust the origin of the timer to match the new timeout value.
14271		this._time += this.read() % timeout - elapsed;
14272
14273		this._timeout = timeout;
14274		this._call = window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed);
14275	};
14276
14277	/**
14278	 * Stops the autoplay.
14279	 * @public
14280	 */
14281	Autoplay.prototype.stop = function() {
14282		if (this._core.is('rotating')) {
14283			// Reset the clock.
14284			this._time = 0;
14285			this._paused = true;
14286
14287			window.clearTimeout(this._call);
14288			this._core.leave('rotating');
14289		}
14290	};
14291
14292	/**
14293	 * Pauses the autoplay.
14294	 * @public
14295	 */
14296	Autoplay.prototype.pause = function() {
14297		if (this._core.is('rotating') && !this._paused) {
14298			// Pause the clock.
14299			this._time = this.read();
14300			this._paused = true;
14301
14302			window.clearTimeout(this._call);
14303		}
14304	};
14305
14306	/**
14307	 * Destroys the plugin.
14308	 */
14309	Autoplay.prototype.destroy = function() {
14310		var handler, property;
14311
14312		this.stop();
14313
14314		for (handler in this._handlers) {
14315			this._core.$element.off(handler, this._handlers[handler]);
14316		}
14317		for (property in Object.getOwnPropertyNames(this)) {
14318			typeof this[property] != 'function' && (this[property] = null);
14319		}
14320	};
14321
14322	$.fn.owlCarousel.Constructor.Plugins.autoplay = Autoplay;
14323
14324})(window.Zepto || window.jQuery, window, document);
14325
14326/**
14327 * Navigation Plugin
14328 * @version 2.3.4
14329 * @author Artus Kolanowski
14330 * @author David Deutsch
14331 * @license The MIT License (MIT)
14332 */
14333;(function($, window, document, undefined) {
14334	'use strict';
14335
14336	/**
14337	 * Creates the navigation plugin.
14338	 * @class The Navigation Plugin
14339	 * @param {Owl} carousel - The Owl Carousel.
14340	 */
14341	var Navigation = function(carousel) {
14342		/**
14343		 * Reference to the core.
14344		 * @protected
14345		 * @type {Owl}
14346		 */
14347		this._core = carousel;
14348
14349		/**
14350		 * Indicates whether the plugin is initialized or not.
14351		 * @protected
14352		 * @type {Boolean}
14353		 */
14354		this._initialized = false;
14355
14356		/**
14357		 * The current paging indexes.
14358		 * @protected
14359		 * @type {Array}
14360		 */
14361		this._pages = [];
14362
14363		/**
14364		 * All DOM elements of the user interface.
14365		 * @protected
14366		 * @type {Object}
14367		 */
14368		this._controls = {};
14369
14370		/**
14371		 * Markup for an indicator.
14372		 * @protected
14373		 * @type {Array.<String>}
14374		 */
14375		this._templates = [];
14376
14377		/**
14378		 * The carousel element.
14379		 * @type {jQuery}
14380		 */
14381		this.$element = this._core.$element;
14382
14383		/**
14384		 * Overridden methods of the carousel.
14385		 * @protected
14386		 * @type {Object}
14387		 */
14388		this._overrides = {
14389			next: this._core.next,
14390			prev: this._core.prev,
14391			to: this._core.to
14392		};
14393
14394		/**
14395		 * All event handlers.
14396		 * @protected
14397		 * @type {Object}
14398		 */
14399		this._handlers = {
14400			'prepared.owl.carousel': $.proxy(function(e) {
14401				if (e.namespace && this._core.settings.dotsData) {
14402					this._templates.push('<div class="' + this._core.settings.dotClass + '">' +
14403						$(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '</div>');
14404				}
14405			}, this),
14406			'added.owl.carousel': $.proxy(function(e) {
14407				if (e.namespace && this._core.settings.dotsData) {
14408					this._templates.splice(e.position, 0, this._templates.pop());
14409				}
14410			}, this),
14411			'remove.owl.carousel': $.proxy(function(e) {
14412				if (e.namespace && this._core.settings.dotsData) {
14413					this._templates.splice(e.position, 1);
14414				}
14415			}, this),
14416			'changed.owl.carousel': $.proxy(function(e) {
14417				if (e.namespace && e.property.name == 'position') {
14418					this.draw();
14419				}
14420			}, this),
14421			'initialized.owl.carousel': $.proxy(function(e) {
14422				if (e.namespace && !this._initialized) {
14423					this._core.trigger('initialize', null, 'navigation');
14424					this.initialize();
14425					this.update();
14426					this.draw();
14427					this._initialized = true;
14428					this._core.trigger('initialized', null, 'navigation');
14429				}
14430			}, this),
14431			'refreshed.owl.carousel': $.proxy(function(e) {
14432				if (e.namespace && this._initialized) {
14433					this._core.trigger('refresh', null, 'navigation');
14434					this.update();
14435					this.draw();
14436					this._core.trigger('refreshed', null, 'navigation');
14437				}
14438			}, this)
14439		};
14440
14441		// set default options
14442		this._core.options = $.extend({}, Navigation.Defaults, this._core.options);
14443
14444		// register event handlers
14445		this.$element.on(this._handlers);
14446	};
14447
14448	/**
14449	 * Default options.
14450	 * @public
14451	 * @todo Rename `slideBy` to `navBy`
14452	 */
14453	Navigation.Defaults = {
14454		nav: false,
14455		navText: [
14456			'<span aria-label="' + 'Previous' + '">&#x2039;</span>',
14457			'<span aria-label="' + 'Next' + '">&#x203a;</span>'
14458		],
14459		navSpeed: false,
14460		navElement: 'button type="button" role="presentation"',
14461		navContainer: false,
14462		navContainerClass: 'owl-nav',
14463		navClass: [
14464			'owl-prev',
14465			'owl-next'
14466		],
14467		slideBy: 1,
14468		dotClass: 'owl-dot',
14469		dotsClass: 'owl-dots',
14470		dots: true,
14471		dotsEach: false,
14472		dotsData: false,
14473		dotsSpeed: false,
14474		dotsContainer: false
14475	};
14476
14477	/**
14478	 * Initializes the layout of the plugin and extends the carousel.
14479	 * @protected
14480	 */
14481	Navigation.prototype.initialize = function() {
14482		var override,
14483			settings = this._core.settings;
14484
14485		// create DOM structure for relative navigation
14486		this._controls.$relative = (settings.navContainer ? $(settings.navContainer)
14487			: $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');
14488
14489		this._controls.$previous = $('<' + settings.navElement + '>')
14490			.addClass(settings.navClass[0])
vendor: 4,756 bytes, lines 14491-14652
14491			.html(settings.navText[0])
14492			.prependTo(this._controls.$relative)
14493			.on('click', $.proxy(function(e) {
14494				this.prev(settings.navSpeed);
14495			}, this));
14496		this._controls.$next = $('<' + settings.navElement + '>')
14497			.addClass(settings.navClass[1])
14498			.html(settings.navText[1])
14499			.appendTo(this._controls.$relative)
14500			.on('click', $.proxy(function(e) {
14501				this.next(settings.navSpeed);
14502			}, this));
14503
14504		// create DOM structure for absolute navigation
14505		if (!settings.dotsData) {
14506			this._templates = [ $('<button role="button">')
14507				.addClass(settings.dotClass)
14508				.append($('<span>'))
14509				.prop('outerHTML') ];
14510		}
14511
14512		this._controls.$absolute = (settings.dotsContainer ? $(settings.dotsContainer)
14513			: $('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');
14514
14515		this._controls.$absolute.on('click', 'button', $.proxy(function(e) {
14516			var index = $(e.target).parent().is(this._controls.$absolute)
14517				? $(e.target).index() : $(e.target).parent().index();
14518
14519			e.preventDefault();
14520
14521			this.to(index, settings.dotsSpeed);
14522		}, this));
14523
14524		/*$el.on('focusin', function() {
14525			$(document).off(".carousel");
14526
14527			$(document).on('keydown.carousel', function(e) {
14528				if(e.keyCode == 37) {
14529					$el.trigger('prev.owl')
14530				}
14531				if(e.keyCode == 39) {
14532					$el.trigger('next.owl')
14533				}
14534			});
14535		});*/
14536
14537		// override public methods of the carousel
14538		for (override in this._overrides) {
14539			this._core[override] = $.proxy(this[override], this);
14540		}
14541	};
14542
14543	/**
14544	 * Destroys the plugin.
14545	 * @protected
14546	 */
14547	Navigation.prototype.destroy = function() {
14548		var handler, control, property, override, settings;
14549		settings = this._core.settings;
14550
14551		for (handler in this._handlers) {
14552			this.$element.off(handler, this._handlers[handler]);
14553		}
14554		for (control in this._controls) {
14555			if (control === '$relative' && settings.navContainer) {
14556				this._controls[control].html('');
14557			} else {
14558				this._controls[control].remove();
14559			}
14560		}
14561		for (override in this.overides) {
14562			this._core[override] = this._overrides[override];
14563		}
14564		for (property in Object.getOwnPropertyNames(this)) {
14565			typeof this[property] != 'function' && (this[property] = null);
14566		}
14567	};
14568
14569	/**
14570	 * Updates the internal state.
14571	 * @protected
14572	 */
14573	Navigation.prototype.update = function() {
14574		var i, j, k,
14575			lower = this._core.clones().length / 2,
14576			upper = lower + this._core.items().length,
14577			maximum = this._core.maximum(true),
14578			settings = this._core.settings,
14579			size = settings.center || settings.autoWidth || settings.dotsData
14580				? 1 : settings.dotsEach || settings.items;
14581
14582		if (settings.slideBy !== 'page') {
14583			settings.slideBy = Math.min(settings.slideBy, settings.items);
14584		}
14585
14586		if (settings.dots || settings.slideBy == 'page') {
14587			this._pages = [];
14588
14589			for (i = lower, j = 0, k = 0; i < upper; i++) {
14590				if (j >= size || j === 0) {
14591					this._pages.push({
14592						start: Math.min(maximum, i - lower),
14593						end: i - lower + size - 1
14594					});
14595					if (Math.min(maximum, i - lower) === maximum) {
14596						break;
14597					}
14598					j = 0, ++k;
14599				}
14600				j += this._core.mergers(this._core.relative(i));
14601			}
14602		}
14603	};
14604
14605	/**
14606	 * Draws the user interface.
14607	 * @todo The option `dotsData` wont work.
14608	 * @protected
14609	 */
14610	Navigation.prototype.draw = function() {
14611		var difference,
14612			settings = this._core.settings,
14613			disabled = this._core.items().length <= settings.items,
14614			index = this._core.relative(this._core.current()),
14615			loop = settings.loop || settings.rewind;
14616
14617		this._controls.$relative.toggleClass('disabled', !settings.nav || disabled);
14618
14619		if (settings.nav) {
14620			this._controls.$previous.toggleClass('disabled', !loop && index <= this._core.minimum(true));
14621			this._controls.$next.toggleClass('disabled', !loop && index >= this._core.maximum(true));
14622		}
14623
14624		this._controls.$absolute.toggleClass('disabled', !settings.dots || disabled);
14625
14626		if (settings.dots) {
14627			difference = this._pages.length - this._controls.$absolute.children().length;
14628
14629			if (settings.dotsData && difference !== 0) {
14630				this._controls.$absolute.html(this._templates.join(''));
14631			} else if (difference > 0) {
14632				this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0]));
14633			} else if (difference < 0) {
14634				this._controls.$absolute.children().slice(difference).remove();
14635			}
14636
14637			this._controls.$absolute.find('.active').removeClass('active');
14638			this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active');
14639		}
14640	};
14641
14642	/**
14643	 * Extends event data.
14644	 * @protected
14645	 * @param {Event} event - The event object which gets thrown.
14646	 */
14647	Navigation.prototype.onTrigger = function(event) {
14648		var settings = this._core.settings;
14649
14650		event.page = {
14651			index: $.inArray(this.current(), this._pages),
14652			count: this._pages.length,
vendor: 7,284 bytes, lines 14653-14938
14653			size: settings && (settings.center || settings.autoWidth || settings.dotsData
14654				? 1 : settings.dotsEach || settings.items)
14655		};
14656	};
14657
14658	/**
14659	 * Gets the current page position of the carousel.
14660	 * @protected
14661	 * @returns {Number}
14662	 */
14663	Navigation.prototype.current = function() {
14664		var current = this._core.relative(this._core.current());
14665		return $.grep(this._pages, $.proxy(function(page, index) {
14666			return page.start <= current && page.end >= current;
14667		}, this)).pop();
14668	};
14669
14670	/**
14671	 * Gets the current succesor/predecessor position.
14672	 * @protected
14673	 * @returns {Number}
14674	 */
14675	Navigation.prototype.getPosition = function(successor) {
14676		var position, length,
14677			settings = this._core.settings;
14678
14679		if (settings.slideBy == 'page') {
14680			position = $.inArray(this.current(), this._pages);
14681			length = this._pages.length;
14682			successor ? ++position : --position;
14683			position = this._pages[((position % length) + length) % length].start;
14684		} else {
14685			position = this._core.relative(this._core.current());
14686			length = this._core.items().length;
14687			successor ? position += settings.slideBy : position -= settings.slideBy;
14688		}
14689
14690		return position;
14691	};
14692
14693	/**
14694	 * Slides to the next item or page.
14695	 * @public
14696	 * @param {Number} [speed=false] - The time in milliseconds for the transition.
14697	 */
14698	Navigation.prototype.next = function(speed) {
14699		$.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
14700	};
14701
14702	/**
14703	 * Slides to the previous item or page.
14704	 * @public
14705	 * @param {Number} [speed=false] - The time in milliseconds for the transition.
14706	 */
14707	Navigation.prototype.prev = function(speed) {
14708		$.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
14709	};
14710
14711	/**
14712	 * Slides to the specified item or page.
14713	 * @public
14714	 * @param {Number} position - The position of the item or page.
14715	 * @param {Number} [speed] - The time in milliseconds for the transition.
14716	 * @param {Boolean} [standard=false] - Whether to use the standard behaviour or not.
14717	 */
14718	Navigation.prototype.to = function(position, speed, standard) {
14719		var length;
14720
14721		if (!standard && this._pages.length) {
14722			length = this._pages.length;
14723			$.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
14724		} else {
14725			$.proxy(this._overrides.to, this._core)(position, speed);
14726		}
14727	};
14728
14729	$.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation;
14730
14731})(window.Zepto || window.jQuery, window, document);
14732
14733/**
14734 * Hash Plugin
14735 * @version 2.3.4
14736 * @author Artus Kolanowski
14737 * @author David Deutsch
14738 * @license The MIT License (MIT)
14739 */
14740;(function($, window, document, undefined) {
14741	'use strict';
14742
14743	/**
14744	 * Creates the hash plugin.
14745	 * @class The Hash Plugin
14746	 * @param {Owl} carousel - The Owl Carousel
14747	 */
14748	var Hash = function(carousel) {
14749		/**
14750		 * Reference to the core.
14751		 * @protected
14752		 * @type {Owl}
14753		 */
14754		this._core = carousel;
14755
14756		/**
14757		 * Hash index for the items.
14758		 * @protected
14759		 * @type {Object}
14760		 */
14761		this._hashes = {};
14762
14763		/**
14764		 * The carousel element.
14765		 * @type {jQuery}
14766		 */
14767		this.$element = this._core.$element;
14768
14769		/**
14770		 * All event handlers.
14771		 * @protected
14772		 * @type {Object}
14773		 */
14774		this._handlers = {
14775			'initialized.owl.carousel': $.proxy(function(e) {
14776				if (e.namespace && this._core.settings.startPosition === 'URLHash') {
14777					$(window).trigger('hashchange.owl.navigation');
14778				}
14779			}, this),
14780			'prepared.owl.carousel': $.proxy(function(e) {
14781				if (e.namespace) {
14782					var hash = $(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash');
14783
14784					if (!hash) {
14785						return;
14786					}
14787
14788					this._hashes[hash] = e.content;
14789				}
14790			}, this),
14791			'changed.owl.carousel': $.proxy(function(e) {
14792				if (e.namespace && e.property.name === 'position') {
14793					var current = this._core.items(this._core.relative(this._core.current())),
14794						hash = $.map(this._hashes, function(item, hash) {
14795							return item === current ? hash : null;
14796						}).join();
14797
14798					if (!hash || window.location.hash.slice(1) === hash) {
14799						return;
14800					}
14801
14802					window.location.hash = hash;
14803				}
14804			}, this)
14805		};
14806
14807		// set default options
14808		this._core.options = $.extend({}, Hash.Defaults, this._core.options);
14809
14810		// register the event handlers
14811		this.$element.on(this._handlers);
14812
14813		// register event listener for hash navigation
14814		$(window).on('hashchange.owl.navigation', $.proxy(function(e) {
14815			var hash = window.location.hash.substring(1),
14816				items = this._core.$stage.children(),
14817				position = this._hashes[hash] && items.index(this._hashes[hash]);
14818
14819			if (position === undefined || position === this._core.current()) {
14820				return;
14821			}
14822
14823			this._core.to(this._core.relative(position), false, true);
14824		}, this));
14825	};
14826
14827	/**
14828	 * Default options.
14829	 * @public
14830	 */
14831	Hash.Defaults = {
14832		URLhashListener: false
14833	};
14834
14835	/**
14836	 * Destroys the plugin.
14837	 * @public
14838	 */
14839	Hash.prototype.destroy = function() {
14840		var handler, property;
14841
14842		$(window).off('hashchange.owl.navigation');
14843
14844		for (handler in this._handlers) {
14845			this._core.$element.off(handler, this._handlers[handler]);
14846		}
14847		for (property in Object.getOwnPropertyNames(this)) {
14848			typeof this[property] != 'function' && (this[property] = null);
14849		}
14850	};
14851
14852	$.fn.owlCarousel.Constructor.Plugins.Hash = Hash;
14853
14854})(window.Zepto || window.jQuery, window, document);
14855
14856/**
14857 * Support Plugin
14858 *
14859 * @version 2.3.4
14860 * @author Vivid Planet Software GmbH
14861 * @author Artus Kolanowski
14862 * @author David Deutsch
14863 * @license The MIT License (MIT)
14864 */
14865;(function($, window, document, undefined) {
14866
14867	var style = $('<support>').get(0).style,
14868		prefixes = 'Webkit Moz O ms'.split(' '),
14869		events = {
14870			transition: {
14871				end: {
14872					WebkitTransition: 'webkitTransitionEnd',
14873					MozTransition: 'transitionend',
14874					OTransition: 'oTransitionEnd',
14875					transition: 'transitionend'
14876				}
14877			},
14878			animation: {
14879				end: {
14880					WebkitAnimation: 'webkitAnimationEnd',
14881					MozAnimation: 'animationend',
14882					OAnimation: 'oAnimationEnd',
14883					animation: 'animationend'
14884				}
14885			}
14886		},
14887		tests = {
14888			csstransforms: function() {
14889				return !!test('transform');
14890			},
14891			csstransforms3d: function() {
14892				return !!test('perspective');
14893			},
14894			csstransitions: function() {
14895				return !!test('transition');
14896			},
14897			cssanimations: function() {
14898				return !!test('animation');
14899			}
14900		};
14901
14902	function test(property, prefixed) {
14903		var result = false,
14904			upper = property.charAt(0).toUpperCase() + property.slice(1);
14905
14906		$.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) {
14907			if (style[property] !== undefined) {
14908				result = prefixed ? property : true;
14909				return false;
14910			}
14911		});
14912
14913		return result;
14914	}
14915
14916	function prefixed(property) {
14917		return test(property, true);
14918	}
14919
14920	if (tests.csstransitions()) {
14921		/* jshint -W053 */
14922		$.support.transition = new String(prefixed('transition'))
14923		$.support.transition.end = events.transition.end[ $.support.transition ];
14924	}
14925
14926	if (tests.cssanimations()) {
14927		/* jshint -W053 */
14928		$.support.animation = new String(prefixed('animation'))
14929		$.support.animation.end = events.animation.end[ $.support.animation ];
14930	}
14931
14932	if (tests.csstransforms()) {
14933		/* jshint -W053 */
14934		$.support.transform = new String(prefixed('transform'));
14935		$.support.transform3d = tests.csstransforms3d();
14936	}
14937
14938})(window.Zepto || window.jQuery, window, document);
14939
14940$(window).bind("load resize",function(e){
14941  $('a[href^="#"]').on('click', function (e) {
14942    var widthwin = $( window ).width();
14943    if(widthwin > 1000) var headerh = 55;
14944    else if (widthwin <= 1000 && widthwin >= 768) headerh = 55;
14945    else  headerh = 52;
14946    e.preventDefault();
14947    var target = this.hash, $target = $(target);
14948    if($target.length) {
14949      $('html, body').stop().animate({
14950        'scrollTop': $target.offset().top - headerh
14951      }, 300, 'swing', function () {});
14952    }
14953  });
14954});
14955$(window).bind("load",function(e){
14956  var widthwin = $( window ).width();
14957    if(widthwin > 1000) var headerh = 55;
14958    else if (widthwin <= 1000 && widthwin >= 768) headerh = 55;
14959    else headerh = 52;
14960  var str = location.hash;
14961  if(str != '' && $(str).length != 0) {
14962    var n = str.replace("_temp","");
14963    $('html,body').animate({scrollTop:$(n).offset().top - headerh}, 300);
14964  }
14965});
14966//= require ./bootstrap/transition
14967//= require ./bootstrap/alert
14968//= require ./bootstrap/button
14969//= require ./bootstrap/carousel
14970//= require ./bootstrap/collapse
14971//= require ./bootstrap/dropdown
14972//= require ./bootstrap/modal
14973//= require ./bootstrap/tab
14974//= require ./bootstrap/affix
14975//= require ./bootstrap/scrollspy
14976//= require ./bootstrap/tooltip
14977//= require ./bootstrap/popover
14978
vendor: 40,181 bytes, lines 14979-16353
14979/*!
14980 * Bootstrap v3.3.7 (http://getbootstrap.com)
14981 * Copyright 2011-2016 Twitter, Inc.
14982 * Licensed under the MIT license
14983 */
14984
14985if (typeof jQuery === 'undefined') {
14986  throw new Error('Bootstrap\'s JavaScript requires jQuery')
14987}
14988
14989+function ($) {
14990  'use strict';
14991  var version = $.fn.jquery.split(' ')[0].split('.')
14992  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
14993    throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
14994  }
14995}(jQuery);
14996
14997/* ========================================================================
14998 * Bootstrap: transition.js v3.3.7
14999 * http://getbootstrap.com/javascript/#transitions
15000 * ========================================================================
15001 * Copyright 2011-2016 Twitter, Inc.
15002 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
15003 * ======================================================================== */
15004
15005
15006+function ($) {
15007  'use strict';
15008
15009  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
15010  // ============================================================
15011
15012  function transitionEnd() {
15013    var el = document.createElement('bootstrap')
15014
15015    var transEndEventNames = {
15016      WebkitTransition : 'webkitTransitionEnd',
15017      MozTransition    : 'transitionend',
15018      OTransition      : 'oTransitionEnd otransitionend',
15019      transition       : 'transitionend'
15020    }
15021
15022    for (var name in transEndEventNames) {
15023      if (el.style[name] !== undefined) {
15024        return { end: transEndEventNames[name] }
15025      }
15026    }
15027
15028    return false // explicit for ie8 (  ._.)
15029  }
15030
15031  // http://blog.alexmaccaw.com/css-transitions
15032  $.fn.emulateTransitionEnd = function (duration) {
15033    var called = false
15034    var $el = this
15035    $(this).one('bsTransitionEnd', function () { called = true })
15036    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
15037    setTimeout(callback, duration)
15038    return this
15039  }
15040
15041  $(function () {
15042    $.support.transition = transitionEnd()
15043
15044    if (!$.support.transition) return
15045
15046    $.event.special.bsTransitionEnd = {
15047      bindType: $.support.transition.end,
15048      delegateType: $.support.transition.end,
15049      handle: function (e) {
15050        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
15051      }
15052    }
15053  })
15054
15055}(jQuery);
15056
15057/* ========================================================================
15058 * Bootstrap: alert.js v3.3.7
15059 * http://getbootstrap.com/javascript/#alerts
15060 * ========================================================================
15061 * Copyright 2011-2016 Twitter, Inc.
15062 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
15063 * ======================================================================== */
15064
15065
15066+function ($) {
15067  'use strict';
15068
15069  // ALERT CLASS DEFINITION
15070  // ======================
15071
15072  var dismiss = '[data-dismiss="alert"]'
15073  var Alert   = function (el) {
15074    $(el).on('click', dismiss, this.close)
15075  }
15076
15077  Alert.VERSION = '3.3.7'
15078
15079  Alert.TRANSITION_DURATION = 150
15080
15081  Alert.prototype.close = function (e) {
15082    var $this    = $(this)
15083    var selector = $this.attr('data-target')
15084
15085    if (!selector) {
15086      selector = $this.attr('href')
15087      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
15088    }
15089
15090    var $parent = $(selector === '#' ? [] : selector)
15091
15092    if (e) e.preventDefault()
15093
15094    if (!$parent.length) {
15095      $parent = $this.closest('.alert')
15096    }
15097
15098    $parent.trigger(e = $.Event('close.bs.alert'))
15099
15100    if (e.isDefaultPrevented()) return
15101
15102    $parent.removeClass('in')
15103
15104    function removeElement() {
15105      // detach from parent, fire event then clean up data
15106      $parent.detach().trigger('closed.bs.alert').remove()
15107    }
15108
15109    $.support.transition && $parent.hasClass('fade') ?
15110      $parent
15111        .one('bsTransitionEnd', removeElement)
15112        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
15113      removeElement()
15114  }
15115
15116
15117  // ALERT PLUGIN DEFINITION
15118  // =======================
15119
15120  function Plugin(option) {
15121    return this.each(function () {
15122      var $this = $(this)
15123      var data  = $this.data('bs.alert')
15124
15125      if (!data) $this.data('bs.alert', (data = new Alert(this)))
15126      if (typeof option == 'string') data[option].call($this)
15127    })
15128  }
15129
15130  var old = $.fn.alert
15131
15132  $.fn.alert             = Plugin
15133  $.fn.alert.Constructor = Alert
15134
15135
15136  // ALERT NO CONFLICT
15137  // =================
15138
15139  $.fn.alert.noConflict = function () {
15140    $.fn.alert = old
15141    return this
15142  }
15143
15144
15145  // ALERT DATA-API
15146  // ==============
15147
15148  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
15149
15150}(jQuery);
15151
15152/* ========================================================================
15153 * Bootstrap: button.js v3.3.7
15154 * http://getbootstrap.com/javascript/#buttons
15155 * ========================================================================
15156 * Copyright 2011-2016 Twitter, Inc.
15157 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
15158 * ======================================================================== */
15159
15160
15161+function ($) {
15162  'use strict';
15163
15164  // BUTTON PUBLIC CLASS DEFINITION
15165  // ==============================
15166
15167  var Button = function (element, options) {
15168    this.$element  = $(element)
15169    this.options   = $.extend({}, Button.DEFAULTS, options)
15170    this.isLoading = false
15171  }
15172
15173  Button.VERSION  = '3.3.7'
15174
15175  Button.DEFAULTS = {
15176    loadingText: 'loading...'
15177  }
15178
15179  Button.prototype.setState = function (state) {
15180    var d    = 'disabled'
15181    var $el  = this.$element
15182    var val  = $el.is('input') ? 'val' : 'html'
15183    var data = $el.data()
15184
15185    state += 'Text'
15186
15187    if (data.resetText == null) $el.data('resetText', $el[val]())
15188
15189    // push to event loop to allow forms to submit
15190    setTimeout($.proxy(function () {
15191      $el[val](data[state] == null ? this.options[state] : data[state])
15192
15193      if (state == 'loadingText') {
15194        this.isLoading = true
15195        $el.addClass(d).attr(d, d).prop(d, true)
15196      } else if (this.isLoading) {
15197        this.isLoading = false
15198        $el.removeClass(d).removeAttr(d).prop(d, false)
15199      }
15200    }, this), 0)
15201  }
15202
15203  Button.prototype.toggle = function () {
15204    var changed = true
15205    var $parent = this.$element.closest('[data-toggle="buttons"]')
15206
15207    if ($parent.length) {
15208      var $input = this.$element.find('input')
15209      if ($input.prop('type') == 'radio') {
15210        if ($input.prop('checked')) changed = false
15211        $parent.find('.active').removeClass('active')
15212        this.$element.addClass('active')
15213      } else if ($input.prop('type') == 'checkbox') {
15214        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
15215        this.$element.toggleClass('active')
15216      }
15217      $input.prop('checked', this.$element.hasClass('active'))
15218      if (changed) $input.trigger('change')
15219    } else {
15220      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
15221      this.$element.toggleClass('active')
15222    }
15223  }
15224
15225
15226  // BUTTON PLUGIN DEFINITION
15227  // ========================
15228
15229  function Plugin(option) {
15230    return this.each(function () {
15231      var $this   = $(this)
15232      var data    = $this.data('bs.button')
15233      var options = typeof option == 'object' && option
15234
15235      if (!data) $this.data('bs.button', (data = new Button(this, options)))
15236
15237      if (option == 'toggle') data.toggle()
15238      else if (option) data.setState(option)
15239    })
15240  }
15241
15242  var old = $.fn.button
15243
15244  $.fn.button             = Plugin
15245  $.fn.button.Constructor = Button
15246
15247
15248  // BUTTON NO CONFLICT
15249  // ==================
15250
15251  $.fn.button.noConflict = function () {
15252    $.fn.button = old
15253    return this
15254  }
15255
15256
15257  // BUTTON DATA-API
15258  // ===============
15259
15260  $(document)
15261    .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
15262      var $btn = $(e.target).closest('.btn')
15263      Plugin.call($btn, 'toggle')
15264      if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
15265        // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
15266        e.preventDefault()
15267        // The target component still receive the focus
15268        if ($btn.is('input,button')) $btn.trigger('focus')
15269        else $btn.find('input:visible,button:visible').first().trigger('focus')
15270      }
15271    })
15272    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
15273      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
15274    })
15275
15276}(jQuery);
15277
15278/* ========================================================================
15279 * Bootstrap: carousel.js v3.3.7
15280 * http://getbootstrap.com/javascript/#carousel
15281 * ========================================================================
15282 * Copyright 2011-2016 Twitter, Inc.
15283 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
15284 * ======================================================================== */
15285
15286
15287+function ($) {
15288  'use strict';
15289
15290  // CAROUSEL CLASS DEFINITION
15291  // =========================
15292
15293  var Carousel = function (element, options) {
15294    this.$element    = $(element)
15295    this.$indicators = this.$element.find('.carousel-indicators')
15296    this.options     = options
15297    this.paused      = null
15298    this.sliding     = null
15299    this.interval    = null
15300    this.$active     = null
15301    this.$items      = null
15302
15303    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
15304
15305    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
15306      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
15307      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
15308  }
15309
15310  Carousel.VERSION  = '3.3.7'
15311
15312  Carousel.TRANSITION_DURATION = 600
15313
15314  Carousel.DEFAULTS = {
15315    interval: 5000,
15316    pause: 'hover',
15317    wrap: true,
15318    keyboard: true
15319  }
15320
15321  Carousel.prototype.keydown = function (e) {
15322    if (/input|textarea/i.test(e.target.tagName)) return
15323    switch (e.which) {
15324      case 37: this.prev(); break
15325      case 39: this.next(); break
15326      default: return
15327    }
15328
15329    e.preventDefault()
15330  }
15331
15332  Carousel.prototype.cycle = function (e) {
15333    e || (this.paused = false)
15334
15335    this.interval && clearInterval(this.interval)
15336
15337    this.options.interval
15338      && !this.paused
15339      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
15340
15341    return this
15342  }
15343
15344  Carousel.prototype.getItemIndex = function (item) {
15345    this.$items = item.parent().children('.item')
15346    return this.$items.index(item || this.$active)
15347  }
15348
15349  Carousel.prototype.getItemForDirection = function (direction, active) {
15350    var activeIndex = this.getItemIndex(active)
15351    var willWrap = (direction == 'prev' && activeIndex === 0)
15352                || (direction == 'next' && activeIndex == (this.$items.length - 1))
15353    if (willWrap && !this.options.wrap) return active
15354    var delta = direction == 'prev' ? -1 : 1
15355    var itemIndex = (activeIndex + delta) % this.$items.length
15356    return this.$items.eq(itemIndex)
15357  }
15358
15359  Carousel.prototype.to = function (pos) {
15360    var that        = this
15361    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
15362
15363    if (pos > (this.$items.length - 1) || pos < 0) return
15364
15365    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
15366    if (activeIndex == pos) return this.pause().cycle()
15367
15368    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
15369  }
15370
15371  Carousel.prototype.pause = function (e) {
15372    e || (this.paused = true)
15373
15374    if (this.$element.find('.next, .prev').length && $.support.transition) {
15375      this.$element.trigger($.support.transition.end)
15376      this.cycle(true)
15377    }
15378
15379    this.interval = clearInterval(this.interval)
15380
15381    return this
15382  }
15383
15384  Carousel.prototype.next = function () {
15385    if (this.sliding) return
15386    return this.slide('next')
15387  }
15388
15389  Carousel.prototype.prev = function () {
15390    if (this.sliding) return
15391    return this.slide('prev')
15392  }
15393
15394  Carousel.prototype.slide = function (type, next) {
15395    var $active   = this.$element.find('.item.active')
15396    var $next     = next || this.getItemForDirection(type, $active)
15397    var isCycling = this.interval
15398    var direction = type == 'next' ? 'left' : 'right'
15399    var that      = this
15400
15401    if ($next.hasClass('active')) return (this.sliding = false)
15402
15403    var relatedTarget = $next[0]
15404    var slideEvent = $.Event('slide.bs.carousel', {
15405      relatedTarget: relatedTarget,
15406      direction: direction
15407    })
15408    this.$element.trigger(slideEvent)
15409    if (slideEvent.isDefaultPrevented()) return
15410
15411    this.sliding = true
15412
15413    isCycling && this.pause()
15414
15415    if (this.$indicators.length) {
15416      this.$indicators.find('.active').removeClass('active')
15417      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
15418      $nextIndicator && $nextIndicator.addClass('active')
15419    }
15420
15421    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
15422    if ($.support.transition && this.$element.hasClass('slide')) {
15423      $next.addClass(type)
15424      $next[0].offsetWidth // force reflow
15425      $active.addClass(direction)
15426      $next.addClass(direction)
15427      $active
15428        .one('bsTransitionEnd', function () {
15429          $next.removeClass([type, direction].join(' ')).addClass('active')
15430          $active.removeClass(['active', direction].join(' '))
15431          that.sliding = false
15432          setTimeout(function () {
15433            that.$element.trigger(slidEvent)
15434          }, 0)
15435        })
15436        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
15437    } else {
15438      $active.removeClass('active')
15439      $next.addClass('active')
15440      this.sliding = false
15441      this.$element.trigger(slidEvent)
15442    }
15443
15444    isCycling && this.cycle()
15445
15446    return this
15447  }
15448
15449
15450  // CAROUSEL PLUGIN DEFINITION
15451  // ==========================
15452
15453  function Plugin(option) {
15454    return this.each(function () {
15455      var $this   = $(this)
15456      var data    = $this.data('bs.carousel')
15457      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
15458      var action  = typeof option == 'string' ? option : options.slide
15459
15460      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
15461      if (typeof option == 'number') data.to(option)
15462      else if (action) data[action]()
15463      else if (options.interval) data.pause().cycle()
15464    })
15465  }
15466
15467  var old = $.fn.carousel
15468
15469  $.fn.carousel             = Plugin
15470  $.fn.carousel.Constructor = Carousel
15471
15472
15473  // CAROUSEL NO CONFLICT
15474  // ====================
15475
15476  $.fn.carousel.noConflict = function () {
15477    $.fn.carousel = old
15478    return this
15479  }
15480
15481
15482  // CAROUSEL DATA-API
15483  // =================
15484
15485  var clickHandler = function (e) {
15486    var href
15487    var $this   = $(this)
15488    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
15489    if (!$target.hasClass('carousel')) return
15490    var options = $.extend({}, $target.data(), $this.data())
15491    var slideIndex = $this.attr('data-slide-to')
15492    if (slideIndex) options.interval = false
15493
15494    Plugin.call($target, options)
15495
15496    if (slideIndex) {
15497      $target.data('bs.carousel').to(slideIndex)
15498    }
15499
15500    e.preventDefault()
15501  }
15502
15503  $(document)
15504    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
15505    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
15506
15507  $(window).on('load', function () {
15508    $('[data-ride="carousel"]').each(function () {
15509      var $carousel = $(this)
15510      Plugin.call($carousel, $carousel.data())
15511    })
15512  })
15513
15514}(jQuery);
15515
15516/* ========================================================================
15517 * Bootstrap: collapse.js v3.3.7
15518 * http://getbootstrap.com/javascript/#collapse
15519 * ========================================================================
15520 * Copyright 2011-2016 Twitter, Inc.
15521 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
15522 * ======================================================================== */
15523
15524/* jshint latedef: false */
15525
15526+function ($) {
15527  'use strict';
15528
15529  // COLLAPSE PUBLIC CLASS DEFINITION
15530  // ================================
15531
15532  var Collapse = function (element, options) {
15533    this.$element      = $(element)
15534    this.options       = $.extend({}, Collapse.DEFAULTS, options)
15535    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
15536                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
15537    this.transitioning = null
15538
15539    if (this.options.parent) {
15540      this.$parent = this.getParent()
15541    } else {
15542      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
15543    }
15544
15545    if (this.options.toggle) this.toggle()
15546  }
15547
15548  Collapse.VERSION  = '3.3.7'
15549
15550  Collapse.TRANSITION_DURATION = 350
15551
15552  Collapse.DEFAULTS = {
15553    toggle: true
15554  }
15555
15556  Collapse.prototype.dimension = function () {
15557    var hasWidth = this.$element.hasClass('width')
15558    return hasWidth ? 'width' : 'height'
15559  }
15560
15561  Collapse.prototype.show = function () {
15562    if (this.transitioning || this.$element.hasClass('in')) return
15563
15564    var activesData
15565    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
15566
15567    if (actives && actives.length) {
15568      activesData = actives.data('bs.collapse')
15569      if (activesData && activesData.transitioning) return
15570    }
15571
15572    var startEvent = $.Event('show.bs.collapse')
15573    this.$element.trigger(startEvent)
15574    if (startEvent.isDefaultPrevented()) return
15575
15576    if (actives && actives.length) {
15577      Plugin.call(actives, 'hide')
15578      activesData || actives.data('bs.collapse', null)
15579    }
15580
15581    var dimension = this.dimension()
15582
15583    this.$element
15584      .removeClass('collapse')
15585      .addClass('collapsing')[dimension](0)
15586      .attr('aria-expanded', true)
15587
15588    this.$trigger
15589      .removeClass('collapsed')
15590      .attr('aria-expanded', true)
15591
15592    this.transitioning = 1
15593
15594    var complete = function () {
15595      this.$element
15596        .removeClass('collapsing')
15597        .addClass('collapse in')[dimension]('')
15598      this.transitioning = 0
15599      this.$element
15600        .trigger('shown.bs.collapse')
15601    }
15602
15603    if (!$.support.transition) return complete.call(this)
15604
15605    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
15606
15607    this.$element
15608      .one('bsTransitionEnd', $.proxy(complete, this))
15609      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
15610  }
15611
15612  Collapse.prototype.hide = function () {
15613    if (this.transitioning || !this.$element.hasClass('in')) return
15614
15615    var startEvent = $.Event('hide.bs.collapse')
15616    this.$element.trigger(startEvent)
15617    if (startEvent.isDefaultPrevented()) return
15618
15619    var dimension = this.dimension()
15620
15621    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
15622
15623    this.$element
15624      .addClass('collapsing')
15625      .removeClass('collapse in')
15626      .attr('aria-expanded', false)
15627
15628    this.$trigger
15629      .addClass('collapsed')
15630      .attr('aria-expanded', false)
15631
15632    this.transitioning = 1
15633
15634    var complete = function () {
15635      this.transitioning = 0
15636      this.$element
15637        .removeClass('collapsing')
15638        .addClass('collapse')
15639        .trigger('hidden.bs.collapse')
15640    }
15641
15642    if (!$.support.transition) return complete.call(this)
15643
15644    this.$element
15645      [dimension](0)
15646      .one('bsTransitionEnd', $.proxy(complete, this))
15647      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
15648  }
15649
15650  Collapse.prototype.toggle = function () {
15651    this[this.$element.hasClass('in') ? 'hide' : 'show']()
15652  }
15653
15654  Collapse.prototype.getParent = function () {
15655    return $(this.options.parent)
15656      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
15657      .each($.proxy(function (i, element) {
15658        var $element = $(element)
15659        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
15660      }, this))
15661      .end()
15662  }
15663
15664  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
15665    var isOpen = $element.hasClass('in')
15666
15667    $element.attr('aria-expanded', isOpen)
15668    $trigger
15669      .toggleClass('collapsed', !isOpen)
15670      .attr('aria-expanded', isOpen)
15671  }
15672
15673  function getTargetFromTrigger($trigger) {
15674    var href
15675    var target = $trigger.attr('data-target')
15676      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
15677
15678    return $(target)
15679  }
15680
15681
15682  // COLLAPSE PLUGIN DEFINITION
15683  // ==========================
15684
15685  function Plugin(option) {
15686    return this.each(function () {
15687      var $this   = $(this)
15688      var data    = $this.data('bs.collapse')
15689      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
15690
15691      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
15692      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
15693      if (typeof option == 'string') data[option]()
15694    })
15695  }
15696
15697  var old = $.fn.collapse
15698
15699  $.fn.collapse             = Plugin
15700  $.fn.collapse.Constructor = Collapse
15701
15702
15703  // COLLAPSE NO CONFLICT
15704  // ====================
15705
15706  $.fn.collapse.noConflict = function () {
15707    $.fn.collapse = old
15708    return this
15709  }
15710
15711
15712  // COLLAPSE DATA-API
15713  // =================
15714
15715  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
15716    var $this   = $(this)
15717
15718    if (!$this.attr('data-target')) e.preventDefault()
15719
15720    var $target = getTargetFromTrigger($this)
15721    var data    = $target.data('bs.collapse')
15722    var option  = data ? 'toggle' : $this.data()
15723
15724    Plugin.call($target, option)
15725  })
15726
15727}(jQuery);
15728
15729/* ========================================================================
15730 * Bootstrap: dropdown.js v3.3.7
15731 * http://getbootstrap.com/javascript/#dropdowns
15732 * ========================================================================
15733 * Copyright 2011-2016 Twitter, Inc.
15734 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
15735 * ======================================================================== */
15736
15737
15738+function ($) {
15739  'use strict';
15740
15741  // DROPDOWN CLASS DEFINITION
15742  // =========================
15743
15744  var backdrop = '.dropdown-backdrop'
15745  var toggle   = '[data-toggle="dropdown"]'
15746  var Dropdown = function (element) {
15747    $(element).on('click.bs.dropdown', this.toggle)
15748  }
15749
15750  Dropdown.VERSION = '3.3.7'
15751
15752  function getParent($this) {
15753    var selector = $this.attr('data-target')
15754
15755    if (!selector) {
15756      selector = $this.attr('href')
15757      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
15758    }
15759
15760    var $parent = selector && $(selector)
15761
15762    return $parent && $parent.length ? $parent : $this.parent()
15763  }
15764
15765  function clearMenus(e) {
15766    if (e && e.which === 3) return
15767    $(backdrop).remove()
15768    $(toggle).each(function () {
15769      var $this         = $(this)
15770      var $parent       = getParent($this)
15771      var relatedTarget = { relatedTarget: this }
15772
15773      if (!$parent.hasClass('open')) return
15774
15775      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
15776
15777      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
15778
15779      if (e.isDefaultPrevented()) return
15780
15781      $this.attr('aria-expanded', 'false')
15782      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
15783    })
15784  }
15785
15786  Dropdown.prototype.toggle = function (e) {
15787    var $this = $(this)
15788
15789    if ($this.is('.disabled, :disabled')) return
15790
15791    var $parent  = getParent($this)
15792    var isActive = $parent.hasClass('open')
15793
15794    clearMenus()
15795
15796    if (!isActive) {
15797      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
15798        // if mobile we use a backdrop because click events don't delegate
15799        $(document.createElement('div'))
15800          .addClass('dropdown-backdrop')
15801          .insertAfter($(this))
15802          .on('click', clearMenus)
15803      }
15804
15805      var relatedTarget = { relatedTarget: this }
15806      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
15807
15808      if (e.isDefaultPrevented()) return
15809
15810      $this
15811        .trigger('focus')
15812        .attr('aria-expanded', 'true')
15813
15814      $parent
15815        .toggleClass('open')
15816        .trigger($.Event('shown.bs.dropdown', relatedTarget))
15817    }
15818
15819    return false
15820  }
15821
15822  Dropdown.prototype.keydown = function (e) {
15823    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
15824
15825    var $this = $(this)
15826
15827    e.preventDefault()
15828    e.stopPropagation()
15829
15830    if ($this.is('.disabled, :disabled')) return
15831
15832    var $parent  = getParent($this)
15833    var isActive = $parent.hasClass('open')
15834
15835    if (!isActive && e.which != 27 || isActive && e.which == 27) {
15836      if (e.which == 27) $parent.find(toggle).trigger('focus')
15837      return $this.trigger('click')
15838    }
15839
15840    var desc = ' li:not(.disabled):visible a'
15841    var $items = $parent.find('.dropdown-menu' + desc)
15842
15843    if (!$items.length) return
15844
15845    var index = $items.index(e.target)
15846
15847    if (e.which == 38 && index > 0)                 index--         // up
15848    if (e.which == 40 && index < $items.length - 1) index++         // down
15849    if (!~index)                                    index = 0
15850
15851    $items.eq(index).trigger('focus')
15852  }
15853
15854
15855  // DROPDOWN PLUGIN DEFINITION
15856  // ==========================
15857
15858  function Plugin(option) {
15859    return this.each(function () {
15860      var $this = $(this)
15861      var data  = $this.data('bs.dropdown')
15862
15863      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
15864      if (typeof option == 'string') data[option].call($this)
15865    })
15866  }
15867
15868  var old = $.fn.dropdown
15869
15870  $.fn.dropdown             = Plugin
15871  $.fn.dropdown.Constructor = Dropdown
15872
15873
15874  // DROPDOWN NO CONFLICT
15875  // ====================
15876
15877  $.fn.dropdown.noConflict = function () {
15878    $.fn.dropdown = old
15879    return this
15880  }
15881
15882
15883  // APPLY TO STANDARD DROPDOWN ELEMENTS
15884  // ===================================
15885
15886  $(document)
15887    .on('click.bs.dropdown.data-api', clearMenus)
15888    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
15889    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
15890    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
15891    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
15892
15893}(jQuery);
15894
15895/* ========================================================================
15896 * Bootstrap: modal.js v3.3.7
15897 * http://getbootstrap.com/javascript/#modals
15898 * ========================================================================
15899 * Copyright 2011-2016 Twitter, Inc.
15900 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
15901 * ======================================================================== */
15902
15903
15904+function ($) {
15905  'use strict';
15906
15907  // MODAL CLASS DEFINITION
15908  // ======================
15909
15910  var Modal = function (element, options) {
15911    this.options             = options
15912    this.$body               = $(document.body)
15913    this.$element            = $(element)
15914    this.$dialog             = this.$element.find('.modal-dialog')
15915    this.$backdrop           = null
15916    this.isShown             = null
15917    this.originalBodyPad     = null
15918    this.scrollbarWidth      = 0
15919    this.ignoreBackdropClick = false
15920
15921    if (this.options.remote) {
15922      this.$element
15923        .find('.modal-content')
15924        .load(this.options.remote, $.proxy(function () {
15925          this.$element.trigger('loaded.bs.modal')
15926        }, this))
15927    }
15928  }
15929
15930  Modal.VERSION  = '3.3.7'
15931
15932  Modal.TRANSITION_DURATION = 300
15933  Modal.BACKDROP_TRANSITION_DURATION = 150
15934
15935  Modal.DEFAULTS = {
15936    backdrop: true,
15937    keyboard: true,
15938    show: true
15939  }
15940
15941  Modal.prototype.toggle = function (_relatedTarget) {
15942    return this.isShown ? this.hide() : this.show(_relatedTarget)
15943  }
15944
15945  Modal.prototype.show = function (_relatedTarget) {
15946    var that = this
15947    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
15948
15949    this.$element.trigger(e)
15950
15951    if (this.isShown || e.isDefaultPrevented()) return
15952
15953    this.isShown = true
15954
15955    this.checkScrollbar()
15956    this.setScrollbar()
15957    this.$body.addClass('modal-open')
15958
15959    this.escape()
15960    this.resize()
15961
15962    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
15963
15964    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
15965      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
15966        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
15967      })
15968    })
15969
15970    this.backdrop(function () {
15971      var transition = $.support.transition && that.$element.hasClass('fade')
15972
15973      if (!that.$element.parent().length) {
15974        that.$element.appendTo(that.$body) // don't move modals dom position
15975      }
15976
15977      that.$element
15978        .show()
15979        .scrollTop(0)
15980
15981      that.adjustDialog()
15982
15983      if (transition) {
15984        that.$element[0].offsetWidth // force reflow
15985      }
15986
15987      that.$element.addClass('in')
15988
15989      that.enforceFocus()
15990
15991      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
15992
15993      transition ?
15994        that.$dialog // wait for modal to slide in
15995          .one('bsTransitionEnd', function () {
15996            that.$element.trigger('focus').trigger(e)
15997          })
15998          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
15999        that.$element.trigger('focus').trigger(e)
16000    })
16001  }
16002
16003  Modal.prototype.hide = function (e) {
16004    if (e) e.preventDefault()
16005
16006    e = $.Event('hide.bs.modal')
16007
16008    this.$element.trigger(e)
16009
16010    if (!this.isShown || e.isDefaultPrevented()) return
16011
16012    this.isShown = false
16013
16014    this.escape()
16015    this.resize()
16016
16017    $(document).off('focusin.bs.modal')
16018
16019    this.$element
16020      .removeClass('in')
16021      .off('click.dismiss.bs.modal')
16022      .off('mouseup.dismiss.bs.modal')
16023
16024    this.$dialog.off('mousedown.dismiss.bs.modal')
16025
16026    $.support.transition && this.$element.hasClass('fade') ?
16027      this.$element
16028        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
16029        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
16030      this.hideModal()
16031  }
16032
16033  Modal.prototype.enforceFocus = function () {
16034    $(document)
16035      .off('focusin.bs.modal') // guard against infinite focus loop
16036      .on('focusin.bs.modal', $.proxy(function (e) {
16037        if (document !== e.target &&
16038            this.$element[0] !== e.target &&
16039            !this.$element.has(e.target).length) {
16040          this.$element.trigger('focus')
16041        }
16042      }, this))
16043  }
16044
16045  Modal.prototype.escape = function () {
16046    if (this.isShown && this.options.keyboard) {
16047      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
16048        e.which == 27 && this.hide()
16049      }, this))
16050    } else if (!this.isShown) {
16051      this.$element.off('keydown.dismiss.bs.modal')
16052    }
16053  }
16054
16055  Modal.prototype.resize = function () {
16056    if (this.isShown) {
16057      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
16058    } else {
16059      $(window).off('resize.bs.modal')
16060    }
16061  }
16062
16063  Modal.prototype.hideModal = function () {
16064    var that = this
16065    this.$element.hide()
16066    this.backdrop(function () {
16067      that.$body.removeClass('modal-open')
16068      that.resetAdjustments()
16069      that.resetScrollbar()
16070      that.$element.trigger('hidden.bs.modal')
16071    })
16072  }
16073
16074  Modal.prototype.removeBackdrop = function () {
16075    this.$backdrop && this.$backdrop.remove()
16076    this.$backdrop = null
16077  }
16078
16079  Modal.prototype.backdrop = function (callback) {
16080    var that = this
16081    var animate = this.$element.hasClass('fade') ? 'fade' : ''
16082
16083    if (this.isShown && this.options.backdrop) {
16084      var doAnimate = $.support.transition && animate
16085
16086      this.$backdrop = $(document.createElement('div'))
16087        .addClass('modal-backdrop ' + animate)
16088        .appendTo(this.$body)
16089
16090      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
16091        if (this.ignoreBackdropClick) {
16092          this.ignoreBackdropClick = false
16093          return
16094        }
16095        if (e.target !== e.currentTarget) return
16096        this.options.backdrop == 'static'
16097          ? this.$element[0].focus()
16098          : this.hide()
16099      }, this))
16100
16101      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
16102
16103      this.$backdrop.addClass('in')
16104
16105      if (!callback) return
16106
16107      doAnimate ?
16108        this.$backdrop
16109          .one('bsTransitionEnd', callback)
16110          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
16111        callback()
16112
16113    } else if (!this.isShown && this.$backdrop) {
16114      this.$backdrop.removeClass('in')
16115
16116      var callbackRemove = function () {
16117        that.removeBackdrop()
16118        callback && callback()
16119      }
16120      $.support.transition && this.$element.hasClass('fade') ?
16121        this.$backdrop
16122          .one('bsTransitionEnd', callbackRemove)
16123          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
16124        callbackRemove()
16125
16126    } else if (callback) {
16127      callback()
16128    }
16129  }
16130
16131  // these following methods are used to handle overflowing modals
16132
16133  Modal.prototype.handleUpdate = function () {
16134    this.adjustDialog()
16135  }
16136
16137  Modal.prototype.adjustDialog = function () {
16138    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
16139
16140    this.$element.css({
16141      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
16142      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
16143    })
16144  }
16145
16146  Modal.prototype.resetAdjustments = function () {
16147    this.$element.css({
16148      paddingLeft: '',
16149      paddingRight: ''
16150    })
16151  }
16152
16153  Modal.prototype.checkScrollbar = function () {
16154    var fullWindowWidth = window.innerWidth
16155    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
16156      var documentElementRect = document.documentElement.getBoundingClientRect()
16157      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
16158    }
16159    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
16160    this.scrollbarWidth = this.measureScrollbar()
16161  }
16162
16163  Modal.prototype.setScrollbar = function () {
16164    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
16165    this.originalBodyPad = document.body.style.paddingRight || ''
16166    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
16167  }
16168
16169  Modal.prototype.resetScrollbar = function () {
16170    this.$body.css('padding-right', this.originalBodyPad)
16171  }
16172
16173  Modal.prototype.measureScrollbar = function () { // thx walsh
16174    var scrollDiv = document.createElement('div')
16175    scrollDiv.className = 'modal-scrollbar-measure'
16176    this.$body.append(scrollDiv)
16177    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
16178    this.$body[0].removeChild(scrollDiv)
16179    return scrollbarWidth
16180  }
16181
16182
16183  // MODAL PLUGIN DEFINITION
16184  // =======================
16185
16186  function Plugin(option, _relatedTarget) {
16187    return this.each(function () {
16188      var $this   = $(this)
16189      var data    = $this.data('bs.modal')
16190      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
16191
16192      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
16193      if (typeof option == 'string') data[option](_relatedTarget)
16194      else if (options.show) data.show(_relatedTarget)
16195    })
16196  }
16197
16198  var old = $.fn.modal
16199
16200  $.fn.modal             = Plugin
16201  $.fn.modal.Constructor = Modal
16202
16203
16204  // MODAL NO CONFLICT
16205  // =================
16206
16207  $.fn.modal.noConflict = function () {
16208    $.fn.modal = old
16209    return this
16210  }
16211
16212
16213  // MODAL DATA-API
16214  // ==============
16215
16216  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
16217    var $this   = $(this)
16218    var href    = $this.attr('href')
16219    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
16220    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
16221
16222    if ($this.is('a')) e.preventDefault()
16223
16224    $target.one('show.bs.modal', function (showEvent) {
16225      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
16226      $target.one('hidden.bs.modal', function () {
16227        $this.is(':visible') && $this.trigger('focus')
16228      })
16229    })
16230    Plugin.call($target, option, this)
16231  })
16232
16233}(jQuery);
16234
16235/* ========================================================================
16236 * Bootstrap: tooltip.js v3.3.7
16237 * http://getbootstrap.com/javascript/#tooltip
16238 * Inspired by the original jQuery.tipsy by Jason Frame
16239 * ========================================================================
16240 * Copyright 2011-2016 Twitter, Inc.
16241 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
16242 * ======================================================================== */
16243
16244
16245+function ($) {
16246  'use strict';
16247
16248  // TOOLTIP PUBLIC CLASS DEFINITION
16249  // ===============================
16250
16251  var Tooltip = function (element, options) {
16252    this.type       = null
16253    this.options    = null
16254    this.enabled    = null
16255    this.timeout    = null
16256    this.hoverState = null
16257    this.$element   = null
16258    this.inState    = null
16259
16260    this.init('tooltip', element, options)
16261  }
16262
16263  Tooltip.VERSION  = '3.3.7'
16264
16265  Tooltip.TRANSITION_DURATION = 150
16266
16267  Tooltip.DEFAULTS = {
16268    animation: true,
16269    placement: 'top',
16270    selector: false,
16271    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
16272    trigger: 'hover focus',
16273    title: '',
16274    delay: 0,
16275    html: false,
16276    container: false,
16277    viewport: {
16278      selector: 'body',
16279      padding: 0
16280    }
16281  }
16282
16283  Tooltip.prototype.init = function (type, element, options) {
16284    this.enabled   = true
16285    this.type      = type
16286    this.$element  = $(element)
16287    this.options   = this.getOptions(options)
16288    this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
16289    this.inState   = { click: false, hover: false, focus: false }
16290
16291    if (this.$element[0] instanceof document.constructor && !this.options.selector) {
16292      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
16293    }
16294
16295    var triggers = this.options.trigger.split(' ')
16296
16297    for (var i = triggers.length; i--;) {
16298      var trigger = triggers[i]
16299
16300      if (trigger == 'click') {
16301        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
16302      } else if (trigger != 'manual') {
16303        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
16304        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
16305
16306        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
16307        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
16308      }
16309    }
16310
16311    this.options.selector ?
16312      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
16313      this.fixTitle()
16314  }
16315
16316  Tooltip.prototype.getDefaults = function () {
16317    return Tooltip.DEFAULTS
16318  }
16319
16320  Tooltip.prototype.getOptions = function (options) {
16321    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
16322
16323    if (options.delay && typeof options.delay == 'number') {
16324      options.delay = {
16325        show: options.delay,
16326        hide: options.delay
16327      }
16328    }
16329
16330    return options
16331  }
16332
16333  Tooltip.prototype.getDelegateOptions = function () {
16334    var options  = {}
16335    var defaults = this.getDefaults()
16336
16337    this._options && $.each(this._options, function (key, value) {
16338      if (defaults[key] != value) options[key] = value
16339    })
16340
16341    return options
16342  }
16343
16344  Tooltip.prototype.enter = function (obj) {
16345    var self = obj instanceof this.constructor ?
16346      obj : $(obj.currentTarget).data('bs.' + this.type)
16347
16348    if (!self) {
16349      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
16350      $(obj.currentTarget).data('bs.' + this.type, self)
16351    }
16352
16353    if (obj instanceof $.Event) {
vendor: 9,753 bytes, lines 16354-16632
16354      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
16355    }
16356
16357    if (self.tip().hasClass('in') || self.hoverState == 'in') {
16358      self.hoverState = 'in'
16359      return
16360    }
16361
16362    clearTimeout(self.timeout)
16363
16364    self.hoverState = 'in'
16365
16366    if (!self.options.delay || !self.options.delay.show) return self.show()
16367
16368    self.timeout = setTimeout(function () {
16369      if (self.hoverState == 'in') self.show()
16370    }, self.options.delay.show)
16371  }
16372
16373  Tooltip.prototype.isInStateTrue = function () {
16374    for (var key in this.inState) {
16375      if (this.inState[key]) return true
16376    }
16377
16378    return false
16379  }
16380
16381  Tooltip.prototype.leave = function (obj) {
16382    var self = obj instanceof this.constructor ?
16383      obj : $(obj.currentTarget).data('bs.' + this.type)
16384
16385    if (!self) {
16386      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
16387      $(obj.currentTarget).data('bs.' + this.type, self)
16388    }
16389
16390    if (obj instanceof $.Event) {
16391      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
16392    }
16393
16394    if (self.isInStateTrue()) return
16395
16396    clearTimeout(self.timeout)
16397
16398    self.hoverState = 'out'
16399
16400    if (!self.options.delay || !self.options.delay.hide) return self.hide()
16401
16402    self.timeout = setTimeout(function () {
16403      if (self.hoverState == 'out') self.hide()
16404    }, self.options.delay.hide)
16405  }
16406
16407  Tooltip.prototype.show = function () {
16408    var e = $.Event('show.bs.' + this.type)
16409
16410    if (this.hasContent() && this.enabled) {
16411      this.$element.trigger(e)
16412
16413      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
16414      if (e.isDefaultPrevented() || !inDom) return
16415      var that = this
16416
16417      var $tip = this.tip()
16418
16419      var tipId = this.getUID(this.type)
16420
16421      this.setContent()
16422      $tip.attr('id', tipId)
16423      this.$element.attr('aria-describedby', tipId)
16424
16425      if (this.options.animation) $tip.addClass('fade')
16426
16427      var placement = typeof this.options.placement == 'function' ?
16428        this.options.placement.call(this, $tip[0], this.$element[0]) :
16429        this.options.placement
16430
16431      var autoToken = /\s?auto?\s?/i
16432      var autoPlace = autoToken.test(placement)
16433      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
16434
16435      $tip
16436        .detach()
16437        .css({ top: 0, left: 0, display: 'block' })
16438        .addClass(placement)
16439        .data('bs.' + this.type, this)
16440
16441      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
16442      this.$element.trigger('inserted.bs.' + this.type)
16443
16444      var pos          = this.getPosition()
16445      var actualWidth  = $tip[0].offsetWidth
16446      var actualHeight = $tip[0].offsetHeight
16447
16448      if (autoPlace) {
16449        var orgPlacement = placement
16450        var viewportDim = this.getPosition(this.$viewport)
16451
16452        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :
16453                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :
16454                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :
16455                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :
16456                    placement
16457
16458        $tip
16459          .removeClass(orgPlacement)
16460          .addClass(placement)
16461      }
16462
16463      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
16464
16465      this.applyPlacement(calculatedOffset, placement)
16466
16467      var complete = function () {
16468        var prevHoverState = that.hoverState
16469        that.$element.trigger('shown.bs.' + that.type)
16470        that.hoverState = null
16471
16472        if (prevHoverState == 'out') that.leave(that)
16473      }
16474
16475      $.support.transition && this.$tip.hasClass('fade') ?
16476        $tip
16477          .one('bsTransitionEnd', complete)
16478          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
16479        complete()
16480    }
16481  }
16482
16483  Tooltip.prototype.applyPlacement = function (offset, placement) {
16484    var $tip   = this.tip()
16485    var width  = $tip[0].offsetWidth
16486    var height = $tip[0].offsetHeight
16487
16488    // manually read margins because getBoundingClientRect includes difference
16489    var marginTop = parseInt($tip.css('margin-top'), 10)
16490    var marginLeft = parseInt($tip.css('margin-left'), 10)
16491
16492    // we must check for NaN for ie 8/9
16493    if (isNaN(marginTop))  marginTop  = 0
16494    if (isNaN(marginLeft)) marginLeft = 0
16495
16496    offset.top  += marginTop
16497    offset.left += marginLeft
16498
16499    // $.fn.offset doesn't round pixel values
16500    // so we use setOffset directly with our own function B-0
16501    $.offset.setOffset($tip[0], $.extend({
16502      using: function (props) {
16503        $tip.css({
16504          top: Math.round(props.top),
16505          left: Math.round(props.left)
16506        })
16507      }
16508    }, offset), 0)
16509
16510    $tip.addClass('in')
16511
16512    // check to see if placing tip in new offset caused the tip to resize itself
16513    var actualWidth  = $tip[0].offsetWidth
16514    var actualHeight = $tip[0].offsetHeight
16515
16516    if (placement == 'top' && actualHeight != height) {
16517      offset.top = offset.top + height - actualHeight
16518    }
16519
16520    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
16521
16522    if (delta.left) offset.left += delta.left
16523    else offset.top += delta.top
16524
16525    var isVertical          = /top|bottom/.test(placement)
16526    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
16527    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
16528
16529    $tip.offset(offset)
16530    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
16531  }
16532
16533  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
16534    this.arrow()
16535      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
16536      .css(isVertical ? 'top' : 'left', '')
16537  }
16538
16539  Tooltip.prototype.setContent = function () {
16540    var $tip  = this.tip()
16541    var title = this.getTitle()
16542
16543    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
16544    $tip.removeClass('fade in top bottom left right')
16545  }
16546
16547  Tooltip.prototype.hide = function (callback) {
16548    var that = this
16549    var $tip = $(this.$tip)
16550    var e    = $.Event('hide.bs.' + this.type)
16551
16552    function complete() {
16553      if (that.hoverState != 'in') $tip.detach()
16554      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
16555        that.$element
16556          .removeAttr('aria-describedby')
16557          .trigger('hidden.bs.' + that.type)
16558      }
16559      callback && callback()
16560    }
16561
16562    this.$element.trigger(e)
16563
16564    if (e.isDefaultPrevented()) return
16565
16566    $tip.removeClass('in')
16567
16568    $.support.transition && $tip.hasClass('fade') ?
16569      $tip
16570        .one('bsTransitionEnd', complete)
16571        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
16572      complete()
16573
16574    this.hoverState = null
16575
16576    return this
16577  }
16578
16579  Tooltip.prototype.fixTitle = function () {
16580    var $e = this.$element
16581    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
16582      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
16583    }
16584  }
16585
16586  Tooltip.prototype.hasContent = function () {
16587    return this.getTitle()
16588  }
16589
16590  Tooltip.prototype.getPosition = function ($element) {
16591    $element   = $element || this.$element
16592
16593    var el     = $element[0]
16594    var isBody = el.tagName == 'BODY'
16595
16596    var elRect    = el.getBoundingClientRect()
16597    if (elRect.width == null) {
16598      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
16599      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
16600    }
16601    var isSvg = window.SVGElement && el instanceof window.SVGElement
16602    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
16603    // See https://github.com/twbs/bootstrap/issues/20280
16604    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
16605    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
16606    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
16607
16608    return $.extend({}, elRect, scroll, outerDims, elOffset)
16609  }
16610
16611  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
16612    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :
16613           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
16614           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
16615        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
16616
16617  }
16618
16619  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
16620    var delta = { top: 0, left: 0 }
16621    if (!this.$viewport) return delta
16622
16623    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
16624    var viewportDimensions = this.getPosition(this.$viewport)
16625
16626    if (/right|left/.test(placement)) {
16627      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
16628      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
16629      if (topEdgeOffset < viewportDimensions.top) { // top overflow
16630        delta.top = viewportDimensions.top - topEdgeOffset
16631      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
16632        delta.top = viewportDimensions.top + viewportDimensions.height - bottom
vendor: 19,773 bytes, lines 16632-17355
16632EdgeOffset
16633      }
16634    } else {
16635      var leftEdgeOffset  = pos.left - viewportPadding
16636      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
16637      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
16638        delta.left = viewportDimensions.left - leftEdgeOffset
16639      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
16640        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
16641      }
16642    }
16643
16644    return delta
16645  }
16646
16647  Tooltip.prototype.getTitle = function () {
16648    var title
16649    var $e = this.$element
16650    var o  = this.options
16651
16652    title = $e.attr('data-original-title')
16653      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
16654
16655    return title
16656  }
16657
16658  Tooltip.prototype.getUID = function (prefix) {
16659    do prefix += ~~(Math.random() * 1000000)
16660    while (document.getElementById(prefix))
16661    return prefix
16662  }
16663
16664  Tooltip.prototype.tip = function () {
16665    if (!this.$tip) {
16666      this.$tip = $(this.options.template)
16667      if (this.$tip.length != 1) {
16668        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
16669      }
16670    }
16671    return this.$tip
16672  }
16673
16674  Tooltip.prototype.arrow = function () {
16675    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
16676  }
16677
16678  Tooltip.prototype.enable = function () {
16679    this.enabled = true
16680  }
16681
16682  Tooltip.prototype.disable = function () {
16683    this.enabled = false
16684  }
16685
16686  Tooltip.prototype.toggleEnabled = function () {
16687    this.enabled = !this.enabled
16688  }
16689
16690  Tooltip.prototype.toggle = function (e) {
16691    var self = this
16692    if (e) {
16693      self = $(e.currentTarget).data('bs.' + this.type)
16694      if (!self) {
16695        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
16696        $(e.currentTarget).data('bs.' + this.type, self)
16697      }
16698    }
16699
16700    if (e) {
16701      self.inState.click = !self.inState.click
16702      if (self.isInStateTrue()) self.enter(self)
16703      else self.leave(self)
16704    } else {
16705      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
16706    }
16707  }
16708
16709  Tooltip.prototype.destroy = function () {
16710    var that = this
16711    clearTimeout(this.timeout)
16712    this.hide(function () {
16713      that.$element.off('.' + that.type).removeData('bs.' + that.type)
16714      if (that.$tip) {
16715        that.$tip.detach()
16716      }
16717      that.$tip = null
16718      that.$arrow = null
16719      that.$viewport = null
16720      that.$element = null
16721    })
16722  }
16723
16724
16725  // TOOLTIP PLUGIN DEFINITION
16726  // =========================
16727
16728  function Plugin(option) {
16729    return this.each(function () {
16730      var $this   = $(this)
16731      var data    = $this.data('bs.tooltip')
16732      var options = typeof option == 'object' && option
16733
16734      if (!data && /destroy|hide/.test(option)) return
16735      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
16736      if (typeof option == 'string') data[option]()
16737    })
16738  }
16739
16740  var old = $.fn.tooltip
16741
16742  $.fn.tooltip             = Plugin
16743  $.fn.tooltip.Constructor = Tooltip
16744
16745
16746  // TOOLTIP NO CONFLICT
16747  // ===================
16748
16749  $.fn.tooltip.noConflict = function () {
16750    $.fn.tooltip = old
16751    return this
16752  }
16753
16754}(jQuery);
16755
16756/* ========================================================================
16757 * Bootstrap: popover.js v3.3.7
16758 * http://getbootstrap.com/javascript/#popovers
16759 * ========================================================================
16760 * Copyright 2011-2016 Twitter, Inc.
16761 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
16762 * ======================================================================== */
16763
16764
16765+function ($) {
16766  'use strict';
16767
16768  // POPOVER PUBLIC CLASS DEFINITION
16769  // ===============================
16770
16771  var Popover = function (element, options) {
16772    this.init('popover', element, options)
16773  }
16774
16775  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
16776
16777  Popover.VERSION  = '3.3.7'
16778
16779  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
16780    placement: 'right',
16781    trigger: 'click',
16782    content: '',
16783    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
16784  })
16785
16786
16787  // NOTE: POPOVER EXTENDS tooltip.js
16788  // ================================
16789
16790  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
16791
16792  Popover.prototype.constructor = Popover
16793
16794  Popover.prototype.getDefaults = function () {
16795    return Popover.DEFAULTS
16796  }
16797
16798  Popover.prototype.setContent = function () {
16799    var $tip    = this.tip()
16800    var title   = this.getTitle()
16801    var content = this.getContent()
16802
16803    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
16804    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
16805      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
16806    ](content)
16807
16808    $tip.removeClass('fade top bottom left right in')
16809
16810    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
16811    // this manually by checking the contents.
16812    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
16813  }
16814
16815  Popover.prototype.hasContent = function () {
16816    return this.getTitle() || this.getContent()
16817  }
16818
16819  Popover.prototype.getContent = function () {
16820    var $e = this.$element
16821    var o  = this.options
16822
16823    return $e.attr('data-content')
16824      || (typeof o.content == 'function' ?
16825            o.content.call($e[0]) :
16826            o.content)
16827  }
16828
16829  Popover.prototype.arrow = function () {
16830    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
16831  }
16832
16833
16834  // POPOVER PLUGIN DEFINITION
16835  // =========================
16836
16837  function Plugin(option) {
16838    return this.each(function () {
16839      var $this   = $(this)
16840      var data    = $this.data('bs.popover')
16841      var options = typeof option == 'object' && option
16842
16843      if (!data && /destroy|hide/.test(option)) return
16844      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
16845      if (typeof option == 'string') data[option]()
16846    })
16847  }
16848
16849  var old = $.fn.popover
16850
16851  $.fn.popover             = Plugin
16852  $.fn.popover.Constructor = Popover
16853
16854
16855  // POPOVER NO CONFLICT
16856  // ===================
16857
16858  $.fn.popover.noConflict = function () {
16859    $.fn.popover = old
16860    return this
16861  }
16862
16863}(jQuery);
16864
16865/* ========================================================================
16866 * Bootstrap: scrollspy.js v3.3.7
16867 * http://getbootstrap.com/javascript/#scrollspy
16868 * ========================================================================
16869 * Copyright 2011-2016 Twitter, Inc.
16870 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
16871 * ======================================================================== */
16872
16873
16874+function ($) {
16875  'use strict';
16876
16877  // SCROLLSPY CLASS DEFINITION
16878  // ==========================
16879
16880  function ScrollSpy(element, options) {
16881    this.$body          = $(document.body)
16882    this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
16883    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
16884    this.selector       = (this.options.target || '') + ' .nav li > a'
16885    this.offsets        = []
16886    this.targets        = []
16887    this.activeTarget   = null
16888    this.scrollHeight   = 0
16889
16890    this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
16891    this.refresh()
16892    this.process()
16893  }
16894
16895  ScrollSpy.VERSION  = '3.3.7'
16896
16897  ScrollSpy.DEFAULTS = {
16898    offset: 10
16899  }
16900
16901  ScrollSpy.prototype.getScrollHeight = function () {
16902    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
16903  }
16904
16905  ScrollSpy.prototype.refresh = function () {
16906    var that          = this
16907    var offsetMethod  = 'offset'
16908    var offsetBase    = 0
16909
16910    this.offsets      = []
16911    this.targets      = []
16912    this.scrollHeight = this.getScrollHeight()
16913
16914    if (!$.isWindow(this.$scrollElement[0])) {
16915      offsetMethod = 'position'
16916      offsetBase   = this.$scrollElement.scrollTop()
16917    }
16918
16919    this.$body
16920      .find(this.selector)
16921      .map(function () {
16922        var $el   = $(this)
16923        var href  = $el.data('target') || $el.attr('href')
16924        var $href = /^#./.test(href) && $(href)
16925
16926        return ($href
16927          && $href.length
16928          && $href.is(':visible')
16929          && [[$href[offsetMethod]().top + offsetBase, href]]) || null
16930      })
16931      .sort(function (a, b) { return a[0] - b[0] })
16932      .each(function () {
16933        that.offsets.push(this[0])
16934        that.targets.push(this[1])
16935      })
16936  }
16937
16938  ScrollSpy.prototype.process = function () {
16939    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
16940    var scrollHeight = this.getScrollHeight()
16941    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()
16942    var offsets      = this.offsets
16943    var targets      = this.targets
16944    var activeTarget = this.activeTarget
16945    var i
16946
16947    if (this.scrollHeight != scrollHeight) {
16948      this.refresh()
16949    }
16950
16951    if (scrollTop >= maxScroll) {
16952      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
16953    }
16954
16955    if (activeTarget && scrollTop < offsets[0]) {
16956      this.activeTarget = null
16957      return this.clear()
16958    }
16959
16960    for (i = offsets.length; i--;) {
16961      activeTarget != targets[i]
16962        && scrollTop >= offsets[i]
16963        && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
16964        && this.activate(targets[i])
16965    }
16966  }
16967
16968  ScrollSpy.prototype.activate = function (target) {
16969    this.activeTarget = target
16970
16971    this.clear()
16972
16973    var selector = this.selector +
16974      '[data-target="' + target + '"],' +
16975      this.selector + '[href="' + target + '"]'
16976
16977    var active = $(selector)
16978      .parents('li')
16979      .addClass('active')
16980
16981    if (active.parent('.dropdown-menu').length) {
16982      active = active
16983        .closest('li.dropdown')
16984        .addClass('active')
16985    }
16986
16987    active.trigger('activate.bs.scrollspy')
16988  }
16989
16990  ScrollSpy.prototype.clear = function () {
16991    $(this.selector)
16992      .parentsUntil(this.options.target, '.active')
16993      .removeClass('active')
16994  }
16995
16996
16997  // SCROLLSPY PLUGIN DEFINITION
16998  // ===========================
16999
17000  function Plugin(option) {
17001    return this.each(function () {
17002      var $this   = $(this)
17003      var data    = $this.data('bs.scrollspy')
17004      var options = typeof option == 'object' && option
17005
17006      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
17007      if (typeof option == 'string') data[option]()
17008    })
17009  }
17010
17011  var old = $.fn.scrollspy
17012
17013  $.fn.scrollspy             = Plugin
17014  $.fn.scrollspy.Constructor = ScrollSpy
17015
17016
17017  // SCROLLSPY NO CONFLICT
17018  // =====================
17019
17020  $.fn.scrollspy.noConflict = function () {
17021    $.fn.scrollspy = old
17022    return this
17023  }
17024
17025
17026  // SCROLLSPY DATA-API
17027  // ==================
17028
17029  $(window).on('load.bs.scrollspy.data-api', function () {
17030    $('[data-spy="scroll"]').each(function () {
17031      var $spy = $(this)
17032      Plugin.call($spy, $spy.data())
17033    })
17034  })
17035
17036}(jQuery);
17037
17038/* ========================================================================
17039 * Bootstrap: tab.js v3.3.7
17040 * http://getbootstrap.com/javascript/#tabs
17041 * ========================================================================
17042 * Copyright 2011-2016 Twitter, Inc.
17043 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
17044 * ======================================================================== */
17045
17046
17047+function ($) {
17048  'use strict';
17049
17050  // TAB CLASS DEFINITION
17051  // ====================
17052
17053  var Tab = function (element) {
17054    // jscs:disable requireDollarBeforejQueryAssignment
17055    this.element = $(element)
17056    // jscs:enable requireDollarBeforejQueryAssignment
17057  }
17058
17059  Tab.VERSION = '3.3.7'
17060
17061  Tab.TRANSITION_DURATION = 150
17062
17063  Tab.prototype.show = function () {
17064    var $this    = this.element
17065    var $ul      = $this.closest('ul:not(.dropdown-menu)')
17066    var selector = $this.data('target')
17067
17068    if (!selector) {
17069      selector = $this.attr('href')
17070      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
17071    }
17072
17073    if ($this.parent('li').hasClass('active')) return
17074
17075    var $previous = $ul.find('.active:last a')
17076    var hideEvent = $.Event('hide.bs.tab', {
17077      relatedTarget: $this[0]
17078    })
17079    var showEvent = $.Event('show.bs.tab', {
17080      relatedTarget: $previous[0]
17081    })
17082
17083    $previous.trigger(hideEvent)
17084    $this.trigger(showEvent)
17085
17086    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
17087
17088    var $target = $(selector)
17089
17090    this.activate($this.closest('li'), $ul)
17091    this.activate($target, $target.parent(), function () {
17092      $previous.trigger({
17093        type: 'hidden.bs.tab',
17094        relatedTarget: $this[0]
17095      })
17096      $this.trigger({
17097        type: 'shown.bs.tab',
17098        relatedTarget: $previous[0]
17099      })
17100    })
17101  }
17102
17103  Tab.prototype.activate = function (element, container, callback) {
17104    var $active    = container.find('> .active')
17105    var transition = callback
17106      && $.support.transition
17107      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
17108
17109    function next() {
17110      $active
17111        .removeClass('active')
17112        .find('> .dropdown-menu > .active')
17113          .removeClass('active')
17114        .end()
17115        .find('[data-toggle="tab"]')
17116          .attr('aria-expanded', false)
17117
17118      element
17119        .addClass('active')
17120        .find('[data-toggle="tab"]')
17121          .attr('aria-expanded', true)
17122
17123      if (transition) {
17124        element[0].offsetWidth // reflow for transition
17125        element.addClass('in')
17126      } else {
17127        element.removeClass('fade')
17128      }
17129
17130      if (element.parent('.dropdown-menu').length) {
17131        element
17132          .closest('li.dropdown')
17133            .addClass('active')
17134          .end()
17135          .find('[data-toggle="tab"]')
17136            .attr('aria-expanded', true)
17137      }
17138
17139      callback && callback()
17140    }
17141
17142    $active.length && transition ?
17143      $active
17144        .one('bsTransitionEnd', next)
17145        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
17146      next()
17147
17148    $active.removeClass('in')
17149  }
17150
17151
17152  // TAB PLUGIN DEFINITION
17153  // =====================
17154
17155  function Plugin(option) {
17156    return this.each(function () {
17157      var $this = $(this)
17158      var data  = $this.data('bs.tab')
17159
17160      if (!data) $this.data('bs.tab', (data = new Tab(this)))
17161      if (typeof option == 'string') data[option]()
17162    })
17163  }
17164
17165  var old = $.fn.tab
17166
17167  $.fn.tab             = Plugin
17168  $.fn.tab.Constructor = Tab
17169
17170
17171  // TAB NO CONFLICT
17172  // ===============
17173
17174  $.fn.tab.noConflict = function () {
17175    $.fn.tab = old
17176    return this
17177  }
17178
17179
17180  // TAB DATA-API
17181  // ============
17182
17183  var clickHandler = function (e) {
17184    e.preventDefault()
17185    Plugin.call($(this), 'show')
17186  }
17187
17188  $(document)
17189    .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
17190    .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
17191
17192}(jQuery);
17193
17194/* ========================================================================
17195 * Bootstrap: affix.js v3.3.7
17196 * http://getbootstrap.com/javascript/#affix
17197 * ========================================================================
17198 * Copyright 2011-2016 Twitter, Inc.
17199 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
17200 * ======================================================================== */
17201
17202
17203+function ($) {
17204  'use strict';
17205
17206  // AFFIX CLASS DEFINITION
17207  // ======================
17208
17209  var Affix = function (element, options) {
17210    this.options = $.extend({}, Affix.DEFAULTS, options)
17211
17212    this.$target = $(this.options.target)
17213      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
17214      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
17215
17216    this.$element     = $(element)
17217    this.affixed      = null
17218    this.unpin        = null
17219    this.pinnedOffset = null
17220
17221    this.checkPosition()
17222  }
17223
17224  Affix.VERSION  = '3.3.7'
17225
17226  Affix.RESET    = 'affix affix-top affix-bottom'
17227
17228  Affix.DEFAULTS = {
17229    offset: 0,
17230    target: window
17231  }
17232
17233  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
17234    var scrollTop    = this.$target.scrollTop()
17235    var position     = this.$element.offset()
17236    var targetHeight = this.$target.height()
17237
17238    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
17239
17240    if (this.affixed == 'bottom') {
17241      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
17242      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
17243    }
17244
17245    var initializing   = this.affixed == null
17246    var colliderTop    = initializing ? scrollTop : position.top
17247    var colliderHeight = initializing ? targetHeight : height
17248
17249    if (offsetTop != null && scrollTop <= offsetTop) return 'top'
17250    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
17251
17252    return false
17253  }
17254
17255  Affix.prototype.getPinnedOffset = function () {
17256    if (this.pinnedOffset) return this.pinnedOffset
17257    this.$element.removeClass(Affix.RESET).addClass('affix')
17258    var scrollTop = this.$target.scrollTop()
17259    var position  = this.$element.offset()
17260    return (this.pinnedOffset = position.top - scrollTop)
17261  }
17262
17263  Affix.prototype.checkPositionWithEventLoop = function () {
17264    setTimeout($.proxy(this.checkPosition, this), 1)
17265  }
17266
17267  Affix.prototype.checkPosition = function () {
17268    if (!this.$element.is(':visible')) return
17269
17270    var height       = this.$element.height()
17271    var offset       = this.options.offset
17272    var offsetTop    = offset.top
17273    var offsetBottom = offset.bottom
17274    var scrollHeight = Math.max($(document).height(), $(document.body).height())
17275
17276    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
17277    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
17278    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
17279
17280    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
17281
17282    if (this.affixed != affix) {
17283      if (this.unpin != null) this.$element.css('top', '')
17284
17285      var affixType = 'affix' + (affix ? '-' + affix : '')
17286      var e         = $.Event(affixType + '.bs.affix')
17287
17288      this.$element.trigger(e)
17289
17290      if (e.isDefaultPrevented()) return
17291
17292      this.affixed = affix
17293      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
17294
17295      this.$element
17296        .removeClass(Affix.RESET)
17297        .addClass(affixType)
17298        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
17299    }
17300
17301    if (affix == 'bottom') {
17302      this.$element.offset({
17303        top: scrollHeight - height - offsetBottom
17304      })
17305    }
17306  }
17307
17308
17309  // AFFIX PLUGIN DEFINITION
17310  // =======================
17311
17312  function Plugin(option) {
17313    return this.each(function () {
17314      var $this   = $(this)
17315      var data    = $this.data('bs.affix')
17316      var options = typeof option == 'object' && option
17317
17318      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
17319      if (typeof option == 'string') data[option]()
17320    })
17321  }
17322
17323  var old = $.fn.affix
17324
17325  $.fn.affix             = Plugin
17326  $.fn.affix.Constructor = Affix
17327
17328
17329  // AFFIX NO CONFLICT
17330  // =================
17331
17332  $.fn.affix.noConflict = function () {
17333    $.fn.affix = old
17334    return this
17335  }
17336
17337
17338  // AFFIX DATA-API
17339  // ==============
17340
17341  $(window).on('load', function () {
17342    $('[data-spy="affix"]').each(function () {
17343      var $spy = $(this)
17344      var data = $spy.data()
17345
17346      data.offset = data.offset || {}
17347
17348      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
17349      if (data.offsetTop    != null) data.offset.top    = data.offsetTop
17350
17351      Plugin.call($spy, data)
17352    })
17353  })
17354
17355}(jQuery);
17356
vendor: 37,045 bytes, lines 17357-17363
17357/*!
17358 * Bootstrap v3.3.7 (http://getbootstrap.com)
17359 * Copyright 2011-2016 Twitter, Inc.
17360 * Licensed under the MIT license
17361 */
17362if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){
17363this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
vendor: 3,058 bytes, lines 17363-17449
17363
17364/* ========================================================================
17365 * Bootstrap: affix.js v3.3.7
17366 * http://getbootstrap.com/javascript/#affix
17367 * ========================================================================
17368 * Copyright 2011-2016 Twitter, Inc.
17369 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
17370 * ======================================================================== */
17371
17372
17373+function ($) {
17374  'use strict';
17375
17376  // AFFIX CLASS DEFINITION
17377  // ======================
17378
17379  var Affix = function (element, options) {
17380    this.options = $.extend({}, Affix.DEFAULTS, options)
17381
17382    this.$target = $(this.options.target)
17383      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
17384      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
17385
17386    this.$element     = $(element)
17387    this.affixed      = null
17388    this.unpin        = null
17389    this.pinnedOffset = null
17390
17391    this.checkPosition()
17392  }
17393
17394  Affix.VERSION  = '3.3.7'
17395
17396  Affix.RESET    = 'affix affix-top affix-bottom'
17397
17398  Affix.DEFAULTS = {
17399    offset: 0,
17400    target: window
17401  }
17402
17403  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
17404    var scrollTop    = this.$target.scrollTop()
17405    var position     = this.$element.offset()
17406    var targetHeight = this.$target.height()
17407
17408    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
17409
17410    if (this.affixed == 'bottom') {
17411      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
17412      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
17413    }
17414
17415    var initializing   = this.affixed == null
17416    var colliderTop    = initializing ? scrollTop : position.top
17417    var colliderHeight = initializing ? targetHeight : height
17418
17419    if (offsetTop != null && scrollTop <= offsetTop) return 'top'
17420    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
17421
17422    return false
17423  }
17424
17425  Affix.prototype.getPinnedOffset = function () {
17426    if (this.pinnedOffset) return this.pinnedOffset
17427    this.$element.removeClass(Affix.RESET).addClass('affix')
17428    var scrollTop = this.$target.scrollTop()
17429    var position  = this.$element.offset()
17430    return (this.pinnedOffset = position.top - scrollTop)
17431  }
17432
17433  Affix.prototype.checkPositionWithEventLoop = function () {
17434    setTimeout($.proxy(this.checkPosition, this), 1)
17435  }
17436
17437  Affix.prototype.checkPosition = function () {
17438    if (!this.$element.is(':visible')) return
17439
17440    var height       = this.$element.height()
17441    var offset       = this.options.offset
17442    var offsetTop    = offset.top
17443    var offsetBottom = offset.bottom
17444    var scrollHeight = Math.max($(document).height(), $(document.body).height())
17445
17446    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
17447    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
17448    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
17449
vendor: 1,763 bytes, lines 17450-17522
17450    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
17451
17452    if (this.affixed != affix) {
17453      if (this.unpin != null) this.$element.css('top', '')
17454
17455      var affixType = 'affix' + (affix ? '-' + affix : '')
17456      var e         = $.Event(affixType + '.bs.affix')
17457
17458      this.$element.trigger(e)
17459
17460      if (e.isDefaultPrevented()) return
17461
17462      this.affixed = affix
17463      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
17464
17465      this.$element
17466        .removeClass(Affix.RESET)
17467        .addClass(affixType)
17468        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
17469    }
17470
17471    if (affix == 'bottom') {
17472      this.$element.offset({
17473        top: scrollHeight - height - offsetBottom
17474      })
17475    }
17476  }
17477
17478
17479  // AFFIX PLUGIN DEFINITION
17480  // =======================
17481
17482  function Plugin(option) {
17483    return this.each(function () {
17484      var $this   = $(this)
17485      var data    = $this.data('bs.affix')
17486      var options = typeof option == 'object' && option
17487
17488      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
17489      if (typeof option == 'string') data[option]()
17490    })
17491  }
17492
17493  var old = $.fn.affix
17494
17495  $.fn.affix             = Plugin
17496  $.fn.affix.Constructor = Affix
17497
17498
17499  // AFFIX NO CONFLICT
17500  // =================
17501
17502  $.fn.affix.noConflict = function () {
17503    $.fn.affix = old
17504    return this
17505  }
17506
17507
17508  // AFFIX DATA-API
17509  // ==============
17510
17511  $(window).on('load', function () {
17512    $('[data-spy="affix"]').each(function () {
17513      var $spy = $(this)
17514      var data = $spy.data()
17515
17516      data.offset = data.offset || {}
17517
17518      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
17519      if (data.offsetTop    != null) data.offset.top    = data.offsetTop
17520
17521      Plugin.call($spy, data)
17522    })
vendor: 34,085 bytes, lines 17522-18706
17522
17523  })
17524
17525}(jQuery);
17526
17527/* ========================================================================
17528 * Bootstrap: alert.js v3.3.7
17529 * http://getbootstrap.com/javascript/#alerts
17530 * ========================================================================
17531 * Copyright 2011-2016 Twitter, Inc.
17532 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
17533 * ======================================================================== */
17534
17535
17536+function ($) {
17537  'use strict';
17538
17539  // ALERT CLASS DEFINITION
17540  // ======================
17541
17542  var dismiss = '[data-dismiss="alert"]'
17543  var Alert   = function (el) {
17544    $(el).on('click', dismiss, this.close)
17545  }
17546
17547  Alert.VERSION = '3.3.7'
17548
17549  Alert.TRANSITION_DURATION = 150
17550
17551  Alert.prototype.close = function (e) {
17552    var $this    = $(this)
17553    var selector = $this.attr('data-target')
17554
17555    if (!selector) {
17556      selector = $this.attr('href')
17557      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
17558    }
17559
17560    var $parent = $(selector === '#' ? [] : selector)
17561
17562    if (e) e.preventDefault()
17563
17564    if (!$parent.length) {
17565      $parent = $this.closest('.alert')
17566    }
17567
17568    $parent.trigger(e = $.Event('close.bs.alert'))
17569
17570    if (e.isDefaultPrevented()) return
17571
17572    $parent.removeClass('in')
17573
17574    function removeElement() {
17575      // detach from parent, fire event then clean up data
17576      $parent.detach().trigger('closed.bs.alert').remove()
17577    }
17578
17579    $.support.transition && $parent.hasClass('fade') ?
17580      $parent
17581        .one('bsTransitionEnd', removeElement)
17582        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
17583      removeElement()
17584  }
17585
17586
17587  // ALERT PLUGIN DEFINITION
17588  // =======================
17589
17590  function Plugin(option) {
17591    return this.each(function () {
17592      var $this = $(this)
17593      var data  = $this.data('bs.alert')
17594
17595      if (!data) $this.data('bs.alert', (data = new Alert(this)))
17596      if (typeof option == 'string') data[option].call($this)
17597    })
17598  }
17599
17600  var old = $.fn.alert
17601
17602  $.fn.alert             = Plugin
17603  $.fn.alert.Constructor = Alert
17604
17605
17606  // ALERT NO CONFLICT
17607  // =================
17608
17609  $.fn.alert.noConflict = function () {
17610    $.fn.alert = old
17611    return this
17612  }
17613
17614
17615  // ALERT DATA-API
17616  // ==============
17617
17618  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
17619
17620}(jQuery);
17621
17622/* ========================================================================
17623 * Bootstrap: button.js v3.3.7
17624 * http://getbootstrap.com/javascript/#buttons
17625 * ========================================================================
17626 * Copyright 2011-2016 Twitter, Inc.
17627 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
17628 * ======================================================================== */
17629
17630
17631+function ($) {
17632  'use strict';
17633
17634  // BUTTON PUBLIC CLASS DEFINITION
17635  // ==============================
17636
17637  var Button = function (element, options) {
17638    this.$element  = $(element)
17639    this.options   = $.extend({}, Button.DEFAULTS, options)
17640    this.isLoading = false
17641  }
17642
17643  Button.VERSION  = '3.3.7'
17644
17645  Button.DEFAULTS = {
17646    loadingText: 'loading...'
17647  }
17648
17649  Button.prototype.setState = function (state) {
17650    var d    = 'disabled'
17651    var $el  = this.$element
17652    var val  = $el.is('input') ? 'val' : 'html'
17653    var data = $el.data()
17654
17655    state += 'Text'
17656
17657    if (data.resetText == null) $el.data('resetText', $el[val]())
17658
17659    // push to event loop to allow forms to submit
17660    setTimeout($.proxy(function () {
17661      $el[val](data[state] == null ? this.options[state] : data[state])
17662
17663      if (state == 'loadingText') {
17664        this.isLoading = true
17665        $el.addClass(d).attr(d, d).prop(d, true)
17666      } else if (this.isLoading) {
17667        this.isLoading = false
17668        $el.removeClass(d).removeAttr(d).prop(d, false)
17669      }
17670    }, this), 0)
17671  }
17672
17673  Button.prototype.toggle = function () {
17674    var changed = true
17675    var $parent = this.$element.closest('[data-toggle="buttons"]')
17676
17677    if ($parent.length) {
17678      var $input = this.$element.find('input')
17679      if ($input.prop('type') == 'radio') {
17680        if ($input.prop('checked')) changed = false
17681        $parent.find('.active').removeClass('active')
17682        this.$element.addClass('active')
17683      } else if ($input.prop('type') == 'checkbox') {
17684        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
17685        this.$element.toggleClass('active')
17686      }
17687      $input.prop('checked', this.$element.hasClass('active'))
17688      if (changed) $input.trigger('change')
17689    } else {
17690      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
17691      this.$element.toggleClass('active')
17692    }
17693  }
17694
17695
17696  // BUTTON PLUGIN DEFINITION
17697  // ========================
17698
17699  function Plugin(option) {
17700    return this.each(function () {
17701      var $this   = $(this)
17702      var data    = $this.data('bs.button')
17703      var options = typeof option == 'object' && option
17704
17705      if (!data) $this.data('bs.button', (data = new Button(this, options)))
17706
17707      if (option == 'toggle') data.toggle()
17708      else if (option) data.setState(option)
17709    })
17710  }
17711
17712  var old = $.fn.button
17713
17714  $.fn.button             = Plugin
17715  $.fn.button.Constructor = Button
17716
17717
17718  // BUTTON NO CONFLICT
17719  // ==================
17720
17721  $.fn.button.noConflict = function () {
17722    $.fn.button = old
17723    return this
17724  }
17725
17726
17727  // BUTTON DATA-API
17728  // ===============
17729
17730  $(document)
17731    .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
17732      var $btn = $(e.target).closest('.btn')
17733      Plugin.call($btn, 'toggle')
17734      if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
17735        // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
17736        e.preventDefault()
17737        // The target component still receive the focus
17738        if ($btn.is('input,button')) $btn.trigger('focus')
17739        else $btn.find('input:visible,button:visible').first().trigger('focus')
17740      }
17741    })
17742    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
17743      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
17744    })
17745
17746}(jQuery);
17747
17748/* ========================================================================
17749 * Bootstrap: carousel.js v3.3.7
17750 * http://getbootstrap.com/javascript/#carousel
17751 * ========================================================================
17752 * Copyright 2011-2016 Twitter, Inc.
17753 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
17754 * ======================================================================== */
17755
17756
17757+function ($) {
17758  'use strict';
17759
17760  // CAROUSEL CLASS DEFINITION
17761  // =========================
17762
17763  var Carousel = function (element, options) {
17764    this.$element    = $(element)
17765    this.$indicators = this.$element.find('.carousel-indicators')
17766    this.options     = options
17767    this.paused      = null
17768    this.sliding     = null
17769    this.interval    = null
17770    this.$active     = null
17771    this.$items      = null
17772
17773    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
17774
17775    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
17776      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
17777      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
17778  }
17779
17780  Carousel.VERSION  = '3.3.7'
17781
17782  Carousel.TRANSITION_DURATION = 600
17783
17784  Carousel.DEFAULTS = {
17785    interval: 5000,
17786    pause: 'hover',
17787    wrap: true,
17788    keyboard: true
17789  }
17790
17791  Carousel.prototype.keydown = function (e) {
17792    if (/input|textarea/i.test(e.target.tagName)) return
17793    switch (e.which) {
17794      case 37: this.prev(); break
17795      case 39: this.next(); break
17796      default: return
17797    }
17798
17799    e.preventDefault()
17800  }
17801
17802  Carousel.prototype.cycle = function (e) {
17803    e || (this.paused = false)
17804
17805    this.interval && clearInterval(this.interval)
17806
17807    this.options.interval
17808      && !this.paused
17809      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
17810
17811    return this
17812  }
17813
17814  Carousel.prototype.getItemIndex = function (item) {
17815    this.$items = item.parent().children('.item')
17816    return this.$items.index(item || this.$active)
17817  }
17818
17819  Carousel.prototype.getItemForDirection = function (direction, active) {
17820    var activeIndex = this.getItemIndex(active)
17821    var willWrap = (direction == 'prev' && activeIndex === 0)
17822                || (direction == 'next' && activeIndex == (this.$items.length - 1))
17823    if (willWrap && !this.options.wrap) return active
17824    var delta = direction == 'prev' ? -1 : 1
17825    var itemIndex = (activeIndex + delta) % this.$items.length
17826    return this.$items.eq(itemIndex)
17827  }
17828
17829  Carousel.prototype.to = function (pos) {
17830    var that        = this
17831    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
17832
17833    if (pos > (this.$items.length - 1) || pos < 0) return
17834
17835    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
17836    if (activeIndex == pos) return this.pause().cycle()
17837
17838    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
17839  }
17840
17841  Carousel.prototype.pause = function (e) {
17842    e || (this.paused = true)
17843
17844    if (this.$element.find('.next, .prev').length && $.support.transition) {
17845      this.$element.trigger($.support.transition.end)
17846      this.cycle(true)
17847    }
17848
17849    this.interval = clearInterval(this.interval)
17850
17851    return this
17852  }
17853
17854  Carousel.prototype.next = function () {
17855    if (this.sliding) return
17856    return this.slide('next')
17857  }
17858
17859  Carousel.prototype.prev = function () {
17860    if (this.sliding) return
17861    return this.slide('prev')
17862  }
17863
17864  Carousel.prototype.slide = function (type, next) {
17865    var $active   = this.$element.find('.item.active')
17866    var $next     = next || this.getItemForDirection(type, $active)
17867    var isCycling = this.interval
17868    var direction = type == 'next' ? 'left' : 'right'
17869    var that      = this
17870
17871    if ($next.hasClass('active')) return (this.sliding = false)
17872
17873    var relatedTarget = $next[0]
17874    var slideEvent = $.Event('slide.bs.carousel', {
17875      relatedTarget: relatedTarget,
17876      direction: direction
17877    })
17878    this.$element.trigger(slideEvent)
17879    if (slideEvent.isDefaultPrevented()) return
17880
17881    this.sliding = true
17882
17883    isCycling && this.pause()
17884
17885    if (this.$indicators.length) {
17886      this.$indicators.find('.active').removeClass('active')
17887      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
17888      $nextIndicator && $nextIndicator.addClass('active')
17889    }
17890
17891    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
17892    if ($.support.transition && this.$element.hasClass('slide')) {
17893      $next.addClass(type)
17894      $next[0].offsetWidth // force reflow
17895      $active.addClass(direction)
17896      $next.addClass(direction)
17897      $active
17898        .one('bsTransitionEnd', function () {
17899          $next.removeClass([type, direction].join(' ')).addClass('active')
17900          $active.removeClass(['active', direction].join(' '))
17901          that.sliding = false
17902          setTimeout(function () {
17903            that.$element.trigger(slidEvent)
17904          }, 0)
17905        })
17906        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
17907    } else {
17908      $active.removeClass('active')
17909      $next.addClass('active')
17910      this.sliding = false
17911      this.$element.trigger(slidEvent)
17912    }
17913
17914    isCycling && this.cycle()
17915
17916    return this
17917  }
17918
17919
17920  // CAROUSEL PLUGIN DEFINITION
17921  // ==========================
17922
17923  function Plugin(option) {
17924    return this.each(function () {
17925      var $this   = $(this)
17926      var data    = $this.data('bs.carousel')
17927      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
17928      var action  = typeof option == 'string' ? option : options.slide
17929
17930      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
17931      if (typeof option == 'number') data.to(option)
17932      else if (action) data[action]()
17933      else if (options.interval) data.pause().cycle()
17934    })
17935  }
17936
17937  var old = $.fn.carousel
17938
17939  $.fn.carousel             = Plugin
17940  $.fn.carousel.Constructor = Carousel
17941
17942
17943  // CAROUSEL NO CONFLICT
17944  // ====================
17945
17946  $.fn.carousel.noConflict = function () {
17947    $.fn.carousel = old
17948    return this
17949  }
17950
17951
17952  // CAROUSEL DATA-API
17953  // =================
17954
17955  var clickHandler = function (e) {
17956    var href
17957    var $this   = $(this)
17958    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
17959    if (!$target.hasClass('carousel')) return
17960    var options = $.extend({}, $target.data(), $this.data())
17961    var slideIndex = $this.attr('data-slide-to')
17962    if (slideIndex) options.interval = false
17963
17964    Plugin.call($target, options)
17965
17966    if (slideIndex) {
17967      $target.data('bs.carousel').to(slideIndex)
17968    }
17969
17970    e.preventDefault()
17971  }
17972
17973  $(document)
17974    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
17975    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
17976
17977  $(window).on('load', function () {
17978    $('[data-ride="carousel"]').each(function () {
17979      var $carousel = $(this)
17980      Plugin.call($carousel, $carousel.data())
17981    })
17982  })
17983
17984}(jQuery);
17985
17986/* ========================================================================
17987 * Bootstrap: collapse.js v3.3.7
17988 * http://getbootstrap.com/javascript/#collapse
17989 * ========================================================================
17990 * Copyright 2011-2016 Twitter, Inc.
17991 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
17992 * ======================================================================== */
17993
17994/* jshint latedef: false */
17995
17996+function ($) {
17997  'use strict';
17998
17999  // COLLAPSE PUBLIC CLASS DEFINITION
18000  // ================================
18001
18002  var Collapse = function (element, options) {
18003    this.$element      = $(element)
18004    this.options       = $.extend({}, Collapse.DEFAULTS, options)
18005    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
18006                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
18007    this.transitioning = null
18008
18009    if (this.options.parent) {
18010      this.$parent = this.getParent()
18011    } else {
18012      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
18013    }
18014
18015    if (this.options.toggle) this.toggle()
18016  }
18017
18018  Collapse.VERSION  = '3.3.7'
18019
18020  Collapse.TRANSITION_DURATION = 350
18021
18022  Collapse.DEFAULTS = {
18023    toggle: true
18024  }
18025
18026  Collapse.prototype.dimension = function () {
18027    var hasWidth = this.$element.hasClass('width')
18028    return hasWidth ? 'width' : 'height'
18029  }
18030
18031  Collapse.prototype.show = function () {
18032    if (this.transitioning || this.$element.hasClass('in')) return
18033
18034    var activesData
18035    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
18036
18037    if (actives && actives.length) {
18038      activesData = actives.data('bs.collapse')
18039      if (activesData && activesData.transitioning) return
18040    }
18041
18042    var startEvent = $.Event('show.bs.collapse')
18043    this.$element.trigger(startEvent)
18044    if (startEvent.isDefaultPrevented()) return
18045
18046    if (actives && actives.length) {
18047      Plugin.call(actives, 'hide')
18048      activesData || actives.data('bs.collapse', null)
18049    }
18050
18051    var dimension = this.dimension()
18052
18053    this.$element
18054      .removeClass('collapse')
18055      .addClass('collapsing')[dimension](0)
18056      .attr('aria-expanded', true)
18057
18058    this.$trigger
18059      .removeClass('collapsed')
18060      .attr('aria-expanded', true)
18061
18062    this.transitioning = 1
18063
18064    var complete = function () {
18065      this.$element
18066        .removeClass('collapsing')
18067        .addClass('collapse in')[dimension]('')
18068      this.transitioning = 0
18069      this.$element
18070        .trigger('shown.bs.collapse')
18071    }
18072
18073    if (!$.support.transition) return complete.call(this)
18074
18075    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
18076
18077    this.$element
18078      .one('bsTransitionEnd', $.proxy(complete, this))
18079      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
18080  }
18081
18082  Collapse.prototype.hide = function () {
18083    if (this.transitioning || !this.$element.hasClass('in')) return
18084
18085    var startEvent = $.Event('hide.bs.collapse')
18086    this.$element.trigger(startEvent)
18087    if (startEvent.isDefaultPrevented()) return
18088
18089    var dimension = this.dimension()
18090
18091    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
18092
18093    this.$element
18094      .addClass('collapsing')
18095      .removeClass('collapse in')
18096      .attr('aria-expanded', false)
18097
18098    this.$trigger
18099      .addClass('collapsed')
18100      .attr('aria-expanded', false)
18101
18102    this.transitioning = 1
18103
18104    var complete = function () {
18105      this.transitioning = 0
18106      this.$element
18107        .removeClass('collapsing')
18108        .addClass('collapse')
18109        .trigger('hidden.bs.collapse')
18110    }
18111
18112    if (!$.support.transition) return complete.call(this)
18113
18114    this.$element
18115      [dimension](0)
18116      .one('bsTransitionEnd', $.proxy(complete, this))
18117      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
18118  }
18119
18120  Collapse.prototype.toggle = function () {
18121    this[this.$element.hasClass('in') ? 'hide' : 'show']()
18122  }
18123
18124  Collapse.prototype.getParent = function () {
18125    return $(this.options.parent)
18126      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
18127      .each($.proxy(function (i, element) {
18128        var $element = $(element)
18129        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
18130      }, this))
18131      .end()
18132  }
18133
18134  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
18135    var isOpen = $element.hasClass('in')
18136
18137    $element.attr('aria-expanded', isOpen)
18138    $trigger
18139      .toggleClass('collapsed', !isOpen)
18140      .attr('aria-expanded', isOpen)
18141  }
18142
18143  function getTargetFromTrigger($trigger) {
18144    var href
18145    var target = $trigger.attr('data-target')
18146      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
18147
18148    return $(target)
18149  }
18150
18151
18152  // COLLAPSE PLUGIN DEFINITION
18153  // ==========================
18154
18155  function Plugin(option) {
18156    return this.each(function () {
18157      var $this   = $(this)
18158      var data    = $this.data('bs.collapse')
18159      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
18160
18161      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
18162      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
18163      if (typeof option == 'string') data[option]()
18164    })
18165  }
18166
18167  var old = $.fn.collapse
18168
18169  $.fn.collapse             = Plugin
18170  $.fn.collapse.Constructor = Collapse
18171
18172
18173  // COLLAPSE NO CONFLICT
18174  // ====================
18175
18176  $.fn.collapse.noConflict = function () {
18177    $.fn.collapse = old
18178    return this
18179  }
18180
18181
18182  // COLLAPSE DATA-API
18183  // =================
18184
18185  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
18186    var $this   = $(this)
18187
18188    if (!$this.attr('data-target')) e.preventDefault()
18189
18190    var $target = getTargetFromTrigger($this)
18191    var data    = $target.data('bs.collapse')
18192    var option  = data ? 'toggle' : $this.data()
18193
18194    Plugin.call($target, option)
18195  })
18196
18197}(jQuery);
18198
18199/* ========================================================================
18200 * Bootstrap: dropdown.js v3.3.7
18201 * http://getbootstrap.com/javascript/#dropdowns
18202 * ========================================================================
18203 * Copyright 2011-2016 Twitter, Inc.
18204 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
18205 * ======================================================================== */
18206
18207
18208+function ($) {
18209  'use strict';
18210
18211  // DROPDOWN CLASS DEFINITION
18212  // =========================
18213
18214  var backdrop = '.dropdown-backdrop'
18215  var toggle   = '[data-toggle="dropdown"]'
18216  var Dropdown = function (element) {
18217    $(element).on('click.bs.dropdown', this.toggle)
18218  }
18219
18220  Dropdown.VERSION = '3.3.7'
18221
18222  function getParent($this) {
18223    var selector = $this.attr('data-target')
18224
18225    if (!selector) {
18226      selector = $this.attr('href')
18227      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
18228    }
18229
18230    var $parent = selector && $(selector)
18231
18232    return $parent && $parent.length ? $parent : $this.parent()
18233  }
18234
18235  function clearMenus(e) {
18236    if (e && e.which === 3) return
18237    $(backdrop).remove()
18238    $(toggle).each(function () {
18239      var $this         = $(this)
18240      var $parent       = getParent($this)
18241      var relatedTarget = { relatedTarget: this }
18242
18243      if (!$parent.hasClass('open')) return
18244
18245      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
18246
18247      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
18248
18249      if (e.isDefaultPrevented()) return
18250
18251      $this.attr('aria-expanded', 'false')
18252      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
18253    })
18254  }
18255
18256  Dropdown.prototype.toggle = function (e) {
18257    var $this = $(this)
18258
18259    if ($this.is('.disabled, :disabled')) return
18260
18261    var $parent  = getParent($this)
18262    var isActive = $parent.hasClass('open')
18263
18264    clearMenus()
18265
18266    if (!isActive) {
18267      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
18268        // if mobile we use a backdrop because click events don't delegate
18269        $(document.createElement('div'))
18270          .addClass('dropdown-backdrop')
18271          .insertAfter($(this))
18272          .on('click', clearMenus)
18273      }
18274
18275      var relatedTarget = { relatedTarget: this }
18276      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
18277
18278      if (e.isDefaultPrevented()) return
18279
18280      $this
18281        .trigger('focus')
18282        .attr('aria-expanded', 'true')
18283
18284      $parent
18285        .toggleClass('open')
18286        .trigger($.Event('shown.bs.dropdown', relatedTarget))
18287    }
18288
18289    return false
18290  }
18291
18292  Dropdown.prototype.keydown = function (e) {
18293    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
18294
18295    var $this = $(this)
18296
18297    e.preventDefault()
18298    e.stopPropagation()
18299
18300    if ($this.is('.disabled, :disabled')) return
18301
18302    var $parent  = getParent($this)
18303    var isActive = $parent.hasClass('open')
18304
18305    if (!isActive && e.which != 27 || isActive && e.which == 27) {
18306      if (e.which == 27) $parent.find(toggle).trigger('focus')
18307      return $this.trigger('click')
18308    }
18309
18310    var desc = ' li:not(.disabled):visible a'
18311    var $items = $parent.find('.dropdown-menu' + desc)
18312
18313    if (!$items.length) return
18314
18315    var index = $items.index(e.target)
18316
18317    if (e.which == 38 && index > 0)                 index--         // up
18318    if (e.which == 40 && index < $items.length - 1) index++         // down
18319    if (!~index)                                    index = 0
18320
18321    $items.eq(index).trigger('focus')
18322  }
18323
18324
18325  // DROPDOWN PLUGIN DEFINITION
18326  // ==========================
18327
18328  function Plugin(option) {
18329    return this.each(function () {
18330      var $this = $(this)
18331      var data  = $this.data('bs.dropdown')
18332
18333      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
18334      if (typeof option == 'string') data[option].call($this)
18335    })
18336  }
18337
18338  var old = $.fn.dropdown
18339
18340  $.fn.dropdown             = Plugin
18341  $.fn.dropdown.Constructor = Dropdown
18342
18343
18344  // DROPDOWN NO CONFLICT
18345  // ====================
18346
18347  $.fn.dropdown.noConflict = function () {
18348    $.fn.dropdown = old
18349    return this
18350  }
18351
18352
18353  // APPLY TO STANDARD DROPDOWN ELEMENTS
18354  // ===================================
18355
18356  $(document)
18357    .on('click.bs.dropdown.data-api', clearMenus)
18358    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
18359    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
18360    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
18361    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
18362
18363}(jQuery);
18364
18365/* ========================================================================
18366 * Bootstrap: modal.js v3.3.7
18367 * http://getbootstrap.com/javascript/#modals
18368 * ========================================================================
18369 * Copyright 2011-2016 Twitter, Inc.
18370 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
18371 * ======================================================================== */
18372
18373
18374+function ($) {
18375  'use strict';
18376
18377  // MODAL CLASS DEFINITION
18378  // ======================
18379
18380  var Modal = function (element, options) {
18381    this.options             = options
18382    this.$body               = $(document.body)
18383    this.$element            = $(element)
18384    this.$dialog             = this.$element.find('.modal-dialog')
18385    this.$backdrop           = null
18386    this.isShown             = null
18387    this.originalBodyPad     = null
18388    this.scrollbarWidth      = 0
18389    this.ignoreBackdropClick = false
18390
18391    if (this.options.remote) {
18392      this.$element
18393        .find('.modal-content')
18394        .load(this.options.remote, $.proxy(function () {
18395          this.$element.trigger('loaded.bs.modal')
18396        }, this))
18397    }
18398  }
18399
18400  Modal.VERSION  = '3.3.7'
18401
18402  Modal.TRANSITION_DURATION = 300
18403  Modal.BACKDROP_TRANSITION_DURATION = 150
18404
18405  Modal.DEFAULTS = {
18406    backdrop: true,
18407    keyboard: true,
18408    show: true
18409  }
18410
18411  Modal.prototype.toggle = function (_relatedTarget) {
18412    return this.isShown ? this.hide() : this.show(_relatedTarget)
18413  }
18414
18415  Modal.prototype.show = function (_relatedTarget) {
18416    var that = this
18417    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
18418
18419    this.$element.trigger(e)
18420
18421    if (this.isShown || e.isDefaultPrevented()) return
18422
18423    this.isShown = true
18424
18425    this.checkScrollbar()
18426    this.setScrollbar()
18427    this.$body.addClass('modal-open')
18428
18429    this.escape()
18430    this.resize()
18431
18432    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
18433
18434    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
18435      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
18436        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
18437      })
18438    })
18439
18440    this.backdrop(function () {
18441      var transition = $.support.transition && that.$element.hasClass('fade')
18442
18443      if (!that.$element.parent().length) {
18444        that.$element.appendTo(that.$body) // don't move modals dom position
18445      }
18446
18447      that.$element
18448        .show()
18449        .scrollTop(0)
18450
18451      that.adjustDialog()
18452
18453      if (transition) {
18454        that.$element[0].offsetWidth // force reflow
18455      }
18456
18457      that.$element.addClass('in')
18458
18459      that.enforceFocus()
18460
18461      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
18462
18463      transition ?
18464        that.$dialog // wait for modal to slide in
18465          .one('bsTransitionEnd', function () {
18466            that.$element.trigger('focus').trigger(e)
18467          })
18468          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
18469        that.$element.trigger('focus').trigger(e)
18470    })
18471  }
18472
18473  Modal.prototype.hide = function (e) {
18474    if (e) e.preventDefault()
18475
18476    e = $.Event('hide.bs.modal')
18477
18478    this.$element.trigger(e)
18479
18480    if (!this.isShown || e.isDefaultPrevented()) return
18481
18482    this.isShown = false
18483
18484    this.escape()
18485    this.resize()
18486
18487    $(document).off('focusin.bs.modal')
18488
18489    this.$element
18490      .removeClass('in')
18491      .off('click.dismiss.bs.modal')
18492      .off('mouseup.dismiss.bs.modal')
18493
18494    this.$dialog.off('mousedown.dismiss.bs.modal')
18495
18496    $.support.transition && this.$element.hasClass('fade') ?
18497      this.$element
18498        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
18499        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
18500      this.hideModal()
18501  }
18502
18503  Modal.prototype.enforceFocus = function () {
18504    $(document)
18505      .off('focusin.bs.modal') // guard against infinite focus loop
18506      .on('focusin.bs.modal', $.proxy(function (e) {
18507        if (document !== e.target &&
18508            this.$element[0] !== e.target &&
18509            !this.$element.has(e.target).length) {
18510          this.$element.trigger('focus')
18511        }
18512      }, this))
18513  }
18514
18515  Modal.prototype.escape = function () {
18516    if (this.isShown && this.options.keyboard) {
18517      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
18518        e.which == 27 && this.hide()
18519      }, this))
18520    } else if (!this.isShown) {
18521      this.$element.off('keydown.dismiss.bs.modal')
18522    }
18523  }
18524
18525  Modal.prototype.resize = function () {
18526    if (this.isShown) {
18527      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
18528    } else {
18529      $(window).off('resize.bs.modal')
18530    }
18531  }
18532
18533  Modal.prototype.hideModal = function () {
18534    var that = this
18535    this.$element.hide()
18536    this.backdrop(function () {
18537      that.$body.removeClass('modal-open')
18538      that.resetAdjustments()
18539      that.resetScrollbar()
18540      that.$element.trigger('hidden.bs.modal')
18541    })
18542  }
18543
18544  Modal.prototype.removeBackdrop = function () {
18545    this.$backdrop && this.$backdrop.remove()
18546    this.$backdrop = null
18547  }
18548
18549  Modal.prototype.backdrop = function (callback) {
18550    var that = this
18551    var animate = this.$element.hasClass('fade') ? 'fade' : ''
18552
18553    if (this.isShown && this.options.backdrop) {
18554      var doAnimate = $.support.transition && animate
18555
18556      this.$backdrop = $(document.createElement('div'))
18557        .addClass('modal-backdrop ' + animate)
18558        .appendTo(this.$body)
18559
18560      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
18561        if (this.ignoreBackdropClick) {
18562          this.ignoreBackdropClick = false
18563          return
18564        }
18565        if (e.target !== e.currentTarget) return
18566        this.options.backdrop == 'static'
18567          ? this.$element[0].focus()
18568          : this.hide()
18569      }, this))
18570
18571      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
18572
18573      this.$backdrop.addClass('in')
18574
18575      if (!callback) return
18576
18577      doAnimate ?
18578        this.$backdrop
18579          .one('bsTransitionEnd', callback)
18580          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
18581        callback()
18582
18583    } else if (!this.isShown && this.$backdrop) {
18584      this.$backdrop.removeClass('in')
18585
18586      var callbackRemove = function () {
18587        that.removeBackdrop()
18588        callback && callback()
18589      }
18590      $.support.transition && this.$element.hasClass('fade') ?
18591        this.$backdrop
18592          .one('bsTransitionEnd', callbackRemove)
18593          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
18594        callbackRemove()
18595
18596    } else if (callback) {
18597      callback()
18598    }
18599  }
18600
18601  // these following methods are used to handle overflowing modals
18602
18603  Modal.prototype.handleUpdate = function () {
18604    this.adjustDialog()
18605  }
18606
18607  Modal.prototype.adjustDialog = function () {
18608    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
18609
18610    this.$element.css({
18611      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
18612      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
18613    })
18614  }
18615
18616  Modal.prototype.resetAdjustments = function () {
18617    this.$element.css({
18618      paddingLeft: '',
18619      paddingRight: ''
18620    })
18621  }
18622
18623  Modal.prototype.checkScrollbar = function () {
18624    var fullWindowWidth = window.innerWidth
18625    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
18626      var documentElementRect = document.documentElement.getBoundingClientRect()
18627      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
18628    }
18629    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
18630    this.scrollbarWidth = this.measureScrollbar()
18631  }
18632
18633  Modal.prototype.setScrollbar = function () {
18634    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
18635    this.originalBodyPad = document.body.style.paddingRight || ''
18636    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
18637  }
18638
18639  Modal.prototype.resetScrollbar = function () {
18640    this.$body.css('padding-right', this.originalBodyPad)
18641  }
18642
18643  Modal.prototype.measureScrollbar = function () { // thx walsh
18644    var scrollDiv = document.createElement('div')
18645    scrollDiv.className = 'modal-scrollbar-measure'
18646    this.$body.append(scrollDiv)
18647    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
18648    this.$body[0].removeChild(scrollDiv)
18649    return scrollbarWidth
18650  }
18651
18652
18653  // MODAL PLUGIN DEFINITION
18654  // =======================
18655
18656  function Plugin(option, _relatedTarget) {
18657    return this.each(function () {
18658      var $this   = $(this)
18659      var data    = $this.data('bs.modal')
18660      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
18661
18662      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
18663      if (typeof option == 'string') data[option](_relatedTarget)
18664      else if (options.show) data.show(_relatedTarget)
18665    })
18666  }
18667
18668  var old = $.fn.modal
18669
18670  $.fn.modal             = Plugin
18671  $.fn.modal.Constructor = Modal
18672
18673
18674  // MODAL NO CONFLICT
18675  // =================
18676
18677  $.fn.modal.noConflict = function () {
18678    $.fn.modal = old
18679    return this
18680  }
18681
18682
18683  // MODAL DATA-API
18684  // ==============
18685
18686  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
18687    var $this   = $(this)
18688    var href    = $this.attr('href')
18689    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
18690    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
18691
18692    if ($this.is('a')) e.preventDefault()
18693
18694    $target.one('show.bs.modal', function (showEvent) {
18695      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
18696      $target.one('hidden.bs.modal', function () {
18697        $this.is(':visible') && $this.trigger('focus')
18698      })
18699    })
18700    Plugin.call($target, option, this)
18701  })
18702
18703}(jQuery);
18704
18705/* ========================================================================
18706 * Bootstrap: 
vendor: 11,673 bytes, lines 18706-19139
18706popover.js v3.3.7
18707 * http://getbootstrap.com/javascript/#popovers
18708 * ========================================================================
18709 * Copyright 2011-2016 Twitter, Inc.
18710 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
18711 * ======================================================================== */
18712
18713
18714+function ($) {
18715  'use strict';
18716
18717  // POPOVER PUBLIC CLASS DEFINITION
18718  // ===============================
18719
18720  var Popover = function (element, options) {
18721    this.init('popover', element, options)
18722  }
18723
18724  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
18725
18726  Popover.VERSION  = '3.3.7'
18727
18728  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
18729    placement: 'right',
18730    trigger: 'click',
18731    content: '',
18732    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
18733  })
18734
18735
18736  // NOTE: POPOVER EXTENDS tooltip.js
18737  // ================================
18738
18739  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
18740
18741  Popover.prototype.constructor = Popover
18742
18743  Popover.prototype.getDefaults = function () {
18744    return Popover.DEFAULTS
18745  }
18746
18747  Popover.prototype.setContent = function () {
18748    var $tip    = this.tip()
18749    var title   = this.getTitle()
18750    var content = this.getContent()
18751
18752    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
18753    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
18754      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
18755    ](content)
18756
18757    $tip.removeClass('fade top bottom left right in')
18758
18759    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
18760    // this manually by checking the contents.
18761    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
18762  }
18763
18764  Popover.prototype.hasContent = function () {
18765    return this.getTitle() || this.getContent()
18766  }
18767
18768  Popover.prototype.getContent = function () {
18769    var $e = this.$element
18770    var o  = this.options
18771
18772    return $e.attr('data-content')
18773      || (typeof o.content == 'function' ?
18774            o.content.call($e[0]) :
18775            o.content)
18776  }
18777
18778  Popover.prototype.arrow = function () {
18779    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
18780  }
18781
18782
18783  // POPOVER PLUGIN DEFINITION
18784  // =========================
18785
18786  function Plugin(option) {
18787    return this.each(function () {
18788      var $this   = $(this)
18789      var data    = $this.data('bs.popover')
18790      var options = typeof option == 'object' && option
18791
18792      if (!data && /destroy|hide/.test(option)) return
18793      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
18794      if (typeof option == 'string') data[option]()
18795    })
18796  }
18797
18798  var old = $.fn.popover
18799
18800  $.fn.popover             = Plugin
18801  $.fn.popover.Constructor = Popover
18802
18803
18804  // POPOVER NO CONFLICT
18805  // ===================
18806
18807  $.fn.popover.noConflict = function () {
18808    $.fn.popover = old
18809    return this
18810  }
18811
18812}(jQuery);
18813
18814/* ========================================================================
18815 * Bootstrap: scrollspy.js v3.3.7
18816 * http://getbootstrap.com/javascript/#scrollspy
18817 * ========================================================================
18818 * Copyright 2011-2016 Twitter, Inc.
18819 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
18820 * ======================================================================== */
18821
18822
18823+function ($) {
18824  'use strict';
18825
18826  // SCROLLSPY CLASS DEFINITION
18827  // ==========================
18828
18829  function ScrollSpy(element, options) {
18830    this.$body          = $(document.body)
18831    this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
18832    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
18833    this.selector       = (this.options.target || '') + ' .nav li > a'
18834    this.offsets        = []
18835    this.targets        = []
18836    this.activeTarget   = null
18837    this.scrollHeight   = 0
18838
18839    this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
18840    this.refresh()
18841    this.process()
18842  }
18843
18844  ScrollSpy.VERSION  = '3.3.7'
18845
18846  ScrollSpy.DEFAULTS = {
18847    offset: 10
18848  }
18849
18850  ScrollSpy.prototype.getScrollHeight = function () {
18851    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
18852  }
18853
18854  ScrollSpy.prototype.refresh = function () {
18855    var that          = this
18856    var offsetMethod  = 'offset'
18857    var offsetBase    = 0
18858
18859    this.offsets      = []
18860    this.targets      = []
18861    this.scrollHeight = this.getScrollHeight()
18862
18863    if (!$.isWindow(this.$scrollElement[0])) {
18864      offsetMethod = 'position'
18865      offsetBase   = this.$scrollElement.scrollTop()
18866    }
18867
18868    this.$body
18869      .find(this.selector)
18870      .map(function () {
18871        var $el   = $(this)
18872        var href  = $el.data('target') || $el.attr('href')
18873        var $href = /^#./.test(href) && $(href)
18874
18875        return ($href
18876          && $href.length
18877          && $href.is(':visible')
18878          && [[$href[offsetMethod]().top + offsetBase, href]]) || null
18879      })
18880      .sort(function (a, b) { return a[0] - b[0] })
18881      .each(function () {
18882        that.offsets.push(this[0])
18883        that.targets.push(this[1])
18884      })
18885  }
18886
18887  ScrollSpy.prototype.process = function () {
18888    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
18889    var scrollHeight = this.getScrollHeight()
18890    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()
18891    var offsets      = this.offsets
18892    var targets      = this.targets
18893    var activeTarget = this.activeTarget
18894    var i
18895
18896    if (this.scrollHeight != scrollHeight) {
18897      this.refresh()
18898    }
18899
18900    if (scrollTop >= maxScroll) {
18901      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
18902    }
18903
18904    if (activeTarget && scrollTop < offsets[0]) {
18905      this.activeTarget = null
18906      return this.clear()
18907    }
18908
18909    for (i = offsets.length; i--;) {
18910      activeTarget != targets[i]
18911        && scrollTop >= offsets[i]
18912        && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
18913        && this.activate(targets[i])
18914    }
18915  }
18916
18917  ScrollSpy.prototype.activate = function (target) {
18918    this.activeTarget = target
18919
18920    this.clear()
18921
18922    var selector = this.selector +
18923      '[data-target="' + target + '"],' +
18924      this.selector + '[href="' + target + '"]'
18925
18926    var active = $(selector)
18927      .parents('li')
18928      .addClass('active')
18929
18930    if (active.parent('.dropdown-menu').length) {
18931      active = active
18932        .closest('li.dropdown')
18933        .addClass('active')
18934    }
18935
18936    active.trigger('activate.bs.scrollspy')
18937  }
18938
18939  ScrollSpy.prototype.clear = function () {
18940    $(this.selector)
18941      .parentsUntil(this.options.target, '.active')
18942      .removeClass('active')
18943  }
18944
18945
18946  // SCROLLSPY PLUGIN DEFINITION
18947  // ===========================
18948
18949  function Plugin(option) {
18950    return this.each(function () {
18951      var $this   = $(this)
18952      var data    = $this.data('bs.scrollspy')
18953      var options = typeof option == 'object' && option
18954
18955      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
18956      if (typeof option == 'string') data[option]()
18957    })
18958  }
18959
18960  var old = $.fn.scrollspy
18961
18962  $.fn.scrollspy             = Plugin
18963  $.fn.scrollspy.Constructor = ScrollSpy
18964
18965
18966  // SCROLLSPY NO CONFLICT
18967  // =====================
18968
18969  $.fn.scrollspy.noConflict = function () {
18970    $.fn.scrollspy = old
18971    return this
18972  }
18973
18974
18975  // SCROLLSPY DATA-API
18976  // ==================
18977
18978  $(window).on('load.bs.scrollspy.data-api', function () {
18979    $('[data-spy="scroll"]').each(function () {
18980      var $spy = $(this)
18981      Plugin.call($spy, $spy.data())
18982    })
18983  })
18984
18985}(jQuery);
18986
18987/* ========================================================================
18988 * Bootstrap: tab.js v3.3.7
18989 * http://getbootstrap.com/javascript/#tabs
18990 * ========================================================================
18991 * Copyright 2011-2016 Twitter, Inc.
18992 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
18993 * ======================================================================== */
18994
18995
18996+function ($) {
18997  'use strict';
18998
18999  // TAB CLASS DEFINITION
19000  // ====================
19001
19002  var Tab = function (element) {
19003    // jscs:disable requireDollarBeforejQueryAssignment
19004    this.element = $(element)
19005    // jscs:enable requireDollarBeforejQueryAssignment
19006  }
19007
19008  Tab.VERSION = '3.3.7'
19009
19010  Tab.TRANSITION_DURATION = 150
19011
19012  Tab.prototype.show = function () {
19013    var $this    = this.element
19014    var $ul      = $this.closest('ul:not(.dropdown-menu)')
19015    var selector = $this.data('target')
19016
19017    if (!selector) {
19018      selector = $this.attr('href')
19019      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
19020    }
19021
19022    if ($this.parent('li').hasClass('active')) return
19023
19024    var $previous = $ul.find('.active:last a')
19025    var hideEvent = $.Event('hide.bs.tab', {
19026      relatedTarget: $this[0]
19027    })
19028    var showEvent = $.Event('show.bs.tab', {
19029      relatedTarget: $previous[0]
19030    })
19031
19032    $previous.trigger(hideEvent)
19033    $this.trigger(showEvent)
19034
19035    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
19036
19037    var $target = $(selector)
19038
19039    this.activate($this.closest('li'), $ul)
19040    this.activate($target, $target.parent(), function () {
19041      $previous.trigger({
19042        type: 'hidden.bs.tab',
19043        relatedTarget: $this[0]
19044      })
19045      $this.trigger({
19046        type: 'shown.bs.tab',
19047        relatedTarget: $previous[0]
19048      })
19049    })
19050  }
19051
19052  Tab.prototype.activate = function (element, container, callback) {
19053    var $active    = container.find('> .active')
19054    var transition = callback
19055      && $.support.transition
19056      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
19057
19058    function next() {
19059      $active
19060        .removeClass('active')
19061        .find('> .dropdown-menu > .active')
19062          .removeClass('active')
19063        .end()
19064        .find('[data-toggle="tab"]')
19065          .attr('aria-expanded', false)
19066
19067      element
19068        .addClass('active')
19069        .find('[data-toggle="tab"]')
19070          .attr('aria-expanded', true)
19071
19072      if (transition) {
19073        element[0].offsetWidth // reflow for transition
19074        element.addClass('in')
19075      } else {
19076        element.removeClass('fade')
19077      }
19078
19079      if (element.parent('.dropdown-menu').length) {
19080        element
19081          .closest('li.dropdown')
19082            .addClass('active')
19083          .end()
19084          .find('[data-toggle="tab"]')
19085            .attr('aria-expanded', true)
19086      }
19087
19088      callback && callback()
19089    }
19090
19091    $active.length && transition ?
19092      $active
19093        .one('bsTransitionEnd', next)
19094        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
19095      next()
19096
19097    $active.removeClass('in')
19098  }
19099
19100
19101  // TAB PLUGIN DEFINITION
19102  // =====================
19103
19104  function Plugin(option) {
19105    return this.each(function () {
19106      var $this = $(this)
19107      var data  = $this.data('bs.tab')
19108
19109      if (!data) $this.data('bs.tab', (data = new Tab(this)))
19110      if (typeof option == 'string') data[option]()
19111    })
19112  }
19113
19114  var old = $.fn.tab
19115
19116  $.fn.tab             = Plugin
19117  $.fn.tab.Constructor = Tab
19118
19119
19120  // TAB NO CONFLICT
19121  // ===============
19122
19123  $.fn.tab.noConflict = function () {
19124    $.fn.tab = old
19125    return this
19126  }
19127
19128
19129  // TAB DATA-API
19130  // ============
19131
19132  var clickHandler = function (e) {
19133    e.preventDefault()
19134    Plugin.call($(this), 'show')
19135  }
19136
19137  $(document)
19138    .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
19139    .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler
vendor: 16,825 bytes, lines 19139-19665
19139)
19140
19141}(jQuery);
19142
19143/* ========================================================================
19144 * Bootstrap: tooltip.js v3.3.7
19145 * http://getbootstrap.com/javascript/#tooltip
19146 * Inspired by the original jQuery.tipsy by Jason Frame
19147 * ========================================================================
19148 * Copyright 2011-2016 Twitter, Inc.
19149 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
19150 * ======================================================================== */
19151
19152
19153+function ($) {
19154  'use strict';
19155
19156  // TOOLTIP PUBLIC CLASS DEFINITION
19157  // ===============================
19158
19159  var Tooltip = function (element, options) {
19160    this.type       = null
19161    this.options    = null
19162    this.enabled    = null
19163    this.timeout    = null
19164    this.hoverState = null
19165    this.$element   = null
19166    this.inState    = null
19167
19168    this.init('tooltip', element, options)
19169  }
19170
19171  Tooltip.VERSION  = '3.3.7'
19172
19173  Tooltip.TRANSITION_DURATION = 150
19174
19175  Tooltip.DEFAULTS = {
19176    animation: true,
19177    placement: 'top',
19178    selector: false,
19179    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
19180    trigger: 'hover focus',
19181    title: '',
19182    delay: 0,
19183    html: false,
19184    container: false,
19185    viewport: {
19186      selector: 'body',
19187      padding: 0
19188    }
19189  }
19190
19191  Tooltip.prototype.init = function (type, element, options) {
19192    this.enabled   = true
19193    this.type      = type
19194    this.$element  = $(element)
19195    this.options   = this.getOptions(options)
19196    this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
19197    this.inState   = { click: false, hover: false, focus: false }
19198
19199    if (this.$element[0] instanceof document.constructor && !this.options.selector) {
19200      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
19201    }
19202
19203    var triggers = this.options.trigger.split(' ')
19204
19205    for (var i = triggers.length; i--;) {
19206      var trigger = triggers[i]
19207
19208      if (trigger == 'click') {
19209        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
19210      } else if (trigger != 'manual') {
19211        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
19212        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
19213
19214        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
19215        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
19216      }
19217    }
19218
19219    this.options.selector ?
19220      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
19221      this.fixTitle()
19222  }
19223
19224  Tooltip.prototype.getDefaults = function () {
19225    return Tooltip.DEFAULTS
19226  }
19227
19228  Tooltip.prototype.getOptions = function (options) {
19229    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
19230
19231    if (options.delay && typeof options.delay == 'number') {
19232      options.delay = {
19233        show: options.delay,
19234        hide: options.delay
19235      }
19236    }
19237
19238    return options
19239  }
19240
19241  Tooltip.prototype.getDelegateOptions = function () {
19242    var options  = {}
19243    var defaults = this.getDefaults()
19244
19245    this._options && $.each(this._options, function (key, value) {
19246      if (defaults[key] != value) options[key] = value
19247    })
19248
19249    return options
19250  }
19251
19252  Tooltip.prototype.enter = function (obj) {
19253    var self = obj instanceof this.constructor ?
19254      obj : $(obj.currentTarget).data('bs.' + this.type)
19255
19256    if (!self) {
19257      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
19258      $(obj.currentTarget).data('bs.' + this.type, self)
19259    }
19260
19261    if (obj instanceof $.Event) {
19262      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
19263    }
19264
19265    if (self.tip().hasClass('in') || self.hoverState == 'in') {
19266      self.hoverState = 'in'
19267      return
19268    }
19269
19270    clearTimeout(self.timeout)
19271
19272    self.hoverState = 'in'
19273
19274    if (!self.options.delay || !self.options.delay.show) return self.show()
19275
19276    self.timeout = setTimeout(function () {
19277      if (self.hoverState == 'in') self.show()
19278    }, self.options.delay.show)
19279  }
19280
19281  Tooltip.prototype.isInStateTrue = function () {
19282    for (var key in this.inState) {
19283      if (this.inState[key]) return true
19284    }
19285
19286    return false
19287  }
19288
19289  Tooltip.prototype.leave = function (obj) {
19290    var self = obj instanceof this.constructor ?
19291      obj : $(obj.currentTarget).data('bs.' + this.type)
19292
19293    if (!self) {
19294      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
19295      $(obj.currentTarget).data('bs.' + this.type, self)
19296    }
19297
19298    if (obj instanceof $.Event) {
19299      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
19300    }
19301
19302    if (self.isInStateTrue()) return
19303
19304    clearTimeout(self.timeout)
19305
19306    self.hoverState = 'out'
19307
19308    if (!self.options.delay || !self.options.delay.hide) return self.hide()
19309
19310    self.timeout = setTimeout(function () {
19311      if (self.hoverState == 'out') self.hide()
19312    }, self.options.delay.hide)
19313  }
19314
19315  Tooltip.prototype.show = function () {
19316    var e = $.Event('show.bs.' + this.type)
19317
19318    if (this.hasContent() && this.enabled) {
19319      this.$element.trigger(e)
19320
19321      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
19322      if (e.isDefaultPrevented() || !inDom) return
19323      var that = this
19324
19325      var $tip = this.tip()
19326
19327      var tipId = this.getUID(this.type)
19328
19329      this.setContent()
19330      $tip.attr('id', tipId)
19331      this.$element.attr('aria-describedby', tipId)
19332
19333      if (this.options.animation) $tip.addClass('fade')
19334
19335      var placement = typeof this.options.placement == 'function' ?
19336        this.options.placement.call(this, $tip[0], this.$element[0]) :
19337        this.options.placement
19338
19339      var autoToken = /\s?auto?\s?/i
19340      var autoPlace = autoToken.test(placement)
19341      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
19342
19343      $tip
19344        .detach()
19345        .css({ top: 0, left: 0, display: 'block' })
19346        .addClass(placement)
19347        .data('bs.' + this.type, this)
19348
19349      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
19350      this.$element.trigger('inserted.bs.' + this.type)
19351
19352      var pos          = this.getPosition()
19353      var actualWidth  = $tip[0].offsetWidth
19354      var actualHeight = $tip[0].offsetHeight
19355
19356      if (autoPlace) {
19357        var orgPlacement = placement
19358        var viewportDim = this.getPosition(this.$viewport)
19359
19360        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :
19361                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :
19362                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :
19363                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :
19364                    placement
19365
19366        $tip
19367          .removeClass(orgPlacement)
19368          .addClass(placement)
19369      }
19370
19371      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
19372
19373      this.applyPlacement(calculatedOffset, placement)
19374
19375      var complete = function () {
19376        var prevHoverState = that.hoverState
19377        that.$element.trigger('shown.bs.' + that.type)
19378        that.hoverState = null
19379
19380        if (prevHoverState == 'out') that.leave(that)
19381      }
19382
19383      $.support.transition && this.$tip.hasClass('fade') ?
19384        $tip
19385          .one('bsTransitionEnd', complete)
19386          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
19387        complete()
19388    }
19389  }
19390
19391  Tooltip.prototype.applyPlacement = function (offset, placement) {
19392    var $tip   = this.tip()
19393    var width  = $tip[0].offsetWidth
19394    var height = $tip[0].offsetHeight
19395
19396    // manually read margins because getBoundingClientRect includes difference
19397    var marginTop = parseInt($tip.css('margin-top'), 10)
19398    var marginLeft = parseInt($tip.css('margin-left'), 10)
19399
19400    // we must check for NaN for ie 8/9
19401    if (isNaN(marginTop))  marginTop  = 0
19402    if (isNaN(marginLeft)) marginLeft = 0
19403
19404    offset.top  += marginTop
19405    offset.left += marginLeft
19406
19407    // $.fn.offset doesn't round pixel values
19408    // so we use setOffset directly with our own function B-0
19409    $.offset.setOffset($tip[0], $.extend({
19410      using: function (props) {
19411        $tip.css({
19412          top: Math.round(props.top),
19413          left: Math.round(props.left)
19414        })
19415      }
19416    }, offset), 0)
19417
19418    $tip.addClass('in')
19419
19420    // check to see if placing tip in new offset caused the tip to resize itself
19421    var actualWidth  = $tip[0].offsetWidth
19422    var actualHeight = $tip[0].offsetHeight
19423
19424    if (placement == 'top' && actualHeight != height) {
19425      offset.top = offset.top + height - actualHeight
19426    }
19427
19428    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
19429
19430    if (delta.left) offset.left += delta.left
19431    else offset.top += delta.top
19432
19433    var isVertical          = /top|bottom/.test(placement)
19434    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
19435    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
19436
19437    $tip.offset(offset)
19438    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
19439  }
19440
19441  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
19442    this.arrow()
19443      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
19444      .css(isVertical ? 'top' : 'left', '')
19445  }
19446
19447  Tooltip.prototype.setContent = function () {
19448    var $tip  = this.tip()
19449    var title = this.getTitle()
19450
19451    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
19452    $tip.removeClass('fade in top bottom left right')
19453  }
19454
19455  Tooltip.prototype.hide = function (callback) {
19456    var that = this
19457    var $tip = $(this.$tip)
19458    var e    = $.Event('hide.bs.' + this.type)
19459
19460    function complete() {
19461      if (that.hoverState != 'in') $tip.detach()
19462      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
19463        that.$element
19464          .removeAttr('aria-describedby')
19465          .trigger('hidden.bs.' + that.type)
19466      }
19467      callback && callback()
19468    }
19469
19470    this.$element.trigger(e)
19471
19472    if (e.isDefaultPrevented()) return
19473
19474    $tip.removeClass('in')
19475
19476    $.support.transition && $tip.hasClass('fade') ?
19477      $tip
19478        .one('bsTransitionEnd', complete)
19479        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
19480      complete()
19481
19482    this.hoverState = null
19483
19484    return this
19485  }
19486
19487  Tooltip.prototype.fixTitle = function () {
19488    var $e = this.$element
19489    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
19490      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
19491    }
19492  }
19493
19494  Tooltip.prototype.hasContent = function () {
19495    return this.getTitle()
19496  }
19497
19498  Tooltip.prototype.getPosition = function ($element) {
19499    $element   = $element || this.$element
19500
19501    var el     = $element[0]
19502    var isBody = el.tagName == 'BODY'
19503
19504    var elRect    = el.getBoundingClientRect()
19505    if (elRect.width == null) {
19506      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
19507      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
19508    }
19509    var isSvg = window.SVGElement && el instanceof window.SVGElement
19510    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
19511    // See https://github.com/twbs/bootstrap/issues/20280
19512    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
19513    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
19514    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
19515
19516    return $.extend({}, elRect, scroll, outerDims, elOffset)
19517  }
19518
19519  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
19520    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :
19521           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
19522           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
19523        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
19524
19525  }
19526
19527  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
19528    var delta = { top: 0, left: 0 }
19529    if (!this.$viewport) return delta
19530
19531    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
19532    var viewportDimensions = this.getPosition(this.$viewport)
19533
19534    if (/right|left/.test(placement)) {
19535      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
19536      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
19537      if (topEdgeOffset < viewportDimensions.top) { // top overflow
19538        delta.top = viewportDimensions.top - topEdgeOffset
19539      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
19540        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
19541      }
19542    } else {
19543      var leftEdgeOffset  = pos.left - viewportPadding
19544      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
19545      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
19546        delta.left = viewportDimensions.left - leftEdgeOffset
19547      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
19548        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
19549      }
19550    }
19551
19552    return delta
19553  }
19554
19555  Tooltip.prototype.getTitle = function () {
19556    var title
19557    var $e = this.$element
19558    var o  = this.options
19559
19560    title = $e.attr('data-original-title')
19561      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
19562
19563    return title
19564  }
19565
19566  Tooltip.prototype.getUID = function (prefix) {
19567    do prefix += ~~(Math.random() * 1000000)
19568    while (document.getElementById(prefix))
19569    return prefix
19570  }
19571
19572  Tooltip.prototype.tip = function () {
19573    if (!this.$tip) {
19574      this.$tip = $(this.options.template)
19575      if (this.$tip.length != 1) {
19576        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
19577      }
19578    }
19579    return this.$tip
19580  }
19581
19582  Tooltip.prototype.arrow = function () {
19583    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
19584  }
19585
19586  Tooltip.prototype.enable = function () {
19587    this.enabled = true
19588  }
19589
19590  Tooltip.prototype.disable = function () {
19591    this.enabled = false
19592  }
19593
19594  Tooltip.prototype.toggleEnabled = function () {
19595    this.enabled = !this.enabled
19596  }
19597
19598  Tooltip.prototype.toggle = function (e) {
19599    var self = this
19600    if (e) {
19601      self = $(e.currentTarget).data('bs.' + this.type)
19602      if (!self) {
19603        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
19604        $(e.currentTarget).data('bs.' + this.type, self)
19605      }
19606    }
19607
19608    if (e) {
19609      self.inState.click = !self.inState.click
19610      if (self.isInStateTrue()) self.enter(self)
19611      else self.leave(self)
19612    } else {
19613      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
19614    }
19615  }
19616
19617  Tooltip.prototype.destroy = function () {
19618    var that = this
19619    clearTimeout(this.timeout)
19620    this.hide(function () {
19621      that.$element.off('.' + that.type).removeData('bs.' + that.type)
19622      if (that.$tip) {
19623        that.$tip.detach()
19624      }
19625      that.$tip = null
19626      that.$arrow = null
19627      that.$viewport = null
19628      that.$element = null
19629    })
19630  }
19631
19632
19633  // TOOLTIP PLUGIN DEFINITION
19634  // =========================
19635
19636  function Plugin(option) {
19637    return this.each(function () {
19638      var $this   = $(this)
19639      var data    = $this.data('bs.tooltip')
19640      var options = typeof option == 'object' && option
19641
19642      if (!data && /destroy|hide/.test(option)) return
19643      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
19644      if (typeof option == 'string') data[option]()
19645    })
19646  }
19647
19648  var old = $.fn.tooltip
19649
19650  $.fn.tooltip             = Plugin
19651  $.fn.tooltip.Constructor = Tooltip
19652
19653
19654  // TOOLTIP NO CONFLICT
19655  // ===================
19656
19657  $.fn.tooltip.noConflict = function () {
19658    $.fn.tooltip = old
19659    return this
19660  }
19661
19662}(jQuery);
19663
19664/* ========================================================================
19665 * Bootstrap: 
19665transition.js v3.3.7
19666 * http://getbootstrap.com/javascript/#transitions
19667 * ========================================================================
19668 * Copyright 2011-2016 Twitter, Inc.
19669 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
19670 * ======================================================================== */
19671
19672
19673+function ($) {
19674  'use strict';
19675
19676  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
19677  // ============================================================
19678
19679  function transitionEnd() {
19680    var el = document.createElement('bootstrap')
19681
19682    var transEndEventNames = {
19683      WebkitTransition : 'webkitTransitionEnd',
19684      MozTransition    : 'transitionend',
19685      OTransition      : 'oTransitionEnd otransitionend',
19686      transition       : 'transitionend'
19687    }
19688
19689    for (var name in transEndEventNames) {
19690      if (el.style[name] !== undefined) {
19691        return { end: transEndEventNames[name] }
19692      }
19693    }
19694
19695    return false // explicit for ie8 (  ._.)
19696  }
19697
19698  // http://blog.alexmaccaw.com/css-transitions
19699  $.fn.emulateTransitionEnd = function (duration) {
19700    var called = false
19701    var $el = this
19702    $(this).one('bsTransitionEnd', function () { called = true })
19703    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
19704    setTimeout(callback, duration)
19705    return this
19706  }
19707
19708  $(function () {
19709    $.support.transition = transitionEnd()
19710
19711    if (!$.support.transition) return
19712
19713    $.event.special.bsTransitionEnd = {
19714      bindType: $.support.transition.end,
19715      delegateType: $.support.transition.end,
19716      handle: function (e) {
19717        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
19718      }
19719    }
19720  })
19721
19722}(jQuery);
19723
19724/* headerMod */
19725$(window).on('scroll load', function(){
19726  if($(window).scrollTop() > 1) $("body").addClass('fixHeader');
19727  else $("body").removeClass('fixHeader');
19728});
19729
19730
19731/* for gNavi PC */
19732$(window).resize(function(){
19733  $(".navSub").css('display','none');
19734  $(".gNavi .hasSub").removeClass('active');
19735});
19736
19737// function gNaviHover() {
19738//   var btn = $(".gNavi .hasSub");
19739//   var submenu = $(".navSub");
19740//   $(btn).click(function() {
19741//     var shownav = $(this).find(".navSub");
19742//     browserWidth = $(window).width();
19743//     if (browserWidth > 767) {
19744//       if($(shownav).css("display") == "none") {
19745//         $(shownav).stop().slideDown(200);
19746//         $(this).addClass('active');
19747//       }else{
19748//         $(shownav).stop().slideUp(0);
19749//         $(this).removeClass('active');
19750//       }
19751//     }
19752//   },
19753//   function() {
19754//     var shownav = $(this).find(".navSub");
19755//     browserWidth = $(window).width();
19756//     if (browserWidth > 767) {
19757//       $(shownav).stop().slideUp(0);
19758//       $(this).removeClass('active');
19759//     }
19760//   });
19761// }
19762
19763// gNaviHover();
19764
19765$('.closeSub').click(function(){
19766  $(this).parent(".navSub").stop().slideUp(200);
19767  $(this).parents(".hasSub").removeClass('active');
19768});
19769/* end gNavi PC */
19770
19771
19772/* menu header SP */
19773$('.hamberger').click(function(){
19774  $(this).toggleClass("active");
19775  $("body").toggleClass("layerOn");
19776  var __cur_p = $(window).scrollTop();
19777  var __cur_h = $("body").outerHeight();
19778  if($("body").hasClass("layerOn")){
19779      if($(window).width() < 768){
19780          $("body").attr("data-position",__cur_p);
19781          $("body").css({
19782              "top" : "-"+__cur_p+"px",
19783              "left" : 0,
19784              "width" : "100%",
19785              "height" : __cur_h+"px",
19786              "position" : "fixed",
19787              "z-index" : "-1",
19788              "touch-action" : "none",
19789              "overflow-y":"auto",
19790          });
19791      }
19792  }else{
19793    if($(window).width() < 768){
19794        $("body").css({
19795            "touch-action":"auto",
19796            "overflow-x":"hidden",
19797            "overflow-y":"auto",
19798            "position":"static",
19799            "top":"auto",
19800            "height": "auto"
19801        });
19802        $("html, body").scrollTop($("body").attr("data-position"));
19803    }
19804  }
19805});
19806$('.gNavi .hasSub').click(function(e){
19807  // $(this).toggleClass("active");
19808  // $(this).find('.navSub').stop().slideToggle(200);
19809
19810  if ($(this).children('.navSub').is(":visible")){
19811     $(this).children('.navSub').slideToggle(200);
19812     $(this).toggleClass('active');
19813  } else {
19814     $('.navSub').hide();
19815     $('.hasSub').removeClass('active');
19816     $(this).children('.navSub').slideToggle(200);
19817     $(this).toggleClass('active');
19818  }
19819});
19820//test
19821// if ($(window).width() > 768) {
19822
19823// //   $("body").click(function(e) {
19824// //      var target = e.target;
19825// //     if (target.className.indexOf("hasSub") == -1 && target.offsetParent.className.indexOf("hasSub") == -1 ) {
19826// //           $('.navSub').hide();
19827// //           $('.hasSub').removeClass('active');
19828// //         return;
19829// //     }
19830// //   });
19831// }
19832
19833if ($(window).width() < 768) {
19834  $('.header__corp__ico').click(function(){
19835    $(this).toggleClass('active');
19836    $(this).next('.header__corp__right').stop().slideToggle(200);
19837  });
19838  $('.close_layer, .gNavi li a').not('.js-hasSub').click(function(){
19839    $('.hamberger').removeClass("active");
19840    $("body").removeClass("layerOn");
19841    $("body").css({
19842      "touch-action":"auto",
19843      "overflow-x":"hidden",
19844      "overflow-y":"auto",
19845      "position":"static",
19846      "top":"auto",
19847      "height": "auto"
19848  });
19849  $("html, body").scrollTop($("body").attr("data-position"));
19850  });
19851  $('.gNavi .hasSub .plus').click(function(){
19852    $(this).parent('.hasSub').toggleClass("active");
19853    $(this).next('.navSub').stop().slideToggle(200);
19854  });
19855}
19856jQuery(document).ready(function($) {
19857  // Smooth scroll
19858  // $('a[href*="#"]:not([href="#"])').click(function() {
19859  //   if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
19860  //     var target = $(this.hash);
19861  //     target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
19862  //     if (target.length) {
19863  //       $('html, body').animate({
19864  //         scrollTop: target.offset().top
19865  //       }, 500);
19866  //       return false;
19867  //     }
19868  //   }
19869  // });
19870});
19871
19872// Resize thumbnail box height
19873function thumbImg(dom, ratio_pc, ratio_sp) {
19874  if (dom && ratio_pc && ratio_sp && $(dom).length > 0) {
19875    var ratio = ratio_pc;
19876    if ($(window).width() < 768) {
19877      ratio = ratio_sp;
19878    }
19879    var h = Math.round($(dom).width() / ratio);
19880    $(dom).css('height',h).addClass('loaded');
19881  } else {
19882    return false;
19883  }
19884}
19885
19886function IEdetection() {
19887  var ua = window.navigator.userAgent;
19888  var msie = ua.indexOf('MSIE ');
19889  if (msie > 0) {
19890    // IE 10 or older, return version number
19891    return ('IE ' + parseInt(ua.substring(
19892    msie + 5, ua.indexOf('.', msie)), 10));
19893  }
19894  var trident = ua.indexOf('Trident/');
19895  if (trident > 0) {
19896    // IE 11, return version number
19897    var rv = ua.indexOf('rv:');
19898    return ('IE ' + parseInt(ua.substring(
19899    rv + 3, ua.indexOf('.', rv)), 10));
19900  }
19901  var edge = ua.indexOf('Edge/');
19902  if (edge > 0) {
19903    //Edge (IE 12+), return version number
19904    return ('IE ' + parseInt(ua.substring(
19905    edge + 5, ua.indexOf('.', edge)), 10));
19906  }
19907  // User uses other browser
19908  return ('Not IE');
19909}
19910
19911function GoogleFontLoader() {
19912  WebFontConfig = {
19913    google: { families:['Playfair+Display:400','Gentium+Basic:400','Noto+Sans+JP:400,700','Sawarabi+Mincho&display=swap&subset=japanese']},
19914  };
19915  (function() {
19916    var wf = document.createElement('script');
19917    wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
19918    wf.type = 'text/javascript';
19919    wf.async = 'true';
19920    var s = document.getElementsByTagName('script')[0];
19921    s.parentNode.insertBefore(wf, s);
19922  })();
19923}
19924
19925$(window).load(function() {
19926  var w_width = $(window).width();
19927  $('.js_lazy').each(function(index, el) {
19928    var link_src = $(this).data('src');
19929    var linkSp = $(this).data('srcsp');
19930    if(w_width < 767 && linkSp != null){
19931      link_src = linkSp;
19932    }
19933    $(this).prop('src', link_src);
19934  });
19935
19936  $('.js_bglazy').each(function(index, el) {
19937    var link_src = $(this).data('src');
19938    var linkSp = $(this).data('srcsp');
19939    if(w_width < 767 && linkSp != null){
19940      link_src = linkSp;
19941    }
19942    $(this).css('background-image', 'url('+link_src+')');
19943  });
19944});
19945
19946$(".gNavi .lineUp_cm__boxPrd__item .itemInner").matchHeight();
19947
19948$('.boxfixNews__list').owlCarousel({
19949    items:1,
19950    dots: false,
19951    loop:true,
19952    autoplay:true,
19953    autoplayTimeout: 5000,
19954    autoplayHoverPause:true,
19955    // animateOut: 'fadeOut'
19956  });
19957 $('.icoClose').click(function(){
19958    $(this).parent('.boxfixNews').hide();
19959  });

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.