
var Movie = Class.create({
	paper:null,
	screen_width:0,
	screen_height:0,
	container_x:0,
	wrapper_offset_left :0,
	wrapper_offset_top :0,
	container_y:0,	
	counter:0,
	objects:new Hash(),
	path_lighthouse:"m 134.09564,323.11529 h 15.87044 L 135.35637,107.43265 h 11.96571 c 4.18526,0 4.18526,-2.8955 4.18526,-2.8955 V 86.828803 h -5.76843 v 2.87615 h -13.40056 v -38.69267 h 8.00938 v -7.99004 l -46.002367,-21.41317 -46.17647,21.23583 v 7.98681 h 8.06097 v 38.69268 h -13.42635 v -2.87293 h -5.73942 V 104.3598 c 0,0 0,2.89228 4.2304,2.89228 h 11.91412 l -14.61293,215.70844 55.74646,0.0709 h 7.306467 v -54.90813 h 32.4438 l 0.003,54.99196 0,0 z",
	path_tree_1:"m 134.12224,60.686032 c -1.4678,-0.91301 -1.742,-1.75181 -0.7559,-3.15581 -1.9362,-0.0347 -2.6138,-0.63823 -2.2828,-2.57671 -1.9536,1.09734 -2.89848,0.85503 -3.75526,-1.27763 -0.3426,0.6278 -0.66433,1.08748 -0.99823,1.3924 -1.05154,-2.33092 -2.46076,-4.14013 -3.87172,-4.16331 -0.14492,-2.34599 1.31646,-2.91119 2.56975,-1.69617 -0.20173,-4.23866 -5.85194,-4.98356 -3.42538,-9.32599 -1.2069,-0.66607 -1.86426,-1.97326 -2.58308,-3.25611 0.062,-0.002 0.1229,-0.006 0.18667,-0.006 -0.92576,-1.41849 -0.65216,-2.25788 0.81561,-3.13263 -1.46777,-0.91301 -1.74137,-1.75123 -0.75475,-3.15523 -1.93616,-0.0365 -2.61381,-0.63765 -2.28281,-2.57671 -1.95412,1.09676 -2.89901,0.85445 -3.75579,-1.27821 -0.59244,1.09155 -1.13098,1.68457 -1.76921,1.81325 -1.35356,-1.0214 -3.23754,-2.03817 -2.70597,-3.66825 1.97673,-2.76685 -2.70308,-3.31639 -4.92909,-3.82014 -1.60456,-0.36288 -4.695446,-3.21204 -5.056586,9.2e-4 0,2.62539 -4.57837,3.8723 -4.57837,2.12397 -2.51933,-2.75583 -3.58536,-2.2718 -3.42653,-6.78176 -2.75757,-0.18667 -3.62362,1.49906 -6.8519,0.84692 -0.14319,-2.40106 -1.56979,-3.53204 -1.71355,-5.9331 -3.53493,1.48574 -4.2752,-1.45385 -5.99572,-2.5454 -0.28694,-0.18087 -1.36051,1.27183 -1.7147,0.84924 -0.1455,-0.17449 0.18318,-1.63414 0,-1.69674 -2.35875,-0.7965 -4.89836,-0.42549 -7.21537,-0.52984 -1.4295,-0.90257 -1.68804,-1.7379 -0.71244,-3.12857 -1.93615,-0.0348 -2.61496,-0.63649 -2.2828,-2.57555 -1.9547,1.09676 -2.89843,0.85503 -3.75521,-1.27820997 -1.16053,2.13323997 -2.10427,2.37496997 -4.0126,0.93155997 0.28521,2.28571 -0.3936,2.88741 -2.6654,2.63467 0.2255,0.2887 0.40173,0.55129 0.53389,0.79534 -1.41675,0.57678 -2.21034,0.13275 -2.93727,-1.6782 -1.15821,2.13267 -2.10368,2.37498 -4.01201,0.93156 0.28579,2.28513 -0.39246,2.88742 -2.6654,2.63352 1.3211,1.69385 1.05039,2.53266 -0.90432,3.45435 0.26434,0.11826 0.49564,0.2342 0.69911,0.35361 h -4.3349 c -1.06257,1.35879 -2.31818,2.47237 -3.35987,3.61087 -1.52574,0.68345 -2.35063,0.27593 -3.10712,-1.60631 -1.15763,2.13382 -2.10369,2.37498 -4.011427,0.93155 0.28463,2.28571 -0.39245,2.888 -2.66598,2.63353 1.32284,1.69326 1.05039,2.53207 -0.90373,3.45493 1.42081,0.63012 1.94774,1.24749 1.65152,2.19412 -3.10828,1.59355 -2.85032,3.22943 -1.30893,6.58408 -1.5356,0.1084 -1.80805,-1.03822 -3.42653,-0.84809 0.0724,1.20227 0.1397,2.40107 -0.8562,2.54367 -0.0191,0.93562 0.26028,1.57849 0.69794,2.06311 0.371,0.40984 -0.78895,0.30202 0.3026,1.73616 0.64751,0.84577 2.40164,-0.12058 2.9709,0.2997 0.5762,0.42549 1.02489,0.97851 1.1669,1.83645 -0.38607,0.084 -1.41964,0.69852 -2.60627,1.26835 -0.52288,0.25217 -0.88866,-1.50022 -2.53207,-0.22724 -1.15938,0.17798 -0.12463,1.20344 -0.58954,1.22605 -1.13735,0.0574 -1.98195,-0.48057 -1.98195,-2.26716 -1.27126,0.79128 -2.37614,1.74892 -3.39639,2.79003 -0.94141,0.95822 -3.32624,0.48809 -4.18766,1.52283 -3.3784096,3.52566 -0.20462,3.57784 -1.11995,4.56215 -0.54723,0.59012 -3.3372596,0.56867 -4.8473396,1.61327 1.33965,2.17904 -1.29213,2.87351 -1.86834,3.07639 -0.16869,2.94134 0.30376,6.51685 -2.56917,6.78234 2.05383,2.6967 2.28803,-0.63012 5.9957,1.69617 0.25855,2.2341 -1.18603,2.78191 -3.42653,2.54308 2.59527,3.88217 -2.87582,5.03574 -3.42653003,6.78234 -0.55998,1.77906 3.50711003,4.11114 0,5.08676 2.14658003,-0.14609 2.08050003,1.89905 3.42653003,2.54424 1.35299,-3.01495 -0.0394,-4.96502 2.57033,-7.631 2.34832,0.76693 -1.67123,3.12162 1.7124,3.39117 2.3378796,-1.35762 -1.82543,-5.00212 2.5720696,-5.08617 v 3.39175 c 5.46762,1.21617 6.36728,-2.08978 8.82226,-3.85782 0.42433,0.60288 0.23535,1.32632 -0.53564,2.38309 2.2005,-0.27245 2.87758,0.3281 2.66773,2.55063 1.83297,-1.3785 2.77728,-1.13735 3.92506,0.88923 0.86895,-2.02658 1.81268,-2.26773 3.69145,-1.22256 -0.25622,-1.8892 0.42201,-2.48975 2.299617,-2.51178 -0.4226,-0.64577 -0.59187,-1.17039 -0.51766,-1.63298 0.41678,-0.4394 0.79126,-0.92054 1.17038,-1.3982 0.0534,-0.0336 0.10492,-0.0673 0.16174,-0.10145 -0.0197,-0.0116 -0.0354,-0.0226 -0.0539,-0.0348 0.99937,-1.25153 2.06137,-2.44047 4.06592,-2.69321 -0.51476,-1.75124 -1.32401,-3.21089 -4.28273,-2.54425 5.2166,-3.92796 7.69708,8.49184 10.2796,12.71717 8.08315,3.06713 18.68389,9.10515 20.55917,18.65202 1.32343,6.74755 -2.49091,5.42297 -2.57091,13.983798 4.79807,0 5.88092,0.0365 12.84876,0 0.39245,-6.178318 -3.16335,-14.771018 2.5715,-22.461718 -0.65505,-2.0005 -1.68921,-5.85832 0,-7.63043 3.06248,0.35941 4.57141,2.25788 8.56603,1.69617 2.19005,1.21966 1.14952,-2.29963 1.71239,-2.54426 0.33217,-0.14318 0.69447,-0.19709 1.07823,-0.19709 -0.0742,0.11188 -0.15304,0.22956 -0.24173,0.34956 2.19991,-0.27304 2.87872,0.32868 2.66772,2.5512 1.83296,-1.37908 2.77727,-1.13735 3.92505,0.88982 0.86837,-2.02717 1.81385,-2.2689 3.69029,-1.22314 -0.25506,-1.8892 0.42375,-2.49092 2.30078,-2.51237 -0.92692,-1.41791 -0.65446,-2.25672 0.813286,-3.13146 -1.467746,-0.91301 -1.740206,-1.75124 -0.754746,-3.15524 -1.93557,-0.0359 -2.61496,-0.63766 -2.28164,-2.57787 -1.95471,1.09619 -2.90018,0.8562 -3.75579,-1.27705 -0.30665,0.56404 -0.59882,0.99243 -0.89794,1.2956 -2.07818,-1.83066 -3.72506,-3.96565 -6.54408,-2.87989 -0.0847,-3.75869 1.01503,-6.34409 4.28273,-6.78292 2.79003,0.0655 1.82949,3.84217 2.57148,5.93427 3.44856,2.37149 5.77891,-2.59236 8.565446,0.84865 4.58127,-2.92626 6.45076,-3.52797 7.70983,-6.78292 3.76102,-0.18027 0.0933,3.02366 0,4.23926 0.32289,0.1026 0.64114,0.22724 0.95475,0.36984 0.80518,0.36346 -0.20289,1.7095 1.48574,2.24687 0.76867,0.52926 2.41381,0.24694 3.20161,0.83011 0.83185,0.61447 -0.88055,1.46603 1.31705,3.03176 2.70656,1.45791 2.61961,-0.50607 3.33957,-0.20985 1.07649,0.44288 2.2347,0.74316 3.50479,0.81968 0.0231,0.29912 0.0145,0.64172 -0.0231,1.04112 1.83413,-1.37965 2.77844,-1.13735 3.92622,0.88982 0.8678,-2.02717 1.81268,-2.26947 3.68976,-1.22314 -0.2545,-1.8892 0.4225,-2.49091 2.2996,-2.51178 -0.9229,-1.42197 -0.6493,-2.2602 0.8191,-3.13554 z M 6.8154274,55.143642 c 0.37447,-1.04285 1.09618,-1.74138 2.5709,-1.69674 -0.37447,1.04286 -1.09734,1.74138 -2.5709,1.69674 z m 5.9962796,-8.47734 c 0.40404,-0.39941 1.14199,0 1.71355,0 0,0.56404 0.40404,1.29502 0,1.69385 -0.40288,0.40056 -1.14198,0 -1.71355,0 0,-0.56462 -0.40231,-1.2956 0,-1.69385 z m 0.85736,16.95584 c -2.12224,3.18713 -2.15354,-3.56971 0.85677,-2.54366 1.52632,2.27932 -3.77318,1.63877 -0.85677,2.54366 z m 0.85619,-3.39174 c -2.23991,0.23883 -3.68333,-0.30897 -3.42536,-2.54309 1.45501,0.31129 1.61557,-0.66142 1.71181,-1.69616 3.02422,0.29331 2.21382,2.22599 1.71355,4.23925 z m 72.813897,-35.60844 c 1.77965,0.47477 1.81501,1.32227 0.85736,2.54425 -0.57157,0 -1.71471,1.90485 -1.71471,0 -0.24173,-1.36981 0.80982,-1.45965 0.85735,-2.54425 z m -5.14123,20.3476 c 1.98716,-0.27072 3.28972,0.13565 4.2833,0.84808 -0.59244,1.67413 -2.28397,2.25962 -4.2833,2.54251 v -3.39059 z m -9.42225,0.84808 c 3.0654,-0.6933 4.25259,1.80514 2.56977,3.39116 2.57612,0.85621 1.51819,-1.88861 1.71296,-3.39116 1.39474,2.15759 6.28729,0.36984 5.99513,5.93483 -3.44276,1.84225 -7.68955,1.84225 -11.13404,0 2.05963,-1.9547 1.30718,-2.7338 0.85618,-5.93483 z m -2.5709,0.84866 c 3.9268,0.5652 -0.68693,5.13254 0,0 l 0,0 z m -24.84191,2.5425 c 2.49961,-1.24574 1.46719,4.90184 0,2.54425 -0.44867,-0.72286 0,-1.69616 0,-2.54425 z m 8.56604,-0.84865 c -0.37274,1.04459 -1.09561,1.74195 -2.56917,1.69674 -0.40057,-1.8092 1.22429,-1.61501 2.56917,-1.69674 z m -5.9957,2.54482 c 1.41327,-1.39937 4.33373,1.90833 5.9957,0 0,0.5652 0.40404,1.29503 0,1.69616 -1.4127,1.39821 -4.58185,1.39821 -5.9957,0 -0.40289,-0.40113 -0.40289,-1.29676 0,-1.69616 z m 11.99314,5.08618 h 2.56975 c -0.2823,1.98137 -1.02952,3.50305 -1.71355,5.08733 -1.89153,-0.10608 -0.36404,-3.59754 -0.8562,-5.08733 z m 0.8562,-29.67244 c -2.21789,-1.43763 1.32632,-4.27229 4.28389,-3.39175 1.30429,4.73198 -3.91406,2.40454 -4.28389,3.39175 z m 5.13892,31.3686 c -1.36517,0.6249 0.19651,4.14997 -2.56859,3.39175 -0.24116,-2.21847 0.31245,-3.64739 2.56859,-3.39175 z m 0.85793,4.23809 c 1.38372,-0.23883 1.47415,0.8017 2.56976,0.84866 0.33969,1.644 -3.90245,1.23821 -2.56976,-0.84866 z m -45.401657,-15.2591 c 2.99119,3.15524 -2.33614,4.30128 0,0 l 0,0 z m 14.563477,5.93426 c 0.69156,-0.3397 1.14256,0 1.71239,0 0.11652,-1.6411 -1.19589,-5.08444 2.57092,-5.08734 -1.68168,1.58602 -0.49564,4.0839 2.57032,3.39175 -0.78779,1.4811 -2.67873,1.87123 -5.14065,1.69616 0,0.56461 0.11883,0.76113 -0.28405,1.16054 -0.40463,0.39883 -1.02547,0.93387 -1.42836,0.53447 -0.40461,-0.39998 -0.84053,-1.63355 -5.4e-4,-1.69558 z m 0,2.54308 c 2.65844,0.0875 2.44454,-2.66829 5.9957,-1.69674 0.84808,3.3819 -2.55989,2.5541 -1.71239,5.93542 -1.35183,-1.48632 -3.93434,-1.75877 -4.28331,-4.23868 z m 6.85306,2.54367 c 2.32454,0.77041 -0.87301,2.97031 -0.85736,4.23867 -2.59294,-1.0359 0.60577,-3.23581 0.85736,-4.23867 z m -1.71355,5.93483 c 2.73669,-4.89487 8.20025,2.0005 10.27901,-1.69674 -1.45444,4.26592 2.71409,2.96626 4.28446,4.23925 -3.39232,8.46343 -12.35834,3.70769 -14.56347,-2.54251 z m 29.12405,21.19452 c -6.95277,-1.59645 -5.60267,-11.40998 -14.56058,-11.02159 1.5895,-5.48963 3.39581,-10.76827 10.27727,-11.02101 0.1084,2.9338 -4.45895,1.23764 -5.13892,3.39059 2.45729,2.84569 4.5604,3.8184 9.42223,2.54425 -2.67062,5.43921 6.62699,11.32419 0,16.10776 z m 5.14067,-29.67302 c -1.80689,2.32107 -2.02369,2.99409 -2.56977,5.08618 -3.1987,0.33795 -5.02588,-0.67824 -5.14007,-3.39117 2.25903,0.25738 2.21034,-1.76921 2.56917,-3.39233 3.22827,-0.65041 4.09433,1.03532 6.85363,0.84866 1.56226,0.65911 -0.51243,0.91243 -1.71296,0.84866 z m 7.70809,3.39117 c 0.66664,-2.9193 -0.47592,-4.04911 -3.42537,-3.39117 -1.33154,-3.01379 2.90945,-0.51186 2.57034,-2.54308 2.27526,0.291 2.89089,2.22425 3.42595,4.23867 -0.87127,0.55012 -0.88519,1.94949 -2.57092,1.69558 z m 1.71529,-7.62984 c 2.0179,0.0185 2.52106,-1.4608 5.13835,-0.84808 1.28922,4.36968 -6.1441,6.26468 -5.13835,0.84808 z m 29.981406,-0.84808 c -1.27241,-1.0017 -3.82767,-0.7333 -3.42654,-3.39059 1.273,1.00112 3.82768,0.73273 3.42654,3.39059 z",
	path_island:"m 380.69326,377.17876 c 0,0 26.4496,-19.32162 59.30674,-20.75019 32.85714,-1.42857 172.85714,0 181.42857,-15.71428 C 630,325 732.85714,323.57143 737.14286,345 c 4.28571,21.42857 41.42857,15.71429 45.71428,21.42857 4.28572,5.71429 2.85715,24.28572 2.85715,24.28572 l -418.57143,2.52538 z",
	path_sea:"m 0.99999064,384.86221 877.14287936,0 0,32 -877.14287936,0 z",
	path_seagull:"m 167.70736,270.90067 c -5.41989,-1.82481 -10.87445,-3.5462 -16.35618,-5.1757 -1.29379,-0.047 -2.42877,0.68741 -3.63762,1.03277 -1.27808,0.48085 -2.54574,1.03499 -3.90302,1.25249 -0.92567,-0.18647 -1.8267,-0.59005 -2.79375,-0.44345 -1.09733,-0.0446 -2.18109,0.77684 -3.21694,0.16178 -3.81208,-1.58529 -8.25751,-2.0425 -12.15202,-0.46843 -2.71248,0.98877 -5.34576,2.18709 -8.0372,3.22296 -0.66356,-0.0178 -0.60851,0.87903 0.0903,0.53954 0.93132,-0.15097 2.05506,-1.0416 2.84652,-0.76237 0.88889,0.26585 1.78689,-0.44239 2.68393,-0.53455 4.05089,-1.17062 8.24525,-2.44353 12.50961,-1.96403 0.91316,0.16635 1.82561,0.47212 2.59875,0.98931 0.43898,0.81204 0.16365,1.84497 0.7512,2.62519 -0.0222,0.64363 0.17094,1.36428 0.919,1.34056 0.43428,0.5474 -1.35379,1.35558 -0.11263,1.50993 0.96916,0.0832 2.24893,-1.05044 2.9845,-0.0669 0.22991,0.71499 0.49439,1.92416 1.53255,1.45983 1.14462,-0.26624 -0.81288,-1.84769 0.70549,-1.58908 1.38282,-0.21099 2.39169,-1.28937 3.4328,-2.12748 0.79041,-0.73368 1.54541,-1.56852 1.9039,-2.60503 -0.61453,-0.64174 -1.43891,0.38351 -2.17168,0.36383 -0.99693,0.28827 -2.02683,0.50073 -3.06887,0.49361 -0.95128,-0.56093 0.5939,-1.10018 1.12345,-1.10345 2.52405,-0.81207 5.09938,-1.79265 7.7925,-1.67228 1.60143,0.31214 3.05883,1.09045 4.60128,1.59546 3.30761,1.26756 6.62262,2.54157 10.02525,3.52663 0.63977,0.35596 2.56162,-0.37986 1.19535,-0.8205 -0.74843,-0.2613 -1.50035,-0.51146 -2.24644,-0.7806 z m 2.07644,1.35572 c 0.0561,0.12353 -0.11922,-0.0302 0,0 z m -26.51379,1.32997 c 0.72831,-0.19894 0.46396,1.29152 -9.9e-4,0.41462 -0.10922,-0.0971 -0.1929,-0.3587 9.9e-4,-0.41462 z",
	path_sailboat_left:"m 430.92015,232.86115 0,590.93747 -36.54007,0 c -11.54961,0 -21.01979,11.9513 -22.34746,27.44252 l 129.95508,15.71116 0,-8.81802 c 0,-17.27003 -10.03933,-34.33566 -22.50429,-34.33566 l -36.38324,0 0,-554.41682 c -3.93733,-12.28647 -7.99263,-24.42901 -12.18002,-36.52065 z m 19.23711,49.81271 0,52.49194 c 45.55778,-5.59165 86.93634,-23.29907 124.33555,-52.49194 l -124.33555,0 z m -26.2942,99.15722 c -25.72032,29.18765 -88.55031,59.09763 -109.51685,89.74092 22.85511,9.91597 85.66517,18.43313 109.51685,25.46561 l 0,-115.20653 z m -115.0841,98.01269 c -21.09284,31.60728 -39.6599,63.99147 -55.67264,97.15431 42.02176,20.86225 125.2377,36.72848 170.75674,47.47164 l 0,-116.74123 c -25.79049,-7.60418 -90.45849,-16.91054 -115.0841,-27.88472 z m 141.3783,43.49184 0,63.41692 c 12.34659,-3.50189 35.84084,-7.3815 47.92137,-11.65332 -11.14838,-17.61197 -34.62145,-34.88824 -47.92137,-51.7636 z m 53.35796,60.50359 c -13.852,5.04701 -39.15389,9.60182 -53.35796,13.63022 l 0,116.40307 c 31.03984,-6.99365 72.52899,-16.35437 101.94735,-28.04078 -12.46547,-35.2762 -28.67624,-69.26619 -48.58939,-101.99251 z m -254.5386,1.82083 c -13.61136,29.11346 -25.26543,58.82545 -34.94569,89.14265 53.79369,31.53403 150.01778,54.47621 209.83213,68.59328 l 0,-108.23536 C 376.85327,624.06506 292.25689,607.54523 248.97662,585.66003 z m -37.76853,98.16876 c -11.35226,37.19922 -19.76368,75.30231 -25.17029,114.32213 l 237.82526,0 0,-44.06409 C 363.00322,739.72233 265.83614,716.22117 211.20809,683.82879 z m 344.13755,11.3932 c -30.43963,12.29524 -73.00548,22.06378 -105.18838,29.31537 l 0,73.61356 128.37225,0 C 574.13664,762.70305 566.3714,728.39895 555.34564,695.22199 z M 39.59123,833.03283 c 0,0 75.93477,23.19036 83.43053,41.2288 l 532.10487,34.17959 c 2.94836,-14.7667 6.07703,-29.66531 12.04934,-43.67392 3.31122,-6.62004 12.41526,-17.27187 12.41526,-17.27187 0,0 -16.39241,6.80661 -21.82472,13.37009 -5.06886,6.12436 -11.24435,21.28486 -13.01641,28.37894 L 39.59123,833.03283 z m 90.40921,57.35615 c 10.13051,22.31621 23.24366,46.83927 36.80144,60.1654 17.21724,16.9231 64.9514,32.3068 64.9514,32.3068 l 356.04346,0 c 0,0 45.99574,-32.8637 60.42963,-56.26368 1.728,-2.80141 3.28828,-6.57085 4.65245,-10.63886 L 130.00044,890.38898 z",
	path_sailboat_right:"m 288.26231,232.86115 0,590.93747 36.54007,0 c 11.54961,0 21.01979,11.9513 22.34746,27.44252 l -129.95508,15.71116 0,-8.81802 c 0,-17.27003 10.03933,-34.33566 22.50429,-34.33566 l 36.38324,0 0,-554.41682 c 3.93733,-12.28647 7.99263,-24.42901 12.18002,-36.52065 z m -19.23711,49.81271 0,52.49194 c -45.55778,-5.59165 -86.93634,-23.29907 -124.33555,-52.49194 l 124.33555,0 z m 26.2942,99.15722 c 25.72032,29.18765 88.55031,59.09763 109.51685,89.74092 -22.85511,9.91597 -85.66517,18.43313 -109.51685,25.46561 l 0,-115.20653 z m 115.0841,98.01269 c 21.09284,31.60728 39.6599,63.99147 55.67264,97.15431 -42.02176,20.86225 -125.2377,36.72848 -170.75674,47.47164 l 0,-116.74123 c 25.79049,-7.60418 90.45849,-16.91054 115.0841,-27.88472 z m -141.3783,43.49184 0,63.41692 c -12.34659,-3.50189 -35.84084,-7.3815 -47.92137,-11.65332 11.14838,-17.61197 34.62145,-34.88824 47.92137,-51.7636 z m -53.35796,60.50359 c 13.852,5.04701 39.15389,9.60182 53.35796,13.63022 l 0,116.40307 c -31.03984,-6.99365 -72.52899,-16.35437 -101.94735,-28.04078 12.46547,-35.2762 28.67624,-69.26619 48.58939,-101.99251 z m 254.5386,1.82083 c 13.61136,29.11346 25.26543,58.82545 34.94569,89.14265 -53.79369,31.53403 -150.01778,54.47621 -209.83213,68.59328 l 0,-108.23536 c 47.00979,-11.09554 131.60617,-27.61537 174.88644,-49.50057 z m 37.76853,98.16876 c 11.35226,37.19922 19.76368,75.30231 25.17029,114.32213 l -237.82526,0 0,-44.06409 c 60.85984,-14.3645 158.02692,-37.86566 212.65497,-70.25804 z m -344.13755,11.3932 c 30.43963,12.29524 73.00548,22.06378 105.18838,29.31537 l 0,73.61356 -128.37225,0 c 4.39287,-35.44787 12.15811,-69.75197 23.18387,-102.92893 z m 515.75441,137.81084 c 0,0 -75.93477,23.19036 -83.43053,41.2288 L 64.05583,908.44122 C 61.10747,893.67452 57.9788,878.77591 52.00649,864.7673 48.69527,858.14726 39.59123,847.49543 39.59123,847.49543 c 0,0 16.39241,6.80661 21.82472,13.37009 5.06886,6.12436 11.24435,21.28486 13.01641,28.37894 l 605.15887,-56.21163 z m -90.40921,57.35615 c -10.13051,22.31621 -23.24366,46.83927 -36.80144,60.1654 -17.21724,16.9231 -64.9514,32.3068 -64.9514,32.3068 l -356.04346,0 c 0,0 -45.99574,-32.8637 -60.42963,-56.26368 -1.728,-2.80141 -3.28828,-6.57085 -4.65245,-10.63886 l 522.87838,-25.56966 z",
	path_smallhouse:"M 185.78125 6.25 L 129.84375 62.0625 L 129.15625 82.65625 L 69.59375 122.1875 L 6.25 185.40625 L 37.84375 185.40625 L 37.84375 171.375 L 337.28125 171.375 L 337.28125 185.40625 L 369.65625 185.40625 L 185.78125 6.25 z M 337.28125 185.40625 L 37.84375 185.40625 L 37.84375 381.53125 L 337.28125 381.53125 L 337.28125 185.40625 z M 69.59375 122.1875 L 129.84375 62.0625 L 131.46875 13.40625 L 63.25 13.40625 L 63.25 126.40625 L 69.59375 122.1875 z M 196.1875 217.8125 L 294.09375 217.8125 L 294.09375 379.53125 L 196.1875 379.53125 L 196.1875 217.8125 z M 76.71875 236.375 L 154.46875 236.375 L 154.46875 314.09375 L 76.71875 314.09375 L 76.71875 236.375 z",
	pos_seagull:Array(0,0,1,1),
	pos_seagull_start:0,
	pos_sailboat:Array(0,0,1,1),
	debug:true,
	initialize: function(){
		
		dimension = document.viewport.getDimensions();
		
		c_offset = $("wrapper").cumulativeOffset();
		
		this.wrapper_offset_left = c_offset.left;
		this.wrapper_offset_top = c_offset.top;
		
		this.screen_width = 877;
		this.screen_height = 418;
		this.container_x = 0;
		this.container_y = 60;		
		
		this.paper = Raphael(c_offset.left-55, c_offset.top, this.screen_width, this.screen_height);
		
		//console.log($("wrapper"));
		
		//wrapper_pos = $("wrapper").positionedOffset();
		
		//console.log(wrapper_pos);
		
		
		//console.log(this.paper);
		
	},
	stage:function(){
		
		this.objects.set("background",this.paper.rect(0,0,this.screen_width,this.screen_height));
		//this.objects.get("background").translate(this.wrapper_offset_left,this.wrapper_offset_top = c_offset.top); 
		this.objects.get("background").attr({fill:"lightblue"});
		
		
		
		this.objects.set("sea",this.paper.path(this.path_sea));
		//this.objects.get("sea").translate(this.wrapper_offset_left,this.wrapper_offset_top = c_offset.top);
		this.objects.get("sea").scale(1,1);
		this.objects.get("sea").translate(0,0);
		this.objects.get("sea").attr({fill:"blue"});		
		
		this.objects.set("island_1",this.paper.path(this.path_island));
		//this.objects.get("island_1").translate(this.wrapper_offset_left,this.wrapper_offset_top = c_offset.top);
		this.objects.get("island_1").scale(1,1);
		this.objects.get("island_1").translate(0,0);
		this.objects.get("island_1").attr({fill:"green"});
		
		this.objects.set("lighthouse",this.paper.path(this.path_lighthouse));
		//this.objects.get("lighthouse").translate(this.wrapper_offset_left,this.wrapper_offset_top = c_offset.top);
		this.objects.get("lighthouse").scale(0.7,0.7);
		this.objects.get("lighthouse").translate(600,100);
		this.objects.get("lighthouse").attr({fill:"black"});
		
		this.objects.set("tree_1",this.paper.path(this.path_tree_1));
		//this.objects.get("tree_1").translate(this.wrapper_offset_left,this.wrapper_offset_top = c_offset.top);
		this.objects.get("tree_1").scale(0.7,0.7);
		this.objects.get("tree_1").translate(500,280);		
		this.objects.get("tree_1").attr({fill:"black"});
		
		this.objects.set("seagull_1",this.paper.path(this.path_seagull));
		//this.objects.get("seagull_1").translate(this.wrapper_offset_left,this.wrapper_offset_top = c_offset.top);
		this.objects.get("seagull_1").scale(0,0);
		this.objects.get("seagull_1").translate(0,-150);		
		this.objects.get("seagull_1").attr({fill:"black"});		
		
		this.objects.set("sailboat_left",this.paper.path(this.path_sailboat_left));
		//this.objects.get("sailboat_left").translate(this.wrapper_offset_left,this.wrapper_offset_top = c_offset.top);
		this.objects.get("sailboat_left").scale(0.12,0.12);
		this.objects.get("sailboat_left").translate(-120,-258);
		this.objects.get("sailboat_left").attr({fill:"black"});	
		
		this.objects.set("sailboat_right",this.paper.path(this.path_sailboat_right));
		//this.objects.get("sailboat_right").translate(this.wrapper_offset_left,this.wrapper_offset_top = c_offset.top);
		this.objects.get("sailboat_right").scale(0.12,0.12);
		this.objects.get("sailboat_right").translate(-120,-258);
		this.objects.get("sailboat_right").attr({fill:"black"});	
		this.objects.get("sailboat_right").hide();
		
		
		this.objects.set("smallhouse",this.paper.path(this.path_smallhouse));
		//this.objects.get("smallhouse").translate(this.wrapper_offset_left,this.wrapper_offset_top = c_offset.top);
		this.objects.get("smallhouse").scale(0.11,0.11);
		this.objects.get("smallhouse").translate(280,150);
		this.objects.get("smallhouse").attr({fill:"black"});			
		
		this.pos_seagull_start = this.objects.get("seagull_1");
		
		var x = this.pos_seagull_start._.tx;

		this.pos_seagull_start = x;
		
		this.pos_seagull[1] = 1;	
	},
	animate:function(){
		
		this.counter++;
		
		// Move Seagull
		
		var mod = this.counter % 20;
		 		
		if(mod >= 10)this.pos_seagull[0] =  5;
		
		if(mod < 10)this.pos_seagull[0] =  -5;
		
		this.objects.get("seagull_1").translate(this.pos_seagull[0],0);
		
		// Zoom Seagull
		
		var mod2 = this.counter % 10;
		
		if(mod2 >= 5)this.pos_seagull[1] +=  0.2;
		
		if(mod2 < 5)this.pos_seagull[1] +=  -0.2;
		
		this.objects.get("seagull_1").scale(this.pos_seagull[1]);
		
		// Move Seagull
		
		var mod = this.counter % 60;
		 		
		if(mod >= 30)this.pos_sailboat[0] =  5;
		
		if(mod < 30)this.pos_sailboat[0] =  -5;
		
		if(mod>=30){
			this.objects.get("sailboat_right").translate(this.pos_sailboat[0],0);
			this.objects.get("sailboat_left").translate(this.pos_sailboat[0],0);
			
			this.objects.get("sailboat_right").show();
			this.objects.get("sailboat_left").hide();
		}
		
		if(mod<=30){
			this.objects.get("sailboat_right").translate(this.pos_sailboat[0],0);
			this.objects.get("sailboat_left").translate(this.pos_sailboat[0],0);
			
			this.objects.get("sailboat_right").hide();
			this.objects.get("sailboat_left").show();
		}		
		
		// Start Animation Loop
		
		setTimeout("movie.animate()",100);
	}
	

});
