var jade={compat:{},messages:{},CENTER:0,TOP:1,LEFT:2,BOTTOM:3,RIGHT:4,ALIGN_NORTHWEST:0,ALIGN_NORTH:1,ALIGN_NORTHEAST:2,ALIGN_EAST:3,ALIGN_SOUTHEAST:4,ALIGN_SOUTH:5,ALIGN_SOUTHWEST:6,ALIGN_WEST:7,ALIGN_CENTER:8,ORIENTATION_HORIZONTAL:0,ORIENTATION_VERTICAL:1,SIZEMODE_PROPORTIONAL:0,SIZEMODE_FIXED:1,STATE_NORMAL:0,STATE_OVER:1,STATE_DOWN:2,STATE_OFF:3,STATE_ACTIVE:4,VIEWMODE_LIST:0,VIEWMODE_ICON:1,AUTOSIZE_NONE:0,AUTOSIZE_VERTICAL:1,AUTOSIZE_HORIZONTAL:2,AUTOSIZE_ALL:3,RENDER_NORMAL:0,RENDER_SCALE:1,
RENDER_FIT_IN:2,RENDER_FILL_IN:3,RENDER_TILE:4,require:function(a){var b;b=eval("window."+a);if(!b)throw Error(a+" required");return b},
inherit:function(a,b){var c;if(!b)throw Error("parentClass must be set. childClass was "+a);c=new Function;c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.parentConstructor=b;a.getName=b.getName;a.getSuperclass=b.getSuperclass},
bind:function(a,b,c){var d,e;if(!a)throw Error("func must be set");b||(b=window);d=Array.prototype.slice.call(arguments,2);e=function(){return a.apply(b,d.concat(d.slice.call(arguments,0)))};
e.jadeFunc=a;e.jadeContext=b;e.equals=function(a){return!a?!1:a.jadeFunc==this.jadeFunc&&a.jadeContext==this.jadeContext};
return e}};
jade.defer=function(a,b,c){return window.setTimeout(jade.bind.apply(this,arguments),0)};
jade.queue=function(a,b){var c,d="",e;if(!a)throw Error("func must be set");b||(b=window);(e=b.jadeCallQueue)||(e=b.jadeCallQueue={});for(d in e)if(e.hasOwnProperty(d)&&(c=e[d],c==a))return+d;d=String(jade.defer(function(a){for(d in e)e.hasOwnProperty(d)&&e[d]==a&&delete e[d];a.call(b)},
b,a));e[d]=a;return+d};
jade.bindAsEventListener=function(a,b,c){var d,e;if(!a)throw Error("func must be set");b||(b=window);d=Array.prototype.slice.call(arguments,2);e=function(){var c,e;c=[];e="event"in window;c.push(e?window.event:arguments[0]);return a.apply(b,c.concat(d).concat(d.slice.call(arguments,e?0:1)))};
e.jadeFunc=a;e.jadeContext=b;e.equals=function(a){return!a?!1:a.jadeFunc==e.jadeFunc&&a.jadeContext==e.jadeContext};
return e};
jade.equals=function(a,b){var c;if(a===b)return!0;if(a==null||b==null)return!1;if(a instanceof Array){if(!(b instanceof Array))return!1;if(a.length!=b.length)return!1;for(c=a.length-1;c>=0;c--)if(!jade.equals(a[c],b[c]))return!1;return!0}return a instanceof Object&&a.equals?a.equals(b):b instanceof Object&&b.equals?b.equals(a):!1};
jade.message=function(a,b){var c,d,e;if(!a)throw Error("messageKey must be set");c=jade.messages[a];if(c==null)return"???"+a+"???";for(d=1,e=arguments.length;d<e;d++)c=c.toString().replace(RegExp("\\{"+(d-1)+"\\}","g"),arguments[d]);return c};
jade.isMessagePresent=function(a){if(!a)throw Error("messageKey must be set");return jade.messages[a]!=null};
jade.clone=function(a,b){return jQuery.extend(!!b,{},a)};
