<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>images/slider_center.png</filename>
    </added>
    <added>
      <filename>images/slider_left.png</filename>
    </added>
    <added>
      <filename>images/slider_right.png</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff></diff>
      <filename>images/off.png</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>images/on.png</filename>
    </modified>
    <modified>
      <diff>@@ -9,15 +9,38 @@
   &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; charset=&quot;utf-8&quot; /&gt;
   &lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
     $(document).ready(function() {
-      $(':checkbox').iphoneStyle();
+      $('.on_off :checkbox').iphoneStyle();
+      $('.yes_no :checkbox').iphoneStyle({ checkedLabel: 'Yes', uncheckedLabel: 'No' });
+      $('.enabled_disabled :checkbox').iphoneStyle({ checkedLabel: 'Enabled', uncheckedLabel: 'Disabled' });
+      $('.long_tiny :checkbox').iphoneStyle({ checkedLabel: 'Very Long Text', uncheckedLabel: 'Tiny' });
     });
   &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
-  &lt;h2&gt;Off by default&lt;/h2&gt;
-  &lt;input type=&quot;checkbox&quot; /&gt;
+  &lt;h1&gt;On/Off&lt;/h1&gt;
   
-  &lt;h2&gt;On by default&lt;/h2&gt;
-  &lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot; /&gt;
+  &lt;div class=&quot;on_off&quot;&gt;
+    &lt;h2&gt;Default off&lt;/h2&gt;
+    &lt;input type=&quot;checkbox&quot; /&gt;
+  
+    &lt;h2&gt;Default on&lt;/h2&gt;
+    &lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot; /&gt;
+  &lt;/div&gt;
+
+  &lt;div class=&quot;yes_no&quot;&gt;
+    &lt;h1&gt;Yes/No&lt;/h1&gt;
+    &lt;input type=&quot;checkbox&quot; /&gt;
+  &lt;/div&gt;
+  
+  &lt;div class=&quot;enabled_disabled&quot;&gt;
+    &lt;h1&gt;Enabled/Disabled&lt;/h1&gt;
+    &lt;input type=&quot;checkbox&quot; /&gt;
+  &lt;/div&gt;
+
+  &lt;div class=&quot;long_tiny&quot;&gt;
+    &lt;h1&gt;Very Long Text/Tiny&lt;/h1&gt;
+    &lt;input type=&quot;checkbox&quot; /&gt;
+  &lt;/div&gt;
+
 &lt;/body&gt;
 &lt;/html&gt;
\ No newline at end of file</diff>
      <filename>jquery-demo.html</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 (function($){
   $.iphoneStyle = {
     defaults: { 
+      duration:          200,
       checkedLabel:      'ON', 
       uncheckedLabel:    'OFF', 
       background:        '#fff',
@@ -24,34 +25,36 @@
       
       elem.css({ opacity: 0 });
       elem.wrap('&lt;div class=&quot;' + options.containerClass + '&quot; /&gt;');
-      elem.after('&lt;div class=&quot;' + options.handleClass + '&quot;&gt;&lt;div class=&quot;' + options.handleBGClass + '&quot; style=&quot;background: ' + options.background + '&quot;/&gt;&lt;div class=&quot;' + options.handleSliderClass + '&quot; /&gt;&lt;/div&gt;')
+      elem.after('&lt;div class=&quot;' + options.handleClass + '&quot;&gt;&lt;div class=&quot;' + options.handleSliderClass + '&quot;&gt;&lt;div class=&quot;right&quot;&gt;&lt;div class=&quot;center&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;')
           .after('&lt;label class=&quot;' + options.labelOffClass + '&quot;&gt;'+ options.uncheckedLabel + '&lt;/label&gt;')
           .after('&lt;label class=&quot;' + options.labelOnClass + '&quot;&gt;' + options.checkedLabel   + '&lt;/label&gt;');
       
       var handle    = elem.siblings('.' + options.handleClass),
-          handlebg  = handle.children('.' + options.handleBGClass),
           offlabel  = elem.siblings('.' + options.labelOffClass),
           onlabel   = elem.siblings('.' + options.labelOnClass),
-          container = elem.parent('.' + options.containerClass),
-          rightside = container.width() - 39;
+          container = elem.parent('.' + options.containerClass);
+      
+      var min = (onlabel.width() &lt; offlabel.width()) ? onlabel.width() : offlabel.width();
+      container.css({width: onlabel.width() + offlabel.width() + 24 });
+      handle.css({width: min});
+      offlabel.css({width: container.width() - 12})
+      
+      var rightside = container.width() - handle.width() - 8;
+      
+      if (elem.is(':checked')) {
+        handle.css({ left: rightside });
+        onlabel.css({ width: rightside })
+      } else {
+        handle.css({ left: 0 });
+        onlabel.css({ width: 0 })
+      }
       
       container.mouseup(function() {
         var is_onstate = (handle.position().left &lt;= 0);
-            new_left   = (is_onstate) ? rightside : 0,
-            bgleft     = (is_onstate) ? 34 : 0;
+            new_left   = (is_onstate) ? rightside : 0;
 
-        handlebg.hide();
-        handle.animate({ left: new_left }, 100, function() {
-          handlebg.css({ left: bgleft }).show();
-        });
-        
-        if (is_onstate) {
-          offlabel.animate({ opacity: 0 }, 200);
-          onlabel.animate({ opacity: 1 }, 200);
-        } else {
-          offlabel.animate({ opacity: 1 }, 200);
-          onlabel.animate({ opacity: 0 }, 200);
-        }
+        handle.animate({ left: new_left }, options.duration);
+        onlabel.animate({ width: new_left }, options.duration);
         
         elem.attr('checked', !is_onstate).change();
         return false;
@@ -61,14 +64,6 @@
       $(container, onlabel, offlabel, handle).mousedown(function() { return false; });
       if ($.browser.ie)
         $(container, onlabel, offlabel, handle).bind('startselect', function() { return false; });
-      
-      // initial load
-      if (elem.is(':checked')) {
-        offlabel.css({ opacity: 0 });
-        onlabel.css({ opacity: 1 });
-        handle.css({ left: rightside });
-        handlebg.css({ left: 34 });
-      }
-    });
+      });
   };
 })(jQuery);
