Index: /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/border/AjaxToggleBorder.html
===================================================================
--- /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/border/AjaxToggleBorder.html	(revision 1003)
+++ /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/border/AjaxToggleBorder.html	(revision 1004)
@@ -7,5 +7,5 @@
 <body>
 <wicket:border>
-  <div class="toggleBorder">
+  <div wicket:id="border" class="toggleBorder">
     <div wicket:id="header" class="toggleBorderHeader">
 	  <span wicket:id="title">Title</span>
Index: /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/border/AjaxToggleBorder.java
===================================================================
--- /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/border/AjaxToggleBorder.java	(revision 1003)
+++ /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/border/AjaxToggleBorder.java	(revision 1004)
@@ -1,4 +1,5 @@
 package eu.clarin.cmdi.virtualcollectionregistry.gui.border;
 
+import org.apache.wicket.ResourceReference;
 import org.apache.wicket.behavior.AttributeAppender;
 import org.apache.wicket.markup.html.WebMarkupContainer;
@@ -7,15 +8,13 @@
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
-import org.odlabs.wiquery.core.effects.EffectSpeed;
-import org.odlabs.wiquery.core.effects.sliding.SlideToggle;
-import org.odlabs.wiquery.core.events.Event;
-import org.odlabs.wiquery.core.events.MouseEvent;
-import org.odlabs.wiquery.core.events.WiQueryEventBehavior;
-import org.odlabs.wiquery.core.javascript.JsScope;
+import org.odlabs.wiquery.core.commons.IWiQueryPlugin;
+import org.odlabs.wiquery.core.commons.WiQueryResourceManager;
 import org.odlabs.wiquery.core.javascript.JsStatement;
 
 @SuppressWarnings("serial")
-public class AjaxToggleBorder extends Border {
-    private final static String COLLAPSED_CLASS = "collapsed";
+public class AjaxToggleBorder extends Border implements IWiQueryPlugin {
+    private static final ResourceReference JAVASCRIPT_RESOURCE =
+        new ResourceReference(AjaxToggleBorder.class, "AjaxToggleBorder.js");
+    private final WebMarkupContainer border;
 
     public AjaxToggleBorder(String id, IModel<String> title,
@@ -24,27 +23,20 @@
         setRenderBodyOnly(true);
 
+        border = new WebMarkupContainer("border");
+        border.setOutputMarkupId(true);
+
         final WebMarkupContainer header = new WebMarkupContainer("header");
-        add(header);
         header.add(new Label("title", title));
+        border.add(header);
 
         final WebMarkupContainer content = new WebMarkupContainer("content");
-        add(content);
         content.setOutputMarkupId(true);
         content.add(getBodyContainer());
+        border.add(content);
+        add(border);
 
-        header.add(new WiQueryEventBehavior(new Event(MouseEvent.CLICK) {
-            @Override
-            public JsScope callback() {
-                final JsScope cb = JsScope.quickScope(new JsStatement()
-                    .$(header).toggleClass(COLLAPSED_CLASS));
-                final SlideToggle effect = new SlideToggle(EffectSpeed.SLOW);
-                effect.setCallback(cb);
-                return JsScope.quickScope(new JsStatement()
-                    .$(content).chain(effect));
-            }
-        }));
         if (!expanded) {
             header.add(new AttributeAppender("class",
-                    new Model<String>(COLLAPSED_CLASS), " "));
+                    new Model<String>("collapsed"), " "));
             content.add(new AttributeAppender("style",
                     new Model<String>("display:none"), ";"));
@@ -64,3 +56,13 @@
     }
 
+    @Override
+    public void contribute(WiQueryResourceManager manager) {
+        manager.addJavaScriptResource(JAVASCRIPT_RESOURCE);
+    }
+
+    @Override
+    public JsStatement statement() {
+        return new JsStatement().$(border).append(".ajaxToggleBorder()");
+    }
+
 } // class AjaxToggleBorder
Index: /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/border/AjaxToggleBorder.js
===================================================================
--- /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/border/AjaxToggleBorder.js	(revision 1004)
+++ /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/border/AjaxToggleBorder.js	(revision 1004)
@@ -0,0 +1,19 @@
+(function($) {
+	$.extend($.fn, {
+		ajaxToggleBorder : function() {
+			var o = {
+				speed: 250
+			};
+			var header = $(this).children('div.toggleBorderHeader');
+			var content = $(this).children('div.toggleBorderContent');
+			header.click(function(e) {
+				e.stopPropagation();
+				content.slideToggle(o.speed, function() {
+					header.toggleClass('collapsed');
+				});
+				return false;
+			});
+			return $(this);
+		}
+	});
+})(jQuery);
Index: /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/table/ColumnName$ItemCell.html
===================================================================
--- /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/table/ColumnName$ItemCell.html	(revision 1003)
+++ /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/table/ColumnName$ItemCell.html	(revision 1004)
@@ -6,12 +6,14 @@
 <body>
 <wicket:panel>
