/*
 * JSMin
 * Javascript Compressor
 * http://www.crockford.com/
 * http://www.smallsharptools.com/
*/

$.ajaxSettings.traditional=true;if(!String.prototype.trim){String.prototype.trim=function(){return this.replace(/^\s*|\s*$/g,"");};}
if(!Array.prototype.forEach){Array.prototype.forEach=function(callbackfn,thisArg){var T,O=Object(this),len=O.length>>>0,k=0;if(!callbackfn||!callbackfn.call){throw new TypeError();}
if(thisArg){T=thisArg;}
while(k<len){var Pk=String(k),kPresent=O.hasOwnProperty(Pk),kValue;if(kPresent){kValue=O[Pk];callbackfn.call(T,kValue,k,O);}
k++;}};}
if(!Array.indexOf){Array.prototype.indexOf=function(obj){for(var i=0;i<this.length;i++){if(this[i]==obj){return i;}}
return-1;};};String.prototype.toDate=function(birth){if(this.length==0){return new Date();}
var ar=String(this).split(/\/|-/);if(ar.length!==3){return new Date();}
var centuryPrefix="";if(ar[2].length==2){if(birth){centuryPrefix=(ar[2]<=String((new Date()).getFullYear()).substr(2))?"20":"19";}else{centuryPrefix=(ar[2]<=String((new Date()).getFullYear()+20).substr(2))?"20":"19";}}
return new Date(centuryPrefix+ar[2],ar[1]-1,ar[0]);};String.prototype.toNumber=function(){var num=parseInt(this.replace(/[\$\u20AC\u00A3\u00A6,]/g,""));if(isNaN(num)){return 0;}
return num;};String.prototype.toFloat=function(){var num=parseFloat(this.replace(/[\$\u20AC\u00A3\u00A6,]/g,""));if(isNaN(num)){return 0;}
return num;};Number.prototype.toCurrency=function(symbol){if(!symbol){symbol="\$";}
return(String(Math.floor(this)).replace(/(?=(\d{3})+$)\B/g,",")+String(this.toFixed(2)).substring(String(this.toFixed(2).length-3))).replace(/(-?)/,"$1"+symbol);};Number.prototype.toWholeCurrency=function(symbol){if(!symbol){symbol="\$";}
return String(Math.round(this)).replace(/(?=(\d{3})+$)\B/g,",").replace(/(-?)/,"$1"+symbol);};Number.prototype.toPercentage=function(){return Math.round(this*100)+"%";};Date.prototype.getFirstDay=function(){d=new Date(this);d.setDate(0);return(d.getDay()+1)%7;};Date.prototype.getLastDay=function(){d=new Date(this);d.setMonth(d.getMonth()+1);d.setDate(-1);return(d.getDay()+1)%7;};Date.prototype.getLastDate=function(){d=new Date(this);d.setMonth(d.getMonth()+1);d.setDate(-1);return d.getDate();};Date.prototype.format=function(f){var d=this;return f.replace(/(yyyy|mmmm|mmm|mm|dddd|ddd|dd|d|hh|h|nn|ss|a\/p)/gi,function($1){switch($1.toLowerCase()){case'yyyy':return d.getFullYear();case'mmmm':return jlta.date.months[d.getMonth()];case'mmm':return jlta.date.months[d.getMonth()].substr(0,3);case'mm':return jlta.addZero(d.getMonth()+1);case'dddd':return jlta.date.days[d.getDay()];case'ddd':return jlta.date.days[d.getDay()].substr(0,3);case'dd':return jlta.addZero(d.getDate());case'd':return d.getDate();case'hh':return jlta.addZero((h=d.getHours()%12)?h:12);case'h':return(h=d.getHours()%12)?h:12;case'nn':return jlta.addZero(d.getMinutes());case'ss':return jlta.addZero(d.getSeconds());case'a/p':return d.getHours()<12?'AM':'PM';}});};var jlta={addZero:function(n){return String(n).replace(/^(\d)$/,"0$1");},getCurrencySymbol:function(currency){switch(currency){case"GBP":return"\u00A3";case"EUR":return"\u20AC";case"JPY":return"\u00A6";default:return"$";}},date:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]}};jQuery(function($){$.extend($.fn,{moderniz:function(){if(!Modernizr.input.placeholder&&$("html.ie7,html.ie6").length==0){this.filter(":input[placeholder]").each(function(){if(this.label){this.label.remove();this.label=null;}
var $this=$(this);if(!this.isWrapped){$this.wrap("<span style=\"position:relative\"></span>");this.isWrapped=true;}
this.label=$("<label for=\""+this.id+"\" class=\"placeholder modernizd\">"+$this.attr("placeholder")+"</label>").toggle(this.value=="");$this.after(this.label);this.label.css({position:"absolute",overflowX:"hidden",left:"2px",top:"0",fontFamily:$this.css("font-family"),fontWeight:$this.css("font-weight"),fontSize:$this.css("font-size"),color:"#888",cursor:"text"});$this.focus(function(){this.label.hide();}).blur(function(){this.label.toggle(this.value=="");}).hover(function(){this.label.hide();},function(){if(!$(this).is(":focus")){this.label.toggle(this.value=="");}}).change(function(){});});}
return this;}});});$(function(){if(!Modernizr.input.autofocus){$("[autofocus]").focus();}
$(":input").moderniz();var ta=$("<textarea maxlength=\"5\">");if(!ta[0].maxLength){$("textarea[maxlength]").live("keypress",function(e){var length=$(this).attr("maxlength");return!((this.value.length>=(length))&&((e.which>8&&e.which<11)||(e.which==13)||(e.which>31&&(e.which<37||e.which>40))));});}
ta=null;});jQuery(function($){$.jltDialog=function(element){this.element=element;};$.extend($.jltDialog,{prototype:{_init:function(){var self=this;self._overlay=$('<div class=\"dialog-overlay\"></div>').appendTo(document.body).hide();self.box=$("<div class=\"dialog\"></div>").append(self.element).appendTo(document.body).hide();self._isOpen=false;$(document).keypress(function(e){if(e.keyCode&&e.keyCode==27){$.data(self.element,"jltDialog").close();}});},open:function(noOverlay){if(!this._isOpen){if(!noOverlay){this._overlay.show();}
this.box.show();this._isOpen=true;}},close:function(){if(this._isOpen){this._overlay.hide();this.box.hide();this._isOpen=false;}},setPosition:function(location){if(!location){return;}
if(location.top){this.box.css({top:Math.max(location.top,$(document).scrollTop()-$(document.body).offset().top)});}
if(location.left){this.box.css({left:location.left});}}}});$.extend($.fn,{jltDialog:function(){return this.each(function(){var instance=$.data(this,"jltDialog");(!instance&&$.data(this,"jltDialog",new $.jltDialog(this))._init());});}});});jlta.site={siteRoot:String(window.location).replace(/(.*jlta\/).*/i,"$1"),currentDirectory:String(window.location).replace(/(.*jlta\/)(.*\/).*/i,"$1$2")};$(function(){var change_location=$("#change-location");var baseURL=$("#home")[0].href;$("h2",change_location).append("<a class='close' href='#'><img alt='close' src='"+baseURL+"images/icon_close.gif' /></a>");change_location.jltDialog();$(".locale a").click(function(){change_location.data("jltDialog").open();var dialogLeft=($(document.body).outerWidth()-change_location.outerWidth())/2;var dialogTop=$("#content-wrapper").offset().top+50;change_location.css({left:dialogLeft+"px",top:dialogTop+"px",display:"block"});return false;});$("a.close",change_location).click(function(){change_location.data("jltDialog").close();return false;});});

