Link in div repeats the function on roll over
<p>So I have a side menu made of <code>div</code>s containing some text and a link.</p>

<p>When I roll over the <code>div</code> I fade in an image.</p>

<p>When I roll over the a tag link in that <code>div</code> it repeats that same function and creates another fade in of the same image witch looks real buggy.</p>

<p>How can I prevent the link a tag to repeat the function </p>

<p>I tried to create a variable set to true on roll over the link and a if inside the fade in method but with no success?</p>

<p>Any ideas would be appreciated.</p>

<hr>

<pre><code>  $j=jQuery.noConflict();

  jQuery(document).ready(function($) {
              var num = 0;
              var numtot = 4;
              var delai = null;
              var stop_x=0;
              var numCur=0;
              var thisIs = 0;
              var delayRoll = 0;
              var count = null;
              var overlink = false;

//on ini

//--//           




 $j(document).ready(function() {


          function start() {
              delai=setInterval(test, 5000);
              console.log("&gt;&gt; start interval");//&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;trace;


          };


          numtot = ($j("#news dl dt").size())-1;

          test();
           start();
                             })





            function fistImage(){


                //if(delayRoll==0){

            $j("#news dl dd").fadeOut();
            $j("#news dl dt").removeClass('current');

            console.log("num on test: " + num);//&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;trace;
            console.log("numCur on test: " + numCur);//&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;trace;

            //console.log("current is"+ );//&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;trace;

            $j("#news dl dt").eq(num).addClass('current');      
            $j("#news dl dt").eq(num).next('dd').fadeIn(500);
            if (num&gt;=numtot) {num = 0;} else {num ++;}; 


                //}
            }

            //firstImage();

              //--//



              ////////--------//////// NEXT IMAGE METHOD
              function nextImage(){

                  if( overlink == false || overlink == true){


console.log("delayRoll image: " + delayRoll);//&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;trace;
$j("#news dl dd").fadeOut();
$j("#news dl dt").removeClass('current');
$j(thisIs).addClass('current');
$j(thisIs).next('dd').fadeIn(500);  
//stop_x=1;

var new_pos=$j(thisIs).attr('id').substring(4, 5);
              new_pos=parseInt(new_pos);

          if (numtot==new_pos) {new_pos = 0;} 
              num = new_pos;
          numtot = ($j("#news dl dt").size())-1;

                  }


  }
  //--//


   function test() {
          //console.log("num on test: " + num);//&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;trace;


  if(stop_x==0){
      fistImage();

  }


  if(stop_x==1){




  }};

  //--//
      //--/

      delai=setInterval(test, 5000);

  //--//



    //-- OVERLAY//
  $j(".overlay").mouseover(function() {
                  stop_x=1;

              }).mouseout( function (){

              stop_x=0;

          });




  //--//mouseover
  $j("#news dl dt").mouseover(function() {
                thisIs = $j(this);
                stop_x=1;                      
                 clearInterval(delai);
                 nextImage();
                 delayRoll==2;

                                       })



   $j("#news dl dt").mouseout(function() {
                            stop_x==0;
                            firstImage();
                            delayRoll=0;            
                                        })




  $("#news dl dt a").live("mouseover mouseout", function() {
// alert(this.href); 
  //return false;
  overlink=true;
});








                                  })//close duc ready
  //--//
</code></pre>

<hr>

<p>and here the html </p>

<pre><code>&lt;div id="news" class="slideshow"&gt;
          &lt;dl&gt;


              &lt;dt id="pos_1"&gt;08/16/11&lt;br /&gt;&lt;br /&gt;Holy Cross to Welcome Class of 2015 on Aug. 27&lt;br /&gt;
      &lt;a class="more" href="blog/2011/08/16/holy-cross-to-welcome-class-of-2015-on-aug-27/index.html"&gt;See more &amp;gt;&lt;/a&gt;
      &lt;/dt&gt;
      &lt;dd&gt;
  &lt;div class="overlay"&gt;
  &lt;p&gt;Holy Cross to Welcome Class of 2015 on Aug. 27                     &lt;span class="nav"&gt;
                                                                                                                                                                                                      &lt;img src="wp-content/themes/marsten/images/ico_more_white.png" width="14" height="14" alt="" /&gt;

&lt;div id="disLink"&gt;&lt;span&gt;&lt;a class="more" href="blog/2011/08/16/holy-cross-to-welcome-class-of-2015-on-aug-27/index.html" &gt;See more &amp;gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;


      &lt;/span&gt; 
      &lt;/p&gt;
  &lt;div id="boxit"&gt;&lt;p class="author"&gt;by &lt;a href="blog/2011/08/16/holy-cross-to-welcome-class-of-2015-on-aug-27/index.html"&gt;&lt;/a&gt;
  &lt;a href="blog/author/nmarkant/index.html" title="Posts by Nikolas Markantonatos"&gt;Nikolas Markantonatos&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;img alt="" src="wp-content/uploads/2011/08/gate2.jpg" width="612" height="451" /&gt;
              &lt;/dd&gt;
</code></pre>
