cant change variable
<p>I'm trying to make a navigation area and am trying to switch tabs with the active variable.
This is just for the nav button, but later I'd like to make a rotator too by switching the variable.</p>

<p>Here is my code:</p>

<pre><code>                active = 1;

        function hover() {


            $(nav1).live('mouseenter', function() {
                active = 2;
            });

            if ( active == 1) {
            $(tab1).fadeIn('fast');
            }
            else if ( active != 1) {
                $(tab1).fadeOut('slow');
            } 

            if ( active == 2) {
                $(tab2).fadeIn('fast');
            }
            else if ( active != 2) {
                $(tab2).fadeOut('slow');
            } 

        }


        hover();
</code></pre>
