window.addEvent('load', function() {
//window.addEvent('domready', function() { -->fuer den IE

var curlist= $$('ul.currlist dd');
selcur = $$('#selcurr');
curlistall= $$('ul.currlist dl');
curlist.each(function(curel) {
//elcurlistact= $(curel).getElement('#selcurr');
//elcurlist= $(curel).getElement('dd');

curel.setStyle('opacity', 0);
curel.setStyle('background-color', '#E7E7E7');
var fxcurlist = new Fx.Styles(curel, {duration:500, wait:false});
curlistall.addEvent('mouseenter', function(){
fxcurlist.stop();
fxcurlist.start({'opacity': 1});
});
curlistall.addEvent('mouseleave', function(){
//fxcurlist.start({'opacity': 0});
fxcurlist.stop();
curel.setStyle('opacity', 0);
});
curel.addEvent('mouseenter', function(){
fxcurlist.start({'background-color': '#FFFFFF'});
});
curel.addEvent('mouseleave', function(){
fxcurlist.start({'background-color': '#E7E7E7'});
});
});

var list = $$('ul.sel_ul li');
list.each(function(element) {
if ($(element).getElement('div.sel_list')) {
el = $(element).getElement('div.sel_list')
elaction = $(element).getElement('div.sel_div')
elul = $(element).getElement('div.sel_list ul')
var fx = new Fx.Styles(el, {duration:1000, wait:true});
var fxout = new Fx.Styles(el, {duration:500, wait:true});
var fxul = new Fx.Styles(elul, {duration:800, wait:false});
var fxulout = new Fx.Styles(elul, {duration:400, wait:false});
el.setStyle('left', 0);
el.setStyle('display', 'none');
el.setStyle('position', 'absolute');
el.setStyle('overflow', 'hidden');
el.setStyle('top', 22);
el.setStyle('left', 20);
el.setStyle('width', 161);
elstartheight = $(element).getElement('div.sel_list_height');
elulstartHeight = elstartheight.getStyle('height');
elul.setStyles({
				height: elulstartHeight,
        left: '0',
        position:'relative'       
        });
pulldownDiv = new Element('div').setProperty('class', 'pulldown_div').injectInside(el);
pulldownDiv.setProperty('id', 'pulldown_' + el.getProperty('id'));
pulldownDiv.setStyles({
				height: elulstartHeight,
        left: '0',
        position:'absolute',
        top:'0',
        width:'161px'
        });
pulldownDiv.setStyle('margin-top', '-' + elulstartHeight);
elul.injectInside(pulldownDiv);
var fxpddiv = new Fx.Styles(pulldownDiv, {duration:800, wait:false,  transition: Fx.Transitions.Quart.easeOut});

//EVENT ENTER
element.addEvent('mouseenter', function(){
fx.clearChain();
fxul.clearChain();
fxul.stop();
fxpddiv.clearChain();
fxpddiv.stop();

elheight = $(element).getElement('div.sel_list_height')
elulHeight = elheight.getStyle('height');
fx.element.setStyle('display', 'block');


fxpddiv.element.setStyle('height', elulHeight );
fx.element.setStyle('height', elulHeight );
//fxul.start({'margin-top': 0 });
fxpddiv.start({'margin-top': 0 });

});

//EVENT LEAVE
element.addEvent('mouseleave', function(){
fx.clearChain();
//fxout.clearChain();
fxul.clearChain();
fx.stop();
fxul.stop();
fxpddiv.clearChain();
fxpddiv.stop();
eluloutHeight = elheight.getStyle('height');

fx.element.setStyle('display', 'none');
//fxul.element.setStyle('margin-top', '-' + eluloutHeight );
fxpddiv.element.setStyle('margin-top', '-' + eluloutHeight );

});

//EVENT CLICK
el.addEvent('click', function(){
fx.clearChain();
fxout.clearChain();

fxout.start({'height': 0 }).chain(function(){fxout.element.setStyle('display', 'none');});

});
}     
});
return false;
}); 

