Problem with className.indexOf()
<p>i've got a problem with className.indexOf()</p>

<p>here's the code</p>

<pre><code>$('#energie').click(function() {
     if(this.className.indexOf('active1, active2')!=-1){}
     else{
     if(this.className.indexOf('inactive1')!=-1){
     $('#navigation div').removeClass();
     $(this).addClass('active1');
     $(this).siblings().addClass('inactive2');
     }
     else {
     $('#navigation div').removeClass();
     $(this).addClass('active2');
     $(this).siblings().addClass('inactive1');
     }
             $("#maincontent &gt; div:visible").fadeOut(300, function(){
         $("div.energiewende").fadeIn(450);
                  ]);
          }

  )};
</code></pre>

<p>the problem is, that if className of .this is active1 or active2 the else function will be triggered although it shouldn't.</p>