-  <div wicket:id="name" class="name"></div>
-  <div wicket:id="details" class="details">
-    <div wicket:id="desc" class="desc"></div>
-    <ul style="list-style: none; margin: 0; padding: 0;">
-      <li style="display: inline"><a href="#">[Display]</a></li>
-      <li style="display: inline"><a href="#">[Action1]</a></li>
-      <li style="display: inline"><a href="#">[Action2]</a></li>
-    </ul>
+  <div wicket:id="nameColumn">
+    <div wicket:id="name" class="name"></div>
+    <div wicket:id="details" class="details">
+      <div wicket:id="desc" class="desc"></div>
+      <ul style="list-style: none; margin: 0; padding: 0;">
+        <li style="display: inline"><a href="#">[Display]</a></li>
+        <li style="display: inline"><a href="#">[Action1]</a></li>
+        <li style="display: inline"><a href="#">[Action2]</a></li>
+      </ul>
+    </div>
   </div>
 </wicket:panel>
Index: /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/table/ColumnName.java
===================================================================
--- /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/table/ColumnName.java	(revision 1003)
+++ /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/table/ColumnName.java	(revision 1004)
@@ -1,4 +1,5 @@
 package eu.clarin.cmdi.virtualcollectionregistry.gui.table;
 
+import org.apache.wicket.ResourceReference;
 import org.apache.wicket.behavior.AttributeAppender;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
@@ -12,10 +13,6 @@
 import org.apache.wicket.model.Model;
 import org.apache.wicket.model.ResourceModel;
-import org.odlabs.wiquery.core.effects.EffectSpeed;
-import org.odlabs.wiquery.core.effects.sliding.SlideToggle;
-import org.odlabs.wiquery.core.events.Event;
-import org.odlabs.wiquery.core.events.MouseEvent;
-import org.odlabs.wiquery.core.events.WiQueryEventBehavior;
-import org.odlabs.wiquery.core.javascript.JsScope;
+import org.odlabs.wiquery.core.commons.IWiQueryPlugin;
+import org.odlabs.wiquery.core.commons.WiQueryResourceManager;
 import org.odlabs.wiquery.core.javascript.JsStatement;
 
@@ -24,18 +21,21 @@
 @SuppressWarnings("serial")
 final class ColumnName extends AbstractColumn<VirtualCollection> {
-    private final class ItemCell extends Panel {
-        private final static String DETAILS_SHOWN_CLASS = "detailsShown";
+    private static final ResourceReference JAVASCRIPT_RESOURCE = 
+        new ResourceReference(ColumnName.class, "ColumnName.js");
 
+    private final class ItemCell extends Panel implements IWiQueryPlugin {
+        private final WebMarkupContainer nameColumn;
+        
         public ItemCell(String id, IModel<VirtualCollection> model) {
             super(id);
             setRenderBodyOnly(true);
+            
+            nameColumn = new WebMarkupContainer("nameColumn");
+            nameColumn.setOutputMarkupId(true);
             final VirtualCollection vc = model.getObject();
-            final Label nameLabel = new Label("name", vc.getName());
-            add(nameLabel);
-            
+            nameColumn.add(new Label("name", vc.getName()));
+
             final WebMarkupContainer details =
                 new WebMarkupContainer("details");
-            details.setOutputMarkupId(true);
-            
             final String desc = vc.getDescription();
             final MultiLineLabel descLabel = new MultiLineLabel("desc", desc);
@@ -44,19 +44,21 @@
             }
             details.add(descLabel);
-            add(details);
-            nameLabel.add(new WiQueryEventBehavior(new Event(MouseEvent.CLICK) {
-                @Override
-                public JsScope callback() {
-                    final JsScope cb = JsScope.quickScope(new JsStatement()
-                        .$(nameLabel).toggleClass(DETAILS_SHOWN_CLASS));
-                    final SlideToggle effect = new SlideToggle(EffectSpeed.SLOW);
-                    effect.setCallback(cb);
-                    return JsScope.quickScope(new JsStatement()
-                        .$(details).chain(effect));
-                }
-            }));
+            // move to css?
             details.add(new AttributeAppender("style",
                     new Model<String>("display:none"), ";"));
+            nameColumn.add(details);
+            add(nameColumn);
         }
+        
+        @Override
+        public void contribute(WiQueryResourceManager manager) {
+            manager.addJavaScriptResource(JAVASCRIPT_RESOURCE);
+        }
+
+        @Override
+        public JsStatement statement() {
+            return new JsStatement().$(nameColumn).append(".detailsToggle()");
+        }
+
     } // class ColumnName.ItemCell
 
Index: /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/table/ColumnName.js
===================================================================
--- /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/table/ColumnName.js	(revision 1004)
+++ /VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/table/ColumnName.js	(revision 1004)
@@ -0,0 +1,19 @@
+(function($) {
+	$.extend($.fn, {
+		detailsToggle : function() {
+			var o = {
+				speed: 250
+			};
+			var name = $(this).children('div.name');
+			var details = $(this).children('div.details');
+			name.click(function(e) {
+				e.stopPropagation();
+				details.slideToggle(o.speed, function() {
+					name.toggleClass('detailsShown');
+				});
+				return false;
+			});
+			return $(this);
+		}
+	});
+})(jQuery);
