title: jQuery Uncaught TypeError: Cannot read property 'nodeType' of undefined
body: <p>There are 4 of these all the same. I narrowed it down to this line by a process of elimination:</p>
  
  <pre><code>originalImg = $(element).find('.ProductImage a img').attr();
  </code></pre>
  
  <p>I'm at a bit of a loss of what might be causing this. </p>
  
  <p>Here is my code in full:</p>
  
  <pre><code>$(function(){
      $('.SubCategoryList li').each(function(index, element) {
          $(element).append('&lt;div class="ProductListWrapper"&gt;&lt;/div&gt;')
          var subcategory_link = $(element).find('a').attr('href');
          $(element)
              .find('.ProductListWrapper')
              .load( subcategory_link + ' #CategoryContent ul.ProductList', productHovers);
      });
  });
  
  function productHovers(){
      $('.SubCategoryList .ProductList li').each(function(index, element){
  
          // This is the problem line. 
          originalImg = $(element).find('.ProductImage a img').attr(); 
  
          $(element).mouseover(function(){
             var link = $(this).find(".ProductImage a").attr('href');
             $.get(link,function(data,status){
                 var tinyImg = $(data)
                     .find('.ImageCarouselBox ul li:nth-child(1) img')
                     .attr('src');
                 var imageSRC = tinyImg.replace('.60.60.jpg','.200.200.jpg');
                 $(element).find('.ProductImage a img').attr('src',imageSRC);
             });
          });
          $(element).mouseleave(function(){
               $(element).find('.ProductImage a img').attr('src',originalImg);
          });
      });
  }
  </code></pre>