       
 
 
-    $("table input.select-row").live "change", ->
+    $(document).on "change", "table input.select-row", ->
 
       $this = $(this)
       $table = $this.parents("table").first()

    )
  

  $("table input.select-all-rows").live "change", ->

    $this = $(this)
    $this.parents("table").find("tbody input.select-row").prop("checked", this.checked)

$ ->

  # Progresssive enhancements
  $(document).on "click", "[data-newwindow]", (e) ->

    [ width, height ] = $(this).data("newwindow").split("x")
    window.open(this.href, "_blank", "width=#{width},height=#{height},location=no,menubar=no")
    e.preventDefault()


  $(document).on "click", "a[data-ajax]", (event) ->
    
    event.preventDefault()
    $this = $(this)
