         self.button.on 'click', $.proxy self.toggleMenu, self
 
     toggleMenu: ->
-        menuPos = @menu.css 'left'
+        _menuPos = @menu.css 'left'
         menuWidth = @getDimensions()
 
-        if menuPos is '0px' then @hideMenu menuWidth else @showMenu menuWidth
+        if _menuPos is '0px' then @hideMenu menuWidth else @showMenu menuWidth
 
     showMenu: (menuWidth) ->
-        contentWidth = 100 - menuWidth
+        _contentWidth = 100 - menuWidth
 
         @menu.animate {
             'left': '0'
         }
 
         @content.animate {
-            'left': "#{menuWidth}%", 'width': "#{contentWidth}%"
+            'left': "#{menuWidth}%", 'width': "#{_contentWidth}%"
         }
 
     hideMenu: (menuWidth) ->

        @addScroll()

    getDimensions: ->   
        menuWidth = parseInt @menu.css('width'), 10
        holderWidth = parseInt @holder.css('width'), 10

        # calculate menuWidth as a percentage of container
        Math.ceil (menuWidth / holderWidth) * 100

    addScroll: ->
        menuHeight = parseInt @menu.find('ul').css('height'), 10
        contentHeight = parseInt @content.css('height'), 10

        if menuHeight > contentHeight then @menu.css {'overflow-y': 'scroll'}
        
new DrmOffscreen()
###############################################################################
"use strict"

$ = jQuery
class @DrmOffscreen
    constructor: (@menu = $('nav.drm-offscreen-menu'), @button = $('button.drm-menu-button'), @content = $('div.drm-offscreen-content'), @holder = $('div.drm-content-holder'), @state = 'hide') ->
        self = @
