function l(a,b,c){if(c<=1)return M.push(a);var d=c/2,e=(a+b+j.random()*d-c/4)/2;l(a,e,c/2),l(e,b,c/2)}b=40,c=150,d="fillStyle",e="lineWidth",g="hsl(27,",j=Math;for(k in a)a[k[0]+k.replace(/[^A-Z]/g,"")]=a[k];M=[99],l(50,50,512),M[512]=99,setInterval(function(){f=new Date/10,a[d]="#8bd",a.fR(0,0,300,75),k=j.cos(f/b)*b,a[d]="#555",a.bP();for(i=0;i<513;a.lT(i-c+k*.8,M[512-i++]-10));a.f(),a[d]="#333",a.bP();for(i=0;i<513;a.lT(i-c+k,M[i++]));a.f();for(h=0;h<=75;h++)l=h*90/(90-h),m=l/450,n=(f+l)%b<20?[g+(b-m*b)+"%,52%)",g+(73-m*73)+"%,23%)"]:[g+(b-m*b)+"%,54%)",g+(b-m*b)+"%,41%)"],o=j.sin((h+f)/b)*30,y=c-h,a[d]=n[0],a.fR(0,y,300,1),p=4-.05*h,a[d]=g+(b-m*b)+"%,33%)",a.fR(-35*p+o+c,y,70*p,1),a[d]=n[1],a.fR(-30*p+o+c,y,60*p,1);k=j.sin(f/15),A=a;with(A){A[d]="#dca",strokeStyle="#421",A[e]=1,bP();for(i=0;i<6;a(150,110+i,21-i,2,8),i+=2);f(),s(),bP(),A[d]="#db7",moveTo(132,119),lT(168,119),lT(164,135),lT(136,135),closePath(),f(),s(),A[e]=4,bP(),lT(129+k,122),lT(132-k,143),moveTo(171+k,122),lT(168-k,143),s()}},0)
(function() {
var C40 = 40
var C150 = 150
var CFillStyle = "fillStyle"
var CAddColorStop = "addColorStop"
var CLineWidth = "lineWidth"
var CHsl27 = "hsl(27,"
var Ma = Math
for(k in a)
a[k[0]+k.replace(/[^A-Z]/g,"")]=a[k]
M = [99]
m(50, 50, 512)
M[512] = 99
function m(y1, y2, l) {
if (l<=1)
return M.push(y1)
var l2 = l/2
var y = (y1+y2+Ma.random()*l2-l/4) / 2
m(y1, y, l/2)
m(y, y2, l/2)
}
setInterval(function() {
var tick = new Date() / 10;
// sky
var sky = a.cLG(0, 0, 0, C150)
sky[CAddColorStop](0, "#25b")
sky[CAddColorStop](1, "#8bd")
a[CFillStyle] = sky
a[CFillStyle] = "#8bd"
a.fR(0, 0, 300, 75)
// mountain
var x = Ma.cos(tick/C40)*C40
a[CFillStyle] = "#555"
a.bP()
for (i=0; i<513; a.lT(i-C150+x*0.8, M[512-i++]-10));
a.f()
a[CFillStyle] = "#333"
a.bP()
for (i=0; i<513; a.lT(i-C150+x, M[i++]));
a.f()
for (h=0; h<=75; h++) {
var d = h*90/(90-h)
var shade = d/450
var colors = (tick + d) % C40 < 20
? [CHsl27+(C40-shade*C40)+"%,52%)", CHsl27+(73-shade*73)+"%,23%)"]
: [CHsl27+(C40-shade*C40)+"%,54%)", CHsl27+(C40-shade*C40)+"%,41%)"]
var shift = Ma.sin((h+tick)/ C40)*30
y = C150-h
a[CFillStyle] = colors[0]
a.fR(0, y, 300, 1)
var scale = 4-0.05*h
a[CFillStyle] = CHsl27+(C40-shade*C40)+"%,33%)"
a.fR(-35*scale+shift+C150, y, 70*scale, 1)
a[CFillStyle] = colors[1]
a.fR(-30*scale+shift+C150, y, 60*scale, 1)
}
x = Ma.sin(tick/15)
// wagon
a[CFillStyle] = "#dca"
a.strokeStyle = "#421"
a[CLineWidth] = 1
a.bP()
for (i=0; i<6; a.a(C150, 110+i, 21-i, 2, 8), i+=2);
a.f()
a.s()
a.bP()
a[CFillStyle] = "#db7"
a.moveTo(132, 119)
a.lT(168, 119)
a.lT(164, 135)
a.lT(136, 135)
a.closePath()
a.f()
a.s()
a[CLineWidth] = 4
a.bP()
a.lT(129+x, 122)
a.lT(132-x, 143)
a.moveTo(171+x, 122)
a.lT(168-x, 143)
a.s()
}, 0);
})();