title: Link changing class of parent <div>, content of two <iframe> elements
body: <p>Interesting (and rather complex) issue here...<br>
  What I have is a page with two iframes and a set of links at the top, each contained inside a div with an image background. What I want is for the contents of both iframes to change (to two separate html documents) when the link is clicked, and for the background image of the link's parent div to also change. I also, however, want the parent div to automatically change back to the original class when a different link is clicked (i.e. I have two classes, 'active' and 'waiting'. When a link is clicked (and its contents subsequently displayed in the iframes) I want it to switch to class 'active'. At all other times, though, (including after a different link might be clicked and become active) I want it to go back to using the 'waiting' class.)</p>
  
  <p>Here's my current code / markup:</p>
  
  <p>Javascript:<br>
  <code>function changeFrame(link) {<br>
  $('#first iframe').src=link.href;<br>
  $('#second iframe').src=</code> (Here would be the second link, not sure how to define that)
  <code>link.ParentNode.addclass("activebutton");
  </code></p>
  
  <p>HTML:<br>
  <code>&lt;div class="waitingbutton"&gt;<br>
  &lt;a href="yes.html"</code> (Somewhere here would be the second link for the second iframe) <code>class="waitingbutton" onclick="changeFrame(this);<br>
  return false;"&gt;Button Text&lt;/a&gt;<br>
  &lt;/div&gt;</code><br>
  (After this come four more divs, each identical bar Button Text and links)</p>
  
  <p>As I suspect you can tell, I'm really just guessing here. Still not hugely familiar with Javascript, hoping someone can help me out.</p>