         if animated {
             UIView.beginAnimations("cancel", context: nil)
             UIView.setAnimationDelay(0)
-            UIView.setAnimationDuration(0.5)
+            UIView.setAnimationDuration(accurateAnimationDuration)
             UIView.setAnimationCurve(.EaseOut)
             
         }

        if animated {
            UIView.beginAnimations("cancel", context: nil)
            UIView.setAnimationDelay(0)
            UIView.setAnimationDuration(0.5)
            UIView.setAnimationCurve(.EaseOut)
            
        }
        if let navigation = navigationController?.navigationBar {
            
            let top = -self.topItemOffset + self.searchBarHeight
            
            self.decksCollectionView.contentInset = UIEdgeInsets(top: top, left: 0, bottom: 0, right: 0)
            self.decksCollectionView.contentOffset.y = -top
            
            navigation.frame.origin.y = self.statusBarHeight
            

        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)
