2 * jQuery UI Effects 1.8.2
4 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
5 * Dual licensed under the MIT (MIT-LICENSE.txt)
6 * and GPL (GPL-LICENSE.txt) licenses.
8 * http://docs.jquery.com/UI/Effects/
10 ;jQuery
.effects
|| (function($) {
16 /******************************************************************************/
17 /****************************** COLOR ANIMATIONS ******************************/
18 /******************************************************************************/
20 // override the animation for color styles
21 $.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
22 'borderRightColor', 'borderTopColor', '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 color
= $.curCSS(elem
, attr
);
80 // Keep going until we find an element that has color, or we hit the body
81 if ( color
!= '' && color
!= 'transparent' || $.nodeName(elem
, "body") )
84 attr
= "backgroundColor";
85 } while ( elem
= elem
.parentNode
);
90 // Some named colors to work with
91 // From Interface by Stefan Petre
92 // http://interface.eyecon.ro/
103 darkcyan
:[0,139,139],
104 darkgrey
:[169,169,169],
106 darkkhaki
:[189,183,107],
107 darkmagenta
:[139,0,139],
108 darkolivegreen
:[85,107,47],
109 darkorange
:[255,140,0],
110 darkorchid
:[153,50,204],
112 darksalmon
:[233,150,122],
113 darkviolet
:[148,0,211],
119 lightblue
:[173,216,230],
120 lightcyan
:[224,255,255],
121 lightgreen
:[144,238,144],
122 lightgrey
:[211,211,211],
123 lightpink
:[255,182,193],
124 lightyellow
:[255,255,224],
135 silver
:[192,192,192],
138 transparent
: [255,255,255]
143 /******************************************************************************/
144 /****************************** CLASS ANIMATIONS ******************************/
145 /******************************************************************************/
147 var classAnimationActions
= ['add', 'remove', 'toggle'],
160 function getElementStyles() {
161 var style
= document
.defaultView
162 ? document
.defaultView
.getComputedStyle(this, null)
168 // webkit enumerates style porperties
169 if (style
&& style
.length
&& style
[0] && style
[style
[0]]) {
170 var len
= style
.length
;
173 if (typeof style
[key
] == 'string') {
174 camelCase
= key
.replace(/\-(\w)/g, function(all
, letter
){
175 return letter
.toUpperCase();
177 newStyle
[camelCase
] = style
[key
];
182 if (typeof style
[key
] === 'string') {
183 newStyle
[key
] = style
[key
];
191 function filterStyles(styles
) {
193 for (name
in styles
) {
194 value
= styles
[name
];
196 // ignore null and undefined values
198 // ignore functions (when does this occur?)
199 $.isFunction(value
) ||
200 // shorthand styles that need to be expanded
201 name
in shorthandStyles
||
202 // ignore scrollbars (break in IE)
203 (/scrollbar/).test(name
) ||
205 // only colors or values that can be converted to numbers
206 (!(/color/i).test(name
) && isNaN(parseFloat(value
)))
215 function styleDifference(oldStyle
, newStyle
) {
216 var diff
= { _
: 0 }, // http://dev.jquery.com/ticket/5459
219 for (name
in newStyle
) {
220 if (oldStyle
[name
] != newStyle
[name
]) {
221 diff
[name
] = newStyle
[name
];
228 $.effects
.animateClass = function(value
, duration
, easing
, callback
) {
229 if ($.isFunction(easing
)) {
234 return this.each(function() {
237 originalStyleAttr
= that
.attr('style') || ' ',
238 originalStyle
= filterStyles(getElementStyles
.call(this)),
240 className
= that
.attr('className');
242 $.each(classAnimationActions
, function(i
, action
) {
244 that
[action
+ 'Class'](value
[action
]);
247 newStyle
= filterStyles(getElementStyles
.call(this));
248 that
.attr('className', className
);
250 that
.animate(styleDifference(originalStyle
, newStyle
), duration
, easing
, function() {
251 $.each(classAnimationActions
, function(i
, action
) {
252 if (value
[action
]) { that
[action
+ 'Class'](value
[action
]); }
254 // work around bug in IE by clearing the cssText before setting it
255 if (typeof that
.attr('style') == 'object') {
256 that
.attr('style').cssText
= '';
257 that
.attr('style').cssText
= originalStyleAttr
;
259 that
.attr('style', originalStyleAttr
);
261 if (callback
) { callback
.apply(this, arguments
); }
267 _addClass
: $.fn
.addClass
,
268 addClass: function(classNames
, speed
, easing
, callback
) {
269 return speed
? $.effects
.animateClass
.apply(this, [{ add
: classNames
},speed
,easing
,callback
]) : this._addClass(classNames
);
272 _removeClass
: $.fn
.removeClass
,
273 removeClass: function(classNames
,speed
,easing
,callback
) {
274 return speed
? $.effects
.animateClass
.apply(this, [{ remove
: classNames
},speed
,easing
,callback
]) : this._removeClass(classNames
);
277 _toggleClass
: $.fn
.toggleClass
,
278 toggleClass: function(classNames
, force
, speed
, easing
, callback
) {
279 if ( typeof force
== "boolean" || force
=== undefined ) {
281 // without speed parameter;
282 return this._toggleClass(classNames
, force
);
284 return $.effects
.animateClass
.apply(this, [(force
?{add
:classNames
}:{remove
:classNames
}),speed
,easing
,callback
]);
287 // without switch parameter;
288 return $.effects
.animateClass
.apply(this, [{ toggle
: classNames
},force
,speed
,easing
]);
292 switchClass: function(remove
,add
,speed
,easing
,callback
) {
293 return $.effects
.animateClass
.apply(this, [{ add
: add
, remove
: remove
},speed
,easing
,callback
]);
299 /******************************************************************************/
300 /*********************************** EFFECTS **********************************/
301 /******************************************************************************/
303 $.extend($.effects
, {
306 // Saves a set of properties in a data storage
307 save: function(element
, set) {
308 for(var i
=0; i
< set.length
; i
++) {
309 if(set[i
] !== null) element
.data("ec.storage."+set[i
], element
[0].style
[set[i
]]);
313 // Restores a set of previously saved properties from a data storage
314 restore: function(element
, set) {
315 for(var i
=0; i
< set.length
; i
++) {
316 if(set[i
] !== null) element
.css(set[i
], element
.data("ec.storage."+set[i
]));
320 setMode: function(el
, mode
) {
321 if (mode
== 'toggle') mode
= el
.is(':hidden') ? 'show' : 'hide'; // Set for toggle
325 getBaseline: function(origin
, original
) { // Translates a [top,left] array into a baseline value
326 // this should be a little more flexible in the future to handle a string & hash
329 case 'top': y
= 0; break;
330 case 'middle': y
= 0.5; break;
331 case 'bottom': y
= 1; break;
332 default: y
= origin
[0] / original
.height
;
335 case 'left': x
= 0; break;
336 case 'center': x
= 0.5; break;
337 case 'right': x
= 1; break;
338 default: x
= origin
[1] / original
.width
;
343 // Wraps the element around a wrapper that copies position properties
344 createWrapper: function(element
) {
346 // if the element is already wrapped, return it
347 if (element
.parent().is('.ui-effects-wrapper')) {
348 return element
.parent();
353 width
: element
.outerWidth(true),
354 height
: element
.outerHeight(true),
355 'float': element
.css('float')
357 wrapper
= $('<div></div>')
358 .addClass('ui-effects-wrapper')
361 background
: 'transparent',
367 element
.wrap(wrapper
);
368 wrapper
= element
.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
370 // transfer positioning properties to the wrapper
371 if (element
.css('position') == 'static') {
372 wrapper
.css({ position
: 'relative' });
373 element
.css({ position
: 'relative' });
376 position
: element
.css('position'),
377 zIndex
: element
.css('z-index')
379 $.each(['top', 'left', 'bottom', 'right'], function(i
, pos
) {
380 props
[pos
] = element
.css(pos
);
381 if (isNaN(parseInt(props
[pos
], 10))) {
385 element
.css({position
: 'relative', top
: 0, left
: 0 });
388 return wrapper
.css(props
).show();
391 removeWrapper: function(element
) {
392 if (element
.parent().is('.ui-effects-wrapper'))
393 return element
.parent().replaceWith(element
);
397 setTransition: function(element
, list
, factor
, value
) {
399 $.each(list
, function(i
, x
){
400 unit
= element
.cssUnit(x
);
401 if (unit
[0] > 0) value
[x
] = unit
[0] * factor
+ unit
[1];
408 function _normalizeArguments(effect
, options
, speed
, callback
) {
409 // shift params for method overloading
410 if (typeof effect
== 'object') {
414 effect
= options
.effect
;
416 if ($.isFunction(options
)) {
421 if ($.isFunction(speed
)) {
425 if (typeof options
== 'number' || $.fx
.speeds
[options
]) {
431 options
= options
|| {};
433 speed
= speed
|| options
.duration
;
434 speed
= $.fx
.off
? 0 : typeof speed
== 'number'
435 ? speed
: $.fx
.speeds
[speed
] || $.fx
.speeds
._default
;
437 callback
= callback
|| options
.complete
;
439 return [effect
, options
, speed
, callback
];
443 effect: function(effect
, options
, speed
, callback
) {
444 var args
= _normalizeArguments
.apply(this, arguments
),
445 // TODO: make effects takes actual parameters instead of a hash
451 effectMethod
= $.effects
[effect
];
453 return effectMethod
&& !$.fx
.off
? effectMethod
.call(this, args2
) : this;
457 show: function(speed
) {
458 if (!speed
|| typeof speed
== 'number' || $.fx
.speeds
[speed
]) {
459 return this._show
.apply(this, arguments
);
461 var args
= _normalizeArguments
.apply(this, arguments
);
462 args
[1].mode
= 'show';
463 return this.effect
.apply(this, args
);
468 hide: function(speed
) {
469 if (!speed
|| typeof speed
== 'number' || $.fx
.speeds
[speed
]) {
470 return this._hide
.apply(this, arguments
);
472 var args
= _normalizeArguments
.apply(this, arguments
);
473 args
[1].mode
= 'hide';
474 return this.effect
.apply(this, args
);
478 // jQuery core overloads toggle and create _toggle
479 __toggle
: $.fn
.toggle
,
480 toggle: function(speed
) {
481 if (!speed
|| typeof speed
== 'number' || $.fx
.speeds
[speed
] ||
482 typeof speed
== 'boolean' || $.isFunction(speed
)) {
483 return this.__toggle
.apply(this, arguments
);
485 var args
= _normalizeArguments
.apply(this, arguments
);
486 args
[1].mode
= 'toggle';
487 return this.effect
.apply(this, args
);
492 cssUnit: function(key
) {
493 var style
= this.css(key
), val
= [];
494 $.each( ['em','px','%','pt'], function(i
, unit
){
495 if(style
.indexOf(unit
) > 0)
496 val
= [parseFloat(style
), unit
];
504 /******************************************************************************/
505 /*********************************** EASING ***********************************/
506 /******************************************************************************/
509 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
511 * Uses the built in easing capabilities added In jQuery 1.1
512 * to offer multiple easing options
514 * TERMS OF USE - jQuery Easing
516 * Open source under the BSD License.
518 * Copyright 2008 George McGinley Smith
519 * All rights reserved.
521 * Redistribution and use in source and binary forms, with or without modification,
522 * are permitted provided that the following conditions are met:
524 * Redistributions of source code must retain the above copyright notice, this list of
525 * conditions and the following disclaimer.
526 * Redistributions in binary form must reproduce the above copyright notice, this list
527 * of conditions and the following disclaimer in the documentation and/or other materials
528 * provided with the distribution.
530 * Neither the name of the author nor the names of contributors may be used to endorse
531 * or promote products derived from this software without specific prior written permission.
533 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
534 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
535 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
536 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
537 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
538 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
539 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
540 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
541 * OF THE POSSIBILITY OF SUCH DAMAGE.
545 // t: current time, b: begInnIng value, c: change In value, d: duration
546 $.easing
.jswing
= $.easing
.swing
;
551 swing: function (x
, t
, b
, c
, d
) {
552 //alert($.easing.default);
553 return $.easing
[$.easing
.def
](x
, t
, b
, c
, d
);
555 easeInQuad: function (x
, t
, b
, c
, d
) {
556 return c
*(t
/=d
)*t
+ b
;
558 easeOutQuad: function (x
, t
, b
, c
, d
) {
559 return -c
*(t
/=d
)*(t
-2) + b
;
561 easeInOutQuad: function (x
, t
, b
, c
, d
) {
562 if ((t
/=d/2) < 1) return c
/2*t
*t
+ b
;
563 return -c
/2 * ((--t
)*(t
-2) - 1) + b
;
565 easeInCubic: function (x
, t
, b
, c
, d
) {
566 return c
*(t
/=d
)*t
*t
+ b
;
568 easeOutCubic: function (x
, t
, b
, c
, d
) {
569 return c
*((t
=t
/d
-1)*t
*t
+ 1) + b
;
571 easeInOutCubic: function (x
, t
, b
, c
, d
) {
572 if ((t
/=d/2) < 1) return c
/2*t
*t
*t
+ b
;
573 return c
/2*((t
-=2)*t
*t
+ 2) + b
;
575 easeInQuart: function (x
, t
, b
, c
, d
) {
576 return c
*(t
/=d
)*t
*t
*t
+ b
;
578 easeOutQuart: function (x
, t
, b
, c
, d
) {
579 return -c
* ((t
=t
/d
-1)*t
*t
*t
- 1) + b
;
581 easeInOutQuart: function (x
, t
, b
, c
, d
) {
582 if ((t
/=d/2) < 1) return c
/2*t
*t
*t
*t
+ b
;
583 return -c
/2 * ((t
-=2)*t
*t
*t
- 2) + b
;
585 easeInQuint: function (x
, t
, b
, c
, d
) {
586 return c
*(t
/=d
)*t
*t
*t
*t
+ b
;
588 easeOutQuint: function (x
, t
, b
, c
, d
) {
589 return c
*((t
=t
/d
-1)*t
*t
*t
*t
+ 1) + b
;
591 easeInOutQuint: function (x
, t
, b
, c
, d
) {
592 if ((t
/=d/2) < 1) return c
/2*t
*t
*t
*t
*t
+ b
;
593 return c
/2*((t
-=2)*t
*t
*t
*t
+ 2) + b
;
595 easeInSine: function (x
, t
, b
, c
, d
) {
596 return -c
* Math
.cos(t
/d * (Math.PI/2)) + c
+ b
;
598 easeOutSine: function (x
, t
, b
, c
, d
) {
599 return c
* Math
.sin(t
/d * (Math.PI/2)) + b
;
601 easeInOutSine: function (x
, t
, b
, c
, d
) {
602 return -c
/2 * (Math.cos(Math.PI*t/d) - 1) + b
;
604 easeInExpo: function (x
, t
, b
, c
, d
) {
605 return (t
==0) ? b
: c
* Math
.pow(2, 10 * (t
/d
- 1)) + b
;
607 easeOutExpo: function (x
, t
, b
, c
, d
) {
608 return (t
==d
) ? b
+c
: c
* (-Math
.pow(2, -10 * t
/d
) + 1) + b
;
610 easeInOutExpo: function (x
, t
, b
, c
, d
) {
612 if (t
==d
) return b
+c
;
613 if ((t
/=d/2) < 1) return c
/2 * Math
.pow(2, 10 * (t
- 1)) + b
;
614 return c
/2 * (-Math
.pow(2, -10 * --t
) + 2) + b
;
616 easeInCirc: function (x
, t
, b
, c
, d
) {
617 return -c
* (Math
.sqrt(1 - (t
/=d
)*t
) - 1) + b
;
619 easeOutCirc: function (x
, t
, b
, c
, d
) {
620 return c
* Math
.sqrt(1 - (t
=t
/d
-1)*t
) + b
;
622 easeInOutCirc: function (x
, t
, b
, c
, d
) {
623 if ((t
/=d/2) < 1) return -c
/2 * (Math
.sqrt(1 - t
*t
) - 1) + b
;
624 return c
/2 * (Math
.sqrt(1 - (t
-=2)*t
) + 1) + b
;
626 easeInElastic: function (x
, t
, b
, c
, d
) {
627 var s
=1.70158;var p
=0;var a
=c
;
628 if (t
==0) return b
; if ((t
/=d
)==1) return b
+c
; if (!p
) p
=d
*.3;
629 if (a
< Math
.abs(c
)) { a
=c
; var s
=p
/4; }
630 else var s
= p
/(2*Math.PI) * Math.asin (c/a);
631 return -(a
*Math
.pow(2,10*(t
-=1)) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
)) + b
;
633 easeOutElastic: function (x
, t
, b
, c
, d
) {
634 var s
=1.70158;var p
=0;var a
=c
;
635 if (t
==0) return b
; if ((t
/=d
)==1) return b
+c
; if (!p
) p
=d
*.3;
636 if (a
< Math
.abs(c
)) { a
=c
; var s
=p
/4; }
637 else var s
= p
/(2*Math.PI) * Math.asin (c/a);
638 return a
*Math
.pow(2,-10*t
) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
) + c
+ b
;
640 easeInOutElastic: function (x
, t
, b
, c
, d
) {
641 var s
=1.70158;var p
=0;var a
=c
;
642 if (t
==0) return b
; if ((t
/=d/2)==2) return b
+c
; if (!p
) p
=d
*(.3*1.5);
643 if (a
< Math
.abs(c
)) { a
=c
; var s
=p
/4; }
644 else var s
= p
/(2*Math.PI) * Math.asin (c/a);
645 if (t
< 1) return -.5*(a
*Math
.pow(2,10*(t
-=1)) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
)) + b
;
646 return a
*Math
.pow(2,-10*(t
-=1)) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
)*.5 + c
+ b
;
648 easeInBack: function (x
, t
, b
, c
, d
, s
) {
649 if (s
== undefined) s
= 1.70158;
650 return c
*(t
/=d
)*t
*((s
+1)*t
- s
) + b
;
652 easeOutBack: function (x
, t
, b
, c
, d
, s
) {
653 if (s
== undefined) s
= 1.70158;
654 return c
*((t
=t
/d
-1)*t
*((s
+1)*t
+ s
) + 1) + b
;
656 easeInOutBack: function (x
, t
, b
, c
, d
, s
) {
657 if (s
== undefined) s
= 1.70158;
658 if ((t
/=d/2) < 1) return c
/2*(t
*t
*(((s
*=(1.525))+1)*t
- s
)) + b
;
659 return c
/2*((t
-=2)*t
*(((s
*=(1.525))+1)*t
+ s
) + 2) + b
;
661 easeInBounce: function (x
, t
, b
, c
, d
) {
662 return c
- $.easing
.easeOutBounce (x
, d
-t
, 0, c
, d
) + b
;
664 easeOutBounce: function (x
, t
, b
, c
, d
) {
665 if ((t
/=d) < (1/2.75)) {
666 return c
*(7.5625*t
*t
) + b
;
667 } else if (t
< (2/2.75)) {
668 return c
*(7.5625*(t
-=(1.5/2.75))*t
+ .75) + b
;
669 } else if (t
< (2.5/2.75)) {
670 return c
*(7.5625*(t
-=(2.25/2.75))*t
+ .9375) + b
;
672 return c
*(7.5625*(t
-=(2.625/2.75))*t
+ .984375) + b
;
675 easeInOutBounce: function (x
, t
, b
, c
, d
) {
676 if (t
< d
/2) return $.easing
.easeInBounce (x
, t
*2, 0, c
, d
) * .5 + b
;
677 return $.easing
.easeOutBounce (x
, t
*2-d
, 0, c
, d
) * .5 + c
*.5 + b
;
683 * TERMS OF USE - EASING EQUATIONS
685 * Open source under the BSD License.
687 * Copyright 2001 Robert Penner
688 * All rights reserved.
690 * Redistribution and use in source and binary forms, with or without modification,
691 * are permitted provided that the following conditions are met:
693 * Redistributions of source code must retain the above copyright notice, this list of
694 * conditions and the following disclaimer.
695 * Redistributions in binary form must reproduce the above copyright notice, this list
696 * of conditions and the following disclaimer in the documentation and/or other materials
697 * provided with the distribution.
699 * Neither the name of the author nor the names of contributors may be used to endorse
700 * or promote products derived from this software without specific prior written permission.
702 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
703 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
704 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
705 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
706 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
707 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
708 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
709 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
710 * OF THE POSSIBILITY OF SUCH DAMAGE.