title: Setting a rel attribute dynamically
body: <p>I am using PrettyPhoto lightbox, and trying to set a rel attribute on a link when another non-jQuery javascript library makes that link active (it sets the links class to active) so the PrettyPhotot lightbox will open. I don't want the link to open  unless it is an active link. I am successful in setting the attribute, but every link opens in the lightbox when clicked, not just the active one. No errors in FireBug.</p>
  
  <p>Prettyphoto's code is set as so:</p>
  
  <pre><code>$("a[rel^='prettyPhoto']").prettyPhoto();
  </code></pre>
  
  <p>The other javascripts code for the active and inactive click:</p>
  
  <pre><code>ContentFlowConf: {
      onclickActiveItem: function (item) {
          $('.active').attr('rel', 'prettyPhoto[gallery]');
      },
      onclickInactiveItem: function (item) {
      $('.active').removeAttr('rel');
          $('.item').click(function(event) {
              event.preventDefault(); 
          });
      }
  }
  </code></pre>
  
  <p>The initial html is:</p>
  
  <pre><code> &lt;a class="item" title="Image" href="image.jpg"&gt;&lt;img class="content" src="thumb.jpg" alt="Image"/&gt;&lt;/a&gt;
  </code></pre>
  
  <p>The other javascript sets the html to:</p>
  
  <pre><code> &lt;a class="item active" title="Image" href="image.jpg"&gt;&lt;img class="content" src="thumb.jpg" alt="Image"/&gt;&lt;/a&gt;
  </code></pre>
  
  <p>I am of course a novice and not sure what will make it work. I am wondering if the .live function might need to be used? </p>