title: Using Pixastic and .live with a class of images
body: <p>I'm using the Pixastic plugin in JavaScript. I have a table filled with images that are blurred. When I go over them with the mouse I want them to get normal. And when the mouse leaves an image I want it to blur back. For some reason my code doesn't work. Here's the code:</p>
  
  <p>Before, I copied the wrong code part, and I apologize for that this one is the one I'm asking about.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $('.photography').live('mouseover mouseout', function(event) {
              if (event.type == 'mouseover') {
                  function () {Pixastic.revert('this');};
              }
              else {
                  function(){Pixastic.process('this', "blurfast", {amount:0.5});};
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>OK, so I managed to find my old code that actually works half way (when I hover over the image for the first time it works, but when I try for the second time it doesn't).</p>
  
  <pre><code>$(document).ready(function(){
      var blur = function() {Pixastic.process(this, "blurfast", {amount:0.5});};
      var unblur = function () {Pixastic.revert(this);};
      $('.photography').each(blur);
      $('.photography').hover(unblur,blur);
  });
  </code></pre>
  
  <p>OK, so now I'm also adding the code for the function called <code>revert</code>:</p>
  
  <pre><code>revert : function(img) {
      if (Pixastic.Client.hasCanvas()) {
          if (img.tagName.toLowerCase() == "canvas" &amp;&amp; img.__pixastic_org_image) {
              img.width = img.__pixastic_org_width;
              img.height = img.__pixastic_org_height;
              img.getContext("2d").drawImage(img.__pixastic_org_image, 0, 0);
  
              if (img.parentNode &amp;&amp; img.parentNode.replaceChild) {
                  img.parentNode.replaceChild(img.__pixastic_org_image, img);;
              }
              return img;
          }
      }
      else
          if (Pixastic.Client.isIE()) {
              if (typeof img.__pixastic_org_style != "undefined")
                  img.style.cssText = img.__pixastic_org_style;
              }
          }
  </code></pre>