Index: comment_notify.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/comment_notify/comment_notify.js,v
retrieving revision 1.1
diff -u -p -r1.1 comment_notify.js
--- comment_notify.js	13 Feb 2009 21:43:16 -0000	1.1
+++ comment_notify.js	16 Sep 2010 00:45:43 -0000
@@ -1,17 +1,20 @@
 // $Id: comment_notify.js,v 1.1 2009/02/13 21:43:16 greggles Exp $
-if (Drupal.jsEnabled) {
-  $(document).ready(function() {
-    $("#edit-notify-type-1").bind("click", function() {
-      if ($("#edit-notify").attr("checked", false)) {
-        // Auto-notification not checked - do it for them.
-        $("#edit-notify").attr("checked",true);
-      }
-    });
-    $("#edit-notify-type-2").bind("click", function() {
-      if ($("#edit-notify").attr("checked", false)) {
-        // Auto-notification not checked - do it for them.
-        $("#edit-notify").attr("checked",true);
-      }
-    });
-  });
-}
+(function ($) {
+  Drupal.behaviors.commentNotify = {
+    attach: function (context) {
+      $('#edit-notify-type', context).hide();
+      $('#edit-notify', context).bind('change', function() {
+        if ($(this).attr('checked')) {
+          $('#edit-notify-type', context).show();
+          if ($('#edit-notify-type input:checked', context).length == 0) {
+            $('#edit-notify-type input', context)[0].checked = 'checked';
+          }
+        }
+        else {
+          $('#edit-notify-type', context).hide();
+        }
+      });
+      $('#edit-notify', context).trigger('change');
+    }
+  }
+})(jQuery);
