<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -106,11 +106,7 @@ module AssetTags
       if asset.image?
         size = options['size'] ? options.delete('size') : 'icon'
         container = options.delete('container')
-        root = &quot;#{RAILS_ROOT}/public#{asset.thumbnail(size)}&quot;
-        img_height = 0
-        open(root, &quot;rb&quot;) do |fh|
-          img_height = ImageSize.new(fh.read).get_height
-        end
+        img_height = asset.height(size)
         (container.to_i - img_height.to_i)/2
       else
         raise TagError, &quot;Asset is not an image&quot;
@@ -231,7 +227,7 @@ module AssetTags
     attributes = options.inject('') { |s, (k, v)| s &lt;&lt; %{#{k.downcase}=&quot;#{v}&quot; } }.strip
     attributes = &quot; #{attributes}&quot; unless attributes.empty?
     text = tag.double? ? tag.expand : text
-    url = asset.thumbnail(size)
+    url = asset.image? ? asset.thumbnail(size) : asset.asset.url
     %{&lt;a href=&quot;#{url  }#{anchor}&quot;#{attributes}&gt;#{text}&lt;/a&gt;} rescue nil
   end
   </diff>
      <filename>app/models/asset_tags.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ if (Prototype.Version.indexOf(LowPro.CompatibleWithPrototype) != 0 &amp;&amp; window.con
                   &quot; it may not work as expected with this version (&quot; + Prototype.Version + &quot;)&quot;);
 
 if (!Element.addMethods) 
-  Element.addMethods = function(o) { Object.extend(Element.Methods, o); };
+  Element.addMethods = function(o) { Object.extend(Element.Methods, o) };
 
 // Simple utility methods for working with the DOM
 DOM = {};
@@ -24,7 +24,7 @@ DOM.Builder = {
        } else {
          children = arguments;
        };
-       children = $A(children).flatten();
+       children = $A(children).flatten()
      }
      return DOM.Builder.create(tag, attrs, children);
     };
@@ -97,7 +97,7 @@ Event.addBehavior = function(rules) {
     Ajax.Responders.register({
       onComplete : function() { 
         if (Event.addBehavior.reassignAfterAjax) 
-          setTimeout(function() { ab.reload(); }, 10);
+          setTimeout(function() { ab.reload() }, 10);
       }
     });
     ab.responderApplied = true;
@@ -114,8 +114,8 @@ Event.delegate = function(rules) {
       var element = $(e.element());
       for (var selector in rules)
         if (element.match(selector)) return rules[selector].apply(this, $A(arguments));
-    };
-};
+    }
+}
 
 Object.extend(Event.addBehavior, {
   rules : {}, cache : [],
@@ -130,9 +130,9 @@ Object.extend(Event.addBehavior, {
         var parts = sel.split(/:(?=[a-z]+$)/), css = parts[0], event = parts[1];
         $$(css).each(function(element) {
           if (event) {
-            observer = Event.addBehavior._wrapObserver(observer);
-            $(element).observe(event, observer);
-            Event.addBehavior.cache.push([element, event, observer]);
+            var wrappedObserver = Event.addBehavior._wrapObserver(observer);
+            $(element).observe(event, wrappedObserver);
+            Event.addBehavior.cache.push([element, event, wrappedObserver]);
           } else {
             if (!element.$$assigned || !element.$$assigned.include(observer)) {
               if (observer.attach) observer.attach(element);
@@ -163,7 +163,7 @@ Object.extend(Event.addBehavior, {
   _wrapObserver: function(observer) {
     return function(event) {
       if (observer.call(this, event) === false) event.stop(); 
-    };
+    }
   }
   
 });
@@ -206,7 +206,6 @@ var Behavior = {
       parent = properties.shift();
 
       var behavior = function() { 
-        var behavior = arguments.callee;
         if (!this.initialize) {
           var args = $A(arguments);
 
@@ -253,9 +252,11 @@ var Behavior = {
       return new this(element, Array.prototype.slice.call(arguments, 1));
     },
     _bindEvents : function(bound) {
-      for (var member in bound)
-        if (member.match(/^on(.+)/) &amp;&amp; typeof bound[member] == 'function')
-          bound.element.observe(RegExp.$1, Event.addBehavior._wrapObserver(bound[member].bindAsEventListener(bound)));
+      for (var member in bound) {
+        var matches = member.match(/^on(.+)/);
+        if (matches &amp;&amp; typeof bound[member] == 'function')
+          bound.element.observe(matches[1], Event.addBehavior._wrapObserver(bound[member].bindAsEventListener(bound)));
+      }
     }
   }
 };
@@ -278,17 +279,9 @@ Remote.Base = {
     this._bindCallbacks();
   },
   _makeRequest : function(options) {
-    if (options.confirm) {
-      if (confirm(options.confirm)) {
-        if (options.update) new Ajax.Updater(options.update, options.url, options);
-        else new Ajax.Request(options.url, options);
-        return false;
-      }
-    } else {
-      if (options.update) new Ajax.Updater(options.update, options.url, options);
-      else new Ajax.Request(options.url, options);
-      return false;
-    }
+    if (options.update) new Ajax.Updater(options.update, options.url, options);
+    else new Ajax.Request(options.url, options);
+    return false;
   },
   _bindCallbacks: function() {
     $w('onCreate onComplete onException onFailure onInteractive onLoading onLoaded onSuccess').each(function(cb) {
@@ -296,7 +289,7 @@ Remote.Base = {
         this.options[cb] = this.options[cb].bind(this);
     }.bind(this));
   }
-};
+}
 
 Remote.Link = Behavior.create(Remote.Base, {
   onclick : function() {
@@ -311,29 +304,14 @@ Remote.Form = Behavior.create(Remote.Base, {
     var sourceElement = e.element();
     
     if (['input', 'button'].include(sourceElement.nodeName.toLowerCase()) &amp;&amp; 
-        sourceElement.type.match(/submit|image/))
+        sourceElement.type == 'submit')
       this._submitButton = sourceElement;
   },
   onsubmit : function() {
-    var parameters = this.element.serialize();
-
-    if (parameters.blank()) {
-      parameters = this.options.parameters;
-    } else {
-      parameters = parameters + '&amp;' + this.options.parameters;
-    }
-    delete this.options.parameters;
-    if (this._submitButton) {
-      if (parameters.blank()) {
-        parameters = this._submitButton.name + &quot;=&quot; + this._submitButton.value;
-      } else {
-        parameters = parameters + '&amp;' + this._submitButton.name + &quot;=&quot; + this._submitButton.value;
-      }
-    }
     var options = Object.extend({
       url : this.element.action,
       method : this.element.method || 'get',
-      parameters : parameters
+      parameters : this.element.serialize({ submit: this._submitButton.name })
     }, this.options);
     this._submitButton = null;
     return this._makeRequest(options);
@@ -358,4 +336,3 @@ Observed = Behavior.create({
                                       new Form.Element.EventObserver(this.element, this.callback);
   }
 });
-</diff>
      <filename>public/javascripts/lowpro.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b84822793d1d7c82ae30f65d7c87f032688fc70f</id>
    </parent>
    <parent>
      <id>85e253f28b2ba8a1ae34bf5469fc0e8589162aba</id>
    </parent>
  </parents>
  <author>
    <name>Keith</name>
    <email>keith@keithbingman.com</email>
  </author>
  <url>http://github.com/kbingman/paperclipped/commit/b545acd553b02a9d296a0bec2acd535a9b80839e</url>
  <id>b545acd553b02a9d296a0bec2acd535a9b80839e</id>
  <committed-date>2009-07-06T08:17:51-07:00</committed-date>
  <authored-date>2009-07-06T08:17:51-07:00</authored-date>
  <message>Merge branch 'master' of git://github.com/Aissac/paperclipped into aissic</message>
  <tree>680dc2082235148d801aa9ae22efb5540fcec59b</tree>
  <committer>
    <name>Keith</name>
    <email>keith@keithbingman.com</email>
  </committer>
</commit>
