       $("#closed-motions-loading").hide()
     )
 $ ->
-  $(document).on('click', '#group-closed-motions .pagination a', (e)->
-    unless $(this).parent().hasClass("gap")
-      $("#closed-motion-list").hide()
-      $("#closed-motions-loading").show()
-      $('#group-closed-motions').load($(this).attr('href'), ->
-        $("#closed-motion-list").show()
-        $("#closed-motions-loading").hide()
-      )
-      e.preventDefault()
-  )
+  if $("body.groups.show").length > 0
+    $(document).on('click', '#group-closed-motions .pagination a', (e)->
+      unless $(this).parent().hasClass("gap")
+        $("#closed-motion-list").hide()
+        $("#closed-motions-loading").show()
+        $('#group-closed-motions').load($(this).attr('href'), ->
+          $("#closed-motion-list").show()
+          $("#closed-motions-loading").hide()
+        )
+        e.preventDefault()
+    )
 # discussions
 $ ->
-  if $("body.groups").length > 0
+  if $("body.groups.show").length > 0
     idStr = new Array
     idStr = $('#group-discussions').children().attr('class').split('_')
     $('#group-discussions').load("/groups/#{idStr[1]}/discussions", ->


# closed proposals
$ ->
  if $("body.groups").length > 0
    idStr = new Array
    idStr = $('#group-closed-motions').children().attr('class').split('_')
    $('#group-closed-motions').load("/groups/#{idStr[1]}/motions", ->

      $("#discussions-loading").hide()
    )
$ ->
  if $("body.groups.show").length > 0
    $(document).on('click', '#group-discussions .pagination a', (e)->
      unless $(this).parent().hasClass("gap")
        $("#discussion-list").hide()
        $("#discussions-loading").show()
        $('#group-discussions').load($(this).attr('href'), ->
          Application.convertUtcToRelativeTime()
          $("#discussion-list").show()
          $("#discussions-loading").hide()
        )
        e.preventDefault()
    )
