title: transforming jquery to java script
body: <p>I have this script made with jQuery which I am using to show / hide divs on my page. 
  I really need it to be made purely in JavaScript and I have no idea how to do this.
  Could anyone help me ??? 
  I think I need a converter or something . . . </p>
  
  <pre><code>$("#optiuni").children().click(function(){
      $("#" + $(this).attr('name')).show().siblings().hide();
      /*Gives the  link-activ class to the link that i clicked an link-inactive to all others*/
      $(this).attr('class','link-activ').siblings().attr('class','link-neactiv');
  });
  /*this makes shure that the first option from my list is active  incarcarea paginii*/
  $("#optiuni li.prima").children().click();
  </code></pre>
  
  <p>Sample markup:</p>
  
  <pre><code>&lt;div id="lista"&gt;
    &lt;ul id="optiuni"&gt;
      &lt;li id="titlu-lista-p"&gt; &lt;p class="listname-t"&gt;Past Events &lt;/p&gt;&lt;/li&gt;
  
      &lt;li name="opt-1" class="prima"&gt;&lt;a href="#"&gt;&lt;p class="listdata"&gt;28.02.2011&lt;/p&gt;&lt;p class="listname"&gt;TABU Oscar Party&lt;/p&gt; &lt;/a&gt;&lt;/li&gt;
  
      &lt;li name="opt-2" &gt;&lt;a href="#"&gt;&lt;p class="listdata"&gt;24.03.2011&lt;/p&gt;&lt;p class="listname"&gt;Cheese &amp; Wine&lt;/p&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li name="opt-8"&gt;&lt;a href="#"&gt;&lt;p class="listdata"&gt;08.04.2011&lt;/p&gt;&lt;p class="listname"&gt;George Baicea&lt;/p&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div class="centru"&gt;
    &lt;div id="continut" &gt;
      &lt;div id="opt-2" class="galerie" style="background-color: black;"&gt;
        &lt;iframe id="gal" src="cheese/index.html"&gt;&lt;/iframe&gt;
      &lt;/div&gt;
      &lt;div id="opt-1" class="galerie" style="background-color: black;"&gt;
        &lt;iframe  src="tabu/index.html"&gt;&lt;/iframe&gt;
      &lt;/div&gt;
  
      &lt;div id="opt-8" class="galerie" style="background-color: blue;"&gt;
        &lt;iframe   src="no-ev/index.html"&gt;&lt;/iframe&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>