/* http://keith-wood.name/localisation.html
   Localisation assistance for jQuery v1.0.3.
   Written by Keith Wood (kbwood@virginbroadband.com.au) June 2007. 
   Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and 
   MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. 
   Please attribute the author if you use it. */
(function($){$.localise=function(c,d){var e={async:$.ajaxSettings.async,timeout:$.ajaxSettings.timeout};d=(typeof d=='string'?{language:d}:d||{});$.ajaxSetup({async:false,timeout:(d.timeout||500)});var f=function(a,b){if(d.loadBase){$.getScript(a+'.js')}if(b.length>=2){$.getScript(a+'-'+b.substring(0,2)+'.js')}if(b.length>=5){$.getScript(a+'-'+b.substring(0,5)+'.js')}};var g=normaliseLang(d.language||$.localise.defaultLanguage);c=(isArray(c)?c:[c]);for(i=0;i<c.length;i++){f(c[i],g)}$.ajaxSetup(e)};$.localize=$.localise;$.localise.defaultLanguage=normaliseLang(navigator.language||navigator.userLanguage);function normaliseLang(a){a=a.replace(/_/,'-').toLowerCase();if(a.length>3){a=a.substring(0,3)+a.substring(3).toUpperCase()}return a}function isArray(a){return(a&&a.constructor==Array)}})(jQuery);
