-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
4 lines (4 loc) · 107 KB
/
main.js
1
2
3
4
$(document).ready(function(){function e(e){y+=e,$("<div></div>").text(function(){return e>0?"+"+e:e}).css({position:"absolute",top:"45%",left:"45%",font:"bold 100pt 'Spin Cycle'",userSelect:"none",mozUserSelect:"none",webkitUserSelect:"none",color:function(){return e>0?"darkGreen":"darkRed"}()}).appendTo("#world-container").fadeIn(function(){$(this).animate({top:$("#points").position().top,left:$("#points").position().left},1e3,"linear",function(){$("#points span").text(y),$(this).fadeOut().remove()})})}function t(){_.css({top:-4500,left:-1250}),v.fillStyle=T,v.clearRect(0,0,_.width(),_.height()),v.fillRect(0,0,_.width(),_.height()),v.fillStyle=M,v.fillRect(1500,4e3,300,1e3),v.fillRect(300,4e3,2500,300),v.fillRect(300,3500,300,500),v.fillRect(2800,4e3,300,650),v.fillRect(2800,4400,1e3,300),v.fillRect(3500,4550,1200,300),v.fillRect(3500,3200,300,1400),v.fillRect(2800,3100,1700,300),v.fillRect(4500,2500,300,900),v.fillRect(2800,2e3,300,1300),v.fillRect(1650,2e3,1400,300),v.fillRect(1350,1500,300,1500),v.fillRect(1350,1300,900,300),v.fillRect(400,2750,1250,300),v.fillRect(400,500,300,2300),v.fillRect(400,500,3e3,300),v.fillRect(3400,50,300,1750),v.fillRect(3400,1500,1150,300),v.fillRect(4500,50,300,1750),v.fillRect(4500,50,500,300),v.fillRect(3800,1650,300,1e3),v.fillRect(3450,2350,400,300),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("welcome",1650,4950),v.font=k,v.fillText("שְׁמַע",1850,4210),v.fillText("וְאָהַבְתָּ",1400,4210),v.save(),v.translate(3700,4370),v.rotate(-Math.PI/2),v.fillText("יִשְׂרָאֵל",-50,0),v.restore(),v.fillText("אֲשֶׁר",3750,4730),v.fillText("יְהוָה",3430,3300),v.fillText("לַעֲשׂוֹת",3860,3300),v.save(),v.translate(1450,1750),v.rotate(-Math.PI/2),v.fillText("אֱלֹהֵינוּ",-550,80),v.fillText("דִּבֶּר",-270,80),v.restore(),v.fillText("יְהוָה",3550,850),v.fillText("כִּי",3550,540),v.fillText("אֶחָד",4150,1690),v.save(),v.translate(4e3,1900),v.rotate(-Math.PI/2),v.fillText("הַמֶּלֶךְ",85,0),v.restore();var t=y,n=Math.round(Date.now()/1e3),a=setInterval(function(){var e=Math.round(Date.now()/1e3)-n,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),i=!0;_.animate({top:-3940},2e3,function(){var o=function(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(97==s.which||1513==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-2570},2100,function(){_.animate({top:-4290},1e3,function(){_.animate({left:-3250},1700,function(){var o=function(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(104==s.which||1497==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-3020},2500,function(){var o=function(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(104==s.which||1497==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-2580},2e3,function(){_.animate({top:-1920},2500,function(){_.animate({left:-1170},1800,function(){var o=function(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-2640},2e3,function(){_.animate({left:-240},2e3,function(){_.animate({top:-400},3e3,function(){_.animate({left:-3130},3400,function(){var o=function(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(104==s.which||1497==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-1440},1900,function(){_.animate({left:-3590},400,function(){var o=function(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-4160},400,function(){_.animate({top:"0px"},1900,function(){_.animate({left:-4250},555,function(){clearInterval(a),g(1,y-t,Math.floor(Date.now()/1e3)-n,i)})})})),(118==s.which||1492==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-2250},1100,function(){_.animate({left:-3280},400,function(){e(-50),_.animate({left:-3590},400,function(){_.animate({top:-1440},1100,function(){o()})})})}))})};o()})})),(102==s.which||1499==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:"0px"},375,function(){e(-50),_.animate({top:-400},375,function(){o()})}))})};o()})})})})),(115==s.which||1491==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-1210},1500,function(){_.animate({left:-1650},1e3,function(){e(-50),_.animate({left:-1290},1e3,function(){_.animate({top:-1920},1500,function(){o()})})})}))})};o()})})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-4180},1700,function(){_.animate({top:-2340},1700,function(){e(-50),_.animate({top:-3020},1700,function(){_.animate({left:-3250},1700,function(){o()})})})}))})};o()})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-4440},500,function(){_.animate({left:-4140},1700,function(){e(-50),_.animate({left:-3250},1700,function(){_.animate({top:-4290},500,function(){o()})})})}))})};o()})})})),(117==s.which||1493==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-110},2e3,function(){_.animate({top:-3360},2e3,function(){e(-50),_.animate({top:-3940},2e3,function(){_.animate({left:-1250},2e3,function(){o()})})})}))})};o()})}function n(){_.css({top:-4500,left:0}),v.fillStyle=T,v.clearRect(0,0,_.width(),_.height()),v.fillRect(0,0,_.width(),_.height()),v.fillStyle=M,v.fillRect(75,2e3,300,3e3),v.fillRect(300,3e3,750,300),v.fillRect(1050,3e3,300,1700),v.fillRect(300,2e3,400,300),v.fillRect(500,2e3,300,750),v.fillRect(500,2500,2400,300),v.fillRect(1800,2500,300,1e3),v.fillRect(2800,1800,300,2500),v.fillRect(2800,4e3,1800,300),v.fillRect(4400,4e3,300,750),v.fillRect(3900,2500,300,1600),v.fillRect(3900,2500,900,300),v.fillRect(4500,1e3,300,1600),v.fillRect(3700,1e3,900,300),v.fillRect(3700,100,300,2e3),v.fillRect(2400,100,1500,300),v.fillRect(2300,100,300,1e3),v.fillRect(1e3,1e3,1600,300),v.fillRect(2e3,1e3,300,900),v.fillRect(1e3,1900,1300,300),v.fillRect(1e3,50,300,1200),v.fillRect(0,50,2e3,300),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 2",220,4950),v.font=k,v.fillText("וְאָהַבְתָּ",215,2950),v.fillText("כַּאֲשֶׁר",450,3170),v.fillText("אֵת",2160,2700),v.fillText("לְרֵעֲךָ",1950,2900),v.fillText("יְהוָה",2935,2890),v.fillText("אֱלֹהֶיךָ",2935,2550),v.fillText("אֱלֹהֶיךָ",4050,4e3),v.fillText("הַאֱלֹהִים",4230,4190),v.save(),v.translate(3770,1040),v.rotate(Math.PI/3.7),v.fillText("בְּכָל-לְבָבְךָ",100,-50),v.restore(),v.fillText("וּבְכָל",3825,1270),v.fillText("לְבָבְךָ",3830,1375),v.fillText("וּבְכָל-נַפְשְׁךָ",1825,1180),v.save(),v.translate(1820,1100),v.rotate(-Math.PI/3),v.fillText("בְּכָל-נַפְשְׁךָ",50,400),v.restore(),v.save(),v.translate(915,140),v.rotate(Math.PI/3),v.fillText("וּבְכָל-מְאֹדֶךָ",150,-10),v.restore(),v.save(),v.translate(1405,140),v.rotate(-Math.PI/3),v.fillText("בְּכָל-מַמוֹֹמֶךָ",-150,-10),v.restore();var t=y,n=Math.round(Date.now()/1e3),a=setInterval(function(){var e=Math.round(Date.now()/1e3)-n,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),i=!0;_.animate({top:-2860},2e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-1900},2e3,function(){_.animate({left:-180},500,function(){_.animate({top:-2440},1300,function(){_.animate({left:-1550},2e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-2450},2e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(104==s.which||1497==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-3900},2e3,function(){_.animate({left:-3650},2e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-2380},2400,function(){_.animate({left:-4210},1100,function(){_.animate({top:-900},2e3,function(){_.animate({left:-3590},900,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(99==s.which||1489==s.which)&&($(document).off("keypress"),e(50),_.animate({top:0},2e3,function(){_.animate({left:-2120},2e3,function(){_.animate({top:-950},1600,function(){_.animate({left:-1600},700,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-810},2e3,function(){_.animate({top:0},2100,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:0},2100,function(){clearInterval(a),g(2,y-t,Math.floor(Date.now()/1e3)-n,i)})),(99==s.which||1489==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-1460},1500,function(){e(-50),_.animate({left:-750},1500,function(){o()})}))})}o()})})),(99==s.which||1489==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-1780},1600,function(){_.animate({left:-810},1600,function(){e(-50),_.animate({left:-1600},1600,function(){_.animate({top:-950},1600,function(){o()})})})}))})}o()})})})})),(117==s.which||1493==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-1750},1300,function(){e(-50),_.animate({top:-900},1300,function(){o()})}))})}o()})})})})),(118==s.which||1492==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-4100},500,function(){_.animate({top:-4410},900,function(){e(-50),_.animate({top:-3900},900,function(){_.animate({left:-3650},500,function(){o()})})})}))})}o()})})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-1630},1700,function(){e(-50),_.animate({top:-2440},1700,function(){o()})}))})}o()})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-3180},1700,function(){e(-50),_.animate({top:-2440},1700,function(){o()})}))})}o()})})})})),(102==s.which||1499==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-780},1500,function(){_.animate({top:-4400},2e3,function(){e(-50),_.animate({top:-2860},2e3,function(){_.animate({left:0},1500,function(){o()})})})}))})}o()})}function a(){_.css({top:-1400,left:-2170}),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(2400,1500,300,1400),v.fillRect(1500,2700,2100,300),v.fillRect(3300,2300,300,500),v.fillRect(2800,2300,800,300),v.fillRect(2800,100,300,2500),v.fillRect(1700,1100,1300,300),v.fillRect(2300,100,1800,300),v.fillRect(3800,100,300,1400),v.fillRect(4e3,500,900,300),v.fillRect(4600,800,300,4100),v.fillRect(700,3900,3900,300),v.fillRect(3e3,3300,300,700),v.fillRect(3e3,3300,1200,300),v.fillRect(3900,2800,300,700),v.fillRect(700,2500,300,2400),v.fillRect(200,2500,500,300),v.fillRect(200,200,300,2500),v.fillRect(200,600,1700,300),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 3",2550,1600),v.font=k,v.fillText("וְהָיוּ",2700,2850),v.fillText("אֵלֶּה",2400,2850),v.save(),v.translate(2950,1100),v.rotate(-Math.PI/3),v.fillText("הַדְּבָרִים",0,0),v.restore(),v.fillText("אַחֲרֵי",2700,1300),v.fillText("הָאֵלֶּה",3150,250),v.fillText("אֲשֶׁר",2800,250),v.fillText("אֲשֶׁר",4150,680),v.save(),v.translate(3970,800),v.rotate(-Math.PI/2),v.fillText("עַל-לְבָבֶךָ",0,0),v.restore(),v.fillText("אָנֹכִי",4550,4080),v.fillText("תַעֲשׂוּ",4750,4250),v.fillText("מְצַוְּךָ",2950,4070),v.fillText("אָמַר",3150,3900),v.save(),v.translate(870,3780),v.rotate(-Math.PI/2),v.fillText("הַיּוֹם",-100,0),v.fillText("לַעֲשׂוֹת",-380,0),v.restore(),v.fillText("עַל-לְבָבֶךָ",600,770),v.fillText("מְתוּקִים",350,600);var t=y,n=Math.round(Date.now()/1e3),a=setInterval(function(){var e=Math.round(Date.now()/1e3)-n,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),i=!0;_.animate({top:-2570},2e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-3e3},1700,function(){_.animate({top:-2210},400,function(){_.animate({left:-2580},500,function(){_.animate({top:-940},1800,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(118==s.which||1492==s.which)&&($(document).off("keypress"),e(50),_.animate({top:0},1800,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(118==s.which||1492==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-3540},1200,function(){_.animate({top:-480},900,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-4250},700,function(){_.animate({top:-3790},3300,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-2770},1800,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(110==s.which||1502==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-600},2600,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(118==s.which||1492==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-2400},2e3,function(){_.animate({left:-50},1e3,function(){_.animate({top:-480},1500,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(103==s.which||1506==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-1350},1800,function(){clearInterval(a),g(3,y-t,Math.floor(Date.now()/1e3)-n,400==y-t)})),(110==s.which||1502==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:0},500,function(){e(-50),_.animate({top:-480},500,function(){o()})}))})}o()})})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-4500},900,function(){e(-50),_.animate({top:-3790},900,function(){o()})}))})}o()})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-3200},500,function(){_.animate({left:-3600},900,function(){_.animate({top:-2650},900,function(){e(-50),_.animate({top:-3200},900,function(){_.animate({left:-2770},900,function(){_.animate({top:-3790},500,function(){o()})})})})})}))})}o()})),(44==s.which||1514==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-4500},1e3,function(){e(-50),_.animate({top:-3790},1e3,function(){o()})}))})}o()})})),(103==s.which||1506==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-1170},1e3,function(){e(-50),_.animate({top:-480},1e3,function(){o()})}))})}o()})})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-2070},500,function(){e(-50),_.animate({left:-2580},500,function(){o()})}))})}o()})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-1530},1400,function(){e(-50),_.animate({left:-2580},1400,function(){o()})}))})}o()})})})})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-1280},1700,function(){e(-50),_.animate({left:-2170},1700,function(){o()})}))})}o()})}function i(){_.css({top:0,left:0}),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(0,100,3e3,300),v.fillRect(1400,200,300,1e3),v.fillRect(600,900,800,300),v.fillRect(2800,100,300,1900),v.fillRect(2100,900,800,300),v.fillRect(3e3,1700,1100,300),v.fillRect(3900,1e3,300,2400),v.fillRect(4e3,1e3,900,300),v.fillRect(4600,100,300,4800),v.fillRect(3500,100,1400,300),v.fillRect(3300,4e3,1500,300),v.fillRect(3300,2800,300,2100),v.fillRect(2100,2800,1300,300),v.fillRect(2600,2800,300,1e3),v.fillRect(2100,1600,300,1500),v.fillRect(1500,1600,600,300),v.fillRect(1500,1600,300,3e3),v.fillRect(1500,4e3,1300,300),v.fillRect(400,4300,1200,300),v.fillRect(950,3500,300,800),v.fillRect(400,1600,300,2700),v.fillRect(400,2600,800,300),v.fillRect(900,1600,300,1e3),v.fillRect(0,1600,500,300),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 4",250,250),v.font=k,v.fillText("וְשִׁנַּנְתָּם",1750,250),v.fillText("הִשָּׁמֶר",1550,440),v.fillText("אֶת-הַתּוֹרָה",2660,1050),v.fillText("לְבָנֶיךָ",2950,1180),v.save(),v.translate(4050,1900),v.rotate(-Math.PI/2),v.fillText("וְדִבַּרְתָּ",140,90),v.fillText("כִּי-יִשְׁאָלְךָ",-40,-40),v.restore(),v.fillText("בָּם",4770,1300),v.fillText("אֲלֵהֶם",4750,1050),v.fillText("בְּשִׁבְתְּךָ",4500,4180),v.fillText("אִם",4770,4320),v.save(),v.translate(3470,4150),v.rotate(-Math.PI/2),v.fillText("בְּבֵיתֶךָ",140,90),v.fillText("וּבְקוּמֶךָ",-60,-40),v.restore(),v.fillText("וּבְלֶכְתְּךָ",2500,2970),v.save(),v.translate(2760,3140),v.rotate(-Math.PI/2),v.fillText("בְּלֶכְתְּךָ",0,0),v.restore(),v.fillText("בַדֶּרֶךְ",1600,4400),v.fillText("לַעֲשׂוֹת",1800,4200),v.fillText("וּבְשָׁכְבְּךָ",930,4440),v.save(),v.translate(1120,4230),v.rotate(-Math.PI/2),v.fillText("לְמַעַן",0,0),v.restore(),v.save(),v.translate(600,2630),v.rotate(-Math.PI/2),v.fillText("וּבְקוּמֶךָ",0,0),v.restore(),v.fillText("מִּשְׁפָּטִים",800,2760);var t=y,n=Math.round(Date.now()/1e3),a=setInterval(function(){var e=Math.round(Date.now()/1e3)-n,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),i=!0;_.animate({left:-1210},2e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-2420},1900,function(){_.animate({top:-780},1900,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(107==s.which||1500==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-1620},1800,function(){_.animate({left:-3600},1900,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-900},1e3,function(){_.animate({left:-4250},1e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(99==s.which||1489==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-3870},4e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(99==s.which||1489==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-3200},1800,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(99==s.which||1489==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-2780},1500,function(){_.animate({left:-2300},1500,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-1950},700,function(){_.animate({top:-1500},1800,function(){_.animate({left:-1350},700,function(){_.animate({top:-3980},2300,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(99==s.which||1489==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-4120},400,function(){_.animate({left:-700},1200,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-250},700,function(){_.animate({top:-2450},1800,function(){function o(){$(document).on("keypress",function(s){s.which<97&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-1500},1400,function(){_.animate({left:0},600,function(){clearInterval(a),g(4,y-t,Math.floor(Date.now()/1e3)-n,i)})})),(110==s.which||1502==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-600},600,function(){_.animate({top:-1500},1400,function(){e(-50),_.animate({top:-2450},1400,function(){_.animate({left:-250},600,function(){o()})})})}))})}o()})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-3300},1200,function(){e(-50),_.animate({top:-4120},1200,function(){o()})}))})}o()})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-2300},1200,function(){e(-50),_.animate({left:-1350},1200,function(){o()})}))})}o()})})})})),(99==s.which||1489==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-3500},1e3,function(){e(-50),_.animate({top:-2780},1e3,function(){o()})}))})}o()})})),(117==s.which||1493==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-4500},800,function(){e(-50),_.animate({top:-3870},800,function(){o()})}))})}o()})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-4500},900,function(){e(-50),_.animate({top:-3870},900,function(){o()})}))})}o()})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:0},1e3,function(){_.animate({left:-3250},1100,function(){e(-50),_.animate({left:-4250},1100,function(){_.animate({top:-900},1e3,function(){o()})})})}))})}o()})})),(102==s.which||1499==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-3100},2e3,function(){e(-50),_.animate({top:-1620},2e3,function(){o()})}))})}o()})})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-1850},1e3,function(){e(-50),_.animate({left:-2420},1e3,function(){o()})}))})}o()})})),(118==s.which||1492==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-800},1700,function(){_.animate({left:-400},1700,function(){e(-50),_.animate({left:-1210},1700,function(){_.animate({top:0},1700,function(){o()})})})}))})}o()})}function o(){_.css({top:0,left:0}),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(100,0,300,1e3),v.fillRect(100,1e3,2600,300),v.fillRect(900,1e3,300,1100),v.fillRect(100,1800,1e3,300),v.fillRect(2600,1e3,300,1100),v.fillRect(1500,2e3,2500,300),v.fillRect(1500,2e3,300,1e3),v.fillRect(100,2700,4e3,300),v.fillRect(100,2700,300,2200),v.fillRect(100,4600,4800,300),v.fillRect(2e3,3700,300,1e3),v.fillRect(900,3700,1200,300),v.fillRect(4600,100,300,4800),v.fillRect(3100,1500,1700,300),v.fillRect(3100,100,1700,300),v.fillRect(3100,100,300,700),v.fillRect(600,600,3600,300),v.fillRect(1500,0,300,700),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 5",250,200),v.font=k,v.fillText("וּקְשַׁרְתָּם",1300,1180),v.fillText("תְּפִילִין",1050,1330),v.font=C,v.fillText("you know the subject!",730,1970),v.font=k,v.fillText("לְאוֹת",2550,2150),v.fillText("עַל-יָדֶךָ",2880,2150),v.fillText("עַל-יָדֶךָ",1450,2900),v.fillText("בֵּין-עֵינֶיךָ",1820,2900),v.fillText("וְהָיוּ",2300,4770),v.fillText("כִּי",2150,4590),v.save(),v.translate(4800,1550),v.rotate(-Math.PI/2),v.fillText("לְטֹטָפֹת",0,0),v.restore(),v.fillText("אוֹת",4500,1650),v.fillText("בֵּין",3120,770),v.fillText("מֵעַל",3410,770),v.fillText("עֵינֶיךָ",1650,580),v.fillText("לְעֵינֶיךָ",1470,760);var t=y,n=Math.round(Date.now()/1e3),a=setInterval(function(){var e=Math.round(Date.now()/1e3)-n,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),i=!0;_.animate({top:-900},2e3,function(){_.animate({left:-750},2e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-2300},2500,function(){_.animate({top:-1900},1800,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(107==s.which||1500==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-1270},1800,function(){_.animate({top:-2600},1100,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(103==s.which||1506==s.which)&&($(document).off("keypress"),e(50),_.animate({left:0},1700,function(){_.animate({top:-4500},2300,function(){_.animate({left:-1750},1600,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-4250},2300,function(){_.animate({top:-1350},2350,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(107==s.which||1500==s.which)&&($(document).off("keypress"),e(50),_.animate({top:0},2e3,function(){_.animate({left:-2950},1800,function(){_.animate({top:-500},1100,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(99==s.which||1489==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-1200},2100,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(103==s.which||1506==s.which)&&($(document).off("keypress"),e(50),_.animate({top:0},1200,function(){clearInterval(a),g(5,y-t,Math.floor(Date.now()/1e3)-n,i)})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-450},1600,function(){e(-50),_.animate({left:-1200},1600,function(){o()})}))})}o()})),(110==s.which||1502==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-3700},1600,function(){e(-50),_.animate({left:-2950},1600,function(){o()})}))})}o()})})})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-2900},1600,function(){e(-50),_.animate({left:-4250},1600,function(){o()})}))})}o()})})),(102==s.which||1499==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-3600},1500,function(){_.animate({left:-750},1500,function(){e(-50),_.animate({left:-1750},1500,function(){_.animate({top:-4500},1500,function(){o()})})})}))})}o()})})})),(99==s.which||1489==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-3600},2100,function(){e(-50),_.animate({left:-1270},2100,function(){o()})}))})}o()})})),(103==s.which||1506==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-3500},1300,function(){e(-50),_.animate({left:-2350},1300,function(){o()})}))})}o()})})),(44==s.which||1514==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-1700},1800,function(){_.animate({left:-350},1100,function(){e(100),_.animate({left:-0},600,function(){e(-50),_.animate({left:-750},1700,function(){_.animate({top:-900},1800,function(){o()})})})})}))})}o()})})}function s(){_.css({top:0,left:-2070}),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(2300,0,300,3500),v.fillRect(1200,2e3,3300,300),v.fillRect(4500,1e3,300,3100),v.fillRect(500,4100,4300,300),v.fillRect(1900,2400,300,1700),v.fillRect(1200,2400,800,300),v.fillRect(500,1e3,300,3300),v.fillRect(100,1e3,2e3,300),v.fillRect(100,100,300,900),v.fillRect(1800,0,300,1e3),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 6",2450,200),v.font=k,v.fillText("וּכְתַבְתָּם",2650,2200),v.fillText("כַּתַבְתָּם",2300,2200),v.fillText("לֹא",2430,2350),v.save(),v.translate(4690,2280),v.rotate(-Math.PI/2),v.fillText("עַל-מְזֻזוֹת",0,0),v.restore(),v.fillText("לְאוֹת",4650,2060),v.fillText("בֵּיתֶךָ",1880,4270),v.fillText("דְּלָתְךָ",2060,4110),v.fillText("וּבִשְׁעָרֶיךָ",900,1150),v.fillText("לְמַעַן",500,1150);var t=y,n=Math.round(Date.now()/1e3),a=setInterval(function(){var e=Math.round(Date.now()/1e3)-n,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),i=!0;_.animate({top:-1950},2800,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-4250},2300,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(103==s.which||1506==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-4e3},2300,function(){_.animate({left:-1700},2700,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(99==s.which||1489==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-350},1800,function(){_.animate({top:-950},2300,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-1700},1800,function(){_.animate({top:0},1500,function(){clearInterval(a),g(6,y-t,Math.floor(Date.now()/1e3)-n,i)})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:0},500,function(){_.animate({top:0},1e3,function(){e(-50),_.animate({top:-950},1e3,function(){_.animate({left:-350},500,function(){o()})})})}))})}o()})})),(115==s.which||1491==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-2250},1500,function(){_.animate({left:-700},1500,function(){e(-50),_.animate({left:-1700},1500,function(){_.animate({top:-4e3},1500,function(){o()})})})}))})}o()})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-800},1500,function(){e(-50),_.animate({top:-1950},1500,function(){o()})}))})}o()})),(102==s.which||1499==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-700},1600,function(){e(-50),_.animate({left:-2070},1600,function(){o()})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-3200},1600,function(){e(-50),_.animate({top:-1950},1600,function(){o()})}))})}o()})}function r(){_.css({top:0,left:0}),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(100,0,300,3500),v.fillRect(100,500,800,300),v.fillRect(100,2300,1500,300),v.fillRect(1600,2300,300,1800),v.fillRect(600,2800,1e3,300),v.fillRect(600,2800,300,700),v.fillRect(500,3800,1300,300),v.fillRect(500,3800,300,700),v.fillRect(500,4250,2800,300),v.fillRect(2200,3e3,300,1300),v.fillRect(3100,2700,300,2200),v.fillRect(2600,2700,1300,300),v.fillRect(2600,2300,300,500),v.fillRect(2600,2300,1500,300),v.fillRect(4e3,2300,300,1700),v.fillRect(3500,3400,500,300),v.fillRect(3500,3400,300,1500),v.fillRect(3500,4600,1400,300),v.fillRect(4600,100,300,4800),v.fillRect(4e3,4150,900,300),v.fillRect(3500,1e3,1300,300),v.fillRect(2200,100,2700,300),v.fillRect(2800,100,300,1800),v.fillRect(2200,1700,2100,300),v.fillRect(2200,600,300,2300),v.fillRect(1500,600,800,300),v.fillRect(1750,100,300,700),v.fillRect(1450,600,300,1500),v.fillRect(500,1800,1e3,300),v.fillRect(1e3,100,300,1700),v.fillRect(500,100,1150,300),v.fillRect(500,0,300,200),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 7",240,200),v.font=k,v.fillText("וְהָיָה",250,830),v.fillText("הַמַּלְאָךְ",400,650),v.fillText("אִם-שָׁמֹעַ",420,2520),v.fillText("עֵקֶב",250,2650),v.fillText("תִּשְׁמְעוּ",1750,3150),v.fillText("אֶל-מִצְוֹתַי",1550,3e3),v.fillText("אֶל-מִצְוֹתַי",2500,4410),v.fillText("הַיּוֹם",2350,4250),v.fillText("אֲשֶׁר",3250,4300),v.fillText("וִידַעְתֶּם",3250,4550),v.fillText("אָנֹכִי",3100,2880),v.fillText("צִוִּיתִי",3450,2880),v.fillText("מְצַוֶּה",4e3,3600),v.fillText("דִּבֶּר",4160,3700),v.fillText("אֶתְכֶם",4750,4200),v.fillText("בְּנֵי-יִשְׂרָאֵל",4600,4350),v.fillText("הַיּוֹם",4750,1e3),v.fillText("לְאַהֲבָה",4550,1150),v.fillText("לְאַהֲבָה",2950,450),v.fillText("כִּי",2720,280),v.fillText("אֶת-יְהוָה",2800,1800),v.fillText("בְּכָל-לְבַבְכֶם",3100,1950),v.fillText("אֱלֹהֵיכֶם",2360,1780),v.fillText("וּלְעָבְדוֹ",2360,2e3),v.fillText("וּלְעָבְדוֹ",1750,760),v.fillText("לְעוֹלָם",1900,550),v.save(),v.translate(1200,1860),v.rotate(-Math.PI/2),v.fillText("בְּכָל-לְבַבְכֶם",0,0),v.restore(),v.fillText("כַּאֲשֶׁר",850,1950),v.fillText("וּבְכָל-נַפְשְׁכֶם",950,220),v.fillText("כָּל-הַיָּמִים",1200,350);var t=y,n=Math.round(Date.now()/1e3),a=setInterval(function(){var e=Math.round(Date.now()/1e3)-n,t=e%60;
1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),i=!0;_.animate({top:-450},1e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-2250},1700,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-1300},1500,function(){_.animate({top:-2750},800,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(44==s.which||1514==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-3700},1300,function(){_.animate({left:-400},1e3,function(){_.animate({top:-4150},400,function(){_.animate({left:-2e3},1600,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-2900},500,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-2550},1e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-2500},400,function(){_.animate({top:-2250},400,function(){_.animate({left:-3700},1e3,function(){_.animate({top:-3300},1e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(110==s.which||1502==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-3350},400,function(){_.animate({top:-4500},900,function(){_.animate({left:-4250},600,function(){_.animate({top:-4050},450,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-850},1700,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(118==s.which||1492==s.which)&&($(document).off("keypress"),e(50),_.animate({top:0},700,function(){_.animate({left:-2600},1100,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(107==s.which||1500==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-1600},1200,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-2100},500,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(116==s.which||1488==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-440},900,function(){_.animate({left:-1500},400,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-1250},500,function(){_.animate({top:-1620},1e3,function(){_.animate({left:-700},400,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(99==s.which||1489==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-50},1e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-250},400,function(){_.animate({top:0},300,function(){clearInterval(a),g(7,y-t,Math.floor(Date.now()/1e3)-n,i)})})),(102==s.which||1499==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-1250},400,function(){e(-50),_.animate({left:-700},400,function(){o()})}))})}o()})),(102==s.which||1499==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-250},400,function(){e(-50),_.animate({left:-700},400,function(){o()})}))})}o()})})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:0},400,function(){e(-50),_.animate({top:-440},400,function(){o()})}))})}o()})})),(117==s.which||1493==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-2700},1200,function(){e(-50),_.animate({top:-1600},1200,function(){o()})}))})}o()})),(99==s.which||1489==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-4e3},1e3,function(){e(-50),_.animate({left:-2600},1e3,function(){o()})}))})}o()})),(102==s.which||1499==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-2e3},600,function(){e(-50),_.animate({left:-2600},600,function(){o()})}))})}o()})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-3200},900,function(){e(-50),_.animate({left:-4250},900,function(){o()})}))})}o()})),(99==s.which||1489==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-3700},500,function(){e(-50),_.animate({left:-4250},500,function(){o()})}))})}o()})})})})),(115==s.which||1491==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-3700},400,function(){e(-50),_.animate({top:-3300},400,function(){o()})}))})}o()})})})})),(109==s.which||1510==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-3400},500,function(){e(-50),_.animate({left:-2900},500,function(){o()})}))})}o()})),(117==s.which||1493==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-4500},400,function(){e(-50),_.animate({top:-4150},400,function(){o()})}))})}o()})),(118==s.which||1492==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-2700},1300,function(){e(-50),_.animate({top:-4150},1300,function(){o()})}))})}o()})})})})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-250},800,function(){_.animate({top:-3200},500,function(){e(-50),_.animate({top:-2750},500,function(){_.animate({left:-1300},800,function(){o()})})})}))})}o()})})),(103==s.which||1506==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-3250},1200,function(){e(-50),_.animate({top:-2250},1200,function(){o()})}))})}o()})),(118==s.which||1492==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-350},400,function(){e(-50),_.animate({left:0},400,function(){o()})}))})}o()})}function l(){_.css({top:0,left:-2200}),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(2400,0,300,500),v.fillRect(1e3,500,2500,300),v.fillRect(1600,500,300,800),v.fillRect(900,500,300,1500),v.fillRect(100,2e3,1900,300),v.fillRect(100,500,300,1500),v.fillRect(2e3,2e3,300,1500),v.fillRect(100,3200,1900,300),v.fillRect(100,2500,300,700),v.fillRect(700,3200,300,1700),v.fillRect(700,4600,2500,300),v.fillRect(3e3,1600,300,3300),v.fillRect(3e3,3800,1900,300),v.fillRect(2e3,1450,2200,300),v.fillRect(3900,1450,300,1300),v.fillRect(3400,2700,1500,300),v.fillRect(3400,2700,300,900),v.fillRect(4600,200,300,2600),v.fillRect(3e3,1e3,1900,300),v.fillRect(2800,100,2100,300),v.fillRect(4e3,200,300,600),v.fillRect(2800,0,300,200),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 8",2550,200),v.font=k,v.fillText("וְנָתַתִּי",2350,700),v.fillText("לְמַעַן",2700,700),v.fillText("מְטַר-אַרְצְכֶם",1600,700),v.fillText("בְּעִתּוֹ",1750,900),v.fillText("בְּעִתּוֹ",1200,2180),v.fillText("לִרְצֹנְכֶם",900,2180),v.fillText("יוֹרֶה",850,3580),v.fillText("חֻקֹּתָיו",600,3400),v.fillText("וּמַלְקוֹשׁ",3150,3850),v.fillText("מַלְקוֹשׁ",3350,4e3),v.fillText("וְאָסַפְתָּ",3350,1620),v.fillText("לִמְטַר",3020,1620),v.fillText("דְגָנֶךָ",4250,2900),v.fillText("עֵשֶׂב",3900,2900),v.fillText("וְתִירֹשְׁךָ",4750,1050),v.fillText("הַיּוֹם",4600,1200),v.fillText("וְיִצְהָרֶךָ",4e3,300),v.fillText("תָּמִיד",4150,500);var t=y,n=Math.round(Date.now()/1e3),a=setInterval(function(){var e=Math.round(Date.now()/1e3)-n,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),i=!0;_.animate({top:-450},900,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-1300},1300,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(110==s.which||1502==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-700},900,function(){_.animate({top:-1900},1500,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(99==s.which||1489==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-1700},1e3,function(){_.animate({top:-3150},1500,function(){_.animate({left:-350},1300,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(104==s.which||1497==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-4500},1800,function(){_.animate({left:-2800},2100,function(){_.animate({top:-3700},1300,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-1280},1800,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-3700},900,function(){_.animate({top:-2600},1500,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(115==s.which||1491==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-4250},500,function(){_.animate({top:-960},1450,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-50},900,function(){_.animate({left:-3800},400,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-2550},1e3,function(){_.animate({top:0},300,function(){clearInterval(a),g(8,y-t,Math.floor(Date.now()/1e3)-n,i)})})),(44==s.which||1514==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-600},500,function(){e(-50),_.animate({top:-50},500,function(){o()})}))})}o()})})),(118==s.which||1492==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-2700},1200,function(){e(-50),_.animate({left:-4250},1200,function(){o()})}))})}o()})})),(103==s.which||1506==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-3250},400,function(){_.animate({top:-3400},900,function(){e(-50),_.animate({top:-2600},900,function(){_.animate({left:-3700},400,function(){o()})})})}))})}o()})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-1650},900,function(){e(-50),_.animate({left:-2800},900,function(){o()})}))})}o()})),(110==s.which||1502==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-4250},1600,function(){e(-50),_.animate({left:-2800},1600,function(){o()})}))})}o()})})})),(106==s.which||1495==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:0},300,function(){_.animate({top:-2300},900,function(){e(-50),_.animate({top:-3150},900,function(){_.animate({left:-350},300,function(){o()})})})}))})}o()})})})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:0},700,function(){_.animate({top:-300},1700,function(){e(-50),_.animate({top:-1900},1700,function(){_.animate({left:-700},700,function(){o()})})})}))})}o()})})),(99==s.which||1489==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-1e3},800,function(){e(-50),_.animate({top:-450},800,function(){o()})}))})}o()})),(107==s.which||1500==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-3e3},1200,function(){e(-50),_.animate({left:-2200},1200,function(){o()})}))})}o()})}function c(){_.css({top:-2230,left:0}),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(0,2300,1e3,300),v.fillRect(1e3,1300,300,2500),v.fillRect(500,3500,600,300),v.fillRect(500,3500,300,1400),v.fillRect(100,4e3,600,300),v.fillRect(100,2700,300,1400),v.fillRect(100,2700,800,300),v.fillRect(500,4600,4400,300),v.fillRect(3e3,3500,300,1400),v.fillRect(1800,3500,1300,300),v.fillRect(4600,2100,300,2800),v.fillRect(3400,2100,1500,300),v.fillRect(3400,100,300,4400),v.fillRect(600,100,4300,300),v.fillRect(4600,100,300,1900),v.fillRect(1400,100,300,4400),v.fillRect(1400,2e3,1900,300),v.fillRect(600,100,300,2150),v.fillRect(0,1950,600,300),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 9",250,2450),v.font=k,v.fillText("וְנָתַתִּי",1150,2650),v.fillText("טו",1150,2400),v.fillText("עֵשֶׂב",650,4350),v.fillText("מְטַר",500,4200),v.fillText("בְּשָׂדְךָ",3300,4750),v.fillText("וְאָכַלְתָּ",3150,4600),v.save(),v.translate(3580,2150),v.rotate(-Math.PI/2),v.fillText("לִבְהֶמְתֶּךָ",0,0),v.restore(),v.fillText("וְלָקַחְתָּ",3550,2400),v.fillText("וְאָכַלְתָּ",3400,300),v.fillText("אָכַלְתָּ",3700,300),v.fillText("וְשָׂבָעְתָּ",1400,300),v.fillText("הִשָּׁמְרוּ",1550,450),v.font=C,v.fillText("back",1550,2e3),v.font=k,v.fillText("וְשָׂבָעְתָּ",1550,2300),v.fillText("לָכֶם",1700,2150);var t=y,n=Math.round(Date.now()/1e3),a=setInterval(function(){var e=Math.round(Date.now()/1e3)-n,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),i=!0;_.animate({left:-750},600,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-3400},800,function(){_.animate({left:-350},400,function(){_.animate({top:-3900},700,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(103==s.which||1506==s.which)&&($(document).off("keypress"),e(50),_.animate({top:-4500},500,function(){_.animate({left:-2800},1900,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(99==s.which||1489==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-4250},1200,function(){_.animate({top:-1950},1800,function(){_.animate({left:-3200},1e3,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(107==s.which||1500==s.which)&&($(document).off("keypress"),e(50),_.animate({top:0},1700,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-1100},1500,function(){function o(){$(document).on("keypress",function(s){s.which<97&&s.which>64&&(s.which+=32),(117==s.which||1493==s.which)&&($(document).off("keypress"),e(50),_.animate({left:-500},800,function(){_.animate({top:-1900},1500,function(){_.animate({left:0},600,function(){clearInterval(a),g(9,y-t,Math.floor(Date.now()/1e3)-n,i)})})})),(118==s.which||1492==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-1900},1500,function(){function t(){$(document).on("keypress",function(n){n.which<97&&n.which>64&&(n.which+=32),98==n.which&&($(document).off("keypress"),e(10),_.animate({top:0},1500,function(){o()})),(117==n.which||1493==n.which)&&($(document).off("keypress"),i=!1,_.animate({top:-4200},1700,function(){e(-50),_.animate({top:-1900},1700,function(){t()})})),(107==n.which||1500==n.which)&&($(document).off("keypress"),i=!1,_.animate({left:-2800},1200,function(){e(-50),_.animate({left:-1100},1200,function(){t()})}))})}e(-50),t()}))})}o()})),(116==s.which||1488==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:-4250},800,function(){_.animate({top:-1700},1100,function(){e(-50),_.animate({top:0},1100,function(){_.animate({left:-3200},800,function(){o()})})})}))})}o()})),(117==s.which||1493==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-4200},1300,function(){e(-50),_.animate({top:-1950},1300,function(){o()})}))})}o()})})})),(117==s.which||1493==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-3400},800,function(){_.animate({left:-1600},900,function(){e(-50),_.animate({left:-2800},900,function(){_.animate({top:-4500},800,function(){o()})})})}))})}o()})})),(110==s.which||1502==s.which)&&($(document).off("keypress"),i=!1,_.animate({left:0},300,function(){_.animate({top:-2550},900,function(){_.animate({left:-400},300,function(){e(-50),_.animate({left:0},300,function(){_.animate({top:-3900},900,function(){_.animate({left:-350},600,function(){o()})})})})})}))})}o()})})})),(121==s.which||1496==s.which)&&($(document).off("keypress"),i=!1,_.animate({top:-1100},600,function(){e(-50),_.animate({top:-2230},600,function(){o()})}))})}o()})}function d(){function t(){$(document).on("keypress",function(a){a.which<97&&(a.which+=32),(118==a.which||1492==a.which)&&($(document).off("keypress"),e(50),_.animate({left:-1e3},900,function(){_.animate({top:-1300},500,function(){n()})})),(117==a.which||1493==a.which)&&($(document).off("keypress"),f=!1,_.animate({top:-3200},1600,function(){e(-50),_.animate({top:-1850},1600,function(){t()})}))})}function n(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-650},600,function(){_.animate({left:-1800},700,function(){_.animate({top:-2250},1600,function(){_.animate({left:-300},700,function(){_.animate({top:-3510},700,function(){a()})})})})})),(116==t.which||1488==t.which)&&($(document).off("keypress"),f=!1,_.animate({left:-300},600,function(){e(-50),_.animate({left:-1e3},600,function(){n()})}))})}function a(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(112==t.which||1508==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-1900},1300,function(){i()})),(102==t.which||1499==t.which)&&($(document).off("keypress"),f=!1,_.animate({left:0},400,function(){e(-50),_.animate({left:-300},400,function(){a()})}))})}function i(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(104==t.which||1497==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-3900},500,function(){_.animate({left:-700},1e3,function(){o()})})),(103==t.which||1506==t.which)&&($(document).off("keypress"),f=!1,_.animate({top:-2575},900,function(){_.animate({left:-700},700,function(){e(-50),_.animate({left:-1900},700,function(){_.animate({top:-3510},900,function(){i()})})})}))})}function o(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-4500},600,function(){_.animate({left:-2750},1800,function(){_.animate({top:-3800},800,function(){s()})})})),(110==t.which||1502==t.which)&&($(document).off("keypress"),f=!1,_.animate({left:0},700,function(){e(-50),_.animate({left:-700},700,function(){o()})}))})}function s(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-4250},1700,function(){_.animate({top:-2900},1400,function(){r()})})),(118==t.which||1492==t.which)&&($(document).off("keypress"),f=!1,_.animate({left:-2400},400,function(){e(-50),_.animate({left:-2750},400,function(){s()})})),32==t.which&&($(document).off("keypress"),t.preventDefault(),f=!1,e(300),v.fillStyle=M,v.fillRect(3e3,1e3,300,3e3),v.save(),v.fillStyle=b,v.translate(3150,3550),v.rotate(Math.PI/2),v.fillText("וְסַרְתֶּם, וַעֲבַדְתֶּם אֱלֹהִים",0,0),v.restore(),_.animate({top:-350},6e3,function(){c()}))})}function r(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-3200},1e3,function(){_.animate({top:-1600},1400,function(){l()})})),(103==t.which||1506==t.which)&&($(document).off("keypress"),f=!1,_.animate({top:-1900},900,function(){e(-50),_.animate({top:-2900},900,function(){r()})}))})}function l(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-4250},1100,function(){_.animate({top:-350},1200,function(){_.animate({left:-2800},1900,function(){c()})})})),(110==t.which||1502==t.which)&&($(document).off("keypress"),f=!1,_.animate({top:-600},900,function(){e(-50),_.animate({top:-1600},900,function(){l()})}))})}function c(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-2200},500,function(){d()})),(107==t.which||1500==t.which)&&($(document).off("keypress"),f=!1,_.animate({top:0},400,function(){e(-50),_.animate({top:-350},400,function(){c()})})),110==t.which&&($(document).off("keypress"),t.preventDefault(),f=!1,e(-200),v.fillStyle=M,v.fillRect(3e3,1e3,300,3e3),v.save(),v.fillStyle=b,v.font=C,v.translate(3150,1400),v.rotate(Math.PI/2),v.fillText("you're a bad listener!",0,0),v.restore(),_.animate({top:-3800},5500,function(){s()}))})}function d(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-300},2200,function(){u()})),(116==t.which||1488==t.which)&&($(document).off("keypress"),f=!1,_.animate({top:-2300},1900,function(){e(-50),_.animate({top:-350},1900,function(){d()})}))})}function u(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(50),_.animate({top:0},2200,function(){clearInterval(p),g(10,y-h,Math.floor(Date.now()/1e3)-m,f)})),(99==t.which||1489==t.which)&&($(document).off("keypress"),f=!1,_.animate({top:-950},500,function(){_.animate({left:-700},500,function(){e(-50),_.animate({left:-300},500,function(){_.animate({top:-350},500,function(){u()})})})}))})}_.css({top:0,left:0}),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(100,0,300,3500),v.fillRect(400,1900,1e3,300),v.fillRect(1300,900,300,1300),v.fillRect(500,1400,1e3,300),v.fillRect(1300,800,1e3,300),v.fillRect(2e3,900,300,1700),v.fillRect(500,2300,1800,300),v.fillRect(500,2300,300,1500),v.fillRect(100,3600,2300,300),v.fillRect(2200,2700,300,1600),v.fillRect(900,2700,1300,300),v.fillRect(100,4e3,2300,300),v.fillRect(1e3,4e3,300,900),v.fillRect(1e3,4600,2300,300),v.fillRect(3e3,50,300,4800),v.fillRect(2550,3900,2350,300),v.fillRect(4600,2100,300,1800),v.fillRect(3400,3e3,1300,300),v.fillRect(3400,800,300,2500),v.fillRect(3400,1700,1300,300),v.fillRect(4600,400,300,1600),v.fillRect(500,400,4400,300),v.fillRect(2500,400,300,2200),v.fillRect(500,0,300,1300),v.fillRect(500,1e3,700,300),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 10",250,250),v.font=k,v.fillText("הִשָּׁמְרוּ",450,2100),v.fillText("וְחָרָה",250,2200),v.fillText("לָכֶם",1450,1450),v.fillText("אֲשֶׁר",1300,1600),v.fillText("פֶּן",750,3750),v.fillText("כִּי",500,3750),v.fillText("יִפְתֶּה",2350,3900),v.fillText("עֲבַדְתֶּם",2350,3600),v.fillText("לְבַבְכֶם",1150,4300),v.fillText("מַחְשְׁבוֹתֵיכֶם",1e3,4150),v.fillText("וְסַרְתֶּם",3300,4100),v.fillText("הִשָּׁמְרוּ",3e3,4100),v.fillText("וַעֲבַדְתֶּם",4550,3170),v.fillText("עֲבַדְתֶּם",4750,3050),v.fillText("אֱלֹהִים",3800,1900),v.fillText("מַעֲשֵׂי",3550,1750),v.save(),v.font=C,v.translate(3200,700),v.rotate(-Math.PI/3.5),v.fillText("not here",0,0),v.restore(),v.fillText("אֲחֵרִים",2950,580),v.fillText("לֹא",3150,500),v.fillText("וְהִשְׁתַּחֲוִיתֶם",2500,600),v.fillText("אֲשֶׁר",2680,770),v.fillText("לָהֶם",670,470),v.fillText("בְּקֶרֶב",670,700);var h=y,m=Math.round(Date.now()/1e3),p=setInterval(function(){var e=Math.round(Date.now()/1e3)-m,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),f=!0;_.animate({top:-1850},2e3,function(){t()})}function u(){function t(){$(document).on("keypress",function(a){a.which<97&&(a.which+=32),(117==a.which||1493==a.which)&&($(document).off("keypress"),e(40),_.animate({left:-2500},1300,function(){_.animate({top:-900},800,function(){n()})})),(107==a.which||1500==a.which)&&($(document).off("keypress"),D=!1,_.animate({top:-600},500,function(){e(-40),_.animate({top:0},500,function(){t()})}))})}function n(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-3500},1e3,function(){_.animate({top:0},800,function(){a()})})),(110==t.which||1502==t.which)&&($(document).off("keypress"),D=!1,_.animate({left:-1400},800,function(){_.animate({top:-300},500,function(){e(-40),_.animate({top:-900},500,function(){_.animate({left:-2500},800,function(){n()})})})}))})}function a(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(99==t.which||1489==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-4250},600,function(){_.animate({top:-1280},1200,function(){i()})})),(103==t.which||1506==t.which)&&($(document).off("keypress"),D=!1,_.animate({left:-2900},500,function(){e(-40),_.animate({left:-3500},500,function(){a()})}))})}function i(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-1700},2500,function(){o()})),(116==t.which||1488==t.which)&&($(document).off("keypress"),D=!1,_.animate({top:-2200},800,function(){e(-40),_.animate({top:-1280},800,function(){i()})}))})}function o(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-600},1e3,function(){_.animate({top:-380},800,function(){_.animate({left:-200},400,function(){s()})})})),(118==t.which||1492==t.which)&&($(document).off("keypress"),D=!1,_.animate({top:-1950},500,function(){_.animate({left:-2500},800,function(){e(-40),_.animate({left:-1700},800,function(){_.animate({top:-1280},500,function(){o()})})})}))})}function s(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(40),_.animate({top:-1820},1e3,function(){r()})),(107==t.which||1500==t.which)&&($(document).off("keypress"),D=!1,_.animate({left:0},400,function(){e(-40),_.animate({left:-200},400,function(){s()})}))})}function r(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(110==t.which||1502==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-1300},1e3,function(){_.animate({top:-2330},700,function(){_.animate({left:-2100},800,function(){l()})})})),(100==t.which||1490==t.which)&&($(document).off("keypress"),D=!1,_.animate({left:0},400,function(){e(-40),_.animate({left:-200},400,function(){r()})}))})}function l(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-3e3},1e3,function(){c()})),(103==t.which||1506==t.which)&&($(document).off("keypress"),D=!1,_.animate({top:-3100},700,function(){e(-40),_.animate({top:-2330},700,function(){l()})}))})}function c(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-3900},1e3,function(){d()})),(44==t.which||1514==t.which)&&($(document).off("keypress"),D=!1,_.animate({top:-1600},600,function(){e(-40),_.animate({top:-2330},600,function(){c()})}))})}function d(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(44==t.which||1514==t.which)&&($(document).off("keypress"),e(40),_.animate({top:-3500},1e3,function(){u()})),(104==t.which||1497==t.which)&&($(document).off("keypress"),D=!1,_.animate({top:-1650},600,function(){_.animate({left:-3400},600,function(){e(-40),_.animate({left:-3900},600,function(){_.animate({top:-2330},600,function(){d()})})})}))})}function u(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-3200},600,function(){_.animate({left:-3800,top:-4500},1e3,function(){_.animate({left:-3e3},700,function(){h()})})})),(104==t.which||1497==t.which)&&($(document).off("keypress"),D=!1,_.animate({left:-4250},400,function(){_.animate({top:-4500},600,function(){e(-40),_.animate({top:-3500},600,function(){_.animate({left:-3900},400,function(){u()})})})}))})}function h(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-2450},500,function(){_.animate({top:-3400},1e3,function(){m()})})),(116==t.which||1488==t.which)&&($(document).off("keypress"),D=!1,_.animate({top:-4e3},500,function(){e(-40),_.animate({top:-4500},500,function(){h()})}))})}function m(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(110==t.which||1502==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-2100},400,function(){_.animate({top:-3950},800,function(){p()})})),(118==t.which||1492==t.which)&&($(document).off("keypress"),D=!1,_.animate({top:-2650},500,function(){_.animate({left:-3600},1e3,function(){e(-40),_.animate({left:-2450},1e3,function(){_.animate({top:-3400},500,function(){m()})})})}))})}function p(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(110==t.which||1502==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-1600},400,function(){_.animate({top:-3200,left:-1200},800,function(){f()})})),(117==t.which||1493==t.which)&&($(document).off("keypress"),D=!1,_.animate({top:-4500},500,function(){e(-40),_.animate({top:-3950},500,function(){p()})}))})}function f(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(118==t.which||1492==t.which)&&($(document).off("keypress"),e(40),_.animate({top:-2600,left:-900},800,function(){_.animate({left:-600},400,function(){w()})})),(116==t.which||1488==t.which)&&($(document).off("keypress"),D=!1,_.animate({top:-2600},600,function(){e(-40),_.animate({top:-3200},600,function(){f()})}))})}function w(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(118==t.which||1492==t.which)&&($(document).off("keypress"),e(40),_.animate({left:0},600,function(){_.animate({top:-3e3},800,function(){E()})})),(116==t.which||1488==t.which)&&($(document).off("keypress"),D=!1,_.animate({top:-2100},400,function(){e(-40),_.animate({top:-2600},400,function(){w()})}))})}function E(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(40),_.animate({top:-3450},600,function(){_.animate({left:-800},600,function(){_.animate({top:-3950},700,I)})})),(97==t.which||1513==t.which)&&($(document).off("keypress"),D=!1,_.animate({left:-500},400,function(){e(-40),_.animate({left:0},400,E)}))})}function I(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(104==t.which||1497==t.which)&&($(document).off("keypress"),e(40),_.animate({top:-4500},500,x)),(116==t.which||1488==t.which)&&($(document).off("keypress"),D=!1,_.animate({left:-1100},400,function(){e(-40),_.animate({left:-800},400,I)}))})}function x(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(98==t.which||1504==t.which)&&($(document).off("keypress"),e(40),_.animate({left:-400},400,S)),(118==t.which||1492==t.which)&&($(document).off("keypress"),D=!1,_.animate({left:-1700},900,function(){e(-40),_.animate({left:-800},900,x)}))})}function S(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(40),_.animate({top:-3750},600,function(){_.animate({left:0},300,function(){_.animate({top:-4500},600,function(){clearInterval(B),g(11,y-R,Math.floor(Date.now()/1e3)-A,D)
})})})),(99==t.which||1489==t.which)&&($(document).off("keypress"),D=!1,_.animate({left:-200},300,function(){e(-40),_.animate({left:-400},300,S)}))})}_.css({top:0,left:0}),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(0,100,3e3,300),v.fillRect(1200,100,300,800),v.fillRect(2700,100,300,1e3),v.fillRect(1600,1e3,2300,300),v.fillRect(1600,500,300,500),v.fillRect(3800,100,300,1200),v.fillRect(3100,100,1800,300),v.fillRect(4600,100,300,2400),v.fillRect(800,1400,4100,300),v.fillRect(2e3,1400,300,700),v.fillRect(2e3,2e3,1e3,300),v.fillRect(800,500,300,1200),v.fillRect(50,500,800,300),v.fillRect(400,500,300,1700),v.fillRect(50,1900,1600,300),v.fillRect(1600,1900,300,700),v.fillRect(1600,2400,2900,300),v.fillRect(2300,2400,300,1e3),v.fillRect(3200,1800,300,800),v.fillRect(4200,1800,300,2e3),v.fillRect(3600,1800,600,300),v.fillRect(3450,3600,1450,300),v.fillRect(4600,3600,300,1300),v.save(),v.beginPath(),v.translate(3450,3900),v.rotate(-Math.PI/5),v.rect(0,0,300,1100),v.restore(),v.fill(),v.fillRect(2700,4614,1640,300),v.fillRect(3250,4150,300,750),v.fillRect(2700,2800,300,2100),v.fillRect(2700,2800,1400,300),v.fillRect(2300,3500,500,300),v.fillRect(2300,3500,300,1400),v.fillRect(1800,4e3,500,300),v.save(),v.beginPath(),v.translate(950,2830),v.rotate(-Math.PI/6),v.rect(0,0,300,1700),v.restore(),v.fill(),v.fillRect(1600,2800,300,1100),v.fillRect(100,2680,1110,300),v.fillRect(750,2300,300,600),v.fillRect(100,2700,300,800),v.fillRect(100,3100,900,300),v.fillRect(100,3500,1150,300),v.fillRect(950,3500,300,1400),v.fillRect(950,4e3,650,300),v.fillRect(400,4600,1800,300),v.fillRect(600,3900,300,900),v.fillRect(50,3900,700,300),v.fillRect(50,3900,300,1100),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 11",250,250),v.font=k,v.fillText("וְחָרָה",1500,250),v.fillText("לָהֶם",1350,400),v.fillText("אַף-יְהוָה",3050,1200),v.fillText("מְהֵרָה",2650,1200),v.fillText("בָּכֶם",4100,250),v.fillText("עֲלֵיכֶם",3800,250),v.fillText("וְעָצַר",4570,1580),v.fillText("אִם",4750,1750),v.fillText("אֶת-הַשָּׁמַיִם",1950,1580),v.fillText("הַשָּׁמַיִם",2150,1700),v.save(),v.translate(660,735),v.rotate(-Math.PI/3),v.fillText("וְלֹא-יִהְיֶה",0,0),v.restore(),v.fillText("לֹא-יִהְיֶה",425,650),v.fillText("מָטָר",700,2100),v.fillText("גֶּשֶׁם",450,2100),v.fillText("וְהָאֲדָמָה",2600,2600),v.fillText("עַל",2500,2750),v.fillText("לֹא",3500,2600),v.fillText("תִתֵּן",3350,2400),v.fillText("תִתֵּן",4370,2750),v.fillText("יִהְיֶה",4370,2400),v.fillText("אֶת-יְבוּלָהּ",4150,3800),v.fillText("יְבוּלָהּ",4500,3800),v.fillText("וַאֲבַדְתֶּם",3200,4750),v.fillText("אֲשֶׁר",3400,4575),v.fillText("מְהֵרָה",2600,3700),v.fillText("הָאָרֶץ",2850,3500),v.fillText("מֵעַל",2250,4200),v.fillText("וְלֹא",2450,4350),v.fillText("הָאָרֶץ",1500,3500),v.fillText("אָנֹכִי",1750,3550),v.fillText("הַטֹּבָה",790,2850),v.fillText("אֲשֶׁר",900,2700),v.fillText("אֲשֶׁר",250,3450),v.fillText("שֶנַתָּתִּי",450,3300),v.fillText("יְהוָה",1100,4400),v.fillText("אָנֹכִי",1250,4200),v.fillText("נֹתֵן",900,4750),v.fillText("הִשְׁבִּיעַ",1200,4750),v.fillText("לָכֶם",750,4620),v.fillText("בָּכֶם",600,4750);var R=y,A=Math.round(Date.now()/1e3),B=setInterval(function(){var e=Math.round(Date.now()/1e3)-A,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),D=!0;_.animate({left:-1e3},1e3,function(){t()})}function h(){function t(){$(document).on("keypress",function(a){a.which<97&&(a.which+=32),(117==a.which||1493==a.which)&&($(document).off("keypress"),e(50),_.animate({top:-3500},2e3,function(){_.animate({left:-900},800,n)})),(99==a.which||1489==a.which)&&($(document).off("keypress"),E=!1,_.animate({left:-600},500,function(){e(-50),_.animate({left:0},500,t)}))})}function n(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-2100},1e3,function(){_.animate({top:-2850},800,a)})),(107==t.which||1500==t.which)&&($(document).off("keypress"),E=!1,_.animate({top:-2800},700,function(){e(-50),_.animate({top:-3500},700,n)}))})}function a(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-3250},600,i)),(103==t.which||1506==t.which)&&($(document).off("keypress"),E=!1,_.animate({top:-2200},400,function(){e(-50),_.animate({top:-2850},400,a)}))})}function i(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(103==t.which||1506==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-1850},800,o)),(99==t.which||1489==t.which)&&($(document).off("keypress"),E=!1,_.animate({top:-3500},500,function(){e(-50),_.animate({top:-2850},500,i)}))})}function o(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-3600},400,function(){_.animate({top:-3050},800,s)})),(110==t.which||1502==t.which)&&($(document).off("keypress"),E=!1,_.animate({left:-2200},900,function(){e(-50),_.animate({left:-3250},900,o)}))})}function s(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-4250},600,function(){_.animate({top:-1900},800,r)})),(107==t.which||1500==t.which)&&($(document).off("keypress"),E=!1,_.animate({top:-3500},500,function(){e(-50),_.animate({top:-3050},500,s)}))})}function r(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-900},900,function(){_.animate({left:-3600},500,function(){_.animate({top:0},700,l)})})),(107==t.which||1500==t.which)&&($(document).off("keypress"),E=!1,_.animate({left:-4e3},300,function(){_.animate({top:-2650},900,function(){e(-50),_.animate({top:-1900},900,function(){_.animate({left:-4250},300,r)})})}))})}function l(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-1850},1800,function(){_.animate({top:-1550},1200,c)})),(99==t.which||1489==t.which)&&($(document).off("keypress"),E=!1,_.animate({left:-4250},500,function(){e(-50),_.animate({left:-3600},500,l)}))})}function c(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(103==t.which||1506==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-2500},1100,function(){_.animate({left:-1200},600,d)})),(104==t.which||1497==t.which)&&($(document).off("keypress"),E=!1,_.animate({left:-4e3},2e3,function(){e(-50),_.animate({left:-1850},2e3,c)}))})}function d(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-300},1300,function(){_.animate({top:-1850},900,u)})),(99==t.which||1489==t.which)&&($(document).off("keypress"),E=!1,_.animate({top:-3200},700,function(){e(-50),_.animate({top:-2500},700,d)}))})}function u(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-1250},800,function(){_.animate({left:-1e3},600,h)})),(116==t.which||1488==t.which)&&($(document).off("keypress"),E=!1,_.animate({left:-1400},1e3,function(){e(-50),_.animate({left:-300},1e3,u)}))})}function h(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(99==t.which||1489==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-550},400,m)),(118==t.which||1492==t.which)&&($(document).off("keypress"),E=!1,_.animate({left:-1400},400,function(){e(-50),_.animate({left:-1e3},400,h)}))})}function m(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(103==t.which||1506==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-300},600,function(){_.animate({top:0},600,function(){clearInterval(w),g(12,y-p,Math.floor(Date.now()/1e3)-f,E)})})),(104==t.which||1497==t.which)&&($(document).off("keypress"),E=!1,_.animate({left:-1400},400,function(){e(-50),_.animate({left:-1e3},400,m)}))})}_.css({top:0,left:0,height:4e3}).height(4e3).attr("height",4e3),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(100,0,300,3900),v.fillRect(100,1e3,1e3,300),v.fillRect(200,3600,2500,300),v.fillRect(1e3,3e3,300,900),v.fillRect(2400,2400,300,1500),v.fillRect(2400,3e3,1e3,300),v.fillRect(3400,2e3,300,1900),v.fillRect(2400,2e3,1700,300),v.fillRect(3800,2e3,300,1900),v.fillRect(3800,3100,1100,300),v.fillRect(4600,1e3,300,2100),v.fillRect(4200,2e3,700,300),v.fillRect(4200,2e3,300,1e3),v.fillRect(3800,1e3,1100,300),v.fillRect(3800,100,300,1e3),v.fillRect(2e3,100,2900,300),v.fillRect(2e3,100,300,2500),v.fillRect(2e3,1600,2500,300),v.fillRect(500,2600,1800,300),v.fillRect(1400,2600,300,900),v.fillRect(500,1400,300,1400),v.fillRect(500,2e3,1400,300),v.fillRect(500,1400,1400,300),v.fillRect(1200,600,300,800),v.fillRect(500,600,1400,300),v.fillRect(500,0,300,800),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 12",250,250),v.font=k,v.fillText("וְשַׂמְתֶּם",250,1300),v.fillText("בְּנֵי",500,1150),v.fillText("אֶת-דְּבָרַי",1400,3750),v.fillText("לְאוֹת",1150,3650),v.fillText("אֵלֶּה",2700,3200),v.fillText("עַל",2550,3e3),v.save(),v.translate(3550,3050),v.rotate(-Math.PI/4),v.fillText("עַל-לְבַבְכֶם",0,0),v.restore(),v.fillText("בְּתוֹךְ",3550,3300),v.fillText("וְעַל-נַפְשְׁכֶם",3750,2200),v.fillText("מֵעַל",3400,2200),v.fillText("וּקְשַׁרְתֶּם",4100,3300),v.fillText("לְדַבֵּר",3950,3500),v.fillText("אֹתָם",4750,2050),v.fillText("לְאוֹת",4500,2150),v.fillText("לְאוֹת",3800,250),v.fillText("בֵּין",4100,250),v.save(),v.translate(2200,1900),v.rotate(-Math.PI/4),v.fillText("עַל-יֶדְכֶם",0,0),v.restore(),v.fillText("יָדֶךָ",2450,1750),v.fillText("וְהָיוּ",1400,2750),v.fillText("בֵּין",1550,2950),v.fillText("לְטוֹטָפֹת",650,2e3),v.fillText("אֲשֶׁר",850,2150),v.fillText("בֵּין",1350,1350),v.fillText("הַיּוֹם",1500,1550),v.fillText("עֵינֵיכֶם",1200,800),v.fillText("יֶדְכֶם",1500,800);var p=y,f=Math.round(Date.now()/1e3),w=setInterval(function(){var e=Math.round(Date.now()/1e3)-f,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),E=!0;_.animate({top:-950},1e3,t)}function m(){function t(){$(document).on("keypress",function(a){a.which<97&&(a.which+=32),(117==a.which||1493==a.which)&&($(document).off("keypress"),e(50),_.animate({top:-1550,left:-1300},1600,n)),(107==a.which||1500==a.which)&&($(document).off("keypress"),f=!1,_.animate({top:-1500,left:-3100},1500,function(){e(-50),_.animate({top:-650,left:-2150},1500,t)}))})}function n(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-700},1e3,function(){_.animate({top:-2750},1e3,a)})),(99==t.which||1489==t.which)&&($(document).off("keypress"),f=!1,_.animate({left:-2700},1500,function(){e(-50),_.animate({left:-1300},1500,n)}))})}function a(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-1400},600,i)),(99==t.which||1489==t.which)&&($(document).off("keypress"),f=!1,_.animate({left:-300},500,function(){e(-50),_.animate({left:-700},500,a)}))})}function i(){$(document).on("keypress",function(t){t.which<97&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-4120},900,function(){_.animate({left:-2300},600,o)})),(118==t.which||1492==t.which)&&($(document).off("keypress"),f=!1,_.animate({top:-1800},900,function(){e(-50),_.animate({top:-2750},900,i)}))})}function o(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(99==t.which||1489==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-3600},1600,function(){_.animate({top:-1100},2100,s)})),(44==t.which||1514==t.which)&&($(document).off("keypress"),f=!1,_.animate({top:-1800},1500,function(){e(-50),_.animate({top:-4120},1500,o)}))})}function s(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(99==t.which||1489==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-3300},400,function(){_.animate({top:-700,left:-2900},1e3,function(){_.animate({top:-500},300,r)})})),(117==t.which||1493==t.which)&&($(document).off("keypress"),f=!1,_.animate({left:-3900},500,function(){_.animate({top:-2600},1e3,function(){e(-50),_.animate({top:-1100},1e3,function(){_.animate({left:-3600},500,s)})})}))})}function r(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(99==t.which||1489==t.which)&&($(document).off("keypress"),e(50),_.animate({top:0},500,function(){_.animate({left:-4250},800,function(){_.animate({top:-2950},1600,l)})})),(117==t.which||1493==t.which)&&($(document).off("keypress"),f=!1,_.animate({left:-4e3},800,function(){e(-50),_.animate({left:-2900},800,r)}))})}function l(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-4500},1e3,function(){_.animate({left:-900},1700,c)})),(116==t.which||1488==t.which)&&($(document).off("keypress"),f=!1,_.animate({left:-4e3},300,function(){_.animate({top:-4200},1200,function(){e(-50),_.animate({top:-2950},1200,function(){_.animate({left:-4250},300,l)})})}))})}function c(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(99==t.which||1489==t.which)&&($(document).off("keypress"),e(50),_.animate({left:0},700,function(){_.animate({top:-1100},3500,d)})),(110==t.which||1502==t.which)&&($(document).off("keypress"),f=!1,_.animate({top:-3050},1100,function(){_.animate({left:-400},500,function(){_.animate({left:-900,top:-4500},1500,function(){e(-50),c()})})}))})}function d(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-200},800,function(){_.animate({left:-900},900,u)})),(99==t.which||1489==t.which)&&($(document).off("keypress"),f=!1,_.animate({left:-1100},1e3,function(){_.animate({top:-500,left:-1600},1e3,function(){e(-50),_.animate({top:-1100,left:-1100},1e3,function(){_.animate({left:0},1e3,d)})})}))})}function u(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-1800},600,function(){_.animate({top:0},400,function(){clearInterval(p),g(13,y-h,Math.floor(Date.now()/1e3)-m,f)})})),(99==t.which||1489==t.which)&&($(document).off("keypress"),f=!1,_.animate({top:-800},600,function(){e(-50),_.animate({top:-200},600,u)}))})}_.css({top:0,left:-2150,height:5e3}).height(5e3).attr("height",5e3),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(2400,0,300,1e3),v.beginPath(),v.save(),v.translate(2488,942),v.rotate(-Math.PI/4),v.rect(0,0,300,1300),v.restore(),v.save(),v.translate(2400,730),v.rotate(Math.PI/4),v.rect(0,0,300,1300),v.restore(),v.fill(),v.fillRect(900,1650,2200,300),v.fillRect(900,1650,300,1200),v.fillRect(500,2800,1400,300),v.fillRect(1600,2100,300,2100),v.fillRect(1600,4200,2600,300),v.fillRect(2500,2100,300,2100),v.fillRect(3900,1400,300,2800),v.fillRect(3600,1200,800,300),v.fillRect(4250,1200,300,1500),v.save(),v.beginPath(),v.translate(3035,935),v.rotate(-Math.PI/4),v.rect(0,0,300,800),v.restore(),v.fill(),v.fillRect(3035,100,300,835),v.fillRect(3100,600,1400,300),v.fillRect(3100,100,1800,300),v.fillRect(4600,100,300,4800),v.fillRect(4250,3e3,500,300),v.fillRect(4250,3e3,300,1500),v.fillRect(100,4600,4800,300),v.fillRect(1200,3200,300,1700),v.fillRect(600,3200,600,300),v.save(),v.beginPath(),v.translate(600,3500),v.rotate(-Math.PI/8),v.rect(0,0,300,1500),v.restore(),v.fill(),v.fillRect(100,500,300,4400),v.fillRect(100,1200,1405,300),v.save(),v.beginPath(),v.translate(1930,650),v.rotate(Math.PI/4),v.rect(0,0,300,900),v.restore(),v.fill(),v.fillRect(100,300,2200,300),v.fillRect(1e3,300,300,800),v.fillRect(2e3,0,300,500),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 13",2550,250),v.font=k,v.fillText("וְלִמַּדְתֶּם",2400,950),v.fillText("לְמַעַן",2700,950),v.fillText("אֹתָם",1550,1800),v.fillText("בְּנֵיכֶם",1800,1800),v.fillText("אֶת-בְּנֵיכֶם",1250,3e3),v.fillText("בְּשִׁבְתְּךָ",900,3e3),v.fillText("לְדַבֵּר",1750,3100),v.fillText("הַיּוֹם",1750,2850),v.fillText("בָּם",2800,4350),v.fillText("תָּמִיד",2650,4200),v.fillText("בְּשִׁבְתְּךָ",3850,1400),v.fillText("וְאָהַבְתָּ",4150,1400),v.fillText("בְּבֵיתֶךָ",3190,650),v.fillText("וּבְלֶכְתְּךָ",3450,800),v.save(),v.translate(4800,3250),v.rotate(-Math.PI/2),v.fillText("וּבְלֶכְתְּךָ",0,0),v.restore(),v.fillText("אֲשֶׁר",4550,3200),v.fillText("בַדֶּרֶךְ",1100,4750),v.fillText("מִן-הַמִּדְבָּר",1275,4600),v.fillText("וּבְשָׁכְבְּךָ",250,1200),v.fillText("בֵּין",450,1350),v.fillText("וּבִשְׁעָרֶיךָ",1400,450),v.fillText("בְּשְׁעָרֶיךָ",1150,650);var h=y,m=Math.round(Date.now()/1e3),p=setInterval(function(){var e=Math.round(Date.now()/1e3)-m,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),f=!0;_.animate({top:-650},1e3,t)}function p(){function t(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({rotate:"90deg"},5e3,n)),32==t.which&&($(document).off("keypress"),l=!1,e(200),_.animate({rotate:"-90deg"},5e3,i))})}function n(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(103==t.which||1506==t.which)&&($(document).off("keypress"),e(50),_.animate({rotate:"180deg"},5e3,a)),(99==t.which||1489==t.which)&&($(document).off("keypress"),l=!1,_.animate({top:-2e3},2e3,function(){e(-50),_.animate({top:0},2e3,n)}))})}function a(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(99==t.which||1489==t.which)&&($(document).off("keypress"),e(50),_.animate({rotate:"270deg"},5e3,i)),(115==t.which||1491==t.which)&&($(document).off("keypress"),l=!1,_.animate({top:-2e3},2e3,function(){e(-50),_.animate({top:0},2e3,a)}))})}function i(){$(document).on("keypress",function(n){if(n.which<97&&n.which>64&&(n.which+=32),(117==n.which||1493==n.which)&&($(document).off("keypress"),l=!1,_.animate({top:-2e3},2e3,function(){e(50),clearInterval(r),$("#world-container").css("background-color","initial"),g(14,y-o,Math.floor(Date.now()/1e3)-s,l)})),118==n.which||1492==n.which){$(document).off("keypress"),e(-100);var a=parseInt(_.rotate())<0;_.animate({rotate:a?"0deg":"360deg"},5e3,function(){_.rotate("0deg"),t()})}})}_.css({top:-2e3,left:-2100}).parent().css("background-color",T),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.fillRect(2350,200,300,2100),v.strokeStyle=M,v.lineWidth=300,v.beginPath(),v.arc(2500,2500,2250,0,360*(Math.PI/180),!0),v.stroke(),v.fillRect(200,2350,2100,300),v.fillRect(2350,2700,300,2100),v.fillRect(2700,2350,2100,300),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 14",2500,2200),v.font=k,v.fillText("וּכְתַבְתָּם",2300,250),v.save(),v.translate(300,2700),v.rotate(-Math.PI/2),v.fillText("עַל-מְזוּזוֹת",0,0),v.fillText("בָּם",200,150),v.restore(),v.save(),v.translate(2700,4750),v.rotate(Math.PI),v.fillText("בֵּיתֶךָ",0,0),v.fillText("דְּלָתְךָ",200,200),v.restore(),v.fillText("וּבִשְׁעָרֶיךָ",4675,2500),v.save(),v.translate(4750,2300),v.rotate(Math.PI/2),v.fillText("הַיּוֹם",0,0),v.restore();var o=y,s=Math.round(Date.now()/1e3),r=setInterval(function(){var e=Math.round(Date.now()/1e3)-s,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3),l=!0;_.animate({top:0},2e3,t)}function f(){function t(){$(document).on("keypress",function(a){a.which<97&&a.which>64&&(a.which+=32),(107==a.which||1500==a.which)&&($(document).off("keypress"),e(50),_.animate({left:-1e3},800,n)),(117==a.which||1493==a.which)&&($(document).off("keypress"),S=!1,_.animate({top:-1200},500,function(){e(-50),_.animate({top:-700},500,t)}))})}function n(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(104==t.which||1497==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-1550},600,function(){_.animate({left:-1800},700,a)})),(44==t.which||1514==t.which)&&($(document).off("keypress"),S=!1,_.animate({top:0},600,function(){e(-50),_.animate({top:-700},600,n)}))})}function a(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(104==t.which||1497==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-2500},700,function(){_.animate({top:-500},900,i)})),(99==t.which||1489==t.which)&&($(document).off("keypress"),S=!1,_.animate({top:-2300},700,function(){e(-50),_.animate({top:-1550},700,a)}))})}function i(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(117==t.which||1493==t.which)&&($(document).off("keypress"),e(50),_.animate({top:0},500,o)),(103==t.which||1506==t.which)&&($(document).off("keypress"),S=!1,_.animate({left:-1400},1e3,function(){_.animate({top:-1200},800,function(){e(-50),_.animate({top:-500},800,function(){_.animate({left:-2500},1e3,i)})})}))})}function o(){function t(e,o){if(i)if(v.clearRect(3100,500,700,1700),v.fillRect(3100,2200,700,-1700*a),a>=o){for(var s=Math.random();s>.3;)s=Math.random();setTimeout(function(){n(s,o)},50)}else{var r=Math.round(1e3*((o-e)/(50*o)))/1e3;a+=r,setTimeout(function(){t(e,o)},50)}}function n(e,o){if(i)if(v.clearRect(3100,500,700,1700),v.fillRect(3100,2200,700,-1700*a),e>=a){for(var s=Math.random();.7>s;)s=Math.random();setTimeout(function(){t(e,s)},50)}else{var r=Math.round(1e3*((o-e)/(50*o)))/1e3;a-=r,setTimeout(function(){n(e,o)},50)}}var a,i=!0;_.animate({scale:.28,top:-1930,left:-2400},700,function(){$('<div id="bar-message">לְמַעַן יִרְבּוּ יְמֵיכֶם – see how high you can get <i>your</i> life!<br/>Press space to stop the bar.</div>').css({position:"absolute",top:"45%",width:"100%",textAlign:"center",font:"bold 20pt 'Spin Cycle'",userSelect:"none",mozUserSelect:"none",webkitUserSelect:"none",color:"white"}).appendTo("body").fadeIn(),v.fillStyle=M;for(var n=Math.random(),o=Math.random();.7>n;)n=Math.random();for(;o>.3;)o=Math.random();a=o,setTimeout(function(){$("#bar-message").fadeOut().remove(),t(o,n)},5e3),$(document).on("keypress",function(t){32==t.which&&($(document).off("keypress"),i=!1,e(Math.round(1e3*a)),_.animate({scale:1,top:0,left:-2500},700,function(){_.animate({left:-3700},1e3,s)}))})})}function s(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(99==t.which||1489==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-900},900,r)),(122==t.which||1494==t.which)&&($(document).off("keypress"),S=!1,_.animate({left:-4250},500,function(){e(-50),_.animate({left:-3700},500,s)}))})}function r(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(103==t.which||1506==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-2500},1500,function(){_.animate({left:-4250},500,l)})),(118==t.which||1492==t.which)&&($(document).off("keypress"),S=!1,_.animate({left:-4250},500,function(){e(-50),_.animate({left:-3700},500,r)}))})}function l(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(118==t.which||1492==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-4500},2e3,c)),(102==t.which||1499==t.which)&&($(document).off("keypress"),S=!1,_.animate({top:-1200},1e3,function(){e(-50),_.animate({top:-2500},1e3,l)}))})}function c(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(116==t.which||1488==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-2600,left:-3200},1e3,function(){_.animate({left:-2400},600,d)})),(97==t.which||1513==t.which)&&($(document).off("keypress"),S=!1,_.animate({left:-3200},1e3,function(){e(-50),_.animate({left:-4250},1e3,c)}))})}function d(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(98==t.which||1504==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-4150},1700,u)),(99==t.which||1489==t.which)&&($(document).off("keypress"),S=!1,_.animate({top:-1800},600,function(){e(-50),_.animate({top:-2600},600,d)}))})}function u(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(104==t.which||1497==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-1700},700,h)),(107==t.which||1500==t.which)&&($(document).off("keypress"),S=!1,_.animate({left:-3700},1100,function(){e(-50),_.animate({left:-2400},1100,u)}))})}function h(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-2600},1500,function(){_.animate({left:-1300},500,m)})),(116==t.which||1488==t.which)&&($(document).off("keypress"),S=!1,_.animate({top:-4500},400,function(){_.animate({left:3e3},1500,function(){e(-50),_.animate({left:-1700},1500,function(){_.animate({top:-4150},400,h)})})}))})}function m(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-700},900,p)),(102==t.which||1499==t.which)&&($(document).off("keypress"),S=!1,_.animate({top:-1800},1e3,function(){e(-50),_.animate({top:-2600},1e3,m)}))})}function p(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(107==t.which||1500==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-200},400,f)),(116==t.which||1488==t.which)&&($(document).off("keypress"),S=!1,_.animate({top:-1e3},1500,function(){e(-50),_.animate({left:-200},400,function(){_.animate({top:-2600},1500,f)})}))})}function f(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(102==t.which||1499==t.which)&&($(document).off("keypress"),e(50),_.animate({left:0},400,function(){_.animate({top:-3200},600,w)})),(116==t.which||1488==t.which)&&($(document).off("keypress"),S=!1,_.animate({top:-1e3},1500,function(){e(-50),_.animate({left:-700},400,function(){_.animate({top:-2600},1500,p)})}))})}function w(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(118==t.which||1492==t.which)&&($(document).off("keypress"),e(50),_.animate({left:-1300},1200,function(){_.animate({top:-3950},600,E)})),(116==t.which||1488==t.which)&&($(document).off("keypress"),S=!1,_.animate({top:-4200},1e3,function(){e(-50),_.animate({top:-3200},1e3,w)}))})}function E(){$(document).on("keypress",function(t){t.which<97&&t.which>64&&(t.which+=32),(103==t.which||1506==t.which)&&($(document).off("keypress"),e(50),_.animate({top:-4500},600,function(){_.animate({left:0},1200,function(){g(15,y-I,Math.floor(Date.now()/1e3)-x,S)})})),(117==t.which||1493==t.which)&&($(document).off("keypress"),S=!1,_.animate({left:-300},1e3,function(){e(-50),_.animate({left:-1300},1e3,E)}))})}_.css({top:0,left:0}).rotate("0deg"),v.fillStyle=T,v.fillRect(0,0,$("#world").width(),$("#world").height()),v.fillStyle=M,v.beginPath(),v.rect(100,0,300,1500),v.rect(100,800,1200,300),v.rect(1200,100,300,1500),v.rect(1200,1600,1500,300),v.rect(2e3,1600,300,1e3),v.rect(2700,100,300,1800),v.rect(1600,600,1100,300),v.rect(1600,600,300,900),v.rect(2700,100,2200,300),v.rect(3900,100,300,2500),v.rect(3900,1e3,1e3,300),v.rect(3900,2600,1e3,300),v.rect(4600,1400,300,3500),v.rect(3500,4600,1400,300),v.save(),v.translate(3257,2926),v.rotate(-Math.PI/5),v.rect(0,0,300,2200),v.restore(),v.rect(2600,2750,900,300),v.rect(2600,2e3,300,2300),v.rect(1900,4200,2200,300),v.rect(1900,2700,300,2100),v.rect(1900,4600,1500,300),v.rect(100,2700,2100,300),v.rect(1600,2e3,300,1e3),v.rect(900,1200,200,1800),v.rect(500,1200,600,200),v.rect(500,1200,200,1800),v.rect(100,2700,300,1800),v.rect(100,3300,1700,300),v.rect(1500,3300,300,1600),v.rect(500,4e3,1300,300),v.rect(0,4600,1800,300),v.save(),v.rotate(45*Math.PI/180),v.fill(),v.restore(),v.closePath(),v.beginPath(),v.rect(3100,500,700,1700),v.lineWidth=8,v.stroke(),v.closePath(),v.fillStyle=b,v.textAlign="center",v.font=C,v.fillText("level 15",250,250),v.font=k,v.fillText("לְמַעַן",500,1e3),v.fillText("וְהוֹרִישׁ",250,1100),v.fillText("יִרְבּוּ",1350,1150),v.fillText("תֶּחֶזְקוּ",1350,900),v.fillText("יְמֵיכֶם",2350,1750),v.fillText("בְּנֵיכֶם",2150,1900),v.fillText("וִימֵי",2850,650),v.fillText("עַל",2650,780),v.fillText("בְנֵיכֶם",4050,450),v.fillText("זַרְעֲכֶם",4250,300),v.fillText("עַל",4070,1300),v.fillText("הָאֲדָמָה",4250,1150),v.fillText("הָאֲדָמָה",4750,2900),v.fillText("כָּל",4780,2650),v.fillText("אֲשֶׁר",4600,4600),v.fillText("שֶנַתָּתִּי",4450,4800),v.fillText("נִשְׁבַּע",2750,3e3),v.fillText("בֹּטֵחַ",2750,2750),v.fillText("יְהוָה",2600,4400),v.fillText("לָתֵת",2900,4370),v.save(),v.translate(2050,4350),v.rotate(-Math.PI/2),v.fillText("לַאֲבֹתֵיכֶם",0,0),v.restore(),v.fillText("אֲשֶׁר",2050,4600),v.fillText("לָתֵת",1600,2900),v.fillText("כִּי",1750,2700),v.fillText("לָהֶם",900,2900),v.fillText("אִם",1e3,2700),v.fillText("כִּימֵי",500,2900),v.fillText("אֶת",600,2700),v.fillText("הַשָּׁמַיִם",500,3450),v.fillText("אֶת",250,3650),v.save(),v.translate(1750,4250),v.rotate(-Math.PI/2),v.fillText("עַל-הָאָרֶץ",0,0),v.restore(),v.fillText("וְהָאָרֶץ",1500,4150);var I=y,x=Math.round(Date.now()/1e3);setInterval(function(){var e=Math.round(Date.now()/1e3)-x,t=e%60;1==t.toString().length&&(t="0"+t),$("#time").text(Math.floor(e/60)+":"+t),30>e?$("#time").css("color","green"):45>e&&$("#time").css("color","darkOrange"),e>44&&$("#time").css("color","darkRed")},1e3);var S=!0;_.animate({top:-700},700,t)}function g(t,g,M,k){$("#music")[0].pause(),v.fillStyle=T,v.clearRect(0,0,_.width(),_.height()),v.fillRect(0,0,_.width(),_.height());var C=$('<audio autoplay="autoplay"><source src="sounds/'+t+'.wav" /><source src="sounds/'+t+'.mp3" /></audio>'),b=["שְׁמַ֖ע יִשְׂרָאֵ֑ל יְהוָ֥ה אֱלֹהֵ֖ינוּ יְהוָ֥ה ׀ אֶחָֽד׃","וְאָ֣הַבְתָּ֔ אֵ֖ת יְהוָ֣ה אֱלֹהֶ֑יךָ בְּכָל־לְבָֽבְךָ֥ וּבְכָל־נַפְשְׁךָ֖ וּבְכָל־מְאֹדֶֽךָ׃","וְהָי֞וּ הַדְּבָרִ֣ים הָאֵ֗לֶּה אֲשֶׁ֨ר אָֽנֹכִ֧י מְצַוְּךָ֛ הַיּ֖וֹם עַל־לְבָבֶֽךָ׃","וְשִׁנַּנְתָּ֣ם לְבָנֶ֔יךָ וְדִבַּרְתָּ֖ בָּ֑ם בְּשִׁבְתְּךָ֤ בְּבֵיתֶ֨ךָ֙ וּבְלֶכְתְּךָ֣ בַדֶּ֔רֶךְ וּֽבְשָׁכְבְּךָ֖ וּבְקוּמֶֽךָ׃","וּקְשַׁרְתָּ֥ם לְא֖וֹת עַל־יָדֶ֑ךָ וְהָי֥וּ לְטֹֽטָפֹ֖ת בֵּ֥ין עֵינֶֽיךָ׃","וּכְתַבְתָּ֛ם עַל־מְזֻז֥וֹת בֵּיתֶ֖ךָ וּבִשְׁעָרֶֽיךָ׃","וְהָיָ֗ה אִם־שָׁמֹ֤עַ תִּשְׁמְעוּ֙ אֶל־מִצְוֹתַ֔י אֲשֶׁ֧ר אָֽנֹכִ֛י מְצַוֶּ֥ה אֶתְכֶ֖ם הַיּ֑וֹם לְאַֽהֲבָ֞ה אֶת־יְהוָ֤ה אֱלֹֽהֵיכֶם֙ וּלְעָבְד֔וֹ בְּכָל־לְבַבְכֶ֖ם וּבְכָל־נַפְשְׁכֶֽם׃","וְנָֽתַתִּ֧י מְטַֽר־אַרְצְכֶ֛ם בְּעִתּ֖וֹ יוֹרֶ֣ה וּמַלְק֑וֹשׁ וְאָֽסַפְתָּ֣ דְגָנֶ֔ךָ וְתִֽירֹשְׁךָ֖ וְיִצְהָרֶֽךָ׃","וְנָֽתַתִּ֛י עֵ֥שֶׂב בְּשָֽׂדְךָ֖ לִבְהֶמְתֶּ֑ךָ וְאָֽכַלְתָּ֖ וְשָׂבָֽעְתָּ׃","הִשָּֽׁמְר֣וּ לָכֶ֔ם פֶּ֥ן יִפְתֶּ֖ה לְבַבְכֶ֑ם וְסַרְתֶּ֗ם וַֽעֲבַדְתֶּם֙ אֱלֹהִ֣ים אֲחֵרִ֔ים וְהִשְׁתַּֽחֲוִיתֶ֖ם לָהֶֽם׃","וְחָרָ֨ה אַף־יְהוָ֜ה בָּכֶ֗ם וְעָצַ֤ר אֶת־הַשָּׁמַ֨יִם֙ וְלֹֽא־יִהְיֶ֣ה מָטָ֔ר וְהָ֣אֲדָמָ֔ה לֹ֥א תִתֵּ֖ן אֶת־יְבוּלָ֑הּ וַֽאֲבַדְתֶּ֣ם מְהֵרָ֗ה מֵעַל֙ הָאָ֣רֶץ הַטֹּבָ֔ה אֲשֶׁ֥ר יְהוָ֖ה נֹתֵ֥ן לָכֶֽם׃","וְשַׂמְתֶּם֙ אֶת־דְּבָרַ֣י אֵ֔לֶּה עַל־לְבַבְכֶ֖ם וְעַֽל־נַפְשְׁכֶ֑ם וּקְשַׁרְתֶּ֨ם אֹתָ֤ם לְאוֹת֙ עַל־יֶדְכֶ֔ם וְהָי֥וּ לְטֽוֹטָפֹ֖ת בֵּ֥ין עֵֽינֵיכֶֽם׃","וְלִמַּדְתֶּ֥ם אֹתָ֛ם אֶת־בְּנֵיכֶ֖ם לְדַבֵּ֣ר בָּ֑ם בְּשִׁבְתְּךָ֤ בְּבֵיתֶ֨ךָ֙ וּבְלֶכְתְּךָ֣ בַדֶּ֔רֶךְ וּֽבְשָׁכְבְּךָ֖ וּבְקוּמֶֽךָ׃","וּכְתַבְתָּ֛ם עַל־מְזוּז֥וֹת בֵּיתֶ֖ךָ וּבִשְׁעָרֶֽיךָ׃","לְמַ֨עַן יִרְבּ֤וּ יְמֵיכֶם֙ וִימֵ֣י בְנֵיכֶ֔ם עַ֚ל הָֽאֲדָמָ֔ה אֲשֶׁ֨ר נִשְׁבַּ֧ע יְהוָ֛ה לַאֲבֹֽתֵיכֶ֖ם לָתֵ֣ת לָהֶ֑ם כִּימֵ֥י הַשָּׁמַ֖יִם עַל־הָאָֽרֶץ׃"],I=[n,a,i,o,s,r,l,c,d,u,h,m,p,f],x=6==t||15==t;
w+=M,e(100),45>M&&setTimeout(function(){e(15*(45-M))},500),k&&setTimeout(function(){e(200)},45>M?1e3:500),$('<div style="height:480px"></div>').appendTo("#introduction").append('<p style="font-size:xx-large;margin-top:20px">Finished level '+t+"</p>",'<p style="font-size:larger;margin-top:5px"><big style="font-size:150%">'+(g+100)+" points</big> this level</p>",'<p style="font-size:larger">time: '+function(){var e=M%60;return 1==e.toString().length&&(e="0"+e),Math.floor(M/60)+":"+e}()+(45>M?" +"+15*(45-M)+" points":"")+"</p>",k?'<p style="font-size:larger">+200 perfection bonus</p>':"",'<p style="font-size:larger">total: <big>'+(g+100+(45>M?15*(45-M):0)+(k?200:0))+" points</big> this level</p>",'<p style="font-size:xx-large;margin-top:50px" dir="rtl">'+b[t-1]+"</p>",'<img src="next.png" alt="next" id="'+(x?"finishPerek":"showInfo")+'" style="margin-top:100px" />'),$("#introduction>div,#world,#time,#music").hide("fast"),$("#introduction,#introduction>div:last-child").show("fast"),$("#introduction").on("click","#startLvl",function(){$("#introduction").off("click","#startLvl"),$("#introduction").hide("fast"),$("#world-container").css("height","500px"),$("#world,#time,#music").show("fast"),C[0].pause(),C.remove(),$("#time").text("0:00").css("color","green"),$("#music")[0].play(),I[t-1]()}),$("#introduction").on("click","#showInfo",function(){$("#introduction").off("click","#showInfo"),$("#introduction>div").hide("fast"),$(".info:eq("+(t-1)+")").show("fast").append(15==t?'<div style="margin-top:25px;font-size:larger">Ready to finish up?<img src="next.png" alt="next" id="endGameBtn" style="margin-top:100px" />':'<div style="margin-top:25px;font-size:larger">Ready for level '+(t+1)+'?<br/><img src="start.png" alt="start" id="startLvl" /></div>'),$("#endGameBtn").one("click",function(){$("#introduction>div").hide("fast"),$("#endGame").show("fast"),$("#mitzvahDayBtn").one("click",function(){$("#introduction>div").hide("fast"),$("#mitzvahDay").show("fast"),$("#scorePageBtn").one("click",function(){$("#introduction>div").hide("fast"),$("#scorePage").show("fast"),$("#scorePage h2 span").text(y),$("#highscoresBtn").one("click",function(){function e(){$.getJSON("highscores.php",$.extend({action:"get"},t?{id:n,name:t}:{}),function(e){for(var t="",n=0;n<e.length;n++)t+="<tr"+(e[n].me?' class="myScore"':"")+"><td>"+e[n].position+"</td><td>"+e[n].name+"</td><td>"+e[n].points+"</td></tr>";$("#highscores").html(t)}),$("#introduction>div").hide("fast"),$("#highscoresPage").show("fast")}var t=$("#highscoresName").val(),n=localStorage.getItem("the-sofer-game-user-id");n||(n=Math.pow((t+"-"+y).split("").map(function(){return this.toString().charCodeAt(0)}).reduce(function(e,t){return e+t}),8).toString(12),localStorage.setItem("the-sofer-game-user-id",n)),t?$.post("highscores.php",{action:"add",id:n,name:t,points:y},e):e()})})})})}),$("#introduction").on("click","#finishPerek",function(){$("#introduction").off("click","#finishPerek"),e(250),(6==t?240:360)>w&&setTimeout(function(){e(10*((6==t?240:360)-w))},500),$('<div style="height:480px"></div>').appendTo("#introduction").append('<p style="font-size:larger;margin-top:20px"><big style="font-size:150%">'+(y-E)+" points</big> this perek</p>",'<p style="font-size:larger">time: '+function(){var e=w%60;return 1==e.toString().length&&(e="0"+e),Math.floor(w/60)+":"+e}()+((6==t?240:360)>w?" +"+10*((6==t?240:360)-w)+" points":"")+"</p>",'<p style="font-size:larger">total: <big>'+(y-E+10*((6==t?240:360)-w))+" points</big> this perek</p>",'<p style="font-size:x-large;margin-top:30px" dir="rtl">'+(6==t?'שְׁמַ֖ע יִשְׂרָאֵ֑ל יְהוָ֥ה אֱלֹהֵ֖ינוּ יְהוָ֥ה ׀ אֶחָֽד׃ וְאָ֣הַבְתָּ֔ אֵ֖ת יְהוָ֣ה אֱלֹהֶ֑יךָ בְּכָל־לְבָֽבְךָ֥ וּבְכָל־נַפְשְׁךָ֖ וּבְכָל־מְאֹדֶֽךָ׃ וְהָי֞וּ הַדְּבָרִ֣ים הָאֵ֗לֶּה אֲשֶׁ֨ר אָֽנֹכִ֧י מְצַוְּךָ֛ הַיּ֖וֹם עַל־לְבָבֶֽךָ׃ וְשִׁנַּנְתָּ֣ם לְבָנֶ֔יךָ וְדִבַּרְתָּ֖ בָּ֑ם בְּשִׁבְתְּךָ֤ בְּבֵיתֶ֨ךָ֙ וּבְלֶכְתְּךָ֣ בַדֶּ֔רֶךְ וּֽבְשָׁכְבְּךָ֖ וּבְקוּמֶֽךָ׃ וּקְשַׁרְתָּ֥ם לְא֖וֹת עַל־יָדֶ֑ךָ וְהָי֥וּ לְטֹֽטָפֹ֖ת בֵּ֥ין עֵינֶֽיךָ׃ וּכְתַבְתָּ֛ם עַל־מְזֻז֥וֹת בֵּיתֶ֖ךָ וּבִשְׁעָרֶֽיךָ׃ <a href="http://www.mechon-mamre.org/c/ct/c0506.htm" style="font-size:smaller">(דברים פרק ו)</a>':'וְהָיָ֗ה אִם־שָׁמֹ֤עַ תִּשְׁמְעוּ֙ אֶל־מִצְוֹתַ֔י אֲשֶׁ֧ר אָֽנֹכִ֛י מְצַוֶּ֥ה אֶתְכֶ֖ם הַיּ֑וֹם לְאַֽהֲבָ֞ה אֶת־יְהוָ֤ה אֱלֹֽהֵיכֶם֙ וּלְעָבְד֔וֹ בְּכָל־לְבַבְכֶ֖ם וּבְכָל־נַפְשְׁכֶֽם׃ וְנָֽתַתִּ֧י מְטַֽר־אַרְצְכֶ֛ם בְּעִתּ֖וֹ יוֹרֶ֣ה וּמַלְק֑וֹשׁ וְאָֽסַפְתָּ֣ דְגָנֶ֔ךָ וְתִֽירֹשְׁךָ֖ וְיִצְהָרֶֽךָ׃ וְנָֽתַתִּ֛י עֵ֥שֶׂב בְּשָֽׂדְךָ֖ לִבְהֶמְתֶּ֑ךָ וְאָֽכַלְתָּ֖ וְשָׂבָֽעְתָּ׃ הִשָּֽׁמְר֣וּ לָכֶ֔ם פֶּ֥ן יִפְתֶּ֖ה לְבַבְכֶ֑ם וְסַרְתֶּ֗ם וַֽעֲבַדְתֶּם֙ אֱלֹהִ֣ים אֲחֵרִ֔ים וְהִשְׁתַּֽחֲוִיתֶ֖ם לָהֶֽם׃ וְחָרָ֨ה אַף־יְהוָ֜ה בָּכֶ֗ם וְעָצַ֤ר אֶת־הַשָּׁמַ֨יִם֙ וְלֹֽא־יִהְיֶ֣ה מָטָ֔ר וְהָ֣אֲדָמָ֔ה לֹ֥א תִתֵּ֖ן אֶת־יְבוּלָ֑הּ וַֽאֲבַדְתֶּ֣ם מְהֵרָ֗ה מֵעַל֙ הָאָ֣רֶץ הַטֹּבָ֔ה אֲשֶׁ֥ר יְהוָ֖ה נֹתֵ֥ן לָכֶֽם׃ וְשַׂמְתֶּם֙ אֶת־דְּבָרַ֣י אֵ֔לֶּה עַל־לְבַבְכֶ֖ם וְעַֽל־נַפְשְׁכֶ֑ם וּקְשַׁרְתֶּ֨ם אֹתָ֤ם לְאוֹת֙ עַל־יֶדְכֶ֔ם וְהָי֥וּ לְטֽוֹטָפֹ֖ת בֵּ֥ין עֵֽינֵיכֶֽם׃ וְלִמַּדְתֶּ֥ם אֹתָ֛ם אֶת־בְּנֵיכֶ֖ם לְדַבֵּ֣ר בָּ֑ם בְּשִׁבְתְּךָ֤ בְּבֵיתֶ֨ךָ֙ וּבְלֶכְתְּךָ֣ בַדֶּ֔רֶךְ וּֽבְשָׁכְבְּךָ֖ וּבְקוּמֶֽךָ׃ וּכְתַבְתָּ֛ם עַל־מְזוּז֥וֹת בֵּיתֶ֖ךָ וּבִשְׁעָרֶֽיךָ׃ לְמַ֨עַן יִרְבּ֤וּ יְמֵיכֶם֙ וִימֵ֣י בְנֵיכֶ֔ם עַ֚ל הָֽאֲדָמָ֔ה אֲשֶׁ֨ר נִשְׁבַּ֧ע יְהוָ֛ה לַאֲבֹֽתֵיכֶ֖ם לָתֵ֣ת לָהֶ֑ם כִּימֵ֥י הַשָּׁמַ֖יִם עַל־הָאָֽרֶץ׃ <a href="http://www.mechon-mamre.org/c/ct/c0511.htm" style="font-size:smaller">(דברים פרק יא)</a>')+"</p>",'<img src="next.png" alt="next" id="showInfo" style="margin-top:100px" />'),$("#introduction>div,#world").hide("fast"),$("#introduction,#introduction>div:last-child").show("fast"),E=y})}var _,v,y=0,T="#09099C",M="#9ADFF6",k="70pt Sofer,serif bold",C="50pt serif bold",b="black",w=0,E=0;$.each($("#heb").text().split(""),function(e,t){$("#typer").append("<span>"+$("#eng").text().split("")[e]+"-"+t+"</span>")}),$("#heb,#eng").remove(),$('<span style="width:106px"><a href="http://typeint.com/typer" style="color:inherit;text-decoration:none;" target="_blank">full version</a></span>').appendTo("#typer"),$("#open-close-typer").click(function(){$("#typer").toggle("slow"),$("#open-close-typer span").toggle()}),$("#music-control").click(function(){$("#music")[0].paused?$("#music")[0].play():$("#music")[0].pause(),$("#music-control span").toggle()}),$("#typer span").click(function(){var e=this,t=$.Event("keypress",{which:$(e).text().split("")[2].charCodeAt(0)});$(document).trigger(t)}),_=$("#world"),_.hide().css("backgroundColor",T),$(window).keypress(function(e){33===e.keyCode&&(_.css("top","+=100"),e.preventDefault()),34===e.keyCode&&(_.css("top","-=100"),e.preventDefault()),35===e.keyCode&&(_.css("left","-=100"),e.preventDefault()),36===e.keyCode&&(_.css("left","+=100"),e.preventDefault()),37===e.keyCode&&_.css("left","+=10"),39===e.keyCode&&_.css("left","-=10"),38===e.keyCode&&_.css("top","+=10"),40===e.keyCode&&_.css("top","-=10")}),v=_[0].getContext("2d");var I=new Image;I.src="tiles.png",I.onload=function(){M=v.createPattern(I,"repeat")},$(".next").click(function(){var e=$("#introduction>div").filter(":visible");e.hide("fast"),e.siblings(":nth-child("+(e.index()+2)+")").show("fast"),$("#introduction").css("padding",5),"next.png"==$(this).attr("src")&&setTimeout(function(){$("#start").removeClass("disabled")},5e3)}),$("#start").click(function(){$("#introduction").hide("fast"),$("#world-container").css("height","500px"),$("#points,#time,#open-close-typer,#world,#music-control").show("fast"),$("#points span").text(y),t()})});