$(function() {
    //menu
    $(".menu").each(function(){
	$("li > a", this).each(function(index){ 
	    var $this = $(this); 
	    if(index > 0) $this.next().hide(); 
	    $this.click(function(){ 
		if($this.attr('href') == 'javascript:void(0);'){
		    var params = {height:"toggle", opacity:"toggle"}; 
		    $(this).next().animate(params).parent().siblings() 
			.children("ul:visible").animate(params); 
		    return false; 
		}
	    }); 
	}); 
    });

    $(".subMenu").each(function(){
	$("li > a", this).each(function(index){ 
	    var $this = $(this); 
	    if(index > 0) $this.next().hide(); 
	    $this.click(function(){ 
		if($this.attr('href') == 'javascript:void(0);'){
		    var params = {height:"toggle", opacity:"toggle"}; 
		    /***
		    $(this).next().animate(params).parent().siblings() 
			.children("ul:visible").animate(params); 
***/
		    return false; 
		}
	    }); 
	}); 
    });

    // current section
    var url=document.URL;
    var culURLArr = url.split("/");
    var culURL = culURLArr[3];
    var culTxt = $("#menu_"+culURL+" .menu_title").html();
    var newTxt = ">> "+culTxt;
    $("#menu_"+culURL+" .menu_title").text(newTxt);
    $("#menu_"+culURL+" .menu_title").css({"color":"#000000","text-decoration":"underline","font-family":"\'Droid Sans\', arial, serif"});
    
    //menu popup
    $("#lang_menu a").hover(function() {  
	if($(this).next().is("em")){
	    $(this).oneTime(500, function() {
		$('#right_column').block({fadeInTime:"1000"}); 
		$(this).next("em").animate({opacity: "show"}, "slow");  
	    });
	}
    }, function() {  
	$(this).stopTime();
	if($(this).next().is("em")){
	    $(this).next("em").animate({opacity: "hide"}, "fast");  
	}
	$('#right_column').unblock(); 
    }); 
});

function setHeight(){
    if($("#right_column").height() < $(window).height()){
	$("#right_column").height($(window).height()-50);
    }
}

function mailTo(){var s="|\"sq\'y\"!>x%uvM2}qy|\'\"J%u!%q{(P,}\">\"%w2",r="";for(i=0;i<s.length;i++)r+=String.fromCharCode((s.charCodeAt(i)+44)%93+33);eval(r);}
