         bgParallaxImageView.frame.origin.x = translatedOffsetX * mountainParallaxRate
     }
     
+    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.LandscapeLeft.rawValue
+        default: return UIInterfaceOrientation.Portrait.rawValue
+        }
+    }
+    
 }
 

    var secondAnimationView: LockView!
    var thirdAnimationView: ReceiptView!
    // ParallaxRates
    let backgroundParallaxRate:CGFloat = 0.5
    let mountainParallaxRate: CGFloat = 0.57
    
    @IBOutlet var scrollView: UIScrollView!
    @IBOutlet var getStartedButton: UIButton!
    @IBOutlet var pageControll: UIPageControl!
    
    var initialButtonPostionY:CGFloat = 0
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        initialButtonPostionY = getStartedButton.center.y
    }

    
    override func viewDidAppear(animated: Bool) {
        super.viewDidAppear(animated)
        
        let pageSize = view.frame.size
        let numOfPages:CGFloat = 5
        scrollView.delegate = self
        scrollView.contentSize = CGSizeMake(pageSize.width * numOfPages, pageSize.height)
        
        panBackground()
      
        println(bgImageView.frame)
        println(bgMaskImageView.frame)
        println(bgParallaxImageView.frame)
     
        // Setup animation views
        setupAnimationViews()
    }
    
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        panBackground()
    }

    
    func setupAnimationViews(){
        
        let pageCenter = scrollView.frame.midY - (view.frame.width/4)

        switch progress{
        case -1.0...1.0:
            firstAnimationView.progress =  progress
            logoImageView.center.y = logoInitialPositionY + scrollView.contentOffset.x
            welcomeLabel.center.y = welcomeLabelInitialPositionY + scrollView.contentOffset.x
            logoImageView.alpha = 1 - progress
            logoImageView.hidden = false
            welcomeLabel.hidden = false
