         column = columns.first()
       if column.size()
         self.toggle.call(column, e)
-        $w.scrollTop(column.offset().top - 65)
+        $w.scrollTop(column.offset().top - column_offset)
 
     @up: (e) ->
       e && e.preventDefault()
       panel = $('.modal.media-panel.show')
-      panel.scrollTop(panel.scrollTop() - 100)
+      panel.scrollTop(panel.scrollTop() - scroll_amount)
 
     @down: (e) ->
       e && e.preventDefault()
       panel = $('.modal.media-panel.show')
-      panel.scrollTop(panel.scrollTop() + 100)
+      panel.scrollTop(panel.scrollTop() + scroll_amount)
 
     @resize: ->
-      $('.modal.media-panel.show').css('height', $w.height() - 75)
-
-    do ->
+      $('.modal.media-panel.show').css('height', $w.height() - panel_offset)
+
+    do ->
+      $d.on 'click', '.media-grid.photos a', self.toggle
+      $d.on 'click', '.modal.media-panel .close', self.close
+      $d.keydown self.action
       $w.resize self.resize
-      $d.delegate '.media-grid.photos a', 'click', self.toggle
-      $d.delegate '.modal.media-panel .close', 'click', self.close
-      $d.keydown self.action
 
   class Likes
     self = this

        column = column.parent().prev().find('a').first()
      if column.size()
        self.toggle.call(column, e)
        $w.scrollTop(column.offset().top - 65)

    @next: (e) ->
      columns = self.columns()


  class MediaGrid
    self = this
    column_offset = 140
    panel_offset = 75
    scroll_amount = 200

    @columns: ->
      $('.media-grid.photos a')
