     
     private var refreshControl : UIRefreshControl!
     private var liveInvitations : [Invitation] = []
+    private var pastInvitations : [Invitation] = []
     private var selectedInvitation : Invitation?
     private var searchBar: UISearchBar!
     


extension AlbumGeneralViewController : UITableViewDataSource {
    func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        return 2
    }
    
    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return liveInvitations.count > 0 ? liveInvitations.count : 1
    }
    
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        if liveInvitations.count != 0 {
            let cell = tableView.dequeueReusableCellWithIdentifier(albumGeneralCellReuseIdentifier, forIndexPath: indexPath) as! AlbumGeneralViewCell
            cell.event = liveInvitations[indexPath.row].event
            return cell
        } else {
            let cell = tableView.dequeueReusableCellWithIdentifier(noAlbumsCellReuseIdentifier, forIndexPath: indexPath) as? NoAlbumsCell
            let originalCenter = cell!.arrow.center
            UIView.animateWithDuration(0.6, delay: 0.0, options: .Autoreverse | .Repeat | .CurveEaseOut, animations: { () -> Void in
                cell!.arrow.center.y = cell!.arrow.center.y - 10
                }, completion: { (success:Bool) -> Void in
                cell!.arrow.center = originalCenter
            })

            return cell!
        }
    }

    }
    
    func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
        switch indexPath.section {
        case 0:
            self.selectedInvitation = liveInvitations[indexPath.row]
        case 1:
            self.selectedInvitation = pastInvitations[indexPath.row]
        default:
            break
        }
        performSegueWithIdentifier("AlbumDetailSegue", sender: self)
    }
    
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
