diff --git a/course/format/topics/ajax.php b/course/format/topics/ajax.php
index 0dbea4e..c369581 100644
--- a/course/format/topics/ajax.php
+++ b/course/format/topics/ajax.php
@@ -5,6 +5,6 @@
 
 
 $CFG->ajaxcapable = true;
-$CFG->ajaxtestedbrowsers = array('MSIE' => 6.0, 'Gecko' => 20061111);
+$CFG->ajaxtestedbrowsers = array('MSIE' => 6.0, 'Gecko' => 20061111, 'Safari' => 531);
 
 
diff --git a/lib/ajax/section_classes.js b/lib/ajax/section_classes.js
index 8d3ae20..82f4dbd 100755
--- a/lib/ajax/section_classes.js
+++ b/lib/ajax/section_classes.js
@@ -535,6 +535,7 @@ resource_class.prototype.init_resource = function(id, group, config, parentObj)
     this.groupmode = null;  // Can be null (i.e. does not apply), 0, 1 or 2.
 
     this.linkContainer = this.getEl().getElementsByTagName('a')[0];
+    this.divContainer = this.getEl().getElementsByTagName('div')[0];
 
     this.commandContainer = null;
     this.indentLeftButton = null;
@@ -757,6 +758,7 @@ resource_class.prototype.toggle_hide = function(target, e, superficial, force) {
     }
     if (this.hidden) {
         YAHOO.util.Dom.removeClass(this.linkContainer, 'dimmed');
+        YAHOO.util.Dom.removeClass(this.divContainer, 'dimmed_text');
         this.viewButton.childNodes[0].src = this.viewButton.childNodes[0].src.replace(/show/i, 'hide');
         this.viewButton.childNodes[0].alt = this.viewButton.childNodes[0].alt.replace(strshow, strhide);
         this.viewButton.title = this.viewButton.title.replace(strshow, strhide);
@@ -767,6 +769,7 @@ resource_class.prototype.toggle_hide = function(target, e, superficial, force) {
         }
     } else {
         YAHOO.util.Dom.addClass(this.linkContainer, 'dimmed');
+        YAHOO.util.Dom.addClass(this.divContainer, 'dimmed_text');
         this.viewButton.childNodes[0].src = this.viewButton.childNodes[0].src.replace(/hide/i, 'show');
         this.viewButton.childNodes[0].alt = this.viewButton.childNodes[0].alt.replace(strhide, strshow);
         this.viewButton.title = this.viewButton.title.replace(strhide, strshow);
