Index: collapsiblock-block.tpl.php
===================================================================
RCS file: collapsiblock-block.tpl.php
diff -N collapsiblock-block.tpl.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ collapsiblock-block.tpl.php	26 Sep 2010 13:31:32 -0000
@@ -0,0 +1,37 @@
+<?php
+// $Id$
+
+/**
+ * @file block.tpl.php
+ *
+ * Theme implementation to display a block.
+ *
+ * Available variables:
+ * - $block->subject: Block title.
+ * - $block->content: Block content.
+ * - $block->module: Module that generated the block.
+ * - $block->delta: This is a numeric id connected to each module.
+ * - $block->region: The block region embedding the current block.
+ *
+ * Helper variables:
+ * - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
+ * - $zebra: Same output as $block_zebra but independent of any block region.
+ * - $block_id: Counter dependent on each block region.
+ * - $id: Same output as $block_id but independent of any block region.
+ * - $is_front: Flags true when presented in the front page.
+ * - $logged_in: Flags true when the current user is a logged-in member.
+ * - $is_admin: Flags true when the current user is an administrator.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_block()
+ */
+?>
+<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module; ?>">
+<?php if ($block->subject): ?>
+  <h2><a href="#" role="link"><?php print $block->subject; ?></a></h2>
+<?php endif; ?>
+
+  <div class="content">
+    <?php print $block->content; ?>
+  </div>
+</div>
Index: collapsiblock.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/collapsiblock/collapsiblock.js,v
retrieving revision 1.7
diff -u -p -r1.7 collapsiblock.js
--- collapsiblock.js	24 Aug 2010 18:38:22 -0000	1.7
+++ collapsiblock.js	26 Sep 2010 13:31:32 -0000
@@ -24,12 +24,12 @@ Drupal.behaviors.collapsiblock = functio
       titleElt.target = $(this).find(block_content);
       $(titleElt)
         .addClass('collapsiblock')
-        .click(function () {
+        .click(function (e) {
           var st = Drupal.Collapsiblock.getCookieData();
           if ($(this).is('.collapsiblockCollapsed')) {
             $(this).removeClass('collapsiblockCollapsed');
             if (slidetype == 1) {
-              $(this.target).slideDown(slidespeed);
+              $(this.target).slideDown(slidespeed).attr('aria-hidden', false);
             }
             else {
               $(this.target).animate({height:'show', opacity:'show'}, slidespeed);
@@ -43,7 +43,7 @@ Drupal.behaviors.collapsiblock = functio
           else {
             $(this).addClass('collapsiblockCollapsed');
             if (slidetype == 1) {
-              $(this.target).slideUp(slidespeed);
+              $(this.target).slideUp(slidespeed).attr('aria-hidden', true);
             }
             else {
               $(this.target).animate({height:'hide', opacity:'hide'}, slidespeed);
@@ -62,6 +62,7 @@ Drupal.behaviors.collapsiblock = functio
           });
           cookieString += cookieParts.join(', ') + ' }';
           $.cookie('collapsiblock', cookieString, {path: Drupal.settings.basePath});
+          e.preventDefault();
         });
       // Leave active blocks uncollapsed. If the block is expanded, do nothing.
       if (stat ==  4 || (cookieData[id] == 0 || (stat == 3 && cookieData[id] == undefined)) && !$(this).find('a.active').size()) {
Index: collapsiblock.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/collapsiblock/collapsiblock.module,v
retrieving revision 1.5
diff -u -p -r1.5 collapsiblock.module
--- collapsiblock.module	24 Aug 2010 18:38:22 -0000	1.5
+++ collapsiblock.module	26 Sep 2010 13:31:32 -0000
@@ -105,6 +105,21 @@ function collapsiblock_default_settings(
   return $defaults;
 }
 
+function collapsiblock_preprocess_block(&$vars) {
+  $system_collapsed = variable_get('collapsiblock_settings', array());
+  $incoming_blocks  = 'block-'. $vars['block']->module .'-'. $vars['block']->delta;
+
+  foreach ($system_collapsed as $block_name => $collapsed_state) {
+    if ($block_name == $incoming_blocks) {
+      array_unshift($vars['template_files'], 'collapsiblock-block');
+    }
+  }
+}
+
+function collapsiblock_theme_registry_alter(&$theme_registry) {
+  array_unshift($theme_registry['block']['theme paths'], drupal_get_path('module', 'collapsiblock'));
+}
+
  /**
  * Implementation of hook_form_alter().
  */
