jquery-ui-rails 0.0.1

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