           return if @isDrag is true
           content = @content[0]
           top = content.scrollTop / (content.scrollHeight - content.clientHeight) * (@paneH - @sliderH)
+
           if top + @sliderH is @paneH
+            if @options.preventPageScrolling and e.originalEvent.wheelDelta < 0 then e.preventDefault()
             @el.trigger('scrollend')
+          else if top is 0
+            if @options.preventPageScrolling and e.originalEvent.wheelDelta > 0 then e.preventDefault()
+            @el.trigger('scrolltop')
+
           @slider.css top: top + 'px'
+          
           return
 
         wheel: (e) =>

    addEvents: ->
      events = @events
      pane = @pane
      @win.bind RESIZE  , events[RESIZE]
      @slider.bind MOUSEDOWN , events[DOWN]
      pane.bind MOUSEDOWN    , events[PANEDOWN]
      @content.bind SCROLL   , events[SCROLL]

      if window.addEventListener
        pane = pane[0]

    sliderMinHeight: 20
    contentClass: 'content'
    iOSNativeScrolling: false
    preventPageScrolling: true

  getScrollbarWidth = ->
    outer                = document.createElement 'div'
