         }
         return collectionReusableView
     }
+    
+    func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath)
+    {
+        if indexPath.section == 0
+        {
+            let post = topPosts[indexPath.row]
+            performSegueWithIdentifier("showPhoto", sender: post)
+        }
+        else
+        {
+            let post = mostRecent[indexPath.row]
+            performSegueWithIdentifier("showPhoto", sender: post)
+        }
+    }
 }

        boldAttributed.appendAttributedString(normalAttributed)
        postsCountLabel.attributedText = boldAttributed
    }
}

extension SearchResultsViewController: UICollectionViewDataSource
{
    func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int
    {

        searchTermLabel.text = ""
        postsCountLabel.text = ""
        collectionView.dataSource = self
        collectionView.delegate = self
        callInstagramTagService()
    }
    
