var langs=new Array()
langs={
	"en":"English",
	"zh":"Chinese",
	"ko":"Korean",
	"es":"Spanish",
	"fr":"French",
	"ru":"Russian",
	"ja":"Japanese"
}
var now="ja";
$(function(){
	tgt=$(".foreigners div");
	for(index in langs){
		langs[index];
		tmp='<img src="/js/flags/'+index+'.gif" to="'+index+'" alt="'+langs[index]+'" title="'+langs[index]+'" />';
		tgt.append(tmp);
	}
	$(".foreigners img").each(function(){
		$(this).click(function(){
			to=$(this).attr("to");
			$("body").translateTextNodes(now, to);
		}).hover(function(){
			$(this).addClass("hover");
		},function(){
			$(this).removeClass("hover");
		});
	});
});
