 # 
 # countUp.js
 # by @inorganik
-# v 1.0.3
+# v 1.1.0
 #
 # Example:
 # numAnim = new countUp "SomeElementYouWantToAnimate", 99.99, 2, 1.5

    'ms'
  ]

  #toggle easing
  @useEasing = true
  @doc = if (typeof target == 'string') then document.getElementById target else target
  @startVal = Number startVal  
  endVal = Number endVal
  @countDown = if (startVal > endVal) then true else false
  decimals = Math.max(0, decimals or 0)
  @dec = Math.pow(10, decimals)
  @duration = duration * 1000 or 2000
  @startTime = null
  @remaining = null
  @frameVal = @startVal
  @rAF = null

  # make sure requestAnimationFrame and cancelAnimationFrame are defined
  # polyfill for browsers without native support

    progress = timestamp - @startTime
      
    # to ease or not to ease is the question
    if @options.Easing
      if @countDown
        i = @easeOutExpo progress, 0, @startVal - @endVal, @duration
        @frameVal = @startVal - i
      else
        @frameVal = @easeOutExpo(progress, @startVal, @endVal - @startVal, @duration)
    else
      if @countDown
        i = (@startVal - @endVal) * (progress / @duration)
        @frameVal = @startVal - i
      else
        @frameVal = @startVal + (@endVal - @startVal) * (progress / @duration)
        
    # decimal
    @frameVal = Math.round(@frameVal * @dec) / @dec

    # don't go past enVal since progress can exceed duration in last grame   
    if @countDown
      @frameVal = if (@framVal < @endVal) then @endVal else @frameVal
    else
      @frameVal = if (@framVal > @endVal) then @endVal else @frameVal

    # formate and print value
    @doc.innerHTML = @formatNumber @frameVal.toFixed(decimals)

    # weather to continue
    if progress < @duration
