Да, действительно... может в другой теме было дело... или в личку скинул файл...
Блин, не могу прикрепить файл. Вот, файл положить в html/mod_virtuemart_categories шаблона
[spoiler title=accordion_assets.php]<?php
/**
* VirtueMart Categories Module
* NOTE: THIS MODULE REQUIRES THE PHPSHOP COMPONENT!
*
* @copyright (C) 2010 JFactory Project
* @license
http://www.gnu.org/copyleft/gpl.html GNU/GPL
* This extention is Free Software.
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
$script = "
window.addEvent('domready', function(){
$$($('{$params->get('tag_id')}'), $('{$params->get('tag_id')}').getChildren().filterByTag('ul')).each(function(el){
accParentItems = el.getChildren().filterByClass('parent');
accTogglers = [];
accElements = [];
accParentItems.each(function(element, index){
accTogglers.push(new Element('span').inject(element));
accElements.push(element.getChildren().filterByTag('ul')[0]);
element.index = index;
element.getChildren().filterByTag('a')[0].addEvent('mouseover', function(){
if (this.getNext().offsetHeight == 0) {
this.parentNode.parentNode.Accordion.options.wait = false;
this.parentNode.parentNode.Accordion.display($(this.parentNode).index);
}
});
element.addEvent('mouseleave', function(){
if (element.getChildren().filterByTag('ul')[0].offsetHeight != 0) {
element.parentNode.Accordion.display($(this).index);
}
});
});
if ( accParentItems.length > 0 ){
el.Accordion = new Accordion(accTogglers, accElements, {
opacity: false,
alwaysHide: true,
show: $$(accParentItems).indexOf($$(accParentItems).filterByClass('active')[0]),
duration: 600,
transition: Fx.Transitions.Quart.easeOut,
onActive: function(toggler, element){
element.parentNode.parentNode.setStyle('height', 'auto');
element.parentNode.addClass('expanded');
},
onBackground: function(toggler, element){
element.parentNode.parentNode.setStyle('height', 'auto');
element.setStyle('height', element.offsetHeight+'px');
element.parentNode.removeClass('expanded');
}
}
);
}
});
});
";
// require mootools
JHTML::_('behavior.mootools');
// get document
$document =& JFactory::getDocument();
$document->addScriptDeclaration($script);
[/spoiler]
Аккордион сворачивается сразу после того как уберешь мышку с него.