jquery-ui-rails 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jquery-ui-rails might be problematic. Click here for more details.

Files changed (137) hide show
  1. data/.gitignore +0 -1
  2. data/History.md +6 -0
  3. data/README.md +1 -0
  4. data/Rakefile +13 -2
  5. data/lib/jquery/ui/rails/version.rb +1 -1
  6. data/vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  7. data/vendor/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  8. data/vendor/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  9. data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  10. data/vendor/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  11. data/vendor/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  12. data/vendor/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  13. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  14. data/vendor/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  15. data/vendor/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  16. data/vendor/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  17. data/vendor/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  18. data/vendor/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  19. data/vendor/assets/javascripts/jquery.effects.all.js +14 -0
  20. data/vendor/assets/javascripts/jquery.effects.blind.js +51 -0
  21. data/vendor/assets/javascripts/jquery.effects.bounce.js +80 -0
  22. data/vendor/assets/javascripts/jquery.effects.clip.js +56 -0
  23. data/vendor/assets/javascripts/jquery.effects.core.js +763 -0
  24. data/vendor/assets/javascripts/jquery.effects.drop.js +52 -0
  25. data/vendor/assets/javascripts/jquery.effects.explode.js +81 -0
  26. data/vendor/assets/javascripts/jquery.effects.fade.js +34 -0
  27. data/vendor/assets/javascripts/jquery.effects.fold.js +58 -0
  28. data/vendor/assets/javascripts/jquery.effects.highlight.js +52 -0
  29. data/vendor/assets/javascripts/jquery.effects.pulsate.js +53 -0
  30. data/vendor/assets/javascripts/jquery.effects.scale.js +180 -0
  31. data/vendor/assets/javascripts/jquery.effects.shake.js +59 -0
  32. data/vendor/assets/javascripts/jquery.effects.slide.js +52 -0
  33. data/vendor/assets/javascripts/jquery.effects.transfer.js +47 -0
  34. data/vendor/assets/javascripts/jquery.ui.accordion.js +614 -0
  35. data/vendor/assets/javascripts/jquery.ui.all.js +31 -0
  36. data/vendor/assets/javascripts/jquery.ui.autocomplete.js +635 -0
  37. data/vendor/assets/javascripts/jquery.ui.button.js +417 -0
  38. data/vendor/assets/javascripts/jquery.ui.core.js +321 -0
  39. data/vendor/assets/javascripts/jquery.ui.datepicker-af.js +25 -0
  40. data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +25 -0
  41. data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +25 -0
  42. data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +25 -0
  43. data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +26 -0
  44. data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +25 -0
  45. data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +25 -0
  46. data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +25 -0
  47. data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +25 -0
  48. data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +25 -0
  49. data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +25 -0
  50. data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +25 -0
  51. data/vendor/assets/javascripts/jquery.ui.datepicker-en-AU.js +25 -0
  52. data/vendor/assets/javascripts/jquery.ui.datepicker-en-GB.js +25 -0
  53. data/vendor/assets/javascripts/jquery.ui.datepicker-en-NZ.js +25 -0
  54. data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +25 -0
  55. data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +25 -0
  56. data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +25 -0
  57. data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +25 -0
  58. data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +61 -0
  59. data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +25 -0
  60. data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +25 -0
  61. data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +25 -0
  62. data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +27 -0
  63. data/vendor/assets/javascripts/jquery.ui.datepicker-ge.js +23 -0
  64. data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +25 -0
  65. data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +25 -0
  66. data/vendor/assets/javascripts/jquery.ui.datepicker-hi.js +25 -0
  67. data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +25 -0
  68. data/vendor/assets/javascripts/jquery.ui.datepicker-hu.js +25 -0
  69. data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +25 -0
  70. data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +25 -0
  71. data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +25 -0
  72. data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +25 -0
  73. data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +25 -0
  74. data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +25 -0
  75. data/vendor/assets/javascripts/jquery.ui.datepicker-km.js +25 -0
  76. data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +25 -0
  77. data/vendor/assets/javascripts/jquery.ui.datepicker-lb.js +25 -0
  78. data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +25 -0
  79. data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +25 -0
  80. data/vendor/assets/javascripts/jquery.ui.datepicker-mk.js +25 -0
  81. data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +25 -0
  82. data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +25 -0
  83. data/vendor/assets/javascripts/jquery.ui.datepicker-nl-BE.js +25 -0
  84. data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +25 -0
  85. data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +25 -0
  86. data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +25 -0
  87. data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +25 -0
  88. data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +24 -0
  89. data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +23 -0
  90. data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +28 -0
  91. data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +25 -0
  92. data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +25 -0
  93. data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +26 -0
  94. data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +25 -0
  95. data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +25 -0
  96. data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +25 -0
  97. data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +25 -0
  98. data/vendor/assets/javascripts/jquery.ui.datepicker-ta.js +25 -0
  99. data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +25 -0
  100. data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +25 -0
  101. data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +25 -0
  102. data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +26 -0
  103. data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +25 -0
  104. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +25 -0
  105. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +25 -0
  106. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +25 -0
  107. data/vendor/assets/javascripts/jquery.ui.datepicker.js +1826 -0
  108. data/vendor/assets/javascripts/jquery.ui.dialog.js +882 -0
  109. data/vendor/assets/javascripts/jquery.ui.draggable.js +835 -0
  110. data/vendor/assets/javascripts/jquery.ui.droppable.js +301 -0
  111. data/vendor/assets/javascripts/jquery.ui.mouse.js +168 -0
  112. data/vendor/assets/javascripts/jquery.ui.position.js +298 -0
  113. data/vendor/assets/javascripts/jquery.ui.progressbar.js +112 -0
  114. data/vendor/assets/javascripts/jquery.ui.resizable.js +811 -0
  115. data/vendor/assets/javascripts/jquery.ui.selectable.js +271 -0
  116. data/vendor/assets/javascripts/jquery.ui.slider.js +666 -0
  117. data/vendor/assets/javascripts/jquery.ui.sortable.js +1085 -0
  118. data/vendor/assets/javascripts/jquery.ui.tabs.js +760 -0
  119. data/vendor/assets/javascripts/jquery.ui.widget.js +272 -0
  120. data/vendor/assets/stylesheets/jquery.ui.accordion.css.erb +23 -0
  121. data/vendor/assets/stylesheets/jquery.ui.all.css.erb +13 -0
  122. data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +57 -0
  123. data/vendor/assets/stylesheets/jquery.ui.base.css.erb +23 -0
  124. data/vendor/assets/stylesheets/jquery.ui.button.css.erb +42 -0
  125. data/vendor/assets/stylesheets/jquery.ui.core.css.erb +38 -0
  126. data/vendor/assets/stylesheets/jquery.ui.datepicker.css.erb +72 -0
  127. data/vendor/assets/stylesheets/jquery.ui.dialog.css.erb +25 -0
  128. data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +15 -0
  129. data/vendor/assets/stylesheets/jquery.ui.resizable.css.erb +24 -0
  130. data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +14 -0
  131. data/vendor/assets/stylesheets/jquery.ui.slider.css.erb +28 -0
  132. data/vendor/assets/stylesheets/jquery.ui.tabs.css.erb +22 -0
  133. data/vendor/assets/stylesheets/jquery.ui.theme.css.erb +250 -0
  134. metadata +111 -113
  135. data/jquery-ui/GPL-LICENSE.txt +0 -278
  136. data/jquery-ui/MIT-LICENSE.txt +0 -25
  137. data/jquery-ui/package.json +0 -36
