Template.displayBarnett.helpers({
  actionPerformed: function() {
    barnettDisplayCount = 0;
    initializing = true;
    var query = Actions.find(); // find all data in Actions collection, assign it to 'query'
    query.observeChanges({ // listen to changes to the collection
      added: function(id, fields) { // if anything is added to the collection
        if (fields.artist === "barnett" && !initializing) { // if the added item matches this artist
          var $images = $('img.interactive');
          var imgCount = barnettDisplayCount - 1;
          var thisImage = $images.get(imgCount);
          var $thisImage = $(thisImage);
          var toggleImage = function() {
            $images.addClass('hidden')
            $thisImage.removeClass('hidden');
            if (barnettDisplayCount >= 2) {
              barnettDisplayCount = 1;
            } else {
              barnettDisplayCount++;
            }
          };
          if ($('img.bg')) {
            $('img.bg').remove();
          }
          switch(barnettDisplayCount) {
            case 0:
            barnettDisplayCount++;
              break;
            case 1:
              toggleImage();
              break;
            case 2:
              toggleImage();
              break;
          }
        }
      }
    });
    initializing = false;
    return query;
  }
});

@@ -674,24 +674,105 @@
 unction() %7B%0A
+            if ($('img.bg')) %7B%0A              $('img.bg').remove();%0A            %7D%0A
             
@@ -1016,83 +1016,8 @@
  %7D;%0A
-          if ($('img.bg')) %7B%0A            $('img.bg').remove();%0A          %7D%0A
     

fix issue with barnett exhibit