var Konami=function(){var i={addEvent:function(t,e,n,i){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&(t["e"+e+n]=n,t[e+n]=function(){t["e"+e+n](window.event,i)},t.attachEvent("on"+e,t[e+n]))},input:"",pattern:"38384040373937396665",load:function(n){this.addEvent(document,"keydown",function(t,e){e&&(i=e),i.input+=t?t.keyCode:event.keyCode,i.input.length>i.pattern.length&&(i.input=i.input.substr(i.input.length-i.pattern.length)),i.input==i.pattern&&(i.code(n),i.input="")},this),this.iphone.load(n)},code:function(t){window.location=t},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:!1,capture:!1,orig_keys:"",keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(t){i.code(t)},load:function(t){this.orig_keys=this.keys,i.addEvent(document,"touchmove",function(t){1==t.touches.length&&1==i.iphone.capture&&(t=t.touches[0],i.iphone.stop_x=t.pageX,i.iphone.stop_y=t.pageY,i.iphone.tap=!1,i.iphone.capture=!1,i.iphone.check_direction())}),i.addEvent(document,"touchend",function(){1==i.iphone.tap&&i.iphone.check_direction(t)},!1),i.addEvent(document,"touchstart",function(t){i.iphone.start_x=t.changedTouches[0].pageX,i.iphone.start_y=t.changedTouches[0].pageY,i.iphone.tap=!0,i.iphone.capture=!0})},check_direction:function(t){x_magnitude=Math.abs(this.start_x-this.stop_x),y_magnitude=Math.abs(this.start_y-this.stop_y),x=this.start_x-this.stop_x<0?"RIGHT":"LEFT",y=this.start_y-this.stop_y<0?"DOWN":"UP",result=x_magnitude>y_magnitude?x:y,result=1==this.tap?"TAP":result,result==this.keys[0]&&(this.keys=this.keys.slice(1,this.keys.length)),0==this.keys.length&&(this.keys=this.orig_keys,this.code(t))}}};return i};