var section = 0;
var tid = 0;

window.addEvent('domready', function() {
	toggler_ind = 0;
	if (window.location.pathname.match("^/shop/") || window.location.pathname.match("^/selector/")){
	uri = window.location.pathname.replace(new RegExp("^/shop/([^/]*)/.*"),'/shop/$1/');
	if (tid != 0){
		toggler_ind = -1;
		uri = "/shop/"+tid+"/";
		$$('a.toggler').each( function(tobj, ind){
			if ($(tobj).get('href') == uri)
			toggler_ind = ind;
		});
	} else {
		if(section != 0) uri = "/shop/"+section+"/";
		$$('div.element').each( function(tobj, ind){
			if ($(tobj).getElement('a[href^='+uri+']'))
			toggler_ind = ind;
		});
	}}
	var myAccordion = new Accordion($('menu'), 'a.toggler', 'div.element', {
		opacity: false, show: toggler_ind, initialDisplayFx: false, trigger: 'keydown'
	});

});
