Index: /extensions/event_cats/admin/template/ec_smart_fieldset.inc.tpl
===================================================================
--- /extensions/event_cats/admin/template/ec_smart_fieldset.inc.tpl	(revision 8046)
+++ /extensions/event_cats/admin/template/ec_smart_fieldset.inc.tpl	(revision 8047)
@@ -4,21 +4,24 @@
 {literal}
   <script type="text/javascript">
+    var sf_animate_fast      = false;
     var sf_plus_bullet_path  = '';
     var sf_minus_bullet_path = '';
     
-    function sf_reduce(fieldset_id) {
-      var f_m = jQuery('#' + fieldset_id);
-      if (!f_m.is(':hidden')) {
-        f_m.toggle();
-        jQuery('#' + fieldset_id + '_reduced').toggle();
-      }
+    function sf_reduce(fieldset_id, fast) {
+      var l_m = jQuery('#' + fieldset_id + ' legend');
+      if (sf_reduce.arguments.length < 2) fast = sf_animate_fast;
+      if (!l_m.is('.sf_command')) l_m.addClass('sf_command');
+      if (!jQuery('#' + fieldset_id).is(':hidden'))
+       l_m.trigger('sf_reduce_private', fast);
+      l_m.removeClass('sf_command');
     }
     
-    function sf_maximize(fieldset_id) {
-      var f_m = jQuery('#' + fieldset_id);
-      if (f_m.is(':hidden')) {
-        f_m.toggle();
-        jQuery('#' + fieldset_id + '_reduced').toggle();
-      }
+    function sf_maximize(fieldset_id, fast) {
+      var l_r = jQuery('#' + fieldset_id + '_reduced_legend');
+      if (sf_maximize.arguments.length < 2) fast = sf_animate_fast;
+      if (!l_r.is('.sf_command')) l_r.addClass('sf_command');
+      if (jQuery('#' + fieldset_id).is(':hidden'))
+       l_r.trigger('sf_maximize_private', fast);
+      l_r.removeClass('sf_command');
     }
     
@@ -28,13 +31,13 @@
       if (locked) {
         l_r.css('cursor', 'auto');
-        l_r.removeClass('click_ok');
+        l_r.removeClass('sf_click_ok');
         l_m.css('cursor', 'auto');
-        l_m.removeClass('click_ok');
+        l_m.removeClass('sf_click_ok');
       }
       else {
         l_r.css('cursor', 'pointer');
-        l_r.addClass('click_ok');
+        if (!l_r.is('.sf_click_ok')) l_r.addClass('sf_click_ok');
         l_m.css('cursor', 'pointer');
-        l_m.addClass('click_ok');
+        if (!l_m.is('.sf_click_ok')) l_m.addClass('sf_click_ok');
       }
     }
@@ -73,12 +76,25 @@
         l_r.addClass('sf_click_ok');
         l_r.css({
-          'font-weight'    : l_m.css('font-weight'),
-          'letter-spacing' : l_m.css('letter-spacing'),
-          'padding-left'   : f_m.css('border-left-width'),
-          'text-align'     : l_m.css('text-align'),
-          'outline'        : l_m.css('outline'),
-          'color'          : l_m.css('color'),
-          'font-family'    : l_m.css('font-family'),
-          'font-size'      : l_m.css('font-size'),
+          'font-weight'         : l_m.css('font-weight'),
+          'letter-spacing'      : l_m.css('letter-spacing'),
+          'padding-left'        : f_m.css('border-left-width'),
+          'padding-right'       : f_m.css('border-right-width'),
+          'text-align'          : l_m.css('text-align'),
+          'outline'             : l_m.css('outline'),
+          'color'               : l_m.css('color'),
+          'font-family'         : l_m.css('font-family'),
+          'font-size'           : l_m.css('font-size'),
+          'border-top-width'    : l_m.css('border-top-width'),
+          'border-bottom-width' : l_m.css('border-bottom-width'),
+          'border-left-width'   : l_m.css('border-left-width'),
+          'border-right-width'  : l_m.css('border-right-width'),
+          'border-top-color'    : l_m.css('border-top-color'),
+          'border-bottom-color' : l_m.css('border-bottom-color'),
+          'border-left-color'   : l_m.css('border-left-color'),
+          'border-right-color'  : l_m.css('border-right-color'),
+          'border-top-style'    : l_m.css('border-top-style'),
+          'border-bottom-style' : l_m.css('border-bottom-style'),
+          'border-left-style'   : l_m.css('border-left-style'),
+          'border-right-style'  : l_m.css('border-right-style'),
         });
         if (sf_plus_bullet_path == '') l_r.append(
@@ -94,9 +110,46 @@
         l_r.next().attr('id', cache_id);
         jQuery('.sf_legends').css('cursor', 'pointer');
-        l_m.click(function(){
-          if (l_m.hasClass('sf_click_ok')) { f_m.toggle(); f_r.toggle(); }
+        l_m.bind('sf_reduce_private', function(event, fast){ // Reduce
+          if (l_m.is('.sf_command, .sf_click_ok')) {
+            if (fast) {
+              f_m.hide();
+              f_r.show();
+            }
+            else {
+              f_m.find('*').not('.sf_legends, img').animate(
+                { 'opacity' : 0 },
+                200,
+                function(){
+                  f_m.slideUp(400, function(){
+                    f_r.show();
+                  });
+                }
+              );
+            }
+          }
         });
-        l_r.click(function(){
-          if (l_r.hasClass('sf_click_ok')) { f_m.toggle(); f_r.toggle(); }
+        l_r.bind('sf_maximize_private', function(event, fast){ // Maximize
+          if (l_r.is('.sf_command, .sf_click_ok')) {
+            if (fast) {
+              f_m.find('*').not('.sf_legends, img').css('opacity', 1);
+              f_r.hide();
+              f_m.show();
+            }
+            else {
+              f_r.hide();
+              f_m.slideDown(400, function(){
+                f_m.find('*').not('.sf_legends, img').animate(
+                  { 'opacity' : 1 },
+                  200
+                );
+              });
+            }
+          }
+        });
+        l_m.click(function(){ // Reduce
+          l_m.trigger('sf_reduce_private', sf_animate_fast);
+        });
+        l_r.click(function(){ // Maximize
+          l_r.trigger('sf_maximize_private', sf_animate_fast);
         });
       });
