<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -14,7 +14,7 @@ Examples
   &lt;%= saucy_tag(&quot;I am red&quot;, :style =&gt; {:font =&gt; {:color =&gt; 'red' }}) %&gt;
   &lt;%= saucy_tag(&quot;I am a red/blue sprite&quot;, 
                   :style =&gt; {:font =&gt; {:color =&gt; 'red'}}, 
-                  :hover =&gt; {:font =&gt; {:color =&gt; 'blue'}}
+                  :highlight =&gt; {:font =&gt; {:color =&gt; 'blue'}}
                 ) %&gt;
   
 Use
@@ -34,9 +34,9 @@ Available options
 # Style needs to be a hash - see the 'Styles' heading below
 {:style =&gt; {}}
 
-# Hover option is for sprites, the styles passed in override
-# the styles that were passed in for :style.
-{:hover =&gt; {}}
+# Highlight option is for sprites, the styles passed in override
+# the styles that were passed in for :style. This can be used for hover or focus effects
+{:highlight =&gt; {}}
 
 # The html style needs to be a hash
 # The html class needs to be a array of classNames
@@ -46,8 +46,8 @@ Available options
 {:tag =&gt; :p}
 
 # Transparent needs to be a boolean - 
-# this defaults to false 
-{:transparent =&gt; true}
+# this defaults to true 
+{:transparent =&gt; false}
 
 Styles
 ------
@@ -87,9 +87,7 @@ The style that's passed in will be merged over the top of this.
 Internet Explorer
 -----
 
-Saucy will apply an AlphaFilter if you pass in the transparent option as true.
-
- :transparent =&gt; true
+Saucy will apply an AlphaFilter if you the background color is &quot;transparent&quot; (or absent since this is the default)
 
 Fonts
 -----
@@ -99,19 +97,17 @@ Fonts are loaded from the /plugins/saucy/fonts directory.
 Sprites
 -------
 
-If you're using sprites you need to have the following styles:
+If you set an highlight style Saucy will render a sprite consisting of 2 images, the normal and the highlight.
+To set a sprite to be at the highlight style, simply set the top margin to 0. E.g. the following is for a hover effect:
 
   &lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
     .saucySprite:hover {
-      background-position: 0 0 !important;
+      margin-top: 0 !important;
     }
   &lt;/style&gt;
 
