(function(){function k(a){$.getJSON("/i18n/config.json",function(b){for(var d="",e=0;e<b.length;e++){var c=b[e],d=d+('<li data-lan="'+c.value+'"><a href="javascript:;">'+c.name+"</a></li>");c["default"]&&(f=c.value)}g.html(d);a()})}function l(a){a=a||$.cookie("language")||f||"zh-cn";h(a);b.locale=a;b.load("i18n/"+b.locale+".json",b.locale).done(function(){$("html").i18n();$(".invisible").removeClass("invisible").css("opacity",0).animate({opacity:1},200)})}function h(a){$.cookie("language",a,{expires:365})}
var f="zh-cn",g=$("#lanList");g.on("click","li",function(){var a=$(this).attr("data-lan");h(a);window.location.reload()});var b=$.i18n();$(document).ready(function(a){k(function(){l()})})})();