data/.gitignore CHANGED
@@ -1,3 +1,2 @@
1
1
  *.gem
2
- vendor
3
2
  Gemfile.lock
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ # master
2
+
3
+ # 0.4.1
4
+
5
+ * Add jquery.effects.all
6
+
1
7
  # 0.4.0
2
8
 
3
9
  * Upgrade to jQuery UI 1.8.20
data/README.md CHANGED
@@ -120,6 +120,7 @@ Datepicker has optional i18n modules for non-US locales, named
120
120
  ### Effects
121
121
 
122
122
  ```javascript
123
+ //= require jquery.effects.all
123
124
  //= require jquery.effects.core
124
125
  //= require jquery.effects.blind
125
126
  //= require jquery.effects.bounce
data/Rakefile CHANGED
@@ -33,6 +33,10 @@ def get_js_dependencies(basename)
33
33
  end
34
34
  end
35
35
 
36
+ def remove_js_extension(path)
37
+ path.chomp(".js")
38
+ end
39
+
36
40
  def protect_copyright_notice(source_code)
37
41
  # YUI does not minify comments starting with "/*!"
38
42
  # The i18n files start with non-copyright comments, so we require a newline
@@ -52,7 +56,7 @@ task :javascripts => :submodule do
52
56
  Rake.rake_output_message 'Generating javascripts'
53
57
  Dir.glob("jquery-ui/ui/**/*.js").each do |path|
54
58
  basename = File.basename(path)
55
- dep_modules = get_js_dependencies(basename).map { |dep| dep.sub(/\.js\z/, '') }
59
+ dep_modules = get_js_dependencies(basename).map(&method(:remove_js_extension))
56
60
  dep_modules << 'jquery' if basename == 'jquery.ui.core.js'
57
61
  File.open("#{target_dir}/#{basename}", "w") do |out|
58
62
  dep_modules.each do |mod|
@@ -65,9 +69,16 @@ task :javascripts => :submodule do
65
69
  out.write(source_code)
66
70
  end
67
71
  end
72
+ File.open("#{target_dir}/jquery.effects.all.js", "w") do |out|
73
+ Dir.glob("jquery-ui/ui/jquery.effects.*.js").sort.each do |path|
74
+ asset_name = remove_js_extension(File.basename(path))
75
+ out.write("//= require #{asset_name}\n")
76
+ end
77
+ end
68
78
  File.open("#{target_dir}/jquery.ui.all.js", "w") do |out|
69
79
  Dir.glob("jquery-ui/ui/*.js").sort.each do |path|
70
- out.write("//= require #{File.basename(path).sub(/\.js\z/, '')}\n")
80
+ asset_name = remove_js_extension(File.basename(path))
81
+ out.write("//= require #{asset_name}\n")
71
82
  end
72
83
  end
73
84
  end
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Ui
3
3
  module Rails
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,14 @@
1
+ //= require jquery.effects.blind
2
+ //= require jquery.effects.bounce
3
+ //= require jquery.effects.clip
4
+ //= require jquery.effects.core
5
+ //= require jquery.effects.drop
6
+ //= require jquery.effects.explode
7
+ //= require jquery.effects.fade
8
+ //= require jquery.effects.fold
9
+ //= require jquery.effects.highlight
10
+ //= require jquery.effects.pulsate
11
+ //= require jquery.effects.scale
12
+ //= require jquery.effects.shake
13
+ //= require jquery.effects.slide
14
+ //= require jquery.effects.transfer
@@ -0,0 +1,51 @@
1
+ //= require jquery.effects.core
2
+
3
+ /*!
4
+ * jQuery UI Effects Blind 1.8.20
5
+ *
6
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Effects/Blind
11
+ *
12
+ * Depends:
13
+ * jquery.effects.core.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ $.effects.blind = function(o) {
18
+
19
+ return this.queue(function() {
20
+
21
+ // Create element
22
+ var el = $(this), props = ['position','top','bottom','left','right'];
23
+
24
+ // Set options
25
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
26
+ var direction = o.options.direction || 'vertical'; // Default direction
27
+
28
+ // Adjust
29
+ $.effects.save(el, props); el.show(); // Save & Show
30
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
31
+ var ref = (direction == 'vertical') ? 'height' : 'width';
32
+ var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
33
+ if(mode == 'show') wrapper.css(ref, 0); // Shift
34
+
35
+ // Animation
36
+ var animation = {};
37
+ animation[ref] = mode == 'show' ? distance : 0;
38
+
39
+ // Animate
40
+ wrapper.animate(animation, o.duration, o.options.easing, function() {
41
+ if(mode == 'hide') el.hide(); // Hide
42
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
43
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
44
+ el.dequeue();
45
+ });
46
+
47
+ });
48
+
49
+ };
50
+
51
+ })(jQuery);
@@ -0,0 +1,80 @@
1
+ //= require jquery.effects.core
2
+
3
+ /*!
4
+ * jQuery UI Effects Bounce 1.8.20
5
+ *
6
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Effects/Bounce
11
+ *
12
+ * Depends:
13
+ * jquery.effects.core.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ $.effects.bounce = function(o) {
18
+
19
+ return this.queue(function() {
20
+
21
+ // Create element
22
+ var el = $(this), props = ['position','top','bottom','left','right'];
23
+
24
+ // Set options
25
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
26
+ var direction = o.options.direction || 'up'; // Default direction
27
+ var distance = o.options.distance || 20; // Default distance
28
+ var times = o.options.times || 5; // Default # of times
29
+ var speed = o.duration || 250; // Default speed per bounce
30
+ if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE
31
+
32
+ // Adjust
33
+ $.effects.save(el, props); el.show(); // Save & Show
34
+ $.effects.createWrapper(el); // Create Wrapper
35
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
36
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
37
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3);
38
+ if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
39
+ if (mode == 'hide') distance = distance / (times * 2);
40
+ if (mode != 'hide') times--;
41
+
42
+ // Animate
43
+ if (mode == 'show') { // Show Bounce
44
+ var animation = {opacity: 1};
45
+ animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
46
+ el.animate(animation, speed / 2, o.options.easing);
47
+ distance = distance / 2;
48
+ times--;
49
+ };
50
+ for (var i = 0; i < times; i++) { // Bounces
51
+ var animation1 = {}, animation2 = {};
52
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
53
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
54
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);
55
+ distance = (mode == 'hide') ? distance * 2 : distance / 2;
56
+ };
57
+ if (mode == 'hide') { // Last Bounce
58
+ var animation = {opacity: 0};
59
+ animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
60
+ el.animate(animation, speed / 2, o.options.easing, function(){
61
+ el.hide(); // Hide
62
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
63
+ if(o.callback) o.callback.apply(this, arguments); // Callback
64
+ });
65
+ } else {
66
+ var animation1 = {}, animation2 = {};
67
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
68
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
69
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){
70
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
71
+ if(o.callback) o.callback.apply(this, arguments); // Callback
72
+ });
73
+ };
74
+ el.queue('fx', function() { el.dequeue(); });
75
+ el.dequeue();
76
+ });
77
+
78
+ };
79
+
80
+ })(jQuery);
@@ -0,0 +1,56 @@
1
+ //= require jquery.effects.core
2
+
3
+ /*!
4
+ * jQuery UI Effects Clip 1.8.20
5
+ *
6
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Effects/Clip
11
+ *
12
+ * Depends:
13
+ * jquery.effects.core.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ $.effects.clip = function(o) {
18
+
19
+ return this.queue(function() {
20
+
21
+ // Create element
22
+ var el = $(this), props = ['position','top','bottom','left','right','height','width'];
23
+
24
+ // Set options
25
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
26
+ var direction = o.options.direction || 'vertical'; // Default direction
27
+
28
+ // Adjust
29
+ $.effects.save(el, props); el.show(); // Save & Show
30
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
31
+ var animate = el[0].tagName == 'IMG' ? wrapper : el;
32
+ var ref = {
33
+ size: (direction == 'vertical') ? 'height' : 'width',
34
+ position: (direction == 'vertical') ? 'top' : 'left'
35
+ };
36
+ var distance = (direction == 'vertical') ? animate.height() : animate.width();
37
+ if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
38
+
39
+ // Animation
40
+ var animation = {};
41
+ animation[ref.size] = mode == 'show' ? distance : 0;
42
+ animation[ref.position] = mode == 'show' ? 0 : distance / 2;
43
+
44
+ // Animate
45
+ animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
46
+ if(mode == 'hide') el.hide(); // Hide
47
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
48
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
49
+ el.dequeue();
50
+ }});
51
+
52
+ });
53
+
54
+ };
55
+
56
+ })(jQuery);
@@ -0,0 +1,763 @@
1
+ /*!
2
+ * jQuery UI Effects 1.8.20
3
+ *
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
7
+ *
8
+ * http://docs.jquery.com/UI/Effects/
9
+ */
10
+ ;jQuery.effects || (function($, undefined) {
11
+
12
+ $.effects = {};
13
+
14
+
15
+
16
+ /******************************************************************************/
17
+ /****************************** COLOR ANIMATIONS ******************************/
18
+ /******************************************************************************/
19
+
20
+ // override the animation for color styles
21
+ $.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
22
+ 'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],
23
+ function(i, attr) {
24
+ $.fx.step[attr] = function(fx) {
25
+ if (!fx.colorInit) {
26
+ fx.start = getColor(fx.elem, attr);
27
+ fx.end = getRGB(fx.end);
28
+ fx.colorInit = true;
29
+ }
30
+
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) + ')';
35
+ };
36
+ });
37
+
38
+ // Color Conversion functions from highlightFade
39
+ // By Blair Mitchelmore
40
+ // http://jquery.offput.ca/highlightFade/
41
+
42
+ // Parse strings looking for color tuples [255,255,255]
43
+ function getRGB(color) {
44
+ var result;
45
+
46
+ // Check if we're already dealing with an array of colors
47
+ if ( color && color.constructor == Array && color.length == 3 )
48
+ return color;
49
+
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)];
53
+
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];
57
+
58
+ // Look for #a0b1c2
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)];
61
+
62
+ // Look for #fff
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)];
65
+
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'];
69
+
70
+ // Otherwise, we're most likely dealing with a named color
71
+ return colors[$.trim(color).toLowerCase()];
72
+ }
73
+
74
+ function getColor(elem, attr) {
75
+ var color;
76
+
77
+ do {
78
+ color = $.curCSS(elem, attr);
79
+
80
+ // Keep going until we find an element that has color, or we hit the body
81
+ if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
82
+ break;
83
+
84
+ attr = "backgroundColor";
85
+ } while ( elem = elem.parentNode );
86
+
87
+ return getRGB(color);
88
+ };
89
+
90
+ // Some named colors to work with
91
+ // From Interface by Stefan Petre
92
+ // http://interface.eyecon.ro/
93
+
94
+ var colors = {
95
+ aqua:[0,255,255],
96
+ azure:[240,255,255],
97
+ beige:[245,245,220],
98
+ black:[0,0,0],
99
+ blue:[0,0,255],
100
+ brown:[165,42,42],
101
+ cyan:[0,255,255],
102
+ darkblue:[0,0,139],
103
+ darkcyan:[0,139,139],
104
+ darkgrey:[169,169,169],
105
+ darkgreen:[0,100,0],
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],
111
+ darkred:[139,0,0],
112
+ darksalmon:[233,150,122],
113
+ darkviolet:[148,0,211],
114
+ fuchsia:[255,0,255],
115
+ gold:[255,215,0],
116
+ green:[0,128,0],
117
+ indigo:[75,0,130],
118
+ khaki:[240,230,140],
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],
125
+ lime:[0,255,0],
126
+ magenta:[255,0,255],
127
+ maroon:[128,0,0],
128
+ navy:[0,0,128],
129
+ olive:[128,128,0],
130
+ orange:[255,165,0],
131
+ pink:[255,192,203],
132
+ purple:[128,0,128],
133
+ violet:[128,0,128],
134
+ red:[255,0,0],
135
+ silver:[192,192,192],
136
+ white:[255,255,255],
137
+ yellow:[255,255,0],
138
+ transparent: [255,255,255]
139
+ };
140
+
141
+
142
+
143
+ /******************************************************************************/
144
+ /****************************** CLASS ANIMATIONS ******************************/
145
+ /******************************************************************************/
146
+
147
+ var classAnimationActions = ['add', 'remove', 'toggle'],
148
+ shorthandStyles = {
149
+ border: 1,
150
+ borderBottom: 1,
151
+ borderColor: 1,
152
+ borderLeft: 1,
153
+ borderRight: 1,
154
+ borderTop: 1,
155
+ borderWidth: 1,
156
+ margin: 1,
157
+ padding: 1
158
+ };
159
+
160
+ function getElementStyles() {
161
+ var style = document.defaultView
162
+ ? document.defaultView.getComputedStyle(this, null)
163
+ : this.currentStyle,
164
+ newStyle = {},
165
+ key,
166
+ camelCase;
167
+
168
+ // webkit enumerates style porperties
169
+ if (style && style.length && style[0] && style[style[0]]) {
170
+ var len = style.length;
171
+ while (len--) {
172
+ key = style[len];
173
+ if (typeof style[key] == 'string') {
174
+ camelCase = key.replace(/\-(\w)/g, function(all, letter){
175
+ return letter.toUpperCase();
176
+ });
177
+ newStyle[camelCase] = style[key];
178
+ }
179
+ }
180
+ } else {
181
+ for (key in style) {
182
+ if (typeof style[key] === 'string') {
183
+ newStyle[key] = style[key];
184
+ }
185
+ }
186
+ }
187
+
188
+ return newStyle;
189
+ }
190
+
191
+ function filterStyles(styles) {
192
+ var name, value;
193
+ for (name in styles) {
194
+ value = styles[name];
195
+ if (
196
+ // ignore null and undefined values
197
+ value == null ||
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) ||
204
+
205
+ // only colors or values that can be converted to numbers
206
+ (!(/color/i).test(name) && isNaN(parseFloat(value)))
207
+ ) {
208
+ delete styles[name];
209
+ }
210
+ }
211
+
212
+ return styles;
213
+ }
214
+
215
+ function styleDifference(oldStyle, newStyle) {
216
+ var diff = { _: 0 }, // http://dev.jquery.com/ticket/5459
217
+ name;
218
+
219
+ for (name in newStyle) {
220
+ if (oldStyle[name] != newStyle[name]) {
221
+ diff[name] = newStyle[name];
222
+ }
223
+ }
224
+
225
+ return diff;
226
+ }
227
+
228
+ $.effects.animateClass = function(value, duration, easing, callback) {
229
+ if ($.isFunction(easing)) {
230
+ callback = easing;
231
+ easing = null;
232
+ }
233
+
234
+ return this.queue(function() {
235
+ var that = $(this),
236
+ originalStyleAttr = that.attr('style') || ' ',
237
+ originalStyle = filterStyles(getElementStyles.call(this)),
238
+ newStyle,
239
+ className = that.attr('class') || "";
240
+
241
+ $.each(classAnimationActions, function(i, action) {
242
+ if (value[action]) {
243
+ that[action + 'Class'](value[action]);
244
+ }
245
+ });
246
+ newStyle = filterStyles(getElementStyles.call(this));
247
+ that.attr('class', className);
248
+
249
+ that.animate(styleDifference(originalStyle, newStyle), {
250
+ queue: false,
251
+ duration: duration,
252
+ easing: easing,
253
+ complete: function() {
254
+ $.each(classAnimationActions, function(i, action) {
255
+ if (value[action]) { that[action + 'Class'](value[action]); }
256
+ });
257
+ // work around bug in IE by clearing the cssText before setting it
258
+ if (typeof that.attr('style') == 'object') {
259
+ that.attr('style').cssText = '';
260
+ that.attr('style').cssText = originalStyleAttr;
261
+ } else {
262
+ that.attr('style', originalStyleAttr);
263
+ }
264
+ if (callback) { callback.apply(this, arguments); }
265
+ $.dequeue( this );
266
+ }
267
+ });
268
+ });
269
+ };
270
+
271
+ $.fn.extend({
272
+ _addClass: $.fn.addClass,
273
+ addClass: function(classNames, speed, easing, callback) {
274
+ return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
275
+ },
276
+
277
+ _removeClass: $.fn.removeClass,
278
+ removeClass: function(classNames,speed,easing,callback) {
279
+ return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
280
+ },
281
+
282
+ _toggleClass: $.fn.toggleClass,
283
+ toggleClass: function(classNames, force, speed, easing, callback) {
284
+ if ( typeof force == "boolean" || force === undefined ) {
285
+ if ( !speed ) {
286
+ // without speed parameter;
287
+ return this._toggleClass(classNames, force);
288
+ } else {
289
+ return $.effects.animateClass.apply(this, [(force?{add:classNames}:{remove:classNames}),speed,easing,callback]);
290
+ }
291
+ } else {
292
+ // without switch parameter;
293
+ return $.effects.animateClass.apply(this, [{ toggle: classNames },force,speed,easing]);
294
+ }
295
+ },
296
+
297
+ switchClass: function(remove,add,speed,easing,callback) {
298
+ return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
299
+ }
300
+ });
301
+
302
+
303
+
304
+ /******************************************************************************/
305
+ /*********************************** EFFECTS **********************************/
306
+ /******************************************************************************/
307
+
308
+ $.extend($.effects, {
309
+ version: "1.8.20",
310
+
311
+ // Saves a set of properties in a data storage
312
+ save: function(element, set) {
313
+ for(var i=0; i < set.length; i++) {
314
+ if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);
315
+ }
316
+ },
317
+
318
+ // Restores a set of previously saved properties from a data storage
319
+ restore: function(element, set) {
320
+ for(var i=0; i < set.length; i++) {
321
+ if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
322
+ }
323
+ },
324
+
325
+ setMode: function(el, mode) {
326
+ if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
327
+ return mode;
328
+ },
329
+
330
+ getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
331
+ // this should be a little more flexible in the future to handle a string & hash
332
+ var y, x;
333
+ switch (origin[0]) {
334
+ case 'top': y = 0; break;
335
+ case 'middle': y = 0.5; break;
336
+ case 'bottom': y = 1; break;
337
+ default: y = origin[0] / original.height;
338
+ };
339
+ switch (origin[1]) {
340
+ case 'left': x = 0; break;
341
+ case 'center': x = 0.5; break;
342
+ case 'right': x = 1; break;
343
+ default: x = origin[1] / original.width;
344
+ };
345
+ return {x: x, y: y};
346
+ },
347
+
348
+ // Wraps the element around a wrapper that copies position properties
349
+ createWrapper: function(element) {
350
+
351
+ // if the element is already wrapped, return it
352
+ if (element.parent().is('.ui-effects-wrapper')) {
353
+ return element.parent();
354
+ }
355
+
356
+ // wrap the element
357
+ var props = {
358
+ width: element.outerWidth(true),
359
+ height: element.outerHeight(true),
360
+ 'float': element.css('float')
361
+ },
362
+ wrapper = $('<div></div>')
363
+ .addClass('ui-effects-wrapper')
364
+ .css({
365
+ fontSize: '100%',
366
+ background: 'transparent',
367
+ border: 'none',
368
+ margin: 0,
369
+ padding: 0
370
+ }),
371
+ active = document.activeElement;
372
+
373
+ element.wrap(wrapper);
374
+
375
+ // Fixes #7595 - Elements lose focus when wrapped.
376
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
377
+ $( active ).focus();
378
+ }
379
+
380
+ wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
381
+
382
+ // transfer positioning properties to the wrapper
383
+ if (element.css('position') == 'static') {
384
+ wrapper.css({ position: 'relative' });
385
+ element.css({ position: 'relative' });
386
+ } else {
387
+ $.extend(props, {
388
+ position: element.css('position'),
389
+ zIndex: element.css('z-index')
390
+ });
391
+ $.each(['top', 'left', 'bottom', 'right'], function(i, pos) {
392
+ props[pos] = element.css(pos);
393
+ if (isNaN(parseInt(props[pos], 10))) {
394
+ props[pos] = 'auto';
395
+ }
396
+ });
397
+ element.css({position: 'relative', top: 0, left: 0, right: 'auto', bottom: 'auto' });
398
+ }
399
+
400
+ return wrapper.css(props).show();
401
+ },
402
+
403
+ removeWrapper: function(element) {
404
+ var parent,
405
+ active = document.activeElement;
406
+
407
+ if (element.parent().is('.ui-effects-wrapper')) {
408
+ parent = element.parent().replaceWith(element);
409
+ // Fixes #7595 - Elements lose focus when wrapped.
410
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
411
+ $( active ).focus();
412
+ }
413
+ return parent;
414
+ }
415
+
416
+ return element;
417
+ },
418
+
419
+ setTransition: function(element, list, factor, value) {
420
+ value = value || {};
421
+ $.each(list, function(i, x){
422
+ var unit = element.cssUnit(x);
423
+ if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
424
+ });
425
+ return value;
426
+ }
427
+ });
428
+
429
+
430
+ function _normalizeArguments(effect, options, speed, callback) {
431
+ // shift params for method overloading
432
+ if (typeof effect == 'object') {
433
+ callback = options;
434
+ speed = null;
435
+ options = effect;
436
+ effect = options.effect;
437
+ }
438
+ if ($.isFunction(options)) {
439
+ callback = options;
440
+ speed = null;
441
+ options = {};
442
+ }
443
+ if (typeof options == 'number' || $.fx.speeds[options]) {
444
+ callback = speed;
445
+ speed = options;
446
+ options = {};
447
+ }
448
+ if ($.isFunction(speed)) {
449
+ callback = speed;
450
+ speed = null;
451
+ }
452
+
453
+ options = options || {};
454
+
455
+ speed = speed || options.duration;
456
+ speed = $.fx.off ? 0 : typeof speed == 'number'
457
+ ? speed : speed in $.fx.speeds ? $.fx.speeds[speed] : $.fx.speeds._default;
458
+
459
+ callback = callback || options.complete;
460
+
461
+ return [effect, options, speed, callback];
462
+ }
463
+
464
+ function standardSpeed( speed ) {
465
+ // valid standard speeds
466
+ if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
467
+ return true;
468
+ }
469
+
470
+ // invalid strings - treat as "normal" speed
471
+ if ( typeof speed === "string" && !$.effects[ speed ] ) {
472
+ return true;
473
+ }
474
+
475
+ return false;
476
+ }
477
+
478
+ $.fn.extend({
479
+ effect: function(effect, options, speed, callback) {
480
+ var args = _normalizeArguments.apply(this, arguments),
481
+ // TODO: make effects take actual parameters instead of a hash
482
+ args2 = {
483
+ options: args[1],
484
+ duration: args[2],
485
+ callback: args[3]
486
+ },
487
+ mode = args2.options.mode,
488
+ effectMethod = $.effects[effect];
489
+
490
+ if ( $.fx.off || !effectMethod ) {
491
+ // delegate to the original method (e.g., .show()) if possible
492
+ if ( mode ) {
493
+ return this[ mode ]( args2.duration, args2.callback );
494
+ } else {
495
+ return this.each(function() {
496
+ if ( args2.callback ) {
497
+ args2.callback.call( this );
498
+ }
499
+ });
500
+ }
501
+ }
502
+
503
+ return effectMethod.call(this, args2);
504
+ },
505
+
506
+ _show: $.fn.show,
507
+ show: function(speed) {
508
+ if ( standardSpeed( speed ) ) {
509
+ return this._show.apply(this, arguments);
510
+ } else {
511
+ var args = _normalizeArguments.apply(this, arguments);
512
+ args[1].mode = 'show';
513
+ return this.effect.apply(this, args);
514
+ }
515
+ },
516
+
517
+ _hide: $.fn.hide,
518
+ hide: function(speed) {
519
+ if ( standardSpeed( speed ) ) {
520
+ return this._hide.apply(this, arguments);
521
+ } else {
522
+ var args = _normalizeArguments.apply(this, arguments);
523
+ args[1].mode = 'hide';
524
+ return this.effect.apply(this, args);
525
+ }
526
+ },
527
+
528
+ // jQuery core overloads toggle and creates _toggle
529
+ __toggle: $.fn.toggle,
530
+ toggle: function(speed) {
531
+ if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
532
+ return this.__toggle.apply(this, arguments);
533
+ } else {
534
+ var args = _normalizeArguments.apply(this, arguments);
535
+ args[1].mode = 'toggle';
536
+ return this.effect.apply(this, args);
537
+ }
538
+ },
539
+
540
+ // helper functions
541
+ cssUnit: function(key) {
542
+ var style = this.css(key), val = [];
543
+ $.each( ['em','px','%','pt'], function(i, unit){
544
+ if(style.indexOf(unit) > 0)
545
+ val = [parseFloat(style), unit];
546
+ });
547
+ return val;
548
+ }
549
+ });
550
+
551
+
552
+
553
+ /******************************************************************************/
554
+ /*********************************** EASING ***********************************/
555
+ /******************************************************************************/
556
+
557
+ /*
558
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
559
+ *
560
+ * Uses the built in easing capabilities added In jQuery 1.1
561
+ * to offer multiple easing options
562
+ *
563
+ * TERMS OF USE - jQuery Easing
564
+ *
565
+ * Open source under the BSD License.
566
+ *
567
+ * Copyright 2008 George McGinley Smith
568
+ * All rights reserved.
569
+ *
570
+ * Redistribution and use in source and binary forms, with or without modification,
571
+ * are permitted provided that the following conditions are met:
572
+ *
573
+ * Redistributions of source code must retain the above copyright notice, this list of
574
+ * conditions and the following disclaimer.
575
+ * Redistributions in binary form must reproduce the above copyright notice, this list
576
+ * of conditions and the following disclaimer in the documentation and/or other materials
577
+ * provided with the distribution.
578
+ *
579
+ * Neither the name of the author nor the names of contributors may be used to endorse
580
+ * or promote products derived from this software without specific prior written permission.
581
+ *
582
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
583
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
584
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
585
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
586
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
587
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
588
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
589
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
590
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
591
+ *
592
+ */
593
+
594
+ // t: current time, b: begInnIng value, c: change In value, d: duration
595
+ $.easing.jswing = $.easing.swing;
596
+
597
+ $.extend($.easing,
598
+ {
599
+ def: 'easeOutQuad',
600
+ swing: function (x, t, b, c, d) {
601
+ //alert($.easing.default);
602
+ return $.easing[$.easing.def](x, t, b, c, d);
603
+ },
604
+ easeInQuad: function (x, t, b, c, d) {
605
+ return c*(t/=d)*t + b;
606
+ },
607
+ easeOutQuad: function (x, t, b, c, d) {
608
+ return -c *(t/=d)*(t-2) + b;
609
+ },
610
+ easeInOutQuad: function (x, t, b, c, d) {
611
+ if ((t/=d/2) < 1) return c/2*t*t + b;
612
+ return -c/2 * ((--t)*(t-2) - 1) + b;
613
+ },
614
+ easeInCubic: function (x, t, b, c, d) {
615
+ return c*(t/=d)*t*t + b;
616
+ },
617
+ easeOutCubic: function (x, t, b, c, d) {
618
+ return c*((t=t/d-1)*t*t + 1) + b;
619
+ },
620
+ easeInOutCubic: function (x, t, b, c, d) {
621
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
622
+ return c/2*((t-=2)*t*t + 2) + b;
623
+ },
624
+ easeInQuart: function (x, t, b, c, d) {
625
+ return c*(t/=d)*t*t*t + b;
626
+ },
627
+ easeOutQuart: function (x, t, b, c, d) {
628
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
629
+ },
630
+ easeInOutQuart: function (x, t, b, c, d) {
631
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
632
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
633
+ },
634
+ easeInQuint: function (x, t, b, c, d) {
635
+ return c*(t/=d)*t*t*t*t + b;
636
+ },
637
+ easeOutQuint: function (x, t, b, c, d) {
638
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
639
+ },
640
+ easeInOutQuint: function (x, t, b, c, d) {
641
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
642
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
643
+ },
644
+ easeInSine: function (x, t, b, c, d) {
645
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
646
+ },
647
+ easeOutSine: function (x, t, b, c, d) {
648
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
649
+ },
650
+ easeInOutSine: function (x, t, b, c, d) {
651
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
652
+ },
653
+ easeInExpo: function (x, t, b, c, d) {
654
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
655
+ },
656
+ easeOutExpo: function (x, t, b, c, d) {
657
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
658
+ },
659
+ easeInOutExpo: function (x, t, b, c, d) {
660
+ if (t==0) return b;
661
+ if (t==d) return b+c;
662
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
663
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
664
+ },
665
+ easeInCirc: function (x, t, b, c, d) {
666
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
667
+ },
668
+ easeOutCirc: function (x, t, b, c, d) {
669
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
670
+ },
671
+ easeInOutCirc: function (x, t, b, c, d) {
672
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
673
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
674
+ },
675
+ easeInElastic: function (x, t, b, c, d) {
676
+ var s=1.70158;var p=0;var a=c;
677
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
678
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
679
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
680
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
681
+ },
682
+ easeOutElastic: function (x, t, b, c, d) {
683
+ var s=1.70158;var p=0;var a=c;
684
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
685
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
686
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
687
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
688
+ },
689
+ easeInOutElastic: function (x, t, b, c, d) {
690
+ var s=1.70158;var p=0;var a=c;
691
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
692
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
693
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
694
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
695
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
696
+ },
697
+ easeInBack: function (x, t, b, c, d, s) {
698
+ if (s == undefined) s = 1.70158;
699
+ return c*(t/=d)*t*((s+1)*t - s) + b;
700
+ },
701
+ easeOutBack: function (x, t, b, c, d, s) {
702
+ if (s == undefined) s = 1.70158;
703
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
704
+ },
705
+ easeInOutBack: function (x, t, b, c, d, s) {
706
+ if (s == undefined) s = 1.70158;
707
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
708
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
709
+ },
710
+ easeInBounce: function (x, t, b, c, d) {
711
+ return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;
712
+ },
713
+ easeOutBounce: function (x, t, b, c, d) {
714
+ if ((t/=d) < (1/2.75)) {
715
+ return c*(7.5625*t*t) + b;
716
+ } else if (t < (2/2.75)) {
717
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
718
+ } else if (t < (2.5/2.75)) {
719
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
720
+ } else {
721
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
722
+ }
723
+ },
724
+ easeInOutBounce: function (x, t, b, c, d) {
725
+ if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
726
+ return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
727
+ }
728
+ });
729
+
730
+ /*
731
+ *
732
+ * TERMS OF USE - EASING EQUATIONS
733
+ *
734
+ * Open source under the BSD License.
735
+ *
736
+ * Copyright 2001 Robert Penner
737
+ * All rights reserved.
738
+ *
739
+ * Redistribution and use in source and binary forms, with or without modification,
740
+ * are permitted provided that the following conditions are met:
741
+ *
742
+ * Redistributions of source code must retain the above copyright notice, this list of
743
+ * conditions and the following disclaimer.
744
+ * Redistributions in binary form must reproduce the above copyright notice, this list
745
+ * of conditions and the following disclaimer in the documentation and/or other materials
746
+ * provided with the distribution.
747
+ *
748
+ * Neither the name of the author nor the names of contributors may be used to endorse
749
+ * or promote products derived from this software without specific prior written permission.
750
+ *
751
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
752
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
753
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
754
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
755
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
756
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
757
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
758
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
759
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
760
+ *
761
+ */
762
+
763
+ })(jQuery);