//
//  In my case I want to load them onload, this is how you do it!
// 
Event.observe(window, 'load', loadAccordions, false);

//
//	Set up all accordions
//
function loadAccordions() {
   if ($('marginContent')) {
      var bottomAccordion = new accordion('marginContent', {
   	   // The speed of the accordion
         resizeSpeed : 8.5,
   		classNames : {
   			toggle : 'menu_hdr',
   			toggleActive : 'menu_content_inside_active',
   			content : 'menu_content_inside'
   		},
   		// If you don't want the accordion to stretch to fit 
         // its content, set a value here, handy for horixontal examples.
         //defaultSize : {
         //    height : null,
         //    width : null
         //},
   		// The direction of the accordion
         direction : 'vertical',
         // Should the accordion activate on click or say on mouseover? (apple.com)
         onEvent : 'click'
   	});

   	// Open first one
   	bottomAccordion.activate($$('#marginContent .menu_hdr')[0]);

   	if ($('storeSearch')) {
   	   if ($('storeSearch').value == "") { $('storeSearch').value = "search store..."; }
	   }
   } /* end if */
} 


// Special thanks go out to Will Shaver @ http://primedigit.com/ 
var verticalAccordions = $$('#marginContent .menu_hdr'); 
verticalAccordions.each(function(accordion) { 
   $(accordion.next(0)).setStyle({ 
      height: '0px' 
   }); 
});