PageSourceSearch

https://www.medical-hub.berlin-chemie.de/sites/g/files/fugoka451/f…/scripts/jquery_ui_effect/effect.js?tkbxkr

js berlin-chemie.de collected 2026-09-24 10:12:16 UTC 41,017 bytes, 1,642 lines download raw bytes

vendor: 22,522 bytes, lines 1-918
1/*!
2 * jQuery UI Effects 1.12.1
3 * http://jqueryui.com
4 *
5 * Copyright jQuery Foundation and other contributors
6 * Released under the MIT license.
7 * http://jquery.org/license
8 */
9
10//>>label: Effects Core
11//>>group: Effects
12// jscs:disable maximumLineLength
13//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
14// jscs:enable maximumLineLength
15//>>docs: http://api.jqueryui.com/category/effects-core/
16//>>demos: http://jqueryui.com/effect/
17
18( function( factory ) {
19	if ( typeof define === "function" && define.amd ) {
20
21		// AMD. Register as an anonymous module.
22		define( [ "jquery", "./version" ], factory );
23	} else {
24
25		// Browser globals
26		factory( jQuery );
27	}
28}( function( $ ) {
29
30var dataSpace = "ui-effects-",
31	dataSpaceStyle = "ui-effects-style",
32	dataSpaceAnimated = "ui-effects-animated",
33
34	// Create a local jQuery because jQuery Color relies on it and the
35	// global may not exist with AMD and a custom build (#10199)
36	jQuery = $;
37
38$.effects = {
39	effect: {}
40};
41
42/*!
43 * jQuery Color Animations v2.1.2
44 * https://github.com/jquery/jquery-color
45 *
46 * Copyright 2014 jQuery Foundation and other contributors
47 * Released under the MIT license.
48 * http://jquery.org/license
49 *
50 * Date: Wed Jan 16 08:47:09 2013 -0600
51 */
52( function( jQuery, undefined ) {
53
54	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
55		"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
56
57	// Plusequals test for += 100 -= 100
58	rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
59
60	// A set of RE's that can match strings and generate color tuples.
61	stringParsers = [ {
62			re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
63			parse: function( execResult ) {
64				return [
65					execResult[ 1 ],
66					execResult[ 2 ],
67					execResult[ 3 ],
68					execResult[ 4 ]
69				];
70			}
71		}, {
72			re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
73			parse: function( execResult ) {
74				return [
75					execResult[ 1 ] * 2.55,
76					execResult[ 2 ] * 2.55,
77					execResult[ 3 ] * 2.55,
78					execResult[ 4 ]
79				];
80			}
81		}, {
82
83			// This regex ignores A-F because it's compared against an already lowercased string
84			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
85			parse: function( execResult ) {
86				return [
87					parseInt( execResult[ 1 ], 16 ),
88					parseInt( execResult[ 2 ], 16 ),
89					parseInt( execResult[ 3 ], 16 )
90				];
91			}
92		}, {
93
94			// This regex ignores A-F because it's compared against an already lowercased string
95			re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
96			parse: function( execResult ) {
97				return [
98					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
99					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
100					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
101				];
102			}
103		}, {
104			re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
105			space: "hsla",
106			parse: function( execResult ) {
107				return [
108					execResult[ 1 ],
109					execResult[ 2 ] / 100,
110					execResult[ 3 ] / 100,
111					execResult[ 4 ]
112				];
113			}
114		} ],
115
116	// JQuery.Color( )
117	color = jQuery.Color = function( color, green, blue, alpha ) {
118		return new jQuery.Color.fn.parse( color, green, blue, alpha );
119	},
120	spaces = {
121		rgba: {
122			props: {
123				red: {
124					idx: 0,
125					type: "byte"
126				},
127				green: {
128					idx: 1,
129					type: "byte"
130				},
131				blue: {
132					idx: 2,
133					type: "byte"
134				}
135			}
136		},
137
138		hsla: {
139			props: {
140				hue: {
141					idx: 0,
142					type: "degrees"
143				},
144				saturation: {
145					idx: 1,
146					type: "percent"
147				},
148				lightness: {
149					idx: 2,
150					type: "percent"
151				}
152			}
153		}
154	},
155	propTypes = {
156		"byte": {
157			floor: true,
158			max: 255
159		},
160		"percent": {
161			max: 1
162		},
163		"degrees": {
164			mod: 360,
165			floor: true
166		}
167	},
168	support = color.support = {},
169
170	// Element for support tests
171	supportElem = jQuery( "<p>" )[ 0 ],
172
173	// Colors = jQuery.Color.names
174	colors,
175
176	// Local aliases of functions called often
177	each = jQuery.each;
178
179// Determine rgba support immediately
180supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
181support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
182
183// Define cache name and alpha properties
184// for rgba and hsla spaces
185each( spaces, function( spaceName, space ) {
186	space.cache = "_" + spaceName;
187	space.props.alpha = {
188		idx: 3,
189		type: "percent",
190		def: 1
191	};
192} );
193
194function clamp( value, prop, allowEmpty ) {
195	var type = propTypes[ prop.type ] || {};
196
197	if ( value == null ) {
198		return ( allowEmpty || !prop.def ) ? null : prop.def;
199	}
200
201	// ~~ is an short way of doing floor for positive numbers
202	value = type.floor ? ~~value : parseFloat( value );
203
204	// IE will pass in empty strings as value for alpha,
205	// which will hit this case
206	if ( isNaN( value ) ) {
207		return prop.def;
208	}
209
210	if ( type.mod ) {
211
212		// We add mod before modding to make sure that negatives values
213		// get converted properly: -10 -> 350
214		return ( value + type.mod ) % type.mod;
215	}
216
217	// For now all property types without mod have min and max
218	return 0 > value ? 0 : type.max < value ? type.max : value;
219}
220
221function stringParse( string ) {
222	var inst = color(),
223		rgba = inst._rgba = [];
224
225	string = string.toLowerCase();
226
227	each( stringParsers, function( i, parser ) {
228		var parsed,
229			match = parser.re.exec( string ),
230			values = match && parser.parse( match ),
231			spaceName = parser.space || "rgba";
232
233		if ( values ) {
234			parsed = inst[ spaceName ]( values );
235
236			// If this was an rgba parse the assignment might happen twice
237			// oh well....
238			inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
239			rgba = inst._rgba = parsed._rgba;
240
241			// Exit each( stringParsers ) here because we matched
242			return false;
243		}
244	} );
245
246	// Found a stringParser that handled it
247	if ( rgba.length ) {
248
249		// If this came from a parsed string, force "transparent" when alpha is 0
250		// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
251		if ( rgba.join() === "0,0,0,0" ) {
252			jQuery.extend( rgba, colors.transparent );
253		}
254		return inst;
255	}
256
257	// Named colors
258	return colors[ string ];
259}
260
261color.fn = jQuery.extend( color.prototype, {
262	parse: function( red, green, blue, alpha ) {
263		if ( red === undefined ) {
264			this._rgba = [ null, null, null, null ];
265			return this;
266		}
267		if ( red.jquery || red.nodeType ) {
268			red = jQuery( red ).css( green );
269			green = undefined;
270		}
271
272		var inst = this,
273			type = typeof ( red ),
274			rgba = this._rgba = [];
275
276		// More than 1 argument specified - assume ( red, green, blue, alpha )
277		if ( green !== undefined ) {
278			red = [ red, green, blue, alpha ];
279			type = "array";
280		}
281
282		if ( type === "string" ) {
283			return this.parse( stringParse( red ) || colors._default );
284		}
285
286		if ( type === "array" ) {
287			each( spaces.rgba.props, function( key, prop ) {
288				rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
289			} );
290			return this;
291		}
292
293		if ( type === "object" ) {
294			if ( red instanceof color ) {
295				each( spaces, function( spaceName, space ) {
296					if ( red[ space.cache ] ) {
297						inst[ space.cache ] = red[ space.cache ].slice();
298					}
299				} );
300			} else {
301				each( spaces, function( spaceName, space ) {
302					var cache = space.cache;
303					each( space.props, function( key, prop ) {
304
305						// If the cache doesn't exist, and we know how to convert
306						if ( !inst[ cache ] && space.to ) {
307
308							// If the value was null, we don't need to copy it
309							// if the key was alpha, we don't need to copy it either
310							if ( key === "alpha" || red[ key ] == null ) {
311								return;
312							}
313							inst[ cache ] = space.to( inst._rgba );
314						}
315
316						// This is the only case where we allow nulls for ALL properties.
317						// call clamp with alwaysAllowEmpty
318						inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
319					} );
320
321					// Everything defined but alpha?
322					if ( inst[ cache ] &&
323							jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
324
325						// Use the default of 1
326						inst[ cache ][ 3 ] = 1;
327						if ( space.from ) {
328							inst._rgba = space.from( inst[ cache ] );
329						}
330					}
331				} );
332			}
333			return this;
334		}
335	},
336	is: function( compare ) {
337		var is = color( compare ),
338			same = true,
339			inst = this;
340
341		each( spaces, function( _, space ) {
342			var localCache,
343				isCache = is[ space.cache ];
344			if ( isCache ) {
345				localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
346				each( space.props, function( _, prop ) {
347					if ( isCache[ prop.idx ] != null ) {
348						same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
349						return same;
350					}
351				} );
352			}
353			return same;
354		} );
355		return same;
356	},
357	_space: function() {
358		var used = [],
359			inst = this;
360		each( spaces, function( spaceName, space ) {
361			if ( inst[ space.cache ] ) {
362				used.push( spaceName );
363			}
364		} );
365		return used.pop();
366	},
367	transition: function( other, distance ) {
368		var end = color( other ),
369			spaceName = end._space(),
370			space = spaces[ spaceName ],
371			startColor = this.alpha() === 0 ? color( "transparent" ) : this,
372			start = startColor[ space.cache ] || space.to( startColor._rgba ),
373			result = start.slice();
374
375		end = end[ space.cache ];
376		each( space.props, function( key, prop ) {
377			var index = prop.idx,
378				startValue = start[ index ],
379				endValue = end[ index ],
380				type = propTypes[ prop.type ] || {};
381
382			// If null, don't override start value
383			if ( endValue === null ) {
384				return;
385			}
386
387			// If null - use end
388			if ( startValue === null ) {
389				result[ index ] = endValue;
390			} else {
391				if ( type.mod ) {
392					if ( endValue - startValue > type.mod / 2 ) {
393						startValue += type.mod;
394					} else if ( startValue - endValue > type.mod / 2 ) {
395						startValue -= type.mod;
396					}
397				}
398				result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
399			}
400		} );
401		return this[ spaceName ]( result );
402	},
403	blend: function( opaque ) {
404
405		// If we are already opaque - return ourself
406		if ( this._rgba[ 3 ] === 1 ) {
407			return this;
408		}
409
410		var rgb = this._rgba.slice(),
411			a = rgb.pop(),
412			blend = color( opaque )._rgba;
413
414		return color( jQuery.map( rgb, function( v, i ) {
415			return ( 1 - a ) * blend[ i ] + a * v;
416		} ) );
417	},
418	toRgbaString: function() {
419		var prefix = "rgba(",
420			rgba = jQuery.map( this._rgba, function( v, i ) {
421				return v == null ? ( i > 2 ? 1 : 0 ) : v;
422			} );
423
424		if ( rgba[ 3 ] === 1 ) {
425			rgba.pop();
426			prefix = "rgb(";
427		}
428
429		return prefix + rgba.join() + ")";
430	},
431	toHslaString: function() {
432		var prefix = "hsla(",
433			hsla = jQuery.map( this.hsla(), function( v, i ) {
434				if ( v == null ) {
435					v = i > 2 ? 1 : 0;
436				}
437
438				// Catch 1 and 2
439				if ( i && i < 3 ) {
440					v = Math.round( v * 100 ) + "%";
441				}
442				return v;
443			} );
444
445		if ( hsla[ 3 ] === 1 ) {
446			hsla.pop();
447			prefix = "hsl(";
448		}
449		return prefix + hsla.join() + ")";
450	},
451	toHexString: function( includeAlpha ) {
452		var rgba = this._rgba.slice(),
453			alpha = rgba.pop();
454
455		if ( includeAlpha ) {
456			rgba.push( ~~( alpha * 255 ) );
457		}
458
459		return "#" + jQuery.map( rgba, function( v ) {
460
461			// Default to 0 when nulls exist
462			v = ( v || 0 ).toString( 16 );
463			return v.length === 1 ? "0" + v : v;
464		} ).join( "" );
465	},
466	toString: function() {
467		return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
468	}
469} );
470color.fn.parse.prototype = color.fn;
471
472// Hsla conversions adapted from:
473// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
474
475function hue2rgb( p, q, h ) {
476	h = ( h + 1 ) % 1;
477	if ( h * 6 < 1 ) {
478		return p + ( q - p ) * h * 6;
479	}
480	if ( h * 2 < 1 ) {
481		return q;
482	}
483	if ( h * 3 < 2 ) {
484		return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
485	}
486	return p;
487}
488
489spaces.hsla.to = function( rgba ) {
490	if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
491		return [ null, null, null, rgba[ 3 ] ];
492	}
493	var r = rgba[ 0 ] / 255,
494		g = rgba[ 1 ] / 255,
495		b = rgba[ 2 ] / 255,
496		a = rgba[ 3 ],
497		max = Math.max( r, g, b ),
498		min = Math.min( r, g, b ),
499		diff = max - min,
500		add = max + min,
501		l = add * 0.5,
502		h, s;
503
504	if ( min === max ) {
505		h = 0;
506	} else if ( r === max ) {
507		h = ( 60 * ( g - b ) / diff ) + 360;
508	} else if ( g === max ) {
509		h = ( 60 * ( b - r ) / diff ) + 120;
510	} else {
511		h = ( 60 * ( r - g ) / diff ) + 240;
512	}
513
514	// Chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
515	// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
516	if ( diff === 0 ) {
517		s = 0;
518	} else if ( l <= 0.5 ) {
519		s = diff / add;
520	} else {
521		s = diff / ( 2 - add );
522	}
523	return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];
524};
525
526spaces.hsla.from = function( hsla ) {
527	if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
528		return [ null, null, null, hsla[ 3 ] ];
529	}
530	var h = hsla[ 0 ] / 360,
531		s = hsla[ 1 ],
532		l = hsla[ 2 ],
533		a = hsla[ 3 ],
534		q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
535		p = 2 * l - q;
536
537	return [
538		Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
539		Math.round( hue2rgb( p, q, h ) * 255 ),
540		Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
541		a
542	];
543};
544
545each( spaces, function( spaceName, space ) {
546	var props = space.props,
547		cache = space.cache,
548		to = space.to,
549		from = space.from;
550
551	// Makes rgba() and hsla()
552	color.fn[ spaceName ] = function( value ) {
553
554		// Generate a cache for this space if it doesn't exist
555		if ( to && !this[ cache ] ) {
556			this[ cache ] = to( this._rgba );
557		}
558		if ( value === undefined ) {
559			return this[ cache ].slice();
560		}
561
562		var ret,
563			type = typeof ( value ),
564			arr = ( type === "array" || type === "object" ) ? value : arguments,
565			local = this[ cache ].slice();
566
567		each( props, function( key, prop ) {
568			var val = arr[ type === "object" ? key : prop.idx ];
569			if ( val == null ) {
570				val = local[ prop.idx ];
571			}
572			local[ prop.idx ] = clamp( val, prop );
573		} );
574
575		if ( from ) {
576			ret = color( from( local ) );
577			ret[ cache ] = local;
578			return ret;
579		} else {
580			return color( local );
581		}
582	};
583
584	// Makes red() green() blue() alpha() hue() saturation() lightness()
585	each( props, function( key, prop ) {
586
587		// Alpha is included in more than one space
588		if ( color.fn[ key ] ) {
589			return;
590		}
591		color.fn[ key ] = function( value ) {
592			var vtype = typeof ( value ),
593				fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
594				local = this[ fn ](),
595				cur = local[ prop.idx ],
596				match;
597
598			if ( vtype === "undefined" ) {
599				return cur;
600			}
601
602			if ( vtype === "function" ) {
603				value = value.call( this, cur );
604				vtype = typeof ( value );
605			}
606			if ( value == null && prop.empty ) {
607				return this;
608			}
609			if ( vtype === "string" ) {
610				match = rplusequals.exec( value );
611				if ( match ) {
612					value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
613				}
614			}
615			local[ prop.idx ] = value;
616			return this[ fn ]( local );
617		};
618	} );
619} );
620
621// Add cssHook and .fx.step function for each named hook.
622// accept a space separated string of properties
623color.hook = function( hook ) {
624	var hooks = hook.split( " " );
625	each( hooks, function( i, hook ) {
626		jQuery.cssHooks[ hook ] = {
627			set: function( elem, value ) {
628				var parsed, curElem,
629					backgroundColor = "";
630
631				if ( value !== "transparent" && ( typeof value !== "string" ||
632						( parsed = stringParse( value ) ) ) ) {
633					value = color( parsed || value );
634					if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
635						curElem = hook === "backgroundColor" ? elem.parentNode : elem;
636						while (
637							( backgroundColor === "" || backgroundColor === "transparent" ) &&
638							curElem && curElem.style
639						) {
640							try {
641								backgroundColor = jQuery.css( curElem, "backgroundColor" );
642								curElem = curElem.parentNode;
643							} catch ( e ) {
644							}
645						}
646
647						value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
648							backgroundColor :
649							"_default" );
650					}
651
652					value = value.toRgbaString();
653				}
654				try {
655					elem.style[ hook ] = value;
656				} catch ( e ) {
657
658					// Wrapped to prevent IE from throwing errors on "invalid" values like
659					// 'auto' or 'inherit'
660				}
661			}
662		};
663		jQuery.fx.step[ hook ] = function( fx ) {
664			if ( !fx.colorInit ) {
665				fx.start = color( fx.elem, hook );
666				fx.end = color( fx.end );
667				fx.colorInit = true;
668			}
669			jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
670		};
671	} );
672
673};
674
675color.hook( stepHooks );
676
677jQuery.cssHooks.borderColor = {
678	expand: function( value ) {
679		var expanded = {};
680
681		each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
682			expanded[ "border" + part + "Color" ] = value;
683		} );
684		return expanded;
685	}
686};
687
688// Basic color names only.
689// Usage of any of the other color names requires adding yourself or including
690// jquery.color.svg-names.js.
691colors = jQuery.Color.names = {
692
693	// 4.1. Basic color keywords
694	aqua: "#00ffff",
695	black: "#000000",
696	blue: "#0000ff",
697	fuchsia: "#ff00ff",
698	gray: "#808080",
699	green: "#008000",
700	lime: "#00ff00",
701	maroon: "#800000",
702	navy: "#000080",
703	olive: "#808000",
704	purple: "#800080",
705	red: "#ff0000",
706	silver: "#c0c0c0",
707	teal: "#008080",
708	white: "#ffffff",
709	yellow: "#ffff00",
710
711	// 4.2.3. "transparent" color keyword
712	transparent: [ null, null, null, 0 ],
713
714	_default: "#ffffff"
715};
716
717} )( jQuery );
718
719/******************************************************************************/
720/****************************** CLASS ANIMATIONS ******************************/
721/******************************************************************************/
722( function() {
723
724var classAnimationActions = [ "add", "remove", "toggle" ],
725	shorthandStyles = {
726		border: 1,
727		borderBottom: 1,
728		borderColor: 1,
729		borderLeft: 1,
730		borderRight: 1,
731		borderTop: 1,
732		borderWidth: 1,
733		margin: 1,
734		padding: 1
735	};
736
737$.each(
738	[ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
739	function( _, prop ) {
740		$.fx.step[ prop ] = function( fx ) {
741			if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
742				jQuery.style( fx.elem, prop, fx.end );
743				fx.setAttr = true;
744			}
745		};
746	}
747);
748
749String.prototype.toCamelCase = function() {
750    return this.replace(/^([A-Z])|\s(\w)/g, function(match, p1, p2, offset) {
751        if (p2) return p2.toUpperCase();
752        return p1.toLowerCase();
753    });
754};
755
756function getElementStyles( elem ) {
757	var key, len,
758		style = elem.ownerDocument.defaultView ?
759			elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
760			elem.currentStyle,
761		styles = {};
762
763	if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
764		len = style.length;
765		while ( len-- ) {
766			key = style[ len ];
767			if ( typeof style[ key ] === "string" ) {
768				styles[ key.toCamelCase() ] = style[ key ];
769			}
770		}
771
772	// Support: Opera, IE <9
773	} else {
774		for ( key in style ) {
775			if ( typeof style[ key ] === "string" ) {
776				styles[ key ] = style[ key ];
777			}
778		}
779	}
780
781	return styles;
782}
783
784function styleDifference( oldStyle, newStyle ) {
785	var diff = {},
786		name, value;
787
788	for ( name in newStyle ) {
789		value = newStyle[ name ];
790		if ( oldStyle[ name ] !== value ) {
791			if ( !shorthandStyles[ name ] ) {
792				if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
793					diff[ name ] = value;
794				}
795			}
796		}
797	}
798
799	return diff;
800}
801
802// Support: jQuery <1.8
803if ( !$.fn.addBack ) {
804	$.fn.addBack = function( selector ) {
805		return this.add( selector == null ?
806			this.prevObject : this.prevObject.filter( selector )
807		);
808	};
809}
810
811$.effects.animateClass = function( value, duration, easing, callback ) {
812	var o = $.speed( duration, easing, callback );
813
814	return this.queue( function() {
815		var animated = $( this ),
816			baseClass = animated.attr( "class" ) || "",
817			applyClassChange,
818			allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
819
820		// Map the animated objects to store the original styles.
821		allAnimations = allAnimations.map( function() {
822			var el = $( this );
823			return {
824				el: el,
825				start: getElementStyles( this )
826			};
827		} );
828
829		// Apply class change
830		applyClassChange = function() {
831			$.each( classAnimationActions, function( i, action ) {
832				if ( value[ action ] ) {
833					animated[ action + "Class" ]( value[ action ] );
834				}
835			} );
836		};
837		applyClassChange();
838
839		// Map all animated objects again - calculate new styles and diff
840		allAnimations = allAnimations.map( function() {
841			this.end = getElementStyles( this.el[ 0 ] );
842			this.diff = styleDifference( this.start, this.end );
843			return this;
844		} );
845
846		// Apply original class
847		animated.attr( "class", baseClass );
848
849		// Map all animated objects again - this time collecting a promise
850		allAnimations = allAnimations.map( function() {
851			var styleInfo = this,
852				dfd = $.Deferred(),
853				opts = $.extend( {}, o, {
854					queue: false,
855					complete: function() {
856						dfd.resolve( styleInfo );
857					}
858				} );
859
860			this.el.animate( this.diff, opts );
861			return dfd.promise();
862		} );
863
864		// Once all animations have completed:
865		$.when.apply( $, allAnimations.get() ).done( function() {
866
867			// Set the final class
868			applyClassChange();
869
870			// For each animated element,
871			// clear all css properties that were animated
872			$.each( arguments, function() {
873				var el = this.el;
874				$.each( this.diff, function( key ) {
875					el.css( key, "" );
876				} );
877			} );
878
879			// This is guarnteed to be there if you use jQuery.speed()
880			// it also handles dequeuing the next anim...
881			o.complete.call( animated[ 0 ] );
882		} );
883	} );
884};
885
886$.fn.extend( {
887	addClass: ( function( orig ) {
888		return function( classNames, speed, easing, callback ) {
889			return speed ?
890				$.effects.animateClass.call( this,
891					{ add: classNames }, speed, easing, callback ) :
892				orig.apply( this, arguments );
893		};
894	} )( $.fn.addClass ),
895
896	removeClass: ( function( orig ) {
897		return function( classNames, speed, easing, callback ) {
898			return arguments.length > 1 ?
899				$.effects.animateClass.call( this,
900					{ remove: classNames }, speed, easing, callback ) :
901				orig.apply( this, arguments );
902		};
903	} )( $.fn.removeClass ),
904
905	toggleClass: ( function( orig ) {
906		return function( classNames, force, speed, easing, callback ) {
907			if ( typeof force === "boolean" || force === undefined ) {
908				if ( !speed ) {
909
910					// Without speed parameter
911					return orig.apply( this, arguments );
912				} else {
913					return $.effects.animateClass.call( this,
914						( force ? { add: classNames } : { remove: classNames } ),
915						speed, easing, callback );
916				}
917			} else {
918
vendor: 6,240 bytes, lines 919-1173
919				// Without force parameter
920				return $.effects.animateClass.call( this,
921					{ toggle: classNames }, force, speed, easing );
922			}
923		};
924	} )( $.fn.toggleClass ),
925
926	switchClass: function( remove, add, speed, easing, callback ) {
927		return $.effects.animateClass.call( this, {
928			add: add,
929			remove: remove
930		}, speed, easing, callback );
931	}
932} );
933
934} )();
935
936/******************************************************************************/
937/*********************************** EFFECTS **********************************/
938/******************************************************************************/
939
940( function() {
941
942if ( $.expr && $.expr.filters && $.expr.filters.animated ) {
943	$.expr.filters.animated = ( function( orig ) {
944		return function( elem ) {
945			return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
946		};
947	} )( $.expr.filters.animated );
948}
949
950if ( $.uiBackCompat !== false ) {
951	$.extend( $.effects, {
952
953		// Saves a set of properties in a data storage
954		save: function( element, set ) {
955			var i = 0, length = set.length;
956			for ( ; i < length; i++ ) {
957				if ( set[ i ] !== null ) {
958					element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
959				}
960			}
961		},
962
963		// Restores a set of previously saved properties from a data storage
964		restore: function( element, set ) {
965			var val, i = 0, length = set.length;
966			for ( ; i < length; i++ ) {
967				if ( set[ i ] !== null ) {
968					val = element.data( dataSpace + set[ i ] );
969					element.css( set[ i ], val );
970				}
971			}
972		},
973
974		setMode: function( el, mode ) {
975			if ( mode === "toggle" ) {
976				mode = el.is( ":hidden" ) ? "show" : "hide";
977			}
978			return mode;
979		},
980
981		// Wraps the element around a wrapper that copies position properties
982		createWrapper: function( element ) {
983
984			// If the element is already wrapped, return it
985			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
986				return element.parent();
987			}
988
989			// Wrap the element
990			var props = {
991					width: element.outerWidth( true ),
992					height: element.outerHeight( true ),
993					"float": element.css( "float" )
994				},
995				wrapper = $( "<div></div>" )
996					.addClass( "ui-effects-wrapper" )
997					.css( {
998						fontSize: "100%",
999						background: "transparent",
1000						border: "none",
1001						margin: 0,
1002						padding: 0
1003					} ),
1004
1005				// Store the size in case width/height are defined in % - Fixes #5245
1006				size = {
1007					width: element.width(),
1008					height: element.height()
1009				},
1010				active = document.activeElement;
1011
1012			// Support: Firefox
1013			// Firefox incorrectly exposes anonymous content
1014			// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
1015			try {
1016				active.id;
1017			} catch ( e ) {
1018				active = document.body;
1019			}
1020
1021			element.wrap( wrapper );
1022
1023			// Fixes #7595 - Elements lose focus when wrapped.
1024			if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
1025				$( active ).trigger( "focus" );
1026			}
1027
1028			// Hotfix for jQuery 1.4 since some change in wrap() seems to actually
1029			// lose the reference to the wrapped element
1030			wrapper = element.parent();
1031
1032			// Transfer positioning properties to the wrapper
1033			if ( element.css( "position" ) === "static" ) {
1034				wrapper.css( { position: "relative" } );
1035				element.css( { position: "relative" } );
1036			} else {
1037				$.extend( props, {
1038					position: element.css( "position" ),
1039					zIndex: element.css( "z-index" )
1040				} );
1041				$.each( [ "top", "left", "bottom", "right" ], function( i, pos ) {
1042					props[ pos ] = element.css( pos );
1043					if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
1044						props[ pos ] = "auto";
1045					}
1046				} );
1047				element.css( {
1048					position: "relative",
1049					top: 0,
1050					left: 0,
1051					right: "auto",
1052					bottom: "auto"
1053				} );
1054			}
1055			element.css( size );
1056
1057			return wrapper.css( props ).show();
1058		},
1059
1060		removeWrapper: function( element ) {
1061			var active = document.activeElement;
1062
1063			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
1064				element.parent().replaceWith( element );
1065
1066				// Fixes #7595 - Elements lose focus when wrapped.
1067				if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
1068					$( active ).trigger( "focus" );
1069				}
1070			}
1071
1072			return element;
1073		}
1074	} );
1075}
1076
1077$.extend( $.effects, {
1078	version: "1.12.1",
1079
1080	define: function( name, mode, effect ) {
1081		if ( !effect ) {
1082			effect = mode;
1083			mode = "effect";
1084		}
1085
1086		$.effects.effect[ name ] = effect;
1087		$.effects.effect[ name ].mode = mode;
1088
1089		return effect;
1090	},
1091
1092	scaledDimensions: function( element, percent, direction ) {
1093		if ( percent === 0 ) {
1094			return {
1095				height: 0,
1096				width: 0,
1097				outerHeight: 0,
1098				outerWidth: 0
1099			};
1100		}
1101
1102		var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1,
1103			y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1;
1104
1105		return {
1106			height: element.height() * y,
1107			width: element.width() * x,
1108			outerHeight: element.outerHeight() * y,
1109			outerWidth: element.outerWidth() * x
1110		};
1111
1112	},
1113
1114	clipToBox: function( animation ) {
1115		return {
1116			width: animation.clip.right - animation.clip.left,
1117			height: animation.clip.bottom - animation.clip.top,
1118			left: animation.clip.left,
1119			top: animation.clip.top
1120		};
1121	},
1122
1123	// Injects recently queued functions to be first in line (after "inprogress")
1124	unshift: function( element, queueLength, count ) {
1125		var queue = element.queue();
1126
1127		if ( queueLength > 1 ) {
1128			queue.splice.apply( queue,
1129				[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
1130		}
1131		element.dequeue();
1132	},
1133
1134	saveStyle: function( element ) {
1135		element.data( dataSpaceStyle, element[ 0 ].style.cssText );
1136	},
1137
1138	restoreStyle: function( element ) {
1139		element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || "";
1140		element.removeData( dataSpaceStyle );
1141	},
1142
1143	mode: function( element, mode ) {
1144		var hidden = element.is( ":hidden" );
1145
1146		if ( mode === "toggle" ) {
1147			mode = hidden ? "show" : "hide";
1148		}
1149		if ( hidden ? mode === "hide" : mode === "show" ) {
1150			mode = "none";
1151		}
1152		return mode;
1153	},
1154
1155	// Translates a [top,left] array into a baseline value
1156	getBaseline: function( origin, original ) {
1157		var y, x;
1158
1159		switch ( origin[ 0 ] ) {
1160		case "top":
1161			y = 0;
1162			break;
1163		case "middle":
1164			y = 0.5;
1165			break;
1166		case "bottom":
1167			y = 1;
1168			break;
1169		default:
1170			y = origin[ 0 ] / original.height;
1171		}
1172
1173		switch ( origin[ 1 ] ) {
vendor: 4,246 bytes, lines 1174-1346
1174		case "left":
1175			x = 0;
1176			break;
1177		case "center":
1178			x = 0.5;
1179			break;
1180		case "right":
1181			x = 1;
1182			break;
1183		default:
1184			x = origin[ 1 ] / original.width;
1185		}
1186
1187		return {
1188			x: x,
1189			y: y
1190		};
1191	},
1192
1193	// Creates a placeholder element so that the original element can be made absolute
1194	createPlaceholder: function( element ) {
1195		var placeholder,
1196			cssPosition = element.css( "position" ),
1197			position = element.position();
1198
1199		// Lock in margins first to account for form elements, which
1200		// will change margin if you explicitly set height
1201		// see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
1202		// Support: Safari
1203		element.css( {
1204			marginTop: element.css( "marginTop" ),
1205			marginBottom: element.css( "marginBottom" ),
1206			marginLeft: element.css( "marginLeft" ),
1207			marginRight: element.css( "marginRight" )
1208		} )
1209		.outerWidth( element.outerWidth() )
1210		.outerHeight( element.outerHeight() );
1211
1212		if ( /^(static|relative)/.test( cssPosition ) ) {
1213			cssPosition = "absolute";
1214
1215			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
1216
1217				// Convert inline to inline block to account for inline elements
1218				// that turn to inline block based on content (like img)
1219				display: /^(inline|ruby)/.test( element.css( "display" ) ) ?
1220					"inline-block" :
1221					"block",
1222				visibility: "hidden",
1223
1224				// Margins need to be set to account for margin collapse
1225				marginTop: element.css( "marginTop" ),
1226				marginBottom: element.css( "marginBottom" ),
1227				marginLeft: element.css( "marginLeft" ),
1228				marginRight: element.css( "marginRight" ),
1229				"float": element.css( "float" )
1230			} )
1231			.outerWidth( element.outerWidth() )
1232			.outerHeight( element.outerHeight() )
1233			.addClass( "ui-effects-placeholder" );
1234
1235			element.data( dataSpace + "placeholder", placeholder );
1236		}
1237
1238		element.css( {
1239			position: cssPosition,
1240			left: position.left,
1241			top: position.top
1242		} );
1243
1244		return placeholder;
1245	},
1246
1247	removePlaceholder: function( element ) {
1248		var dataKey = dataSpace + "placeholder",
1249				placeholder = element.data( dataKey );
1250
1251		if ( placeholder ) {
1252			placeholder.remove();
1253			element.removeData( dataKey );
1254		}
1255	},
1256
1257	// Removes a placeholder if it exists and restores
1258	// properties that were modified during placeholder creation
1259	cleanUp: function( element ) {
1260		$.effects.restoreStyle( element );
1261		$.effects.removePlaceholder( element );
1262	},
1263
1264	setTransition: function( element, list, factor, value ) {
1265		value = value || {};
1266		$.each( list, function( i, x ) {
1267			var unit = element.cssUnit( x );
1268			if ( unit[ 0 ] > 0 ) {
1269				value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
1270			}
1271		} );
1272		return value;
1273	}
1274} );
1275
1276// Return an effect options object for the given parameters:
1277function _normalizeArguments( effect, options, speed, callback ) {
1278
1279	// Allow passing all options as the first parameter
1280	if ( $.isPlainObject( effect ) ) {
1281		options = effect;
1282		effect = effect.effect;
1283	}
1284
1285	// Convert to an object
1286	effect = { effect: effect };
1287
1288	// Catch (effect, null, ...)
1289	if ( options == null ) {
1290		options = {};
1291	}
1292
1293	// Catch (effect, callback)
1294	if ( typeof options === 'function' ) {
1295		callback = options;
1296		speed = null;
1297		options = {};
1298	}
1299
1300	// Catch (effect, speed, ?)
1301	if ( typeof options === "number" || $.fx.speeds[ options ] ) {
1302		callback = speed;
1303		speed = options;
1304		options = {};
1305	}
1306
1307	// Catch (effect, options, callback)
1308	if ( typeof speed === 'function' ) {
1309		callback = speed;
1310		speed = null;
1311	}
1312
1313	// Add options to effect
1314	if ( options ) {
1315		$.extend( effect, options );
1316	}
1317
1318	speed = speed || options.duration;
1319	effect.duration = $.fx.off ? 0 :
1320		typeof speed === "number" ? speed :
1321		speed in $.fx.speeds ? $.fx.speeds[ speed ] :
1322		$.fx.speeds._default;
1323
1324	effect.complete = callback || options.complete;
1325
1326	return effect;
1327}
1328
1329function standardAnimationOption( option ) {
1330
1331	// Valid standard speeds (nothing, number, named speed)
1332	if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
1333		return true;
1334	}
1335
1336	// Invalid strings - treat as "normal" speed
1337	if ( typeof option === "string" && !$.effects.effect[ option ] ) {
1338		return true;
1339	}
1340
1341	// Complete callback
1342	if ( typeof option === 'function' ) {
1343		return true;
1344	}
1345
1346	// Options hash (but not naming an effect)
vendor: 4,814 bytes, lines 1347-1530
1347	if ( typeof option === "object" && !option.effect ) {
1348		return true;
1349	}
1350
1351	// Didn't match any standard API
1352	return false;
1353}
1354
1355$.fn.extend( {
1356	effect: function( /* effect, options, speed, callback */ ) {
1357		var args = _normalizeArguments.apply( this, arguments ),
1358			effectMethod = $.effects.effect[ args.effect ],
1359			defaultMode = effectMethod.mode,
1360			queue = args.queue,
1361			queueName = queue || "fx",
1362			complete = args.complete,
1363			mode = args.mode,
1364			modes = [],
1365			prefilter = function( next ) {
1366				var el = $( this ),
1367					normalizedMode = $.effects.mode( el, mode ) || defaultMode;
1368
1369				// Sentinel for duck-punching the :animated psuedo-selector
1370				el.data( dataSpaceAnimated, true );
1371
1372				// Save effect mode for later use,
1373				// we can't just call $.effects.mode again later,
1374				// as the .show() below destroys the initial state
1375				modes.push( normalizedMode );
1376
1377				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.13
1378				if ( defaultMode && ( normalizedMode === "show" ||
1379						( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
1380					el.show();
1381				}
1382
1383				if ( !defaultMode || normalizedMode !== "none" ) {
1384					$.effects.saveStyle( el );
1385				}
1386
1387				if ( typeof next === 'function' ) {
1388					next();
1389				}
1390			};
1391
1392		if ( $.fx.off || !effectMethod ) {
1393
1394			// Delegate to the original method (e.g., .show()) if possible
1395			if ( mode ) {
1396				return this[ mode ]( args.duration, complete );
1397			} else {
1398				return this.each( function() {
1399					if ( complete ) {
1400						complete.call( this );
1401					}
1402				} );
1403			}
1404		}
1405
1406		function run( next ) {
1407			var elem = $( this );
1408
1409			function cleanup() {
1410				elem.removeData( dataSpaceAnimated );
1411
1412				$.effects.cleanUp( elem );
1413
1414				if ( args.mode === "hide" ) {
1415					elem.hide();
1416				}
1417
1418				done();
1419			}
1420
1421			function done() {
1422				if ( typeof complete === 'function' ) {
1423					complete.call( elem[ 0 ] );
1424				}
1425
1426				if ( typeof next === 'function' ) {
1427					next();
1428				}
1429			}
1430
1431			// Override mode option on a per element basis,
1432			// as toggle can be either show or hide depending on element state
1433			args.mode = modes.shift();
1434
1435			if ( $.uiBackCompat !== false && !defaultMode ) {
1436				if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
1437
1438					// Call the core method to track "olddisplay" properly
1439					elem[ mode ]();
1440					done();
1441				} else {
1442					effectMethod.call( elem[ 0 ], args, done );
1443				}
1444			} else {
1445				if ( args.mode === "none" ) {
1446
1447					// Call the core method to track "olddisplay" properly
1448					elem[ mode ]();
1449					done();
1450				} else {
1451					effectMethod.call( elem[ 0 ], args, cleanup );
1452				}
1453			}
1454		}
1455
1456		// Run prefilter on all elements first to ensure that
1457		// any showing or hiding happens before placeholder creation,
1458		// which ensures that any layout changes are correctly captured.
1459		return queue === false ?
1460			this.each( prefilter ).each( run ) :
1461			this.queue( queueName, prefilter ).queue( queueName, run );
1462	},
1463
1464	show: ( function( orig ) {
1465		return function( option ) {
1466			if ( standardAnimationOption( option ) ) {
1467				return orig.apply( this, arguments );
1468			} else {
1469				var args = _normalizeArguments.apply( this, arguments );
1470				args.mode = "show";
1471				return this.effect.call( this, args );
1472			}
1473		};
1474	} )( $.fn.show ),
1475
1476	hide: ( function( orig ) {
1477		return function( option ) {
1478			if ( standardAnimationOption( option ) ) {
1479				return orig.apply( this, arguments );
1480			} else {
1481				var args = _normalizeArguments.apply( this, arguments );
1482				args.mode = "hide";
1483				return this.effect.call( this, args );
1484			}
1485		};
1486	} )( $.fn.hide ),
1487
1488	toggle: ( function( orig ) {
1489		return function( option ) {
1490			if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
1491				return orig.apply( this, arguments );
1492			} else {
1493				var args = _normalizeArguments.apply( this, arguments );
1494				args.mode = "toggle";
1495				return this.effect.call( this, args );
1496			}
1497		};
1498	} )( $.fn.toggle ),
1499
1500	cssUnit: function( key ) {
1501		var style = this.css( key ),
1502			val = [];
1503
1504		$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
1505			if ( style.indexOf( unit ) > 0 ) {
1506				val = [ parseFloat( style ), unit ];
1507			}
1508		} );
1509		return val;
1510	},
1511
1512	cssClip: function( clipObj ) {
1513		if ( clipObj ) {
1514			return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
1515				clipObj.bottom + "px " + clipObj.left + "px)" );
1516		}
1517		return parseClip( this.css( "clip" ), this );
1518	},
1519
1520	transfer: function( options, done ) {
1521		var element = $( this ),
1522			target = $( options.to ),
1523			targetFixed = target.css( "position" ) === "fixed",
1524			body = $( "body" ),
1525			fixTop = targetFixed ? body.scrollTop() : 0,
1526			fixLeft = targetFixed ? body.scrollLeft() : 0,
1527			endPosition = target.offset(),
1528			animation = {
1529				top: endPosition.top - fixTop,
1530				left: endPosition.left - fixLeft,
vendor: 3,195 bytes, lines 1531-1642
1531				height: target.innerHeight(),
1532				width: target.innerWidth()
1533			},
1534			startPosition = element.offset(),
1535			transfer = $( "<div class='ui-effects-transfer'></div>" )
1536				.appendTo( "body" )
1537				.addClass( options.className )
1538				.css( {
1539					top: startPosition.top - fixTop,
1540					left: startPosition.left - fixLeft,
1541					height: element.innerHeight(),
1542					width: element.innerWidth(),
1543					position: targetFixed ? "fixed" : "absolute"
1544				} )
1545				.animate( animation, options.duration, options.easing, function() {
1546					transfer.remove();
1547					if ( typeof done === 'function' ) {
1548						done();
1549					}
1550				} );
1551	}
1552} );
1553
1554function parseClip( str, element ) {
1555		var outerWidth = element.outerWidth(),
1556			outerHeight = element.outerHeight(),
1557			clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
1558			values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
1559
1560		return {
1561			top: parseFloat( values[ 1 ] ) || 0,
1562			right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
1563			bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
1564			left: parseFloat( values[ 4 ] ) || 0
1565		};
1566}
1567
1568$.fx.step.clip = function( fx ) {
1569	if ( !fx.clipInit ) {
1570		fx.start = $( fx.elem ).cssClip();
1571		if ( typeof fx.end === "string" ) {
1572			fx.end = parseClip( fx.end, fx.elem );
1573		}
1574		fx.clipInit = true;
1575	}
1576
1577	$( fx.elem ).cssClip( {
1578		top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,
1579		right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,
1580		bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,
1581		left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left
1582	} );
1583};
1584
1585} )();
1586
1587/******************************************************************************/
1588/*********************************** EASING ***********************************/
1589/******************************************************************************/
1590
1591( function() {
1592
1593// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
1594
1595var baseEasings = {};
1596
1597$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
1598	baseEasings[ name ] = function( p ) {
1599		return Math.pow( p, i + 2 );
1600	};
1601} );
1602
1603$.extend( baseEasings, {
1604	Sine: function( p ) {
1605		return 1 - Math.cos( p * Math.PI / 2 );
1606	},
1607	Circ: function( p ) {
1608		return 1 - Math.sqrt( 1 - p * p );
1609	},
1610	Elastic: function( p ) {
1611		return p === 0 || p === 1 ? p :
1612			-Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );
1613	},
1614	Back: function( p ) {
1615		return p * p * ( 3 * p - 2 );
1616	},
1617	Bounce: function( p ) {
1618		var pow2,
1619			bounce = 4;
1620
1621		while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
1622		return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
1623	}
1624} );
1625
1626$.each( baseEasings, function( name, easeIn ) {
1627	$.easing[ "easeIn" + name ] = easeIn;
1628	$.easing[ "easeOut" + name ] = function( p ) {
1629		return 1 - easeIn( 1 - p );
1630	};
1631	$.easing[ "easeInOut" + name ] = function( p ) {
1632		return p < 0.5 ?
1633			easeIn( p * 2 ) / 2 :
1634			1 - easeIn( p * -2 + 2 ) / 2;
1635	};
1636} );
1637
1638} )();
1639
1640return $.effects;
1641
1642} ) );

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.