<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -35,6 +35,13 @@
         Blind
       &lt;/div&gt;
     &lt;/div&gt;
+    
+    &lt;div class='demo_container'&gt;
+      &lt;a href=&quot;#&quot; id='highlight_link'   class='action'&gt;Highlight&lt;/a&gt;
+      &lt;div id='highlight' class='demo'&gt;
+        Highlight
+      &lt;/div&gt;
+    &lt;/div&gt;
 
     &lt;script type=&quot;text/javascript&quot;&gt;
     document.observe('dom:loaded', function() {</diff>
      <filename>examples/prototype_ext.html</filename>
    </modified>
    <modified>
      <diff>@@ -76,6 +76,11 @@ FX.Base = Class.create((function() {
     return this;
   }
   
+  /** 
+   *  FX.Base#getCycle() -&gt; int
+   *  
+   *  Returns current cycle position
+   **/
   function getCycle() {
     return this.cycle ? this.cycle.current : 1
   }</diff>
      <filename>src/base/base.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 Element.addMethods({
   fade: function(element, options) {
+    if (!(element = $(element))) return;
     new FX.Element(element)
       .setOptions(options || {})
       .animate({opacity: 0})
@@ -8,6 +9,7 @@ Element.addMethods({
   },
   
   appear: function(element, options) {
+    if (!(element = $(element))) return;
     new FX.Element(element)
       .setOptions(options || {})
       .animate({opacity: 1})
@@ -16,26 +18,44 @@ Element.addMethods({
   },
   
   blindUp: function(element, options) {
-    if (!element.visible()) return;
+    if (!(element = $(element)) || !element.visible() || element.fx) return;
     
-    new FX.Element(element)
+    element.fx = new FX.Element(element)
       .setOptions(options || {})
       .onBeforeStarted(function() {element.originalHeight = element.style.height})
-      .onEnded(function() {element.hide(); element.style.height = element.originalHeight; (element.originalHeight)})
+      .onEnded(function() {element.hide(); element.style.height = element.originalHeight; delete element.fx})
       .animate({height: 0})
       .play();
     return element;
   },
   
   blindDown: function(element, options) {
-    if (element.visible()) return;
+    if (!(element = $(element)) || element.visible() || element.fx) return;
     var height = element.getHeight();
-    new FX.Element(element)
+
+    element.fx = new FX.Element(element)
       .setOptions(options || {})
       .onBeforeStarted(function() {element.show(); element.style.height = '0px'})
+      .onEnded(function() {delete element.fx})
       .animate({height: height + 'px'})
       .play();
     return element;
-  }
+  },
   
-})
\ No newline at end of file
+  highlight: function(element, options) {
+    if (!(element = $(element)) || !element.visible()) return;
+    options = options || {};
+
+    if (element.fx) element.fx.stop().reverse().rewind();
+
+    var highlightColor = options.highlightColor || &quot;#ffff99&quot;;
+    var originalColor = element.getStyle('background-color');
+        
+    element.fx = new FX.Element(element.setStyle({backgroundColor: highlightColor}))
+      .setOptions(options)
+      .animate({backgroundColor: originalColor})
+      .onEnded(function() {delete element.fx})
+      .play();
+    return element;
+  }
+});
\ No newline at end of file</diff>
      <filename>src/prototype_ext/element.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>81105f10f399e594e6ba458d681d8ea47c01886a</id>
    </parent>
  </parents>
  <author>
    <name>sgruhier</name>
    <email>sgruhier@mac.com</email>
  </author>
  <url>http://github.com/xilinus/protofx/commit/d77ce7ae2a3690c496541db30c1da62e29ad26c8</url>
  <id>d77ce7ae2a3690c496541db30c1da62e29ad26c8</id>
  <committed-date>2008-12-16T05:10:25-08:00</committed-date>
  <authored-date>2008-12-16T05:10:25-08:00</authored-date>
  <message>add Element#highlight (with ZenCocoon help)</message>
  <tree>4adbde07cf6f0c1150e9f74031e3e7ef345b1383</tree>
  <committer>
    <name>sgruhier</name>
    <email>sgruhier@mac.com</email>
  </committer>
</commit>
