         return 0
     }()
     
+    /**
+     * CollectionView content offset is determined by status bar and navigation bar height
+    */
     lazy private var topItemOffset:CGFloat = {
         return -(self.statusBarHeight + self.navbarHeight)
     }()
     
     private var searchBarHeight:CGFloat = 44
+    private var marginValue:CGFloat = 8
+
+    private var softAnimationDuration = 0.2
+    private var accurateAnimationDuration = 0.5
     
     // TODO: in future replace managerWithDummyData()
     override func viewWillAppear(animated: Bool) {

            
            searchBar.frame.origin.y = 0
            searchBar.frame.size.height = self.searchBarHeight + self.statusBarHeight
            self.decksCollectionView.contentInset = UIEdgeInsets(top: self.searchBarHeight + self.statusBarHeight + 8, left: 0, bottom: 0, right: 0)
        }
        
        if animated {

        startSearchReposition(searchBar, animated: true)
    }
    
    func scrollViewDidScroll(scrollView: UIScrollView) {
        if (scrollView.contentOffset.y < topItemOffset) {
            
            if (!isSearchBarVisible) {
                isSearchBarVisible = true
                decksCollectionView.contentInset = UIEdgeInsets(top: searchBarHeight - topItemOffset, left: 0, bottom: 0, right: 0)
                UIView.animateWithDuration(softAnimationDuration, delay: 0, options: .CurveEaseOut, animations: {
                    
                    self.searchBar?.frame.origin.y = -self.topItemOffset
                }, completion:nil)
            }
        }else {
            isSearchBarVisible = false
            decksCollectionView.contentInset = UIEdgeInsets(top: -topItemOffset, left: 0, bottom: 0, right: 0)
            UIView.animateWithDuration(softAnimationDuration, delay: 0, options: .CurveEaseOut, animations: {
                
                self.searchBar?.frame.origin.y = 0
                
            }, completion:nil)
