     }
     
     public func openSlideMenu() {
-        self.moveSlideMenu(0, animated: true)
+        
+        UIView.animateWithDuration(self.slideDuration, animations: { () -> Void in
+            self.slideMenuViewController.view.frame.origin = CGPoint(x: 0, y: 0)
+            self.activeChild?.view.layer.transform = CATransform3DMakeScale(self.zoomFactor,self.zoomFactor,self.zoomFactor)
+        })
+        
+        // Get our transparentLayer.
+        let transparentLayer = self.activeChild?.view.layer.sublayers!.filter({$0.name == self.transparentLayerKey})[0]
+        
+        // Create the opacity animation function
+        let basicAnimation = CABasicAnimation(keyPath: "opacity")
+        basicAnimation.duration = 0.35
+        basicAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
+        basicAnimation.fromValue = transparentLayer!.opacity
+        
+        // animate to 0 if closed; animate to 0.5 if opening
+        basicAnimation.toValue = 0.5
+        transparentLayer!.opacity = 0.5
+        
+        // exec the animation function
+        transparentLayer!.addAnimation(basicAnimation, forKey: self.transparentLayerAnimationKey)
+        
+        self.slideState = .Opened
+        (self.slideMenuViewController as! FWSlideMenuViewController).progressFinished(.Opened)
     }
     
     public func closeSlideMenu() {
-        self.moveSlideMenu(-self.slideMenuViewController.view.frame.width, animated: true)
+    
+        UIView.animateWithDuration(self.slideDuration, animations: { () -> Void in
+            self.slideMenuViewController.view.frame.origin = CGPoint(x: -self.slideMenuViewController.view.frame.width, y: 0)
+            self.activeChild?.view.layer.transform = CATransform3DIdentity
+        })
+        
+        // Get our transparentLayer.
+        let transparentLayer = self.activeChild?.view.layer.sublayers!.filter({$0.name == self.transparentLayerKey})[0]
+        
+        // Create the opacity animation function
+        let basicAnimation = CABasicAnimation(keyPath: "opacity")
+        basicAnimation.duration = 0.35
+        basicAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
+        basicAnimation.fromValue = 0.5
+        
+        // animate to 0 if closed; animate to 0.5 if opening
+        basicAnimation.toValue = 0
+        transparentLayer!.opacity = 0
+        
+        // exec the animation function
+        transparentLayer!.addAnimation(basicAnimation, forKey: self.transparentLayerAnimationKey)
+ 
+        self.slideState = .Closed
+        (self.slideMenuViewController as! FWSlideMenuViewController).progressFinished(.Closed)
     }
     
     public func displayViewController(vc: UIViewController) {

            self.view.addSubview(vc.view)
            self.view.bringSubviewToFront(self.slideMenuViewController.view)
        } else {
            self.flip(self.activeChild!, to: vc)
        }
        
        self.activeChild = vc
        moveSlideMenu(self.slideMenuViewController.view.frame.width * (-1), animated: true)
    }
    
    public func displayViewController(index index: Int) {

        
    }
    
    private func moveSlideMenu(x: CGFloat) {
        
        func mapValue(x: CGFloat, in_min: CGFloat, in_max: CGFloat, out_min: CGFloat, out_max: CGFloat) -> CGFloat
        {
