a0efe681a5ed854d3a001226faabe12dfa99a1a9
2 * jQuery UI Effects 1.8.22
4 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
5 * Dual licensed under the MIT or GPL Version 2 licenses.
6 * http://jquery.org/license
8 * http://docs.jquery.com/UI/Effects/
10 ;jQuery
.effects
|| (function($, undefined) {
16 /******************************************************************************/
17 /****************************** COLOR ANIMATIONS ******************************/
18 /******************************************************************************/
20 // override the animation for color styles
21 $.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
22 'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],
24 $.fx
.step
[attr
] = function(fx
) {
26 fx
.start
= getColor(fx
.elem
, attr
);
27 fx
.end
= getRGB(fx
.end
);
31 fx
.elem
.style
[attr
] = 'rgb(' +
32 Math
.max(Math
.min(parseInt((fx
.pos
* (fx
.end
[0] - fx
.start
[0])) + fx
.start
[0], 10), 255), 0) + ',' +
33 Math
.max(Math
.min(parseInt((fx
.pos
* (fx
.end
[1] - fx
.start
[1])) + fx
.start
[1], 10), 255), 0) + ',' +
34 Math
.max(Math
.min(parseInt((fx
.pos
* (fx
.end
[2] - fx
.start
[2])) + fx
.start
[2], 10), 255), 0) + ')';
38 // Color Conversion functions from highlightFade
39 // By Blair Mitchelmore
40 // http://jquery.offput.ca/highlightFade/
42 // Parse strings looking for color tuples [255,255,255]
43 function getRGB(color
) {
46 // Check if we're already dealing with an array of colors
47 if ( color
&& color
.constructor == Array
&& color
.length
== 3 )
50 // Look for rgb(num,num,num)
51 if (result
= /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color
))
52 return [parseInt(result
[1],10), parseInt(result
[2],10), parseInt(result
[3],10)];
54 // Look for rgb(num%,num%,num%)
55 if (result
= /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color
))
56 return [parseFloat(result
[1])*2.55, parseFloat(result
[2])*2.55, parseFloat(result
[3])*2.55];
59 if (result
= /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color
))
60 return [parseInt(result
[1],16), parseInt(result
[2],16), parseInt(result
[3],16)];
63 if (result
= /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color
))
64 return [parseInt(result
[1]+result
[1],16), parseInt(result
[2]+result
[2],16), parseInt(result
[3]+result
[3],16)];
66 // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
67 if (result
= /rgba\(0, 0, 0, 0\)/.exec(color
))
68 return colors
['transparent'];
70 // Otherwise, we're most likely dealing with a named color
71 return colors
[$.trim(color
).toLowerCase()];
74 function getColor(elem
, attr
) {
78 // jQuery <1.4.3 uses curCSS, in 1.4.3 - 1.7.2 curCSS = css, 1.8+ only has css
79 color
= ($.curCSS
|| $.css
)(elem
, attr
);
81 // Keep going until we find an element that has color, or we hit the body
82 if ( color
!= '' && color
!= 'transparent' || $.nodeName(elem
, "body") )
85 attr
= "backgroundColor";
86 } while ( elem
= elem
.parentNode
);
91 // Some named colors to work with
92 // From Interface by Stefan Petre
93 // http://interface.eyecon.ro/
104 darkcyan
:[0,139,139],
105 darkgrey
:[169,169,169],
107 darkkhaki
:[189,183,107],
108 darkmagenta
:[139,0,139],
109 darkolivegreen
:[85,107,47],
110 darkorange
:[255,140,0],
111 darkorchid
:[153,50,204],
113 darksalmon
:[233,150,122],
114 darkviolet
:[148,0,211],
120 lightblue
:[173,216,230],
121 lightcyan
:[224,255,255],
122 lightgreen
:[144,238,144],
123 lightgrey
:[211,211,211],
124 lightpink
:[255,182,193],
125 lightyellow
:[255,255,224],
136 silver
:[192,192,192],
139 transparent
: [255,255,255]
144 /******************************************************************************/
145 /****************************** CLASS ANIMATIONS ******************************/
146 /******************************************************************************/
148 var classAnimationActions
= ['add', 'remove', 'toggle'],
161 function getElementStyles() {
162 var style
= document
.defaultView
163 ? document
.defaultView
.getComputedStyle(this, null)
169 // webkit enumerates style porperties
170 if (style
&& style
.length
&& style
[0] && style
[style
[0]]) {
171 var len
= style
.length
;
174 if (typeof style
[key
] == 'string') {
175 camelCase
= key
.replace(/\-(\w)/g, function(all
, letter
){
176 return letter
.toUpperCase();
178 newStyle
[camelCase
] = style
[key
];
183 if (typeof style
[key
] === 'string') {
184 newStyle
[key
] = style
[key
];
192 function filterStyles(styles
) {
194 for (name
in styles
) {
195 value
= styles
[name
];
197 // ignore null and undefined values
199 // ignore functions (when does this occur?)
200 $.isFunction(value
) ||
201 // shorthand styles that need to be expanded
202 name
in shorthandStyles
||
203 // ignore scrollbars (break in IE)
204 (/scrollbar/).test(name
) ||
206 // only colors or values that can be converted to numbers
207 (!(/color/i).test(name
) && isNaN(parseFloat(value
)))
216 function styleDifference(oldStyle
, newStyle
) {
217 var diff
= { _
: 0 }, // http://dev.jquery.com/ticket/5459
220 for (name
in newStyle
) {
221 if (oldStyle
[name
] != newStyle
[name
]) {
222 diff
[name
] = newStyle
[name
];
229 $.effects
.animateClass = function(value
, duration
, easing
, callback
) {
230 if ($.isFunction(easing
)) {
235 return this.queue(function() {
237 originalStyleAttr
= that
.attr('style') || ' ',
238 originalStyle
= filterStyles(getElementStyles
.call(this)),
240 className
= that
.attr('class') || "";
242 $.each(classAnimationActions
, function(i
, action
) {
244 that
[action
+ 'Class'](value
[action
]);
247 newStyle
= filterStyles(getElementStyles
.call(this));
248 that
.attr('class', className
);
250 that
.animate(styleDifference(originalStyle
, newStyle
), {
254 complete: function() {
255 $.each(classAnimationActions
, function(i
, action
) {
256 if (value
[action
]) { that
[action
+ 'Class'](value
[action
]); }
258 // work around bug in IE by clearing the cssText before setting it
259 if (typeof that
.attr('style') == 'object') {
260 that
.attr('style').cssText
= '';
261 that
.attr('style').cssText
= originalStyleAttr
;
263 that
.attr('style', originalStyleAttr
);
265 if (callback
) { callback
.apply(this, arguments
); }
273 _addClass
: $.fn
.addClass
,
274 addClass: function(classNames
, speed
, easing
, callback
) {
275 return speed
? $.effects
.animateClass
.apply(this, [{ add
: classNames
},speed
,easing
,callback
]) : this._addClass(classNames
);
278 _removeClass
: $.fn
.removeClass
,
279 removeClass: function(classNames
,speed
,easing
,callback
) {
280 return speed
? $.effects
.animateClass
.apply(this, [{ remove
: classNames
},speed
,easing
,callback
]) : this._removeClass(classNames
);
283 _toggleClass
: $.fn
.toggleClass
,
284 toggleClass: function(classNames
, force
, speed
, easing
, callback
) {
285 if ( typeof force
== "boolean" || force
=== undefined ) {
287 // without speed parameter;
288 return this._toggleClass(classNames
, force
);
290 return $.effects
.animateClass
.apply(this, [(force
?{add
:classNames
}:{remove
:classNames
}),speed
,easing
,callback
]);
293 // without switch parameter;
294 return $.effects
.animateClass
.apply(this, [{ toggle
: classNames
},force
,speed
,easing
]);
298 switchClass: function(remove
,add
,speed
,easing
,callback
) {
299 return $.effects
.animateClass
.apply(this, [{ add
: add
, remove
: remove
},speed
,easing
,callback
]);
305 /******************************************************************************/
306 /*********************************** EFFECTS **********************************/
307 /******************************************************************************/
309 $.extend($.effects
, {
312 // Saves a set of properties in a data storage
313 save: function(element
, set) {
314 for(var i
=0; i
< set.length
; i
++) {
315 if(set[i
] !== null) element
.data("ec.storage."+set[i
], element
[0].style
[set[i
]]);
319 // Restores a set of previously saved properties from a data storage
320 restore: function(element
, set) {
321 for(var i
=0; i
< set.length
; i
++) {
322 if(set[i
] !== null) element
.css(set[i
], element
.data("ec.storage."+set[i
]));
326 setMode: function(el
, mode
) {
327 if (mode
== 'toggle') mode
= el
.is(':hidden') ? 'show' : 'hide'; // Set for toggle
331 getBaseline: function(origin
, original
) { // Translates a [top,left] array into a baseline value
332 // this should be a little more flexible in the future to handle a string & hash
335 case 'top': y
= 0; break;
336 case 'middle': y
= 0.5; break;
337 case 'bottom': y
= 1; break;
338 default: y
= origin
[0] / original
.height
;
341 case 'left': x
= 0; break;
342 case 'center': x
= 0.5; break;
343 case 'right': x
= 1; break;
344 default: x
= origin
[1] / original
.width
;
349 // Wraps the element around a wrapper that copies position properties
350 createWrapper: function(element
) {
352 // if the element is already wrapped, return it
353 if (element
.parent().is('.ui-effects-wrapper')) {
354 return element
.parent();
359 width
: element
.outerWidth(true),
360 height
: element
.outerHeight(true),
361 'float': element
.css('float')
363 wrapper
= $('<div></div>')
364 .addClass('ui-effects-wrapper')
367 background
: 'transparent',
372 active
= document
.activeElement
;
375 // Firefox incorrectly exposes anonymous content
376 // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
380 active
= document
.body
;
383 element
.wrap( wrapper
);
385 // Fixes #7595 - Elements lose focus when wrapped.
386 if ( element
[ 0 ] === active
|| $.contains( element
[ 0 ], active
) ) {
390 wrapper
= element
.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
392 // transfer positioning properties to the wrapper
393 if (element
.css('position') == 'static') {
394 wrapper
.css({ position
: 'relative' });
395 element
.css({ position
: 'relative' });
398 position
: element
.css('position'),
399 zIndex
: element
.css('z-index')
401 $.each(['top', 'left', 'bottom', 'right'], function(i
, pos
) {
402 props
[pos
] = element
.css(pos
);
403 if (isNaN(parseInt(props
[pos
], 10))) {
407 element
.css({position
: 'relative', top
: 0, left
: 0, right
: 'auto', bottom
: 'auto' });
410 return wrapper
.css(props
).show();
413 removeWrapper: function(element
) {
415 active
= document
.activeElement
;
417 if (element
.parent().is('.ui-effects-wrapper')) {
418 parent
= element
.parent().replaceWith(element
);
419 // Fixes #7595 - Elements lose focus when wrapped.
420 if ( element
[ 0 ] === active
|| $.contains( element
[ 0 ], active
) ) {
429 setTransition: function(element
, list
, factor
, value
) {
431 $.each(list
, function(i
, x
){
432 var unit
= element
.cssUnit(x
);
433 if (unit
[0] > 0) value
[x
] = unit
[0] * factor
+ unit
[1];
440 function _normalizeArguments(effect
, options
, speed
, callback
) {
441 // shift params for method overloading
442 if (typeof effect
== 'object') {
446 effect
= options
.effect
;
448 if ($.isFunction(options
)) {
453 if (typeof options
== 'number' || $.fx
.speeds
[options
]) {
458 if ($.isFunction(speed
)) {
463 options
= options
|| {};
465 speed
= speed
|| options
.duration
;
466 speed
= $.fx
.off
? 0 : typeof speed
== 'number'
467 ? speed
: speed
in $.fx
.speeds
? $.fx
.speeds
[speed
] : $.fx
.speeds
._default
;
469 callback
= callback
|| options
.complete
;
471 return [effect
, options
, speed
, callback
];
474 function standardSpeed( speed
) {
475 // valid standard speeds
476 if ( !speed
|| typeof speed
=== "number" || $.fx
.speeds
[ speed
] ) {
480 // invalid strings - treat as "normal" speed
481 if ( typeof speed
=== "string" && !$.effects
[ speed
] ) {
489 effect: function(effect
, options
, speed
, callback
) {
490 var args
= _normalizeArguments
.apply(this, arguments
),
491 // TODO: make effects take actual parameters instead of a hash
497 mode
= args2
.options
.mode
,
498 effectMethod
= $.effects
[effect
];
500 if ( $.fx
.off
|| !effectMethod
) {
501 // delegate to the original method (e.g., .show()) if possible
503 return this[ mode
]( args2
.duration
, args2
.callback
);
505 return this.each(function() {
506 if ( args2
.callback
) {
507 args2
.callback
.call( this );
513 return effectMethod
.call(this, args2
);
517 show: function(speed
) {
518 if ( standardSpeed( speed
) ) {
519 return this._show
.apply(this, arguments
);
521 var args
= _normalizeArguments
.apply(this, arguments
);
522 args
[1].mode
= 'show';
523 return this.effect
.apply(this, args
);
528 hide: function(speed
) {
529 if ( standardSpeed( speed
) ) {
530 return this._hide
.apply(this, arguments
);
532 var args
= _normalizeArguments
.apply(this, arguments
);
533 args
[1].mode
= 'hide';
534 return this.effect
.apply(this, args
);
538 // jQuery core overloads toggle and creates _toggle
539 __toggle
: $.fn
.toggle
,
540 toggle: function(speed
) {
541 if ( standardSpeed( speed
) || typeof speed
=== "boolean" || $.isFunction( speed
) ) {
542 return this.__toggle
.apply(this, arguments
);
544 var args
= _normalizeArguments
.apply(this, arguments
);
545 args
[1].mode
= 'toggle';
546 return this.effect
.apply(this, args
);
551 cssUnit: function(key
) {
552 var style
= this.css(key
), val
= [];
553 $.each( ['em','px','%','pt'], function(i
, unit
){
554 if(style
.indexOf(unit
) > 0)
555 val
= [parseFloat(style
), unit
];
563 /******************************************************************************/
564 /*********************************** EASING ***********************************/
565 /******************************************************************************/
568 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
570 * Uses the built in easing capabilities added In jQuery 1.1
571 * to offer multiple easing options
573 * TERMS OF USE - jQuery Easing
575 * Open source under the BSD License.
577 * Copyright 2008 George McGinley Smith
578 * All rights reserved.
580 * Redistribution and use in source and binary forms, with or without modification,
581 * are permitted provided that the following conditions are met:
583 * Redistributions of source code must retain the above copyright notice, this list of
584 * conditions and the following disclaimer.
585 * Redistributions in binary form must reproduce the above copyright notice, this list
586 * of conditions and the following disclaimer in the documentation and/or other materials
587 * provided with the distribution.
589 * Neither the name of the author nor the names of contributors may be used to endorse
590 * or promote products derived from this software without specific prior written permission.
592 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
593 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
594 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
595 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
596 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
597 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
598 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
599 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
600 * OF THE POSSIBILITY OF SUCH DAMAGE.
604 // t: current time, b: begInnIng value, c: change In value, d: duration
605 $.easing
.jswing
= $.easing
.swing
;
610 swing: function (x
, t
, b
, c
, d
) {
611 //alert($.easing.default);
612 return $.easing
[$.easing
.def
](x
, t
, b
, c
, d
);
614 easeInQuad: function (x
, t
, b
, c
, d
) {
615 return c
*(t
/=d
)*t
+ b
;
617 easeOutQuad: function (x
, t
, b
, c
, d
) {
618 return -c
*(t
/=d
)*(t
-2) + b
;
620 easeInOutQuad: function (x
, t
, b
, c
, d
) {
621 if ((t
/=d/2) < 1) return c
/2*t
*t
+ b
;
622 return -c
/2 * ((--t
)*(t
-2) - 1) + b
;
624 easeInCubic: function (x
, t
, b
, c
, d
) {
625 return c
*(t
/=d
)*t
*t
+ b
;
627 easeOutCubic: function (x
, t
, b
, c
, d
) {
628 return c
*((t
=t
/d
-1)*t
*t
+ 1) + b
;
630 easeInOutCubic: function (x
, t
, b
, c
, d
) {
631 if ((t
/=d/2) < 1) return c
/2*t
*t
*t
+ b
;
632 return c
/2*((t
-=2)*t
*t
+ 2) + b
;
634 easeInQuart: function (x
, t
, b
, c
, d
) {
635 return c
*(t
/=d
)*t
*t
*t
+ b
;
637 easeOutQuart: function (x
, t
, b
, c
, d
) {
638 return -c
* ((t
=t
/d
-1)*t
*t
*t
- 1) + b
;
640 easeInOutQuart: function (x
, t
, b
, c
, d
) {
641 if ((t
/=d/2) < 1) return c
/2*t
*t
*t
*t
+ b
;
642 return -c
/2 * ((t
-=2)*t
*t
*t
- 2) + b
;
644 easeInQuint: function (x
, t
, b
, c
, d
) {
645 return c
*(t
/=d
)*t
*t
*t
*t
+ b
;
647 easeOutQuint: function (x
, t
, b
, c
, d
) {
648 return c
*((t
=t
/d
-1)*t
*t
*t
*t
+ 1) + b
;
650 easeInOutQuint: function (x
, t
, b
, c
, d
) {
651 if ((t
/=d/2) < 1) return c
/2*t
*t
*t
*t
*t
+ b
;
652 return c
/2*((t
-=2)*t
*t
*t
*t
+ 2) + b
;
654 easeInSine: function (x
, t
, b
, c
, d
) {
655 return -c
* Math
.cos(t
/d * (Math.PI/2)) + c
+ b
;
657 easeOutSine: function (x
, t
, b
, c
, d
) {
658 return c
* Math
.sin(t
/d * (Math.PI/2)) + b
;
660 easeInOutSine: function (x
, t
, b
, c
, d
) {
661 return -c
/2 * (Math.cos(Math.PI*t/d) - 1) + b
;
663 easeInExpo: function (x
, t
, b
, c
, d
) {
664 return (t
==0) ? b
: c
* Math
.pow(2, 10 * (t
/d
- 1)) + b
;
666 easeOutExpo: function (x
, t
, b
, c
, d
) {
667 return (t
==d
) ? b
+c
: c
* (-Math
.pow(2, -10 * t
/d
) + 1) + b
;
669 easeInOutExpo: function (x
, t
, b
, c
, d
) {
671 if (t
==d
) return b
+c
;
672 if ((t
/=d/2) < 1) return c
/2 * Math
.pow(2, 10 * (t
- 1)) + b
;
673 return c
/2 * (-Math
.pow(2, -10 * --t
) + 2) + b
;
675 easeInCirc: function (x
, t
, b
, c
, d
) {
676 return -c
* (Math
.sqrt(1 - (t
/=d
)*t
) - 1) + b
;
678 easeOutCirc: function (x
, t
, b
, c
, d
) {
679 return c
* Math
.sqrt(1 - (t
=t
/d
-1)*t
) + b
;
681 easeInOutCirc: function (x
, t
, b
, c
, d
) {
682 if ((t
/=d/2) < 1) return -c
/2 * (Math
.sqrt(1 - t
*t
) - 1) + b
;
683 return c
/2 * (Math
.sqrt(1 - (t
-=2)*t
) + 1) + b
;
685 easeInElastic: function (x
, t
, b
, c
, d
) {
686 var s
=1.70158;var p
=0;var a
=c
;
687 if (t
==0) return b
; if ((t
/=d
)==1) return b
+c
; if (!p
) p
=d
*.3;
688 if (a
< Math
.abs(c
)) { a
=c
; var s
=p
/4; }
689 else var s
= p
/(2*Math.PI) * Math.asin (c/a);
690 return -(a
*Math
.pow(2,10*(t
-=1)) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
)) + b
;
692 easeOutElastic: function (x
, t
, b
, c
, d
) {
693 var s
=1.70158;var p
=0;var a
=c
;
694 if (t
==0) return b
; if ((t
/=d
)==1) return b
+c
; if (!p
) p
=d
*.3;
695 if (a
< Math
.abs(c
)) { a
=c
; var s
=p
/4; }
696 else var s
= p
/(2*Math.PI) * Math.asin (c/a);
697 return a
*Math
.pow(2,-10*t
) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
) + c
+ b
;
699 easeInOutElastic: function (x
, t
, b
, c
, d
) {
700 var s
=1.70158;var p
=0;var a
=c
;
701 if (t
==0) return b
; if ((t
/=d/2)==2) return b
+c
; if (!p
) p
=d
*(.3*1.5);
702 if (a
< Math
.abs(c
)) { a
=c
; var s
=p
/4; }
703 else var s
= p
/(2*Math.PI) * Math.asin (c/a);
704 if (t
< 1) return -.5*(a
*Math
.pow(2,10*(t
-=1)) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
)) + b
;
705 return a
*Math
.pow(2,-10*(t
-=1)) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
)*.5 + c
+ b
;
707 easeInBack: function (x
, t
, b
, c
, d
, s
) {
708 if (s
== undefined) s
= 1.70158;
709 return c
*(t
/=d
)*t
*((s
+1)*t
- s
) + b
;
711 easeOutBack: function (x
, t
, b
, c
, d
, s
) {
712 if (s
== undefined) s
= 1.70158;
713 return c
*((t
=t
/d
-1)*t
*((s
+1)*t
+ s
) + 1) + b
;
715 easeInOutBack: function (x
, t
, b
, c
, d
, s
) {
716 if (s
== undefined) s
= 1.70158;
717 if ((t
/=d/2) < 1) return c
/2*(t
*t
*(((s
*=(1.525))+1)*t
- s
)) + b
;
718 return c
/2*((t
-=2)*t
*(((s
*=(1.525))+1)*t
+ s
) + 2) + b
;
720 easeInBounce: function (x
, t
, b
, c
, d
) {
721 return c
- $.easing
.easeOutBounce (x
, d
-t
, 0, c
, d
) + b
;
723 easeOutBounce: function (x
, t
, b
, c
, d
) {
724 if ((t
/=d) < (1/2.75)) {
725 return c
*(7.5625*t
*t
) + b
;
726 } else if (t
< (2/2.75)) {
727 return c
*(7.5625*(t
-=(1.5/2.75))*t
+ .75) + b
;
728 } else if (t
< (2.5/2.75)) {
729 return c
*(7.5625*(t
-=(2.25/2.75))*t
+ .9375) + b
;
731 return c
*(7.5625*(t
-=(2.625/2.75))*t
+ .984375) + b
;
734 easeInOutBounce: function (x
, t
, b
, c
, d
) {
735 if (t
< d
/2) return $.easing
.easeInBounce (x
, t
*2, 0, c
, d
) * .5 + b
;
736 return $.easing
.easeOutBounce (x
, t
*2-d
, 0, c
, d
) * .5 + c
*.5 + b
;
742 * TERMS OF USE - EASING EQUATIONS
744 * Open source under the BSD License.
746 * Copyright 2001 Robert Penner
747 * All rights reserved.
749 * Redistribution and use in source and binary forms, with or without modification,
750 * are permitted provided that the following conditions are met:
752 * Redistributions of source code must retain the above copyright notice, this list of
753 * conditions and the following disclaimer.
754 * Redistributions in binary form must reproduce the above copyright notice, this list
755 * of conditions and the following disclaimer in the documentation and/or other materials
756 * provided with the distribution.
758 * Neither the name of the author nor the names of contributors may be used to endorse
759 * or promote products derived from this software without specific prior written permission.
761 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
762 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
763 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
764 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
765 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
766 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
767 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
768 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
769 * OF THE POSSIBILITY OF SUCH DAMAGE.