window.addEvent('domready', function(){
	$('dropDownMenu').addEvent('click', function(el) 
	{
		this.set('class', 'css-select-box-clicked');
		
		if($('dropDownItem').getStyle('display') == 'inline') {
			$('dropDownItem').setStyle('display', 'none');
			this.set('class', 'css-select-box');
		} else {
			$('dropDownItem').setStyle('display', 'inline');
		}
	});
	
	$('dropDownItem').addEvent('click', function() {
		$('dropDownItem').setStyle('display', 'inline');
		$('dropDownMenu').set('class', 'css-select-box-clicked');
	});
	
	$('langBar').addEvent('mouseleave', function() 
	{
		$('dropDownItem').setStyle('display', 'none');
		$('dropDownMenu').set('class', 'css-select-box');
	});
	
	var sfEls = document.getElementById("dropDownItem").getElementsByTagName("div");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
});