 
 let reuseIdentifier = "Cell"
 var isScrolling = false
+var recentlyScrolled = false
+var recentlyScrolledDelay = 2.0 // 2 second delay until we clear recentlyScrolled
+var recentlyScrolledTimer: NSTimer!
 var scrollDirection = ScrollDirection()
 var pageWidth: CGFloat!
 var pageHeight: CGFloat!

            changePageWith(page: page)
        }
    }
    
    func changePageWith(href href: String, andAudioMarkID markID: String) {
        changePageWith(href: href);
        currentPage.audioMarkID(markID);
    }

    func changePageWith(indexPath indexPath: NSIndexPath) {

        }
    }
    
    func scrollViewDidEndDragging(scrollView: UIScrollView, willDecelerate decelerate: Bool) {
        recentlyScrolledTimer = NSTimer.scheduledTimerWithTimeInterval(recentlyScrolledDelay, target: self, selector: "clearRecentlyScrolled", userInfo: nil, repeats: false)
    }

    func clearRecentlyScrolled(){
        if( recentlyScrolledTimer != nil ){
            recentlyScrolledTimer.invalidate()
            recentlyScrolledTimer = nil
        }
        recentlyScrolled = false
    }

    func scrollViewDidEndScrollingAnimation(scrollView: UIScrollView) {
        updateCurrentPage()
    }
