     private var itemCenter: CGPoint!
     private var selectedItem: MainItemView!
     
+    private var itemRows: [ [MainItemView] ] = []
+    private var animator: UIDynamicAnimator!
+    
+    private var lastOffset: CGFloat = 0.0 //for calculate scrollView's delta offset
+    
     @IBOutlet weak private var topView: UIVisualEffectView!
     @IBOutlet weak private var scrollView: UIScrollView!
     

        let topInset = topView.frame.height + 20.0
        scrollView.contentInset = UIEdgeInsets(top: topInset, left: 0, bottom: 0, right: 0)
        scrollView.setContentOffset( CGPoint(x: 0.0, y: -scrollView.contentInset.top), animated: false)
    }
    
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {

        let itemWidth = scrollViewWidth / CGFloat(numberOfItemsPerRow)
        let rowHeight: CGFloat = 135.0
        
        // setup item in scrollView
        itemRows = []
        var count = 0
        for row in 0..<numberOfRows{
            var itemRow = [MainItemView]()
            for col in 0..<numberOfItemsPerRow{
                let xOffset = itemWidth * CGFloat(col)
                let yOffset = rowHeight * CGFloat(row)
