// $Id: $ Drupal.behaviors.hideShowCommentSettings = function (context) { $('#comment-advanced-settings:not(.comment-advanced-settings-processed)', context).each(function() { if ($("input[@name=comment]:checked", context).val() == Drupal.settings.commentsDisabled) { $(this).hide(); } $("input[@name=comment]", context).click(Drupal.processCommentSettings); }).addClass('comment-advanced-settings-processed'); }; Drupal.processCommentSettings = function () { if ($(this).val() == Drupal.settings.commentsDisabled) { $('#comment-advanced-settings').slideUp(); } else { $('#comment-advanced-settings').slideDown(); } }