     var logoInitialPositionY:CGFloat = 0
     var welcomeLabelInitialPositionY:CGFloat = 0
     
+    // ParallaxRates
+    var backgroundParallaxSpeed:CGFloat!
+    var mountainParallaxSpeed: CGFloat!
+    
     override func viewDidLoad() {
         super.viewDidLoad()
     

        pageControll.currentPage = scrollView.currentPage
    }
    
    func updateAnimationViewProgress(){
        
        let progress = scrollView.pageProgressInPercentage
        
        switch progress{
        case -1.0...1.0:
            firstAnimationView.progress =  progress
            logoImageView.center.y = logoInitialPositionY + scrollView.contentOffset.x

            logoImageView.hidden = true
            welcomeLabel.hidden = true
        case 4.0...5.0:
            // get a startpoint where x is zero when on page 5
            let startPointX = scrollView.contentOffset.x - (scrollView.frame.width * 4)
            // If the user over scrolls the scrollview in x, move the button equally in y
            getStartedButton.center.y = buttonEndPositionY - startPointX
        default: break
        }
    }
    
    func panBackground() {
        let translatedOffsetX = -(scrollView.contentOffset.x + scrollView.scrollableEdgeOffset)
        bgImageView.frame.origin.x = translatedOffsetX * backgroundParallaxSpeed
        bgMaskImageView.frame.origin.x = bgImageView.frame.origin.x
        bgParallaxImageView.frame.origin.x = translatedOffsetX * mountainParallaxSpeed
    }
    
//    override func shouldAutorotate() -> Bool {
//        return false
//    }
//    
//    override func supportedInterfaceOrientations() -> Int {
//        
//        let device = UIDevice.currentDevice().userInterfaceIdiom
//        switch device {
//        case .Phone: return UIInterfaceOrientation.Portrait.rawValue
//        case .Pad: return UIInterfaceOrientation.LandscapeRight.rawValue
//        default: return UIInterfaceOrientation.Portrait.rawValue
//        }
//    }
    
}

