(function(a){a.localise=function(g,d,f,e,h){if(typeof d!="object"&&typeof d!="string"){h=e;e=f;f=d;d=""}if(typeof f!="boolean"){h=e;e=f;f=false}if(typeof e!="string"&&!b(e)){h=e;e=["",""]}var k={async:a.ajaxSettings.async,timeout:a.ajaxSettings.timeout};d=typeof d!="string"?d||{}:{language:d,loadBase:f,path:e,timeout:h};var j=!d.path?["",""]:b(d.path)?d.path:[d.path,d.path];a.ajaxSetup({async:false,timeout:d.timeout||500});var l=function(c,b){d.loadBase&&a.getScript(j[0]+c+".js");b.length>=2&&a.getScript(j[1]+c+"-"+b.substring(0,2)+".js");b.length>=5&&a.getScript(j[1]+c+"-"+b.substring(0,5)+".js")},m=c(d.language||a.localise.defaultLanguage);g=b(g)?g:[g];for(i=0;i<g.length;i++)l(g[i],m);a.ajaxSetup(k)};a.localize=a.localise;a.localise.defaultLanguage=c(navigator.language||navigator.userLanguage);function c(a){a=a.replace(/_/,"-").toLowerCase();if(a.length>3)a=a.substring(0,3)+a.substring(3).toUpperCase();return a}function b(a){return a&&a.constructor==Array}})(jQuery)
