GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of madrobby/scripty2
Description: This is the alpha version of script.aculo.us 2, lovingly called "scripty2".
Homepage: http://script.aculo.us/2
Clone URL: git://github.com/kommen/scripty2.git
use context parameter of enumerables; various cosmetic cleanups
madrobby (author)
Mon May 05 14:57:59 -0700 2008
commit  04e65d1f5887505cac9e3b34a8b0cc72d4beb0e8
tree    cee154228b607a4996c5d62fef1f61feb327480f
parent  adea2310c233e48ef7889ff7b121e058c0562e2e
...
6
7
8
9
 
10
11
12
 
13
14
15
16
17
 
18
19
20
21
22
23
 
24
25
 
26
27
 
28
29
30
...
6
7
8
 
9
10
11
 
12
13
14
15
16
 
17
18
19
20
21
22
 
23
24
 
25
26
 
27
28
29
30
0
@@ -6,25 +6,25 @@ var Effect = {
0
     this.globalQueue = new Effect.Queue();
0
     this.queues.push(this.globalQueue);
0
     this.activeEffectCount = 0;
0
-
0
+
0
     this.setHeartbeat(heartbeat || new Effect.Heartbeat());
0
     document.observe('effect:heartbeat', this.renderQueues.bind(this));
0
-
0
+
0
     document.observe('effect:queued', function(){
0
       Effect.activeEffectCount++;
0
       if (Effect.activeEffectCount == 1) Effect.heartbeat.start();
0
     });
0
-
0
+
0
     document.observe('effect:dequeued', function(){
0
       Effect.activeEffectCount--;
0
       if (Effect.activeEffectCount == 0) Effect.heartbeat.stop();
0
     });
0
   },
0
-
0
+
0
   setHeartbeat: function(heartbeat) {
0
- this.heartbeat = heartbeat;
0
+ this.heartbeat = heartbeat;
0
   },
0
-
0
+
0
   renderQueues: function() {
0
     this.queues.invoke('render', this.heartbeat.getTimestamp());
0
   }
...
1
2
3
4
 
5
6
7
8
 
9
10
11
 
12
13
14
 
15
16
17
...
1
2
3
 
4
5
6
7
 
8
9
10
 
11
12
13
 
