about jquery - image gallery : $("#right").click(function(){
          var nextIndex=currIndex.next();
          
          var nextImg = nextIndex.children("img").attr("src");
          $("#main").attr("src",nextImg);
         
        
          currIndex = nextIndex;
          

          
          
      }); 
    
      $("#left").click(function(){
          var prevIndex=currIndex.prev();
          
          var prevImg = prevIndex.children("img").attr("src");
          $("#main").attr("src",prevImg);

        
          currIndex = prevIndex;
        
        
          
          
      });  


When I'm in the last image, the right or left arrow doest't work... hmm please help me