     
     public let gravityMagnitude: CGFloat
     
-    public static var None = NotificationAnimation(inDuration: 0, outDuration: 0)
-    
-    public static var Linear: NotificationAnimation = .Linear()
-    
-    public static var Spring: NotificationAnimation = .Spring()
-    
-    public static var Gravity: NotificationAnimation = .Gravity()
-    
-    public static func Linear(inDirection inDirection: AnimationDirection = .Top, inDuration: NSTimeInterval = 0.4, outDirection: AnimationDirection = .Top, outDuration: NSTimeInterval = 0.4) -> NotificationAnimation {
-        return NotificationAnimation(inAnimation: .Linear, inDirection: inDirection, inDuration: inDuration, outAnimation: .Linear, outDirection: outDirection, outDuration: outDuration)
-    }
-    
-    public static func Spring(inDirection inDirection: AnimationDirection = .Top, inDuration: NSTimeInterval = 0.4, outDirection: AnimationDirection = .Top, outDuration: NSTimeInterval = 0.4, damping: CGFloat = 0.6, initialVelocity: CGFloat = 1.0) -> NotificationAnimation {
-        return NotificationAnimation(inAnimation: .Spring, inDirection: inDirection, inDuration: inDuration, outAnimation: .Spring, outDirection: outDirection, outDuration: outDuration, springDamping: damping, springInitialVelocity: initialVelocity)
-    }
-    
-    public static func Gravity(inDirection inDirection: AnimationDirection = .Top, inDuration: NSTimeInterval = 0.4, outDirection: AnimationDirection = .Top, outDuration: NSTimeInterval = 0.4, magnitude: CGFloat = 1.0) -> NotificationAnimation {
-        return NotificationAnimation(inAnimation: .Gravity, inDirection: inDirection, inDuration: inDuration, outAnimation: .Gravity, outDirection: outDirection, outDuration: outDuration, gravityMagnitude: magnitude)
+    public static var None = Animation(inDuration: 0, outDuration: 0)
+    
+    public static var Linear: Animation = .Linear()
+    
+    public static var Spring: Animation = .Spring()
+    
+    public static var Gravity: Animation = .Gravity()
+    
+    public static func Linear(inDirection inDirection: Direction = .Top, inDuration: NSTimeInterval = 0.4, outDirection: Direction = .Top, outDuration: NSTimeInterval = 0.4) -> Animation {
+        return Animation(inAnimation: .Linear, inDirection: inDirection, inDuration: inDuration, outAnimation: .Linear, outDirection: outDirection, outDuration: outDuration)
+    }
+    
+    public static func Spring(inDirection inDirection: Direction = .Top, inDuration: NSTimeInterval = 0.4, outDirection: Direction = .Top, outDuration: NSTimeInterval = 0.4, damping: CGFloat = 0.6, initialVelocity: CGFloat = 1.0) -> Animation {
+        return Animation(inAnimation: .Spring, inDirection: inDirection, inDuration: inDuration, outAnimation: .Spring, outDirection: outDirection, outDuration: outDuration, springDamping: damping, springInitialVelocity: initialVelocity)
+    }
+    
+    public static func Gravity(inDirection inDirection: Direction = .Top, inDuration: NSTimeInterval = 0.4, outDirection: Direction = .Top, outDuration: NSTimeInterval = 0.4, magnitude: CGFloat = 1.0) -> Animation {
+        return Animation(inAnimation: .Gravity, inDirection: inDirection, inDuration: inDuration, outAnimation: .Gravity, outDirection: outDirection, outDuration: outDuration, gravityMagnitude: magnitude)
     }
     
 }

    
    // configure animations
    
    options[kCRToastAnimationInTypeKey]                 = animation.inAnimationType.rawValue
    options[kCRToastAnimationInDirectionKey]            = animation.inAnimationDirection.rawValue
    options[kCRToastAnimationInTimeIntervalKey]         = animation.inAnimationDuration
    
    options[kCRToastAnimationOutTypeKey]                = animation.outAnimationType.rawValue
    options[kCRToastAnimationOutDirectionKey]           = animation.outAnimationDirection.rawValue
    options[kCRToastAnimationOutTimeIntervalKey]        = animation.outAnimationDuration
    
    options[kCRToastAnimationSpringDampingKey]          = animation.springDamping
    options[kCRToastAnimationSpringInitialVelocityKey]  = animation.springInitialVelocity

    
}

public struct Animation {
    
    public  typealias Type      = CRToastAnimationType
    public  typealias Direction = CRToastAnimationDirection
    
    public init(inAnimation: Type = .Linear, inDirection: Direction = .Top, inDuration: NSTimeInterval = 0.4, outAnimation: Type = .Linear , outDirection: Direction = .Top, outDuration: NSTimeInterval = 0.4, springDamping: CGFloat = 0.6, springInitialVelocity: CGFloat = 1.0, gravityMagnitude: CGFloat = 1.0) {
        self.inType = inAnimation
        self.inDirection = inDirection
        self.inDuration = inDuration
        self.outType = outAnimation
        self.outDirection = outDirection
        self.outDuration = outDuration
        self.springDamping          = springDamping
        self.springInitialVelocity  = springInitialVelocity
        self.gravityMagnitude       = gravityMagnitude
    }
    
    public let inType: Type
    
    public let inDirection: Direction
    
    public let inDuration: NSTimeInterval
    
    public let outType: Type
    
    public let outDirection: Direction
    
    public let outDuration: NSTimeInterval
    
    public let springDamping: CGFloat
    
