window.addEvent('domready', function(){


	
	$$('.menu')[0].getChildren('ul')[0].getChildren('li').each(function(item, index){
		
		item.addEvents({
			'mouseenter':function(e){
				this.addClass('li-over');
				if($chk(item.getChildren('div'))) item.getChildren('div').setStyle('display','block');
			},
			'mouseleave':function(e){
				this.removeClass('li-over');
				if($chk(item.getChildren('div'))) item.getChildren('div').setStyle('display','none');
			}
		});
	});
	var displayP = 6;
	
	if($chk($$('.act-p')[0])){
		$$('.elements').each(function(item, index){
			item.getChildren('div')[0].getChildren('a').each(function(item2, index2){
				if(item2.hasClass('act-p')){
					displayP = index;
					
				}
			});
		});
	}
	$$('.togglers').each(function(item, index){
		if(item.hasClass('act-p2')){
			displayP = index;
		}
	});
	var myAccordion = new Fx.Accordion($$('.togglers'), $$('.elements'), {
		display: displayP,
		alwaysHide: true,
		onActive:function(toggler, element){
			//$$('.togglers').removeClass('tg-on');
			toggler.addClass('tg-on');
		},
		onBackground:function(toggler, element){
			toggler.removeClass('tg-on');
		}
	});
	$$('.lang-cont').addEvents({
		'mouseenter':function(e){
			this.addClass('lang-on');
		},
		'mouseleave':function(e){
			this.removeClass('lang-on');
		}
	});
	

	
});
