Switch through images on mouseover of container element
<p>On my product site search results, I need to scroll through the 4 product images, at 1 second intervals, when the primary product image is hovered or moused over.  This needs to stop and reset to the main image on mouseout.
My images are named sequentially, numbers, from the primary image (eg primary 111.jpg, secondary 112.jpg . . . ) The following code is what I have now but is basically not working and I am really stuck.  Any help would be appreciated.</p>

<p>e.g. <a href="http://buildinternet.com/live/cycle-images/" rel="nofollow">Similar functionality</a></p>

<pre><code>    // when hovering over a result image, alt images display
     $('.pImg1').mouseover(function(){
             imgRef1 = $(this).attr('src'); // returns the full file path
             imgPath1 = imgRef1.substr(0, 11);// returns the first 11 chars starting at 0 ie. ../img/dev/
             imgName1 = imgRef1.substr(11, imgRef1.length-15); // returns the actual file name without the extension
             imgExtn1 = imgRef1.substr(imgRef1.length-4); // returns the file extension
             originalImgName = parseInt(imgName1); // original image name as Integer
             imgName2 = originalImgName;
             count7 = 1


            setInterval(function(){  
                    if(count7 &lt; 4){
                        if(count7 &gt; 1){
                            imgName2 = imgName2 + 1;  // increments imgName2
                            count7 = count7 + 1; // increments count7 by 1
                        }
                        fullImgName = imgPath1 + imgName2 + imgExtn1;
                        $(this).attr('src', fullImgName);
                    } else{
                        imgName2 = originalImgName; // resets image name back to original
                        count7 = 1; // resets counter
                         fullImgName = imgPath1 + imgName2 + imgExtn1;
                        $(this).attr('src', fullImgName);
                        }
                     }, 1000);// end setInterval                     
      }); // end hover
</code></pre>