\ No newline at end of file</diff>
      <filename>jquery/iphone-style-checkboxes.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,5 @@
 .iPhoneCheckContainer {
   position: relative;
-  width: 85px;
   height: 27px;
   cursor: pointer;
   overflow: hidden; }
@@ -11,7 +10,6 @@
 .iPhoneCheckHandle {
   display: block;
   height: 27px;
-  width: 39px;
   cursor: pointer;
   position: absolute;
   top: 0;
@@ -28,10 +26,26 @@
     top: 0;
     left: 0;
     height: 27px;
-    width: 39px;
-    background: url(images/slider.png) no-repeat;
+    width: 100%;
+    padding-left: 4px;
+    background: url(images/slider_left.png) no-repeat;
     z-index: 2; }
+
+  .iPhoneCheckHandle .iPhoneCheckHandleSlider .right {
+    height: 100%;
+    width: 100%;
+    padding-right: 4px;
+    background: url(images/slider_right.png) no-repeat top right;
+    z-index: 2; }
+
+  .iPhoneCheckHandle .iPhoneCheckHandleSlider .center {
+    height: 100%;
+    width: 100%;
+    background: url(images/slider_center.png);
+    z-index: 2; }
+    
 label.iPhoneCheckLabelOn, label.iPhoneCheckLabelOff {
+  white-space: nowrap;
   font-size: 17px;
   line-height: 17px;
   font-weight: bold;
@@ -41,18 +55,22 @@ label.iPhoneCheckLabelOn, label.iPhoneCheckLabelOff {
   display: block;
   height: 22px;
   position: absolute;
-  width: 52px;
-  top: 0; }
+  width: auto;
+  top: 0;
+  overflow: hidden; }
   label.iPhoneCheckLabelOn {
     color: #fff;
     background: url(images/on.png) no-repeat;
     text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
     left: 0;
-    padding: 5px 0 0 8px; }
+    padding: 5px 0 0 8px; 
+    z-index: 1; }
   label.iPhoneCheckLabelOff {
     color: #8B8B8B;
     background: url(images/off.png) no-repeat right 0;
     text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.6);
     text-align: right;
     right: 0;
-    padding: 5px 8px 0 0; }
\ No newline at end of file
+    padding: 5px 8px 0 0; }
+  }
+  
\ No newline at end of file</diff>
      <filename>style.css</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>images/off-end.png</filename>
    </removed>
    <removed>
      <filename>images/on-end.png</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>fd7898595b8cb875d6786ffb2c8afe45e026b82d</id>
    </parent>
  </parents>
  <author>
    <name>Elijah Miller</name>
    <email>elijah.miller@gmail.com</email>
  </author>
  <url>http://github.com/tdreyno/iphone-style-checkboxes/commit/ef2a0a2299bd5e731a9bced5a30eeea8d9ccb0dd</url>
  <id>ef2a0a2299bd5e731a9bced5a30eeea8d9ccb0dd</id>
  <committed-date>2009-06-24T19:29:03-07:00</committed-date>
  <authored-date>2009-06-24T19:29:03-07:00</authored-date>
  <message>Variable size sliders for jQuery.</message>
  <tree>bd57b9ac021640960f2d5e783eb1f5976e6a2f98</tree>
  <committer>
    <name>Elijah Miller</name>
    <email>elijah.miller@gmail.com</email>
  </committer>
</commit>
