!function(){var e,t=function(e,t){return function(){return e.apply(t,arguments)}};window.pass=void 0,e=function(){function e(e){this.resource_manager=e,this.getTileset=t(this.getTileset,this),this.getSprite=t(this.getSprite,this),this.getSound=t(this.getSound,this),this.getObject=t(this.getObject,this),this.getScene=t(this.getScene,this),this.createTileset=t(this.createTileset,this),this.createSprite=t(this.createSprite,this),this.createSound=t(this.createSound,this),this.createObject=t(this.createObject,this),this.createScene=t(this.createScene,this),this.setPreloadScene=t(this.setPreloadScene,this),this.setInitialScene=t(this.setInitialScene,this),this.skipTimers=t(this.skipTimers,this),this.updateTimers=t(this.updateTimers,this),this.iteration=t(this.iteration,this),this.loop=t(this.loop,this),this.start=t(this.start,this),this.updateCanvasSize=t(this.updateCanvasSize,this),this.getSurface=t(this.getSurface,this),this.createSurface=t(this.createSurface,this),this.addCanvas=t(this.addCanvas,this),this.canvases={},this.fps=45,this.last_frameskip_collection=Math.floor(Date.now()),this.frameskip=0,this.current_frameskip=0,this.current_frame=0,this.scenes={},this.objects={},this.sounds={},this.sprites={},this.tilesets={},this.named_timers={},this.unnamed_timers=[],this.ease.engine=this}return e.prototype.addCanvas=function(e,t){return null==t&&(t=""),this.canvases[t]=d.unpackElement(e)},e.prototype.createSurface=function(e){return this.canvases[e]=document.createElement("canvas")},e.prototype.getSurface=function(e){var t;return"string"==typeof e?null!=(t=this.canvases[e])?t.getContext("2d"):void 0:"CANVAS"===e.tagName?e.getContext("2d"):e},e.prototype.updateCanvasSize=function(e,t,n){return e.width=t,e.height=n,e.style.width=""+t+"px",e.style.height=""+n+"px"},e.prototype.start=function(){return this.initial_scene.addTargetSurface(this.canvases[""]),this.loop()},e.prototype.loop=function(){return this.iteration()},e.prototype.iteration=function(){var e,t,n,i,r,s,o,a,u;n=1e3/this.fps,t=Date.now(),r=t+n,this.current_frame+=1,Math.floor(t)>this.last_frameskip_collection&&(this.frameskip=this.current_frameskip,this.current_frameskip=0,this.last_frameskip_collection=Math.floor(t)),this.updateTimers(),u=this.scenes;for(i in u)o=u[i],o.active&&o.iteration();return Date.now()r;r++)t=o[r],t.step();this.unnamed_timers=this.unnamed_timers.filter(function(e){return!e.finished}),a=this.named_timers,u=[];for(n in a)t=a[n],u.push(t.finished?delete this.named_timers[n]:void 0);return u},e.prototype.skipTimers=function(e){var t,n,i,r,s,o,a;for(o=this.unnamed_timers.concat(function(){var e,n;e=this.named_timers,n=[];for(t in e)i=e[t],n.push(i);return n}.call(this)),a=[],r=0,s=o.length;s>r;r++)n=o[r],a.push(n.skip(e));return a},e.prototype.setInitialScene=function(e){return this.initial_scene=e},e.prototype.setPreloadScene=function(e){return this.preload_scene=e},e.prototype.createScene=function(e){var t;return t=new a(this,e),null==this.initial_scene&&(this.initial_scene=t),this.scenes[e]=t},e.prototype.createObject=function(e){return this.objects[e]=new s(this,e)},e.prototype.createSound=function(e,t){return this.sounds[e]=new u(this,e,this.resource_manager.getSound(t))},e.prototype.createSprite=function(e,t){return console.log("gget",this.resource_manager.getImage(t)),this.sprites[e]=new l(this,e,this.resource_manager.getImage(t))},e.prototype.createTileset=function(e,t,n,i){return this.tilesets[e]=new c(this,e,this.resource_manager.getImage(t),n,i)},e.prototype.getScene=function(e){return"string"==typeof e?this.scenes[e]:e},e.prototype.getObject=function(e){return"string"==typeof e?this.objects[e]:e},e.prototype.getSound=function(e){return"string"==typeof e?this.sounds[e]:e},e.prototype.getSprite=function(e){return"string"==typeof e?this.sprites[e]:e},e.prototype.getTileset=function(e){return"string"==typeof e?this.tilesets[e]:e},e}(),e.prototype.draw={_startPath:function(e){return function(t,n){var i;return t=e.getSurface(t),(null!=(i=!n._is_text)?i:!1)&&t.beginPath(),t}}(this),_finishPath:function(){return function(e,t){var n,i,r,s,o,a,u,l,c,h,d,p,f;return(null!=(n=t.stroke)?n:!0)&&(e.lineWidth=null!=(i=null!=(a=t.lineWidth)?a:null!=(u=t.pen)?u.lineWidth:void 0)?i:1,e.strokeStyle=null!=(l=null!=(c=t.lineColor)?c:null!=(h=t.pen)?h.lineColor:void 0)?l:"black",(null!=(d=t._is_text)?d:!1)?e.strokeText(t.text,t.x,t.y):e.stroke()),(null!=(p=t.fill)?p:!1)?(e.fillStyle=null!=(f=null!=(r=t.fillColor)?r:null!=(s=t.pen)?s.fillColor:void 0)?f:"white",(null!=(o=t._is_text)?o:!1)?e.fillText(t.text,t.x,t.y):e.fill()):void 0}}(this),_getTextWidth:function(e){return function(t,n,i){var r;return e._applyTextContext(t,i),r=t.measureText(n).width,t.restore(),r}}(this),_applyTextContext:function(){return function(e,t){var n,i,r,s,o,a,u,l,c,h,d;return n=null!=(a=t.font)?a:"sans-serif",i=null!=(u=t.size)?u:16,s=null!=(l=t.weight)?l:"normal",r=null!=(c=t.style)?c:"normal",o=null!=(h=t.scale)?h:1,e.save(),e.font=""+s+" "+r+" "+i+"px '"+n+"'",e.globalAlpha=null!=(d=t.alpha)?d:1,e.scale(o,o)}}(this),line:function(e){return function(t,n,i,r,s,o){return null==s&&(s={}),null==o&&(o=""),o=e._startPath(o,s),o.moveTo(t,n),o.lineTo(i,r),e._finishPath(o,s)}}(this),rectangle:function(e){return function(t,n,i,r,s,o){return null==s&&(s={}),null==o&&(o=""),o=e._startPath(o,s),o.rect(t,n,i-t,r-n),e._finishPath(o,s)}}(this),boxEllipse:function(e){return function(t,n,i,r,s,o){var a,u,l,c;return null==s&&(s={}),null==o&&(o=""),l=(t+i)/2,c=(n+r)/2,a=(i-t)/2,u=(r-n)/2,e.radiusEllipse(l,c,a,u,s,o)}}(this),radiusEllipse:function(e){return function(t,n,i,r,s,o){var a,u,l,c,h;if(null==s&&(s={}),null==o&&(o=""),o=e._startPath(o,s),u=null!=(c=s.step)?c:.1,i===r)o.arc(t,n,i,0,2*Math.PI,!1);else for(o.moveTo(t+i,n),a=l=0,h=2*Math.PI+u;h>=0?h>=l:l>=h;a=h>=0?++l:--l)o.lineTo(t+Math.cos(a)*i,n+Math.sin(a)*r);return e._finishPath(o,s)}}(this),boxPolygon:function(){return function(e,t,n,i,r,s,o){return null==s&&(s={}),null==o&&(o=""),pass}}(this),radiusPolygon:function(){return function(e,t,n,i,r,s){return null==r&&(r={}),null==s&&(s=""),pass}}(this),text:function(e){return function(t,n,i,r,s){var o;return null==r&&(r={}),null==s&&(s=""),null==r.alignment&&(r.alignment="left"),null==r.scale&&(r.scale=1),r._is_text=!0,r.text=i,r.y=n,null==r.fill&&(r.fill=!0),null==r.fillColor&&(r.fillColor="black"),null==r.stroke&&(r.stroke=!1),"left"===alignment?r.x=t:(o=e._getTextWidth(i,r),"center"===alignment?r.x=t-o/2*scale*scale:"right"===alignment&&(r.x=t-o)),e._startPath(s,r),e._finishPath(s,r),s.restore()}}(this)};var n,t=function(e,t){return function(){return e.apply(t,arguments)}},i=[].slice;e.prototype.ease={_calculateElasticValues:function(e,t,n,i,r){var s;return null==r&&(r=!1),null==n&&(n=r?.3*e*1.5:.3*e),null==t||t=this.start_frame+this.duration?this.infinite?(this.start_frame=e,this.invert_repeat&&(this.start=this.start+this.change,this.change=-this.change),this.value=this.start):null!=this.next?this.goToNext():(this.finished=!0,this.value=this.start+this.change):this.value=this.func(e-this.start_frame)},e.prototype.valueOf=function(){return!this.finished&&this.engine.current_frame>this.last_updated&&(this.updateValue(this.engine.current_frame),this.last_updated=this.engine.current_frame),this.value},e.prototype.backIn=function(e){var t;return e/=this.duration,t=this.params[0],this.change*e*e*((t+1)*e-t)+this.start},e.prototype.backOut=function(e){var t;return e=e/this.duration-1,t=this.params[0],this.change*(e*e*((t+1)*e+t)+1)+this.start},e.prototype.backInOut=function(e){var t;return e/=this.duration/2,t=1.525*this.params[0],1>e?this.change/2*e*e*((t+1)*e-t)+this.start:(e-=2,this.change/2*(e*e*((t+1)*e+t)+2)+this.start)},e.prototype.bounceOut=function(e,t){return null==t&&(t=null),e/=this.duration,t=null!=t?t:this.start,1/2.75>e?7.5625*this.change*e*e+t:2/2.75>e?(e-=1.5/2.75,this.change*(7.5625*e*e+.75)+t):2.5/2.75>e?(e-=2.25/2.75,this.change*(7.5625*e*e+.9375)+t):(e-=2.625/2.75,this.change*(7.5625*e*e+.984375)+t)},e.prototype.bounceIn=function(e,t){return null==t&&(t=null),t=null!=t?t:this.start,this.change-this.bounceOut(this.duration-e,0)+t},e.prototype.bounceInOut=function(e){return ee?-this.change/2*(Math.sqrt(1-e*e)-1)+this.start:(e-=2,this.change/2*(Math.sqrt(1-e*e)+1)+this.start)},e.prototype.cubicIn=function(e){return e/=this.duration,this.change*e*e*e+this.start},e.prototype.cubicOut=function(e){return e=e/this.duration-1,this.change*(e*e*e+1)+this.start},e.prototype.cubicInOut=function(e){return e/=this.duration/2,1>e?change/2*e*e*e+this.start:(e-=2,change/2*(e*e*e+2)+begin)},e.prototype.elasticOut=function(e){var t,n,i;return e/=this.duration,t=this.params[0],i=this.params[1],n=this.params[2],t*Math.pow(2,-10*e)*Math.sin(2*(e*this.duration-n)*Math.PI/i)+this.change+this.start},e.prototype.elasticIn=function(e){var t,n,i;return e/=this.duration,t=this.params[0],i=this.params[1],n=this.params[2],-(t*Math.pow(2,-10*e))*Math.sin(2*(e*this.duration-n)*Math.PI/i)+this.start},e.prototype.elasticInOut=function(e){var t,n,i;return e=e/(this.duration/2)-1,t=this.params[0],i=this.params[1],n=this.params[2],1>e?-.5*t*Math.pow(2,-10*e)*Math.sin((e*this.duration-n)*(2*Math.PI/i))+this.start:t*Math.pow(2,-10*e)*Math.sin(2*(e*this.duration-n)*Math.PI/i)+this.change+this.start},e.prototype.expoIn=function(e){return this.change*Math.pow(2,10*(e/this.duration-1))+this.start},e.prototype.expoOut=function(e){return this.change*(-Math.pow(2,-10*e/this.duration)+1)+this.start},e.prototype.expoInOut=function(e){return e/=this.duration/2,1>e?this.change/2*Math.pow(2,10*(e-1))+this.start:this.change/2*(-Math.pow(2,-10*(e-1))+2)+this.start},e.prototype.linearNone=function(e){return this.change*e/this.duration+this.start},e.prototype.quadIn=function(e){return e/=this.duration,this.change*e*e+this.start},e.prototype.quadOut=function(e){return e/=this.duration,-this.change*e*(e-2)+this.start},e.prototype.quadInOut=function(e){return e/=this.duration/2,1>e?this.change/2*e*e+this.start:(e-=1,-this.change/2*(e*(e-2)-1)+this.start)},e}();var i=[].slice;e.prototype.random={number:function(){return function(e,t,n){var i,r,s;return i=Math.random(),s=Math.abs(t-e),r=1/(null!=n?n:1e-8),Math.floor((e+i*s)*r)/r}}(this),pick:function(){return function(){var e;return e=1<=arguments.length?i.call(arguments,0):[],e[Math.floor(Math.random()*e.length)]}}(this),string:function(){return function(e,t){var n;return null==t&&(t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"),function(){var i,r,s;for(s=[],n=i=0,r=e-1;r>=0?r>=i:i>=r;n=r>=0?++i:--i)s.push(t[Math.floor(Math.random()*t.length)]);return s}().join("")}}(this)};var r,t=function(e,t){return function(){return e.apply(t,arguments)}};e.prototype.timing={startTimer:function(e){return function(t,n,i,s){var o;return null==i&&(i=null),null==s&&(s=!1),o=new r(t,n,s),null!=i?e.named_timers[i]=o:e.unnamed_timers.push(o)}}(this),stopTimer:function(e){return function(t){return e.timers[t].stop()}}(this)},r=function(){function e(e,n,i){this.frames=e,this.callback=n,this.repeat=i,this.stop=t(this.stop,this),this.skip=t(this.skip,this),this.step=t(this.step,this),this.current_frame=0,this.finished=!1}return e.prototype.step=function(){return this.current_frame>=this.frames?(this.callback(),repeat?this.current_frame=0:this.finished=!0):void 0},e.prototype.skip=function(e){return this.current_frame+=e},e.prototype.stop=function(){return this.finished=!0},e}();var s;s=function(){function e(e,t){this.engine=e,this.name=t,this.sprite=null,this.instances=[],this.x=0,this.y=0}return e.prototype.callEvent=function(e,t){var n,i,r;switch(null==t&&(t={}),n={mouseover:this.onMouseOver,mouseout:this.onMouseOut,create:this.onCreate,step:this.onStep,click:this.onClick,click_global:this.onClickGlobal},e){case"draw":return this.drawSelf(null!=(i=t.surface)?i:""),"function"==typeof this.onDraw?this.onDraw(t):void 0;default:return null!=(r=n[e])?r.bind(this)(t):void 0}},e.prototype.drawSelf=function(e){return this.drawSprite(e)},e.prototype.drawSprite=function(e){var t;return null==e&&(e=""),null!=this.sprite&&(null!=(t=this.draw_sprite)?t:"true")?this.sprite.draw(this.x,this.y,{},e):void 0},e.prototype.getBoundingBox=function(){var e,t;return e=null!=(t=this.sprite)?t.getSize():void 0,{x1:this.x,x2:this.x+(null!=e?e.width:void 0),y1:this.y,y2:this.y+(null!=e?e.height:void 0)}},e.prototype.getInstances=function(){return this.instances},e.prototype.checkPointCollision=function(e,t){var n;return n=this.getBoundingBox(),e>=(null!=n?n.x1:void 0)&&e<=(null!=n?n.x2:void 0)&&t>=(null!=n?n.y1:void 0)&&t<=(null!=n?n.y2:void 0)},e}();var o,t=function(e,t){return function(){return e.apply(t,arguments)}};o=function(){function e(e){this.base_path=null!=e?e:"",this.preload=t(this.preload,this),this.prepare=t(this.prepare,this),this.getImage=t(this.getImage,this),this.addSounds=t(this.addSounds,this),this.addScripts=t(this.addScripts,this),this.addImages=t(this.addImages,this),this.addScript=t(this.addScript,this),this.addSound=t(this.addSound,this),this.addImage=t(this.addImage,this),this.joinPath=t(this.joinPath,this),this.resources={stage1_images:[],stage1_audio:[],stage1_scripts:[],images:[],audio:[],scripts:[]},this.resource_objects={images:{},audio:{},scripts:{}}}return e.prototype.joinPath=function(e){return""===this.base_path?e:d.stripRight(this.base_path,"/")+"/"+e},e.prototype.addImage=function(e,t){return null==t&&(t=!1),t?this.resources.stage1_images.push(this.joinPath(e)):this.resources.images.push(this.joinPath(e))},e.prototype.addSound=function(e,t){return null==t&&(t=!1),t?this.resources.stage1_audio.push(this.joinPath(e)):this.resources.audio.push(this.joinPath(e))},e.prototype.addScript=function(e,t){return null==t&&(t=!1),t?this.resources.stage1_scripts.push(this.joinPath(e)):this.resources.scripts.push(this.joinPath(e))},e.prototype.addImages=function(e,t){var n,i,r,s;for(null==t&&(t=!1),s=[],i=0,r=e.length;r>i;i++)n=e[i],s.push(this.addImage(n,t));return s},e.prototype.addScripts=function(e,t){var n,i,r,s;for(null==t&&(t=!1),s=[],i=0,r=e.length;r>i;i++)n=e[i],s.push(this.addScript(n,t));return s},e.prototype.addSounds=function(e,t){var n,i,r,s;for(null==t&&(t=!1),s=[],i=0,r=e.length;r>i;i++)n=e[i],s.push(this.addSound(n,t));return s},e.prototype.getImage=function(e){return console.log("objs",this.resource_objects),console.log("path",e),this.resource_objects.images[this.joinPath(e)]},e.prototype.prepare=function(e){return null==e&&(e=function(){}),pass},e.prototype.preload=function(e,t){var n,i,r,s,o;for(null==e&&(e=function(){}),null==t&&(t=function(){}),o=this.resources.images,r=0,s=o.length;s>r;r++)n=o[r],i=document.createElement("img"),i.src=n,this.resource_objects.images[n]=i;return t()},e}();var a,t=function(e,t){return function(){return e.apply(t,arguments)}};a=function(){function e(e,n){this.engine=e,this.name=n,this.changeScene=t(this.changeScene,this),this.createInstance=t(this.createInstance,this),this.checkMouseCollisions=t(this.checkMouseCollisions,this),this.redraw=t(this.redraw,this),this.iteration=t(this.iteration,this),this.checkActive=t(this.checkActive,this),this.removeTargetSurface=t(this.removeTargetSurface,this),this.handleClick=t(this.handleClick,this),this.addTargetSurface=t(this.addTargetSurface,this),this.instances={},this.surfaces=[],this.dirty=!0,this.last_instance_id=100,this.active=!1,this.width=800,this.height=600,this.last_width=800,this.last_height=600}return e.prototype.addTargetSurface=function(e){return this.surfaces.push(e),this.engine.updateCanvasSize(e,this.width,this.height),$(e).on("mousemove.radium",function(t){return function(n){var i;return i=e.getBoundingClientRect(),t.mouse_x=n.clientX-i.left|0,t.mouse_y=n.clientY-i.top|0,t.checkMouseCollisions()}}(this)),$(e).on("click.radium",function(e){return function(t){return e.handleClick("click",t)}}(this)),$(e).on("mouseup.radium",function(e){return function(t){return e.handleClick("mouse_up",t)}}(this)),$(e).on("mousedown.radium",function(e){return function(t){return e.handleClick("mouse_down",t)}}(this)),this.checkActive()},e.prototype.handleClick=function(e,t){var n,i,r;r=this.instances;for(n in r)i=r[n],i.callEvent(""+e+"_global",{x:this.mouse_x,y:this.mouse_y,button:t.which}),i.checkPointCollision(this.mouse_x,this.mouse_y)&&i.callEvent(e,{x:this.mouse_x,y:this.mouse_y,button:t.which});return t.preventDefault(),t.stopPropagation(),!1},e.prototype.removeTargetSurface=function(e){return this.surfaces=this.surfaces.filter(function(t){return t!==e}),$(e).off("mousemove.radium"),this.checkActive()},e.prototype.checkActive=function(){return this.active=this.surfaces.length>0},e.prototype.iteration=function(){var e,t,n,i,r,s,o,a;if(this.width!==this.last_width||this.height!==this.last_height){for(s=this.surfaces,i=0,r=s.length;r>i;i++)n=s[i],this.engine.updateCanvasSize(n,this.width,this.height);o=[this.width,this.height],this.last_width=o[0],this.last_height=o[1]}a=this.instances;for(e in a)t=a[e],t.callEvent("step")&&(this.dirty=!0);return this.dirty?(this.redraw(),this.dirty=!1):void 0},e.prototype.redraw=function(){var e,t,n,i,r,s,o,a;for(o=this.surfaces,a=[],r=0,s=o.length;s>r;r++)i=o[r],e=this.engine.getSurface(i),e.clearRect(0,0,i.width,i.height),a.push(function(){var e,r;e=this.instances,r=[];for(t in e)n=e[t],r.push(n.callEvent("draw",{surface:i}));return r}.call(this));return a},e.prototype.checkMouseCollisions=function(){var e,t,n,i,r;i=this.instances,r=[];for(t in i)n=i[t],e=n.checkPointCollision(this.mouse_x,this.mouse_y),e&&!n._moused_over?(n.callEvent("mouseover"),r.push(n._moused_over=!0)):!e&&n._moused_over?(n.callEvent("mouseout"),r.push(n._moused_over=!1)):r.push(void 0);return r},e.prototype.createInstance=function(e,t,n){var i,r,s;return null==t&&(t=0),null==n&&(n=0),i=this.last_instance_id+=1,s=this.engine.getObject(e),r=window.Object.create(s),r.x=t,r.y=n,r.id=i,r.scene=this,this.instances[i]=r,s.instances.push(r),r.callEvent("create"),r},e.prototype.changeScene=function(){return pass},e}();var u;u=function(){function e(){}return e}();var l,t=function(e,t){return function(){return e.apply(t,arguments)}};l=function(){function e(e,n,i){this.engine=e,this.name=n,this.image=i,this.getSize=t(this.getSize,this),this.draw=t(this.draw,this)}return e.prototype.draw=function(e,t,n,i){var r;return null==n&&(n={}),null==i&&(i=""),i=this.engine.getSurface(i),i.globalAlpha=null!=(r=n.alpha)?r:1,i.drawImage(this.image,e,t)},e.prototype.getSize=function(){return{width:this.image.width,height:this.image.height}},e}();var c,h,t=function(e,t){return function(){return e.apply(t,arguments)}};c=function(){function e(e,n,i,r,s){this.engine=e,this.name=n,this.image=i,this.tile_width=r,this.tile_height=s,this.tile=t(this.tile,this),this.tiles={}}return e.prototype.tile=function(e,t,n,i,r){var s,o;return null==n&&(n=!1),null==i&&(i=0),null==r&&(r=0),s=""+e+"/"+t+"/"+i+"/"+r+"/"+(n?1:0),null!=(o=this.tiles[s])?o:tiles[s]=new h(this.engine,this,e,t,n,i,r)},e}(),h=function(){function e(e,n,i,r,s,o,a){this.engine=e,this.tileset=n,this.x=i,this.y=r,this.precise=null!=s?s:!1,this.w=null!=o?o:0,this.h=null!=a?a:0,this.getSize=t(this.getSize,this),this.draw=t(this.draw,this)}return e.prototype.draw=function(e,t){var n,i,r,s,o;return this.precise?(r=this.x,s=this.y,i=this.w,n=this.h):(r=this.x*this.tileset.tile_width,s=this.y*this.tileset.tile_height,i=this.tileset.tile_width,n=this.tileset.tile_height),o=this.engine.getSurface(),o.drawImage(r,s,source_width,source_height,e,t)},e.prototype.getSize=function(){return this.precise?{width:this.w,height:this.h}:{width:this.tileset.tile_width,height:this.tileset.tile_height}},e}();var d;d={stripRight:function(e,t){return e.replace(new RegExp(t+"*$","g"),"")},unpackElement:function(e){return console.log(e),e instanceof jQuery?e[0]:e}},window.ResourceManager=o,window.Engine=e}(),function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=Z.type(e);return"function"===n||Z.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(Z.isFunction(t))return Z.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return Z.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(at.test(t))return Z.filter(t,e,n);t=Z.filter(t,e)}return Z.grep(e,function(e){return V.call(t,e)>=0!==n})}function r(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t=ft[e]={};return Z.each(e.match(pt)||[],function(e,n){t[n]=!0}),t}function o(){G.removeEventListener("DOMContentLoaded",o,!1),e.removeEventListener("load",o,!1),Z.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+Math.random()}function u(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(xt,"-$1").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:_t.test(n)?Z.parseJSON(n):n}catch(r){}yt.set(e,t,n)}else n=void 0;return n}function l(){return!0}function c(){return!1}function h(){try{return G.activeElement}catch(e){}}function d(e,t){return Z.nodeName(e,"table")&&Z.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function f(e){var t=Mt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,i=e.length;i>n;n++)vt.set(e[n],"globalEval",!t||vt.get(t[n],"globalEval"))}function m(e,t){var n,i,r,s,o,a,u,l;if(1===t.nodeType){if(vt.hasData(e)&&(s=vt.access(e),o=vt.set(t,s),l=s.events)){delete o.handle,o.events={};for(r in l)for(n=0,i=l[r].length;i>n;n++)Z.event.add(t,r,l[r][n])}yt.hasData(e)&&(a=yt.access(e),u=Z.extend({},a),yt.set(t,u))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&Z.nodeName(e,t)?Z.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Et.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function _(t,n){var i,r=Z(n.createElement(t)).appendTo(n.body),s=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(r[0]))?i.display:Z.css(r[0],"display");return r.detach(),s}function x(e){var t=G,n=Ft[e];return n||(n=_(e,t),"none"!==n&&n||(qt=(qt||Z("