-If you're using tags other than the 'a' tag you'll need to apply this hover pseudo-class with JavaScript,
-as IE 6 only support the hover pseudo-class for 'a' tags.
-
-You need to pass in a :hover option which is in the same format as the :style option.
-The :hover option overrides the :style option (you don't need to pass in all the styles again).
+You need to pass in a :highlight option which is in the same format as the :style option.
+The :highlight option overrides the :style option (you don't need to pass in all the styles again).
 
 Try out
 -------
@@ -119,21 +115,95 @@ Try out
 * In your controller
 
   def saucy
-    @stroked = { 
-      :rotate =&gt; -10, 
-      :stroke =&gt; { 
-        :color =&gt; &quot;red&quot;, 
-        :width =&gt; 1 
-      }, 
+    @spacing = { 
       :font =&gt; { 
-        :size =&gt; 100, 
-        :color =&gt; &quot;#fff&quot; 
-      }, 
+        :size =&gt; 70, 
+        :color =&gt; &quot;#cfc&quot; 
+      },
       :spacing =&gt; {
-        :letter =&gt; 100 
+        :letter =&gt; -6 
       }  
     }
-  
+
+    @thick_stroked = { 
+      :stroke =&gt; { 
+        :color =&gt; &quot;red&quot;,
+        :width =&gt; 5 
+        }, 
+      :font =&gt; { 
+        :size =&gt; 50, 
+        :color =&gt; &quot;#fff&quot; 
+        }  
+      }
+
+    @bauhaus = { 
+      :font =&gt; { 
+        :size =&gt; 50, 
+        :font =&gt; &quot;bauhausl.ttf&quot;, 
+        :color =&gt; &quot;white&quot;  
+        }  
+      }
+    
+    @outline = { 
+      :font =&gt; { 
+        :size =&gt; 60, 
+        :font =&gt; &quot;basket.ttf&quot;, 
+        :color =&gt; &quot;transparent&quot; 
+        },
+      :stroke =&gt; {
+        :width =&gt; 2
+      },
+      :shadow =&gt; { 
+        :render =&gt; true, 
+        :top =&gt; 5, 
+        :left =&gt; 5, 
+        :opacity =&gt; 0.2 
+        }  
+      }
+      
+
+    @shadow = { 
+      :font =&gt; { 
+        :size =&gt; 60, 
+        :font =&gt; &quot;basket.ttf&quot;, 
+        :color =&gt; &quot;#fff&quot; 
+        }, 
+      :shadow =&gt; { 
+        :render =&gt; true, 
+        :top =&gt; 5, 
+        :left =&gt; 5, 
+        :opacity =&gt; 0.2 
+        }  
+      }
+    @rotate = { 
+      :rotate =&gt; -15, 
+      :font =&gt; { 
+        :size =&gt; 70, 
+        :font =&gt; &quot;bauhausl.ttf&quot;, 
+        :color =&gt; &quot;#fec&quot;, 
+        :stretch =&gt; &quot;condensed&quot; 
+        }
+      }
+
+    @saucy = { 
+      :font =&gt; { 
+        :size =&gt; 80, 
+        :font =&gt; &quot;basket.ttf&quot;, 
+        :color =&gt; &quot;#f6c&quot; 
+        },  
+      :stroke =&gt; { 
+        :color =&gt; &quot;white&quot;, 
+        :width =&gt; 15, 
+        :inner =&gt; 1 
+        }, 
+      :shadow =&gt; { 
+        :render =&gt; true, 
+        :top =&gt; 5, 
+        :left =&gt; 5, 
+        :opacity =&gt; 0.2 
+        }
+      }
+    
     @thick_stroked = { 
       :stroke =&gt; { 
         :color =&gt; &quot;red&quot;, 
@@ -141,7 +211,7 @@ Try out
         :inner =&gt; 1 
       }, 
       :font =&gt; { 
-        :size =&gt; 100, 
+        :size =&gt; 50, 
         :color =&gt; &quot;#fff&quot; 
         }, 
       :rotate =&gt; 10, 
@@ -151,49 +221,54 @@ Try out
         :left =&gt; 5 
         }   
       }
-  
-    @bauhaus = { 
-      :font =&gt; { 
-        :size =&gt; 100, 
-        :font =&gt; &quot;bauhausl.ttf&quot;  
-        }  
-      }
+      
   end
   
 * In saucy.html.erb
-  &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
+  &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; 
     &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
   &lt;html&gt;
     &lt;head&gt;
       &lt;title&gt;Saucy&lt;/title&gt;
    
       &lt;style type=&quot;text/css&quot;&gt;
-        .saucySprite:hover {
-          background-position: 0 0 !important;
-        }
+       body {background: url(http://www.mr-tut.com/images/uploads/803.gif); }
+       p {margin-right: 3em; margin-top: 3em; float: left}
+       #container {width: 1000px}
+       .saucySprite:hover { margin-top: 0px !important; }
       &lt;/style&gt;
+    
     &lt;/head&gt;
     &lt;body&gt;
-      &lt;%= saucy_tag &quot;default - no style&quot; %&gt;
-      &lt;%= saucy_tag &quot;mutli\nline\nbauhaus&quot;, :style =&gt; @bauhaus  %&gt;
-      &lt;%= saucy_tag &quot;stroked!!&quot;, :style =&gt; @stroked, :html =&gt; {:class=&gt; [&quot;myclass&quot;]} %&gt;
-      &lt;%= saucy_tag &quot;thick stroked!!&quot;, :style =&gt; @thick_stroked, :html =&gt; {:class =&gt; [&quot;myclass2&quot;]} %&gt;
+      &lt;%= saucy_tag &quot;Saucy - Examples&quot;, :style=&gt; @saucy, :tag=&gt; &quot;h2&quot; %&gt;
 
-      &lt;p&gt;Different tag&lt;/p&gt;
+      &lt;div id=container&gt;
 
-      &lt;%= saucy_tag &quot;h2 tag&quot;, :style =&gt; @bauhaus, :tag =&gt; :h2, :html =&gt; {:id =&gt; &quot;myid&quot;} %&gt;
+      &lt;%= saucy_tag &quot;text\non\nmultiple\nlines&quot;,:style =&gt;  @bauhaus  %&gt;
+      &lt;%= saucy_tag  &quot;letter spacing...&quot;, :style =&gt; @spacing, :html =&gt; {:class=&gt;[&quot;myclass&quot;]} %&gt;
 
-      &lt;p&gt;Sprites&lt;/p&gt;
+      &lt;%= saucy_tag &quot;stroked!!&quot;, :style =&gt; @thick_stroked, :html =&gt;{:class=&gt;[&quot;myclass&quot;]} %&gt;
+      &lt;%= saucy_tag &quot;30 degrees&quot;, :style =&gt; @rotate %&gt;
+      &lt;%= saucy_tag  &quot;shadow&quot;, :style =&gt; @shadow %&gt;
 
       &lt;%= saucy_tag(&quot;I am a red/blue sprite&quot;, 
                       :style =&gt; {:font =&gt; {:color =&gt; 'red'}}, 
-                      :hover =&gt; {:font =&gt; {:color =&gt; 'blue'}}
+                      :highlight =&gt; {:font =&gt; {:color =&gt; 'blue'}}
                     ) %&gt;
 
-      &lt;%= saucy_tag(&quot;thick stroked sprite!!&quot;, 
-                      :style =&gt; @thick_stroked, 
-                      :hover =&gt; {:stroke =&gt; {:color =&gt; &quot;#5fe&quot;}},
-                      :html =&gt; {:class =&gt; [&quot;myclass2&quot;]}
+
+      &lt;%= saucy_tag(&quot;hover effects sprite!!&quot;, 
+                    :style =&gt; @thick_stroked, 
+                    :highlight =&gt; {:stroke =&gt; {:color =&gt; &quot;#5fe&quot;}},
+                    :html =&gt; {:class =&gt; [&quot;myclass2&quot;]}
+                  ) %&gt;
+
+      &lt;%= saucy_tag(  &quot;outline...&quot;,
+                      :style=&gt; @outline, 
+                      :highlight =&gt; {:stroke =&gt; {:color =&gt; &quot;blue&quot; }} 
                     ) %&gt;
+
+      &lt;/div&gt;
     &lt;/body&gt;
-  &lt;/html&gt;
\ No newline at end of file
+  &lt;/html&gt;
+</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -3,19 +3,20 @@ module Saucy
     
     # Arguments:
     # saucy_tag(name, :option1 =&gt; 'foo')
-    # saucy_tag(name1, :option2 =&gt; 'foo', :hover =&gt; {:font =&gt; {:color =&gt; 'blue'}})
+    # saucy_tag(name1, :option2 =&gt; 'foo', :highlight =&gt; {:font =&gt; {:color =&gt; 'blue'}})
     
     def saucy_tag(name, options = {}, &amp;block)      
       filename  = Digest::MD5.hexdigest(name + options.to_s) + '_' + name.gsub(/[^a-z0-9]+/i, '_') + '.png'
       
-      #unless File.exists?(File.join(ABS_OUTPUT_DIR, filename))
+      unless File.exists?(File.join(ABS_OUTPUT_DIR, filename))
         Saucy::Render.render(name, filename, options)
-      #end
+      end
       
       size = Saucy::Image.cached_size(filename)
       # We divide by the number of images to get the height
       # of the first one (for sprites)
-      real_height = size[1] / (options[:hover] ? 2 : 1)
+      real_height = size[1] / (options[:highlight] ? 2 : 1)
+      height = size[1]
       
       src  = File.join(OUTPUT_DIR, filename)
       
@@ -23,41 +24,48 @@ module Saucy
       options[:html][:class] ||= []
       style = options[:html][:style] ||= {}
       
-      style['text-indent'] = '-5000px'
+      style['text-indent'] = '-9999em'
       #style['color'] = 'transparent' #alternative (allows selecting of the text)
-      style['background'] = &quot;url('#{src}') 0 -#{size[1] - real_height}px no-repeat&quot;
+      style['background'] = &quot;url('#{src}') no-repeat&quot;
 
       style['width']      = &quot;#{size[0]}px&quot;
       style['height']     = &quot;#{real_height}px&quot;
 
-      style['overflow'] = &quot;hidden&quot;
+      #style['overflow'] = &quot;hidden&quot;
       style['display'] = &quot;block&quot;
-            
-      if options[:transparent]
-        style['_background']    = 'transparent';
-        style['_filter:progid'] = &quot;DXImageTransform.Microsoft.AlphaImageLoader(src='#{src}', sizingMethod='crop')&quot;
+      
+      ie_style = &quot;&quot;
+      if options[:transparent] != false # transparent by default
+        ie_style += '_background: transparent;'
+        ie_style += &quot;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='#{src}', sizingMethod='crop');&quot;
       end
       
       options[:html][:class] &lt;&lt; 'saucy'
-      if options[:hover]
-        options[:html][:class] &lt;&lt; 'saucySprite'
+      if options[:highlight]
+        style['margin-top'] = &quot;#{real_height - height}px&quot;
+
       end
       
       options[:tag] ||= :p
+       
+      options[:html][:style] = style.collect {|key, value| [key, value].join(': ') }.join('; ') + &quot;; &quot; + ie_style
       
-      # need to use a's for tags for automaitc :hover support (IE6)
-      
-      options[:html][:style] = style.collect {|key, value| [key, value].join(':') }.join(';')
       options[:html][:class] = options[:html][:class].join(' ')
       options[:html].delete(:class) if options[:html][:class].blank?
 
       
       if block_given?
-        concat(content_tag(options[:tag] || :a, capture(&amp;block), options[:html] || {}))
-      else
-        content_tag(options[:tag] || :a, name, options[:html] || {})
+        concat(content_tag(options[:tag], capture(&amp;block), options[:html] || {}))
+      else        
+        if options[:highlight]
+          inner_tag = &quot;&lt;a href='#' class='saucySprite' style=\&quot;#{options[:html][:style]};height: #{height}px;\&quot;&gt;#{name}&lt;/a&gt;&quot;
+          options[:html][:style] = &quot;display:block; overflow:hidden; height: #{real_height}px;&quot;
+          content_tag(options[:tag], inner_tag, options[:html] || {})
+        else
+          content_tag(options[:tag], name, options[:html] || {})
+        end
       end
-      
+
     end
 
   end</diff>
      <filename>lib/saucy/helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -47,9 +47,10 @@ module Saucy
                   )
                   
 
-        if options[:hover]
+        if options[:highlight]
           images  = Magick::ImageList.new
-          style   = style.deep_merge(options[:hover] || {})
+          style   = style.deep_merge(options[:highlight])
+          
           images &lt;&lt; draw(name,  
                       style[:font], 
                       style[:background], 
@@ -121,10 +122,7 @@ module Saucy
           image = shadow!(image, shadow)
         end
 
-
-        
-        image.trim
-        
+        image.trim        
       end
       
       def shadow! input, shadow</diff>
      <filename>lib/saucy/render.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>75729869cb7186ef1121597d33d641f68e5d3e53</id>
    </parent>
  </parents>
  <author>
    <name>weepy</name>
    <email>jonahfox@gmail.com</email>
  </author>
  <url>http://github.com/weepy/saucy/commit/f3477f540509ff281e0f7c33e05a1ea2cf5bcfaf</url>
  <id>f3477f540509ff281e0f7c33e05a1ea2cf5bcfaf</id>
  <committed-date>2008-12-05T07:20:54-08:00</committed-date>
  <authored-date>2008-12-05T07:20:54-08:00</authored-date>
  <message>lots of little fixes</message>
  <tree>b8491214c076581612ce6fc2df9c4c9a47c7ea6e</tree>
  <committer>
    <name>weepy</name>
    <email>jonahfox@gmail.com</email>
  </committer>
</commit>
