diff --git a/www/sites/all/modules/superfish/superfish.module b/www/sites/all/modules/superfish/superfish.module
index 9bf96ba..d46ce1a 100644
--- a/www/sites/all/modules/superfish/superfish.module
+++ b/www/sites/all/modules/superfish/superfish.module
@@ -157,6 +157,30 @@ function superfish_block_configure($delta = 0) {
     '#title' => t('Auto-arrows'),
     '#default_value' => variable_get('superfish_arrow_' . $delta, 0),
   );
+  $form['sf-advanced-settings'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Advanced Superfish options'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+  $form['sf-advanced-settings']['superfish_onbeforeshow_' . $delta] = array(
+    '#type' => 'textarea',
+    '#title' => t('Custom code to run on onbeforeshow'),
+    '#description' => t("Callback function fires just before reveal animation begins – 'this' is the ul about to open<br />Do not include 'function() {' or '}'."),
+    '#default_value' => variable_get('superfish_onbeforeshow_' . $delta, ''),
+  );
+  $form['sf-advanced-settings']['superfish_onshow_' . $delta] = array(
+    '#type' => 'textarea',
+    '#title' => t('Custom code to run on onshow'),
+    '#description' => t("Callback function fires once reveal animation completed – 'this' is the opened ul<br />Do not include 'function() {' or '}'."),
+    '#default_value' => variable_get('superfish_onshow_' . $delta, ''),
+  );
+  $form['sf-advanced-settings']['superfish_onhide_' . $delta] = array(
+    '#type' => 'textarea',
+    '#title' => t('Custom code to run onhide'),
+    '#description' => t("Callback function fires after a sub-menu has closed – 'this' is the ul that just closed<br />Do not include 'function() {' or '}'."),
+    '#default_value' => variable_get('superfish_onhide_' . $delta, ''),
+  );
   $form['sf-plugins'] = array(
     '#type' => 'fieldset',
     '#title' => t('Superfish plugins'),
@@ -441,6 +465,9 @@ function superfish_block_save($delta = 0, $edit = array()) {
   variable_set('superfish_pathlevels_' . $delta, $edit['superfish_pathlevels_' . $delta]);
   variable_set('superfish_slide_' . $delta, $edit['superfish_slide_' . $delta]);
   variable_set('superfish_arrow_' . $delta, $edit['superfish_arrow_' . $delta]);
+  variable_set('superfish_onbeforeshow_' . $delta, $edit['superfish_onbeforeshow_' . $delta]);
+  variable_set('superfish_onshow_' . $delta, $edit['superfish_onshow_' . $delta]);
+  variable_set('superfish_onhide_' . $delta, $edit['superfish_onhide_' . $delta]);
   variable_set('superfish_shadow_' . $delta, $edit['superfish_shadow_' . $delta]);
   variable_set('superfish_bgf_' . $delta, $edit['superfish_bgf_' . $delta]);
   variable_set('superfish_spp_' . $delta, $edit['superfish_spp_' . $delta]);
@@ -530,6 +557,9 @@ function superfish_contents($delta = 0) {
   $speed = variable_get('superfish_speed_' . $delta, 'normal');
   $sfoptions['speed'] = "speed: " . ((is_numeric($speed)) ? $speed : (($speed == ('slow' || 'normal' || 'fast')) ? "'" . $speed . "'" : ''));
   $sfoptions['arrow'] = (variable_get('superfish_arrow_' . $delta, 'false') == 1) ? "autoArrows: true" : "autoArrows: false";
+  $sfoptions['onBeforeShow'] = (variable_get('superfish_onbeforeshow_' . $delta)) ? 'onBeforeShow: function() {' . variable_get('superfish_onbeforeshow_' . $delta, 'false') . '}' : "";
+  $sfoptions['onShow'] = (variable_get('superfish_onshow_' . $delta)) ? 'onShow: function() {' . variable_get('superfish_onshow_' . $delta, 'false') . '}' : "";
+  $sfoptions['onHide'] = (variable_get('superfish_onhide_' . $delta)) ? 'onHide: function() {' . variable_get('superfish_onhide_' . $delta, 'false') . '}' : "";
   $sfoptions['shadow'] = (variable_get('superfish_shadow_' . $delta, 'true') == 1) ? "dropShadows: true" : "dropShadows: false";
   $sfoptions['hoverintent'] = (variable_get('superfish_hid_' . $delta, 1) == 0) ? "disableHI: true" : '';
   $sfoptions = implode(",\n", array_filter($sfoptions));