14
15
16
17
0
@@ -1,17 +1,17 @@
0
 Effect.Attribute = Class.create(Effect.Base, {
0
   initialize: function($super, object, from, to, options, method) {
0
     object = Object.isString(object) ? $(object) : object;
0
-
0
+
0
     this.method = Object.isFunction(method) ? method.bind(object) :
0
       Object.isFunction(object[method]) ? object[method].bind(object) :
0
       function(value) { object[method] = value };
0
-
0
+
0
     this.to = to;
0
     this.from = from;
0
-
0
+
0
     return $super(options);
0
   },
0
-
0
+
0
   update: function(position) {
0
     this.method(this.from.tween(this.to, position));
0
   }
...
2
3
4
5
6
7
8
 
 
 
 
9
10
11
 
12
13
14
15
16
17
 
18
19
 
20
21
22
...
24
25
26
27
 
28
29
30
...
34
35
36
37
 
38
39
40
...
43
44
45
46
 
47
48
49
...
67
68
69
70
 
71
72
73
...
79
80
81
82
 
83
84
85
86
87
 
88
89
90
91
92
 
93
94
95
...
2
3
4
 
 
 
 
5
6
7
8
9
10
 
11
12
13
14
15
16
 
17
18
 
19
20
21
22
...
24
25
26
 
27
28
29
30
...
34
35
36
 
37
38
39
40
...
43
44
45
 
46
47
48
49
...
67
68
69
 
70
71
72
73
...
79
80
81
 
82
83
84
85
86
 
87
88
89
90
91
 
92
93
94
95
0
@@ -2,21 +2,21 @@ Effect.Base = Class.create({
0
   initialize: function(options) {
0
     Effect.initialize();
0
     this.updateWithoutWrappers = this.update;
0
-
0
- if(options.queue && !Effect.queues.include(options.queue))
0
- Effect.queues.push(options.queue);
0
-
0
+
0
+ if (options.queue && !Effect.queues.include(options.queue))
0
+ Effect.queues.push(options.queue);
0
+
0
     this.setOptions(options);
0
     this.state = 'idle';
0
-
0
+
0
     $w('after before').each(function(method) {
0
       this[method] = function(method) {
0
         method(this);
0
         return this;
0
       }
0
- }.bind(this));
0
+ }, this);
0
   },
0
-
0
+
0
   setOptions: function(options) {
0
     if (!this.options) this.options = Object.extend({
0
       transition: options && options.tween ? options.tween : 'sinusoidal',
0
@@ -24,7 +24,7 @@ Effect.Base = Class.create({
0
       position: 'parallel',
0
       fps: 600
0
     }, options);
0
-
0
+
0
     if (this.options.beforeUpdate || this.options.afterUpdate) {
0
       this.update = this.updateWithoutWrappers.wrap( function(proceed,position){
0
         if (this.options.beforeUpdate) this.options.beforeUpdate(this);
0
@@ -34,7 +34,7 @@ Effect.Base = Class.create({
0
     }
0
     this.options.transition = Object.propertize(this.options.transition, Effect.Transitions);
0
   },
0
-
0
+
0
   play: function(options) {
0
     this.setOptions(options);
0
     this.frameCount = 0;
0
@@ -43,7 +43,7 @@ Effect.Base = Class.create({
0
     this.maxFrames = this.options.fps * this.duration / 1000;
0
     return this;
0
   },
0
-
0
+
0
   render: function(timestamp) {
0
     if (timestamp >= this.startsAt) {
0
       if (this.state == 'idle') {
0
@@ -67,7 +67,7 @@ Effect.Base = Class.create({
0
     }
0
     return this;
0
   },
0
-
0
+
0
   inspect: function() {
0
     return '#<Effect:' + [this.state, this.startsAt, this.endsAt].inspect() + '>';
0
   }
0
@@ -79,17 +79,17 @@ Effect.Element = Class.create(Effect.Base, {
0
     this.operators = [];
0
     return $super(options);
0
   },
0
-
0
+
0
   animate: function() {
0
     var args = $A(arguments), operator = args.shift().capitalize();
0
     this.operators.push(new Effect.Operators[operator](args[0], args[1] || {}));
0
   },
0
-
0
+
0
   play: function($super, element, options) {
0
     if (element) this.element = $(element);
0
     return $super(options);
0
   },
0
-
0
+
0
   update: function(position) {
0
     this.operators.invoke('render', position);
0
   }
...
8
9
10
11
 
12
13
14
15
16
 
17
18
19
...
24
25
26
27
 
28
29
 
30
31
32
...
35
36
37
38
 
39
40
41
...
45
46
47
48
 
49
50
51
52
 
53
54
55
 
56
57
58
 
59
60
61
62
...
8
9
10
 
11
12
13
14
15
 
16
17
18
19
...
24
25
26
 
27
28
 
29
30
31
32
...
35
36
37
 
38
39
40
41
...
45
46
47
 
48
49
50
51
 
52
53
54
 
55
56
57
 
58
59
60
61
62
0
@@ -8,12 +8,12 @@ Effect.Morph = Class.create(Effect.Element, {
0
         propertyTransitions: this.options.propertyTransitions || { }
0
       });
0
   },
0
-
0
+
0
   teardown: function() {
0
     if (this.options.change)
0
       this.teardownWrappers();
0
   },
0
-
0
+
0
   setupWrappers: function() {
0
     var elementFloat = this.element.getStyle("float");
0
     this.transitionElement = new Element('div').setStyle({ position: "relative", overflow: "hidden", 'float': elementFloat });
0
@@ -24,9 +24,9 @@ Effect.Morph = Class.create(Effect.Element, {
0
 
0
     this.transitionElement.insert(this.sourceElementWrapper).insert(this.destinationElementWrapper);
0
 
0
- var sourceHeight = this.sourceElementWrapper.getHeight(),
0
+ var sourceHeight = this.sourceElementWrapper.getHeight(),
0
       sourceWidth = this.sourceElementWrapper.getWidth();
0
-
0
+
0
     this.options.change();
0
 
0
     var destinationHeight = this.destinationElementWrapper.getHeight(),
0
@@ -35,7 +35,7 @@ Effect.Morph = Class.create(Effect.Element, {
0
     this.outerWrapper = new Element("div");
0
     this.transitionElement.insert({ before: this.outerWrapper });
0
     this.outerWrapper.setStyle({
0
- overflow: "hidden", height: sourceHeight + "px", width: sourceWidth + "px"
0
+ overflow: "hidden", height: sourceHeight + "px", width: sourceWidth + "px"
0
     }).appendChild(this.transitionElement);
0
 
0
     var maxHeight = Math.max(destinationHeight, sourceHeight), maxWidth = Math.max(destinationWidth, sourceWidth);
0
@@ -45,17 +45,17 @@ Effect.Morph = Class.create(Effect.Element, {
0
     this.destinationElementWrapper.setStyle({ position: "absolute", height: maxHeight + "px", width: maxWidth + "px", top: 0, left: 0, opacity: 0, zIndex: 2000 });
0
 
0
     this.outerWrapper.insert({ before: this.transitionElement }).remove();
0
-
0
+
0
     this.animate('style', this.transitionElement, { style: 'height:' + destinationHeight + 'px; width:' + destinationWidth + 'px' });
0
     this.animate('style', this.destinationElementWrapper, { style: 'opacity: 1.0' });
0
   },
0
-
0
+
0
   teardownWrappers: function() {
0
     var destinationElement = this.destinationElementWrapper.down();
0
-
0
+
0
     if (destinationElement)
0
       this.transitionElement.insert({ before: destinationElement });
0
-
0
+
0
     this.transitionElement.remove();
0
   }
0
 });
0
\ No newline at end of file
...
10
11
12
13
 
14
15
16
...
19
20
21
22
 
23
24
25
26
27
28
29
 
30
31
32
 
33
34
35
36
37
38
39
40
 
 
41
42
43
44
45
46
47
48
49
50
51
52
 
 
 
 
 
 
 
 
 
 
 
53
54
 
55
56
57
...
10
11
12
 
13
14
15
16
...
19
20
21
 
22
23
24
25
26
27
28
 
29
30
31
 
32
33
34
35
36
37
38
 
 
39
40
41
 
 
 
 
 
 
 
 
 
 
 
42
43
44
45
46
47
48
49
50
51
52
53
 
54
55
56
57
0
@@ -10,7 +10,7 @@ var CSS = {
0
     'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' +
0
     'right textIndent top width wordSpacing zIndex'),
0
   LENGTH: /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/,
0
-
0
+
0
   __parseStyleElement: document.createElement('div'),
0
   parseStyle: function(styleString) {
0
     CSS.__parseStyleElement.innerHTML = '<div style="' + styleString + '"></div>';
0
@@ -19,39 +19,39 @@ var CSS = {
0
     CSS.NUMERIC_PROPERTIES.each( function(property){
0
       if (style[property]) styleRules[property] = style[property];
0
     });
0
-
0
+
0
     CSS.COLOR_PROPERTIES.each( function(property){
0
       if (style[property]) styleRules[property] = CSS.Color.fromString(style[property]);
0
     });
0
 
0
     if (Prototype.Browser.IE && styleString.include('opacity'))
0
       styleRules.opacity = styleString.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1];
0
-
0
+
0
     return styleRules;
0
   },
0
-
0
+
0
   Color: {
0
     normalize: function(color) {
0
       if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
0
       color = CSS.Color.fromString(color);
0
       return [0,1,2].map(function(i){ return parseInt(color.slice(i*2+1,i*2+3), 16) });
0
     },
0
-
0
- fromString: function(color) {
0
+
0
+ fromString: function(color) {
0
       var value = '#';
0
- if (color.slice(0,4) == 'rgb(') {
0
- var cols = color.slice(4,color.length-1).split(',');
0
- var i=0; do { value += parseInt(cols[i]).toColorPart() } while (++i<3);
0
- } else {
0
- if (color.slice(0,1) == '#') {
0
- if (color.length==4) for(var i=1;i<4;i++) value += (color.charAt(i) + color.charAt(i)).toLowerCase();
0
- if (color.length==7) value = color.toLowerCase();
0
- }
0
- }
0
- return (value.length==7 ? value : (arguments[1] || value));
0
- }
0
+ if (color.slice(0,4) == 'rgb(') {
0
+ var cols = color.slice(4,color.length-1).split(',');
0
+ var i=0; do { value += parseInt(cols[i]).toColorPart() } while (++i<3);
0
+ } else {
0
+ if (color.slice(0,1) == '#') {
0
+ if (color.length==4) for(var i=1;i<4;i++) value += (color.charAt(i) + color.charAt(i)).toLowerCase();
0
+ if (color.length==7) value = color.toLowerCase();
0
+ }
0
+ }
0
+ return (value.length==7 ? value : (arguments[1] || value));
0
+ }
0
   },
0
-
0
+
0
   ElementMethods: {
0
     getStyles: function(element) {
0
       var css = document.defaultView.getComputedStyle($(element), null);
...
2
3
4
5
 
6
7
8
9
10
 
11
12
13
14
 
15
16
17
18
19
20
21
 
22
23
24
25
26
27
28
 
29
30
31
32
33
 
 
34
35
36
...
2
3
4
 
5
6
7
8
9
 
10
11
12
13
 
14
15
16
17
18
19
20
 
21
22
23
24
25
26
27
 
28
29
30
31
 
 
32
33
34
35
36
0
@@ -2,35 +2,35 @@ Effect.ElementMethods = {
0
   effect: function(element, effect, options){
0
     if (Object.isFunction(effect))
0
       effect = new effect(element, options);
0
- else if (Object.isString(effect))
0
+ else if (Object.isString(effect))
0
       effect = new Effect[effect.capitalize()](element, options);
0
     effect.play(element, options);
0
     return element;
0
   },
0
-
0
+
0
   morph: function(element, style, options){
0
     return element.effect('morph', Object.extend(options, {style: style}));
0
   }.optionize(),
0
-
0
+
0
   appear: function(element, options){
0
     return element.effect('morph', Object.extend({
0
       before: function(){ element.show().setStyle({opacity:0}) },
0
       style: 'opacity:1'
0
     }, options));
0
   },
0
-
0
+
0
   fade: function(element, options){
0
     return element.effect(Effect.Morph, Object.extend({
0
       style: 'opacity:0',
0
       after: element.hide.bind(element)
0
     }, options));
0
   },
0
-
0
+
0
   cloneWithoutIDs: function(element) {
0
     element = $(element);
0
     var clone = element.cloneNode(true);
0
- clone.id = "";
0
- clone.getElementsBySelector("*[id]").each(function(e) { e.id = "" });
0
+ clone.id = '';
0
+ $(clone).select('*[id]').each(function(e) { e.id = ''; });
0
     return clone;
0
   }
0
 };
...
4
5
6
7
 
8
9
10
...
14
15
16
17
18
 
19
...
4
5
6
 
7
8
9
10
...
14
15
16
 
 
17
18
0
@@ -4,7 +4,7 @@ Effect.Helpers = {
0
     [(rw - (w*(rh/h)))/2, 0, w*(rh/h), rh] :
0
     [0, (rh - (h*(rw/w)))/2, rw, h*(rw/w)];
0
   },
0
-
0
+
0
   viewportOverlay: function(){
0
     var viewport = document.viewport.getDimensions();
0
     var offsets = document.viewport.getScrollOffsets();
0
@@ -14,5 +14,4 @@ Effect.Helpers = {
0
       width: viewport.width + 'px', height: viewport.height + 'px'
0
     });
0
   }
0
-};
0
-
0
+};
0
\ No newline at end of file
...
3
4
5
 
6
7
 
8
9
10
11
 
12
13
14
 
15
16
17
18
19
20
21
 
22
23
24
25
26
 
27
28
29
30
 
31
32
33
34
 
35
36
37
...
3
4
5
6
7
 
8
9
10
11
 
12
13
14
 
15
16
17
18
19
20
21
 
22
23
24
25
26
 
27
28
29
30
 
31
32
33
34
 
35
36
37
38
0
@@ -3,35 +3,36 @@ Effect.Heartbeat = Class.create({
0
     this.options = Object.extend({
0
       framerate: Prototype.Browser.MobileSafari ? 20 : 60
0
     }, options);
0
+ this.beat = this.beat.bind(this);
0
   },
0
-
0
+
0
   start: function() {
0
     if (this.heartbeatInterval) return;
0
     this.heartbeatInterval =
0
- setInterval(this.beat.bind(this), 1000/this.options.framerate);
0
+ setInterval(this.beat, 1000/this.options.framerate);
0
     this.updateTimestamp();
0
   },
0
-
0
+
0
   stop: function() {
0
     if (!this.heartbeatInterval) return;
0
     clearInterval(this.heartbeatInterval);
0
     this.heartbeatInterval = null;
0
     this.timestamp = null;
0
   },
0
-
0
+
0
   beat: function() {
0
     this.updateTimestamp();
0
     document.fire('effect:heartbeat');
0
   },
0
-
0
+
0
   getTimestamp: function() {
0
     return this.timestamp || this.generateTimestamp();
0
   },
0
-
0
+
0
   generateTimestamp: function() {
0
     return new Date().getTime();
0
   },
0
-
0
+
0
   updateTimestamp: function() {
0
     this.timestamp = this.generateTimestamp();
0
   }
...
7
8
9
10
 
11
12
13
14
 
15
16
17
...
7
8
9
 
10
11
12
13
 
14
15
16
17
0
@@ -7,11 +7,11 @@ Effect.Operators.Base = Class.create({
0
       transition: Prototype.K
0
     }, options);
0
   },
0
-
0
+
0
   inspect: function() {
0
     return "#<Effect.Operators.Base:" + this.lastValue + ">";
0
   },
0
-
0
+
0
   render: function(position) {
0
     var value = this.valueAt(this.options.transition(position));
0
     this.applyValue(value);
...
4
5
6
 
7
8
9
 
10
11
12
...
4
5
6
7
8
9
10
11
12
13
14
0
@@ -4,9 +4,11 @@ Effect.Operators.Scroll = Class.create(Effect.Operators.Base, {
0
     this.start = object.scrollTop;
0
     this.end = this.options.scrollTo;
0
   },
0
+
0
   valueAt: function(position) {
0
     return this.start + ((this.end - this.start)*position);
0
   },
0
+
0
   applyValue: function(value){
0
     this.object.scrollTop = value.round();
0
   }
...
2
3
4
5
 
6
7
 
8
9
10
11
12
 
13
14
15
16
17
18
19
 
20
21
22
23
24
 
25
26
27
28
29
 
30
31
 
32
33
34
35
36
37
 
38
39
40
...
48
49
50
51
 
52
53
54
...
57
58
59
60
 
61
62
 
63
64
65
66
 
67
68
69
70
 
71
72
73
...
2
3
4
 
5
6
 
7
8
9
10
11
 
12
13
14
15
16
17
18
 
19
20
21
22
23
 
24
25
26
27
28
 
29
30
 
31
32
33
34
35
36
 
37
38
39
40
...
48
49
50
 
51
52
53
54
...
57
58
59
 
60
61
 
62
63
64
65
 
66
67
68
69
 
70
71
72
73
0
@@ -2,39 +2,39 @@ Effect.Operators.Style = Class.create(Effect.Operators.Base, {
0
   initialize: function($super, object, options) {
0
     $super(object, options);
0
     this.element = $(this.object);
0
-
0
+
0
     if (!this.options.propertyTransitions)
0
- this.options.propertyTransitions = { }
0
+ this.options.propertyTransitions = { };
0
     else
0
       for (property in this.options.propertyTransitions)
0
         this.options.propertyTransitions[property] =
0
           Object.propertize(this.options.propertyTransitions[property], Effect.Transitions);
0
-
0
+
0
     if (!Object.isString(this.options.style)) {
0
       this.style = $H(this.options.style);
0
 
0
     } else {
0
       if (this.options.style.include(':')) {
0
         this.style = $H(CSS.parseStyle(this.options.style));
0
-
0
+
0
       } else {
0
         this.element.addClassName(options.style);
0
         this.style = $H(this.element.getStyles());
0
         this.element.removeClassName(options.style);
0
-
0
+
0
         var css = this.element.getStyles();
0
         this.style = this.style.reject(function(style) { return style.value == css[style.key] });
0
       }
0
     }
0
-
0
+
0
     this.tweens = this.style.map(function(pair) {
0
- var property = pair[0].camelize(), target = pair[1], unit = '', tween,
0
+ var property = pair[0].camelize(), target = pair[1], unit = '', tween,
0
         source = this.element.getStyle(property);
0
         
0
       if (CSS.COLOR_PROPERTIES.include(property)) {
0
         if (source == target) return;
0
         source = CSS.Color.normalize(source);
0
- target = CSS.Color.normalize(target); unit = 'color';
0
+ target = CSS.Color.normalize(target); unit = 'color';
0
         tween = function(currentStyle, style, position) {
0
           position = (this.options.propertyTransitions[property] || Effect.Transitions.linear)(position);
0
           var value = '#' + [0,1,2].map(function(index){
0
@@ -48,7 +48,7 @@ Effect.Operators.Style = Class.create(Effect.Operators.Base, {
0
           target = components[1];
0
           unit = String.interpret((components.length == 3) ? components[2] : null);
0
         }
0
- source = parseFloat(source); target = parseFloat(target);
0
+ source = parseFloat(source); target = parseFloat(target);
0
         if (isNaN(source) || isNaN(target) || source == target) return;
0
         tween = function(currentStyle, style, position) {
0
           position = (this.options.propertyTransitions[property] || Effect.Transitions.linear)(position);
0
@@ -57,17 +57,17 @@ Effect.Operators.Style = Class.create(Effect.Operators.Base, {
0
         }.bind(this);
0
       }
0
       return tween;
0
- }.bind(this)).compact();
0
+ }, this).compact();
0
   },
0
-
0
+
0
   valueAt: function(position) {
0
     var style = { }, currentStyle = this.currentStyle || { };
0
     this.tweens.each( function(tween){
0
- tween(currentStyle, style, position)
0
+ tween(currentStyle, style, position);
0
     });
0
     return style;
0
   },
0
-
0
+
0
   applyValue: function(value) {
0
     this.element.setStyle(value);
0
     this.currentStyle = value;
...
2
3
4
5
 
6
7
8
9
 
10
11
12
13
14
15
16
 
17
18
19
20
21
22
23
 
24
25
26
27
 
28
29
 
30
31
32
33
34
35
 
36
37
 
38
39
 
40
41
42
 
43
44
45
...
2
3
4
 
5
6
7
8
 
9
10
11
12
13
14
15
 
16
17
18
19
20
21
22
 
23
24
25
26
 
27
28
 
29
30
31
32
33
34
 
35
36
 
37
38
 
39
40
41
 
42
43
44
45
0
@@ -2,44 +2,44 @@ Effect.Queue = Class.create({
0
   initialize: function() {
0
     this.effects = [];
0
   },
0
-
0
+
0
   active: function() {
0
     return this.effects.length > 0;
0
   },
0
-
0
+
0
   add: function(effect) {
0
     this.calculateTiming(effect);
0
     this.effects.push(effect);
0
     document.fire('effect:queued', this);
0
     return this;
0
   },
0
-
0
+
0
   remove: function(effect) {
0
     this.effects = this.effects.without(effect);
0
     delete effect;
0
     document.fire('effect:dequeued', this);
0
     return this;
0
   },
0
-
0
+
0
   removeInactiveEffects: function() {
0
     this.effects.select(function(effect) {
0
       return effect.state == 'finished';
0
- }).each(this.remove.bind(this));
0
+ }).each(this.remove, this);
0
   },
0
-
0
+
0
   render: function(timestamp) {
0
     this.effects.invoke('render', timestamp);
0
     this.removeInactiveEffects();
0
     return this;
0
   },
0
-
0
+
0
   calculateTiming: function(effect) {
0
- position = effect.options.position || 'parallel';
0
+ position = effect.options.position || 'parallel';
0
     var startsAt = Effect.heartbeat.getTimestamp();
0
-
0
+
0
     if (position == 'end')
0
       startsAt = this.effects.without(effect).pluck('endsAt').max() || startsAt;
0
-
0
+
0
     effect.startsAt =
0
       startsAt + (effect.options.delay || 0) * 1000;
0
     effect.endsAt =
...
1
2
3
4
5
6
7
 
 
 
 
 
8
9
10
11
12
13
 
14
15
16
17
18
19
 
20
21
22
23
24
 
25
26
27
28
29
 
30
31
32
...
38
39
40
41
 
42
43
44
...
50
51
52
53
 
54
55
56
 
57
58
 
59
60
61
62
 
63
64
65
...
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
 
11
12
13
14
15
16
 
17
18
19
20
21
 
22
23
24
25
26
 
27
28
29
30
...
36
37
38
 
39
40
41
42
...
48
49
50
 
51
52
53
 
54
55
 
56
57
58
59
 
60
61
62
63
0
@@ -1,32 +1,30 @@
0
-/*
0
-Based on Easing Equations v2.0
0
-(c) 2003 Robert Penner, all rights reserved.
0
-This work is subject to the terms in http://www.robertpenner.com/easing_terms_of_use.html
0
-
0
-Adapted for Scriptaculous by Ken Snyder (kendsnyder ~at~ gmail ~dot~ com) June 2006
0
-*/
0
+// Based on Easing Equations v2.0
0
+// (c) 2003 Robert Penner, all rights reserved.
0
+// This work is subject to the terms in http://www.robertpenner.com/easing_terms_of_use.html
0
+//
0
+// Adapted for Scriptaculous by Ken Snyder (kendsnyder ~at~ gmail ~dot~ com) June 2006
0
 
0
 Object.extend(Effect.Transitions, {
0
   elastic: function(pos) {
0
     return -1 * Math.pow(4,-8*pos) * Math.sin((pos*6-1)*(2*Math.PI)/2) + 1;
0
   },
0
-
0
+
0
   swingFromTo: function(pos) {
0
     var s = 1.70158;
0