var yi_stl; // namespace
if (!yi_stl) yi_stl = {};

yi_stl.eruvdata = 
[
 [-90.32516956329346, 38.681355735600164],
 [-90.32079219818115, 38.67889335730243],
 [-90.31755208969116, 38.677787772141315],
 [-90.31529903411865, 38.677033954285235],
 [-90.31102895736694, 38.67527501508016],
 [-90.30954837799072, 38.6746384359539],
 [-90.30961275100708, 38.674420657584754],
 [-90.30937671661377, 38.67433689649713],
 [-90.30982732772827, 38.67153921986481],
 [-90.31079292297363, 38.66525661345267],
 [-90.30401229858398, 38.66456968171975],
 [-90.30407667160034, 38.663798969979986],
 [-90.30401229858398, 38.663547649140945],
 [-90.30444145202637, 38.66140300877084],
 [-90.30523538589478, 38.655773022224615],
 /* the parkview addition */
 [-90.30527830123901, 38.65547140331351],
 [-90.29997825622559, 38.65496870230603],
 [-90.30085802078247, 38.64958958070073],
 [-90.30326128005981, 38.64979067662611],
 [-90.30699491500854, 38.65019286678358],
 /* Wash U adjustment 2010 */
/* 0 */ [-90.3070592880249, 38.65014678260923] ,
/* 1 */ [-90.30704319477081, 38.64995406664988] ,
/* 2 */ [-90.30595421791077, 38.6498158135771] ,
/* 3 */ [-90.30540704727173, 38.649773918653885] ,
/* 4 */ [-90.30542314052582, 38.64952673810829] ,
/* 5 */ [-90.30502080917358, 38.64948903252639] ,
/* 6 */ [-90.30517101287842, 38.64937591566155] ,
/* 7 */ [-90.30526220798492, 38.64917481857201] ,
/* 8 */ [-90.30525147914886, 38.649116165147916] ,
/* 9 */ [-90.30519247055054, 38.648885740516924] ,
/* 10 */ [-90.30521392822266, 38.64861760910435] ,
/* 11 */ [-90.30518174171448, 38.64847516388328] ,
/* 12 */ [-90.3049336373806, 38.64844897906919] ,
/* 13 */ [-90.30499264597893, 38.6480352577364] ,
/* 14 */ [-90.30505031347275, 38.64757440078084] ,
/* 15 */ [-90.30487596988678, 38.647443474968725] ,
/* 16 */ [-90.30483573675156, 38.647343971191496] ,
/* 17 */ [-90.30453532934189, 38.64715438992825] ,
/* 18 */ [-90.30424699187279, 38.646980519378424] ,
/* 19 */ [-90.30402168631554, 38.64674380337336] ,
/* 20 */ [-90.30387550592422, 38.64664534604361] ,
/* 21 */ [-90.30314594507217, 38.6465772637684] ,
/* 22 */ [-90.30317008495331, 38.6464484309783] ,
/* 23 */ [-90.30328541994095, 38.64630493402067] ,
/* 24 */ [-90.30337125062943, 38.64625884734559] ,
/* 25 */ [-90.30319422483444, 38.64604621980165] ,
/* 26 */ [-90.30320629477501, 38.645931002642335] ,
/* 27 */ [-90.303293466568, 38.645376910261135] ,
/* old Wash U eastern edge
 [-90.3070592880249, 38.64995825613276],
 [-90.30542850494385, 38.649606338716076],
 [-90.30557870864868, 38.6491203546798],
 [-90.30590057373047, 38.64908683841784],
 [-90.30598640441895, 38.648701400278576],
 [-90.30555725097656, 38.648550576094436],
 [-90.30568599700928, 38.64804782652092],
 [-90.3061580657959, 38.64803106814106],
 [-90.30630826950073, 38.64751155642089],
 [-90.30693054199219, 38.64756183191327],
 [-90.30697345733643, 38.647260178429825],
 [-90.30652284622192, 38.64714286839884],
 [-90.30647993087769, 38.64695852367642],
 [-90.30624389648438, 38.64695852367642],
 [-90.30628681182861, 38.64669038505167],
 [-90.30538558959961, 38.646589832808715],
 [-90.30407667160034, 38.64643900417968],
 [-90.30255317687988, 38.64627141644173],
 [-90.30272483825684, 38.64620438123679],
 [-90.30272483825684, 38.64598651638765],
 [-90.3026819229126, 38.64590272203855],
 [-90.30270338058472, 38.645701615200835],
 [-90.30281066894531, 38.645567543662125],
 [-90.30298233032227, 38.645450230859986],
 */
 [-90.30740261077881, 38.64590272203855],
 [-90.30759572982788, 38.6462211400439],
 [-90.30802488327026, 38.64627141644173],
 [-90.30869007110596, 38.64615410479195],
 [-90.30899047851562, 38.64607031063882],
 [-90.30920505523682, 38.64548374882307], 
 [-90.31038522720337, 38.645584302618204],
 [-90.31042814254761, 38.64521560467955],
 [-90.31077146530151, 38.6430536558647],
 [-90.31107187271118, 38.64079108144544],
 [-90.30776739120483, 38.64047263931151],
 [-90.30800342559814, 38.63939998171362],
 [-90.31407594680786, 38.63998659332658],
 [-90.31729459762573, 38.64038883851479],
 [-90.31763792037964, 38.64030503762008],
 [-90.31810998916626, 38.638377589997916],
 [-90.32021284103394, 38.63851167498826],
 [-90.32032012939453, 38.63819322272663],
 [-90.32102823257446, 38.63807589785253],
 [-90.32089948654175, 38.63765687887726],
 [-90.32083511352539, 38.63673502850912],
 [-90.32081365585327, 38.63614839028378],
 [-90.32085657119751, 38.63577964379899],
 [-90.32089948654175, 38.63547794071871],
 [-90.32044887542725, 38.635444418075835],
 [-90.3205132484436, 38.63505890655611],
 [-90.32225131988525, 38.63534385005318],
 [-90.32534122467041, 38.6358466887555],
 [-90.32549142837524, 38.63556174725727],
 [-90.32570600509644, 38.635544985957395],
 [-90.32686471939087, 38.63326541266257],
 [-90.32752990722656, 38.63328217449545],
 [-90.32798051834106, 38.63324865082574],
 [-90.32843112945557, 38.633064270362155],
 [-90.32875299453735, 38.6328296036317],
 [-90.32896757125854, 38.63259493613311],
 [-90.32916069030762, 38.63229321964905],
 [-90.32999753952026, 38.63200826402595],
 [-90.33285140991211, 38.63044936910002],
 [-90.3331732749939, 38.630499656562186],
 [-90.33334493637085, 38.63039908160256],
 [-90.33364534378052, 38.63041584410563],
 [-90.33428907394409, 38.63038231909558],
 [-90.3347396850586, 38.630332031551106],
 /* BSKI reattachment (summer 08)  
[-90.33469676971436, 38.63096900450827],
[-90.33510446548462, 38.630801380594534],
[-90.33516883850098, 38.63029850650185],
[-90.33568382263184, 38.630114118450784],
[-90.33669233322144, 38.63009735587716],
[-90.34252882003784, 38.630080593299624],
[-90.34321546554565, 38.63021469381014],
[-90.34375190734863, 38.63071756849072],
[-90.34398794174194, 38.631274917140566],
[-90.34418106079102, 38.63200826402595],
[-90.34423470497131, 38.63255722164207],
[-90.34408450126648, 38.63260750762573],
[-90.34399330615997, 38.63292598470324],
[-90.34338176250458, 38.6328296036317],
[-90.34302771091461, 38.632687127027744],
[-90.34267902374268, 38.63251950713115],
[-90.34249126911163, 38.63243150652853],
[-90.34235179424286, 38.63260750762573],
[-90.34211039543152, 38.63305169894963],
[-90.34219086170197, 38.63316065111818],
[-90.3427916765213, 38.63334503133389],
[-90.3426468372345, 38.63370959991001],
[-90.34254491329193, 38.63404064333274],
[-90.34250736236572, 38.63433816206653],
[-90.3423947095871, 38.63479491377597],
[-90.34211039543152, 38.63476139081369],
[-90.34141838550568, 38.634069976220516],
[-90.34132182598114, 38.63421245007612],
[-90.34143447875977, 38.63452253925364],
/* end BSKI reattachment */
 /* restored with the I-64/I-170 changes
 [-90.33481478691101, 38.63070080605819],
 [-90.3349757194519, 38.63060861260923],
 [-90.33498644828796, 38.63046613159133],
 [-90.33526539802551, 38.630306887765634],
 [-90.33573746681213, 38.630114118450784],
 [-90.33600568771362, 38.62998001775214],
 [-90.33624172210693, 38.6299213486176],
 [-90.3369927406311, 38.62987944206356],
 [-90.33728241920471, 38.62981239152611], /* intersection of 40 with metrolink */
 
 /* along metrolink to clayton */
 [-90.33458948135376, 38.63061699383678],
 [-90.33465385437012, 38.63153892288347],
 [-90.33514738082886, 38.631605971806245],
 [-90.33510446548462, 38.63128748886465],
 [-90.33851623535156, 38.631371300302234],
 [-90.33817291259766, 38.63061699383678],
 [-90.33802270889282, 38.630080593299624],
 [-90.33883810043335, 38.63009735587716],
 [-90.3391170501709, 38.63003030554353],
 [-90.34014701843262, 38.63006383071817],
 [-90.34162759780884, 38.63006383071817],
 [-90.34274339675903, 38.63031526902843],
 [-90.34347295761108, 38.63081814300356],
 [-90.34392356872559, 38.63153892288347],
 [-90.34411668777466, 38.63264522209034],
 [-90.34383773803711, 38.63276255585335],
 [-90.34366607666016, 38.6333324599706],
 [-90.34340858459473, 38.63298046090374],
 [-90.3425931930542, 38.632846365566515],
 [-90.34240007400513, 38.633617410330274],
 [-90.34263610839844, 38.63370121904403],
 [-90.3422498703003, 38.63452253925364],
 [-90.34143447875977, 38.63422083088236],
 [-90.34119844436646, 38.63448901616399],
 /* double-listing metrolink border with the next section */
 /*[-90.34154176712036, 38.63502538371729], 
 [-90.34194946289062, 38.63520975913683],
 [-90.34242153167725, 38.63606458443107],
 [-90.34278631210327, 38.63690263854882],
 [-90.34310817718506, 38.63762335725342],
 [-90.34321546554565, 38.63785800829109], */
/* end metrolink */
 /* Going around the Galleria to avoid I-170-40 interchange
 [-90.33840894699097, 38.6298710607498],
 [-90.33849477767944, 38.629912967308755],
 [-90.33854842185974, 38.62977886623389],
 [-90.34123063087463, 38.62983753548501],
 [-90.34232497215271, 38.629896204688116],
 [-90.34285068511963, 38.6300219242474],
 [-90.34322619438171, 38.63022307508374],
 [-90.3434944152832, 38.630499656562186],
 [-90.34374117851257, 38.63092709856657],
 [-90.34391283988953, 38.63129587001284],
 [-90.34408450126648, 38.631647877351114],
 [-90.3441596031189, 38.63205855039467],
 [-90.34419178962708, 38.63239379195151],
 [-90.34459948539734, 38.63242731602095],
 [-90.34457802772522, 38.63227645758493],
 [-90.34454584121704, 38.63184902362556],
 [-90.3445565700531, 38.631371300302234],
 [-90.3445565700531, 38.631044435141604],
 [-90.34502863883972, 38.63105281631819],
 [-90.34558653831482, 38.6309438609462],
 [-90.34598350524902, 38.63097738569369],
 [-90.34642338752747, 38.631203677329104],
 [-90.3467345237732, 38.63130425116001],
 [-90.34767866134644, 38.63135453802255],
 [-90.34766793251038, 38.63184064254205],
 [-90.34841895103455, 38.632083693565804],
 [-90.34841895103455, 38.63260331712843],
 [-90.34875154495239, 38.63274579389897],
 [-90.3489875793457, 38.6329385561378],
 [-90.34924507141113, 38.63322350806319],
 [-90.34930944442749, 38.63357550593663],
 [-90.34913778305054, 38.63605620384042], 
 [-90.34930944442749, 38.63614839028378],
 [-90.34958839416504, 38.633843693632535],
  [-90.33478260040283, 38.63113662803011],
[-90.33510446548462, 38.631388062578004],
[-90.3385591506958, 38.631455111641834],
[-90.33887028694153, 38.63191607225831],
[-90.3400719165802, 38.633114555990154],
[-90.34087657928467, 38.63388559786938],
[-90.3411877155304, 38.63416216521825],
[-90.34130573272705, 38.634329781274026],
[-90.34141570329666, 38.634547681560605],
[-90.34139961004257, 38.634593775767115],
 /* end going around the galleria */
 /* along  Clayton Road  */
[-90.34145057201385, 38.63460215652875],
[-90.34166514873505, 38.63484729337316],
[-90.34187704324722, 38.63507776314607],
[-90.34204870462418, 38.63525585291762],
[-90.34225255250931, 38.63551774883674],
[-90.34242689609528, 38.63579221473313],
[-90.34257978200912, 38.636062489283496],
[-90.34266024827957, 38.636276194020496],
[-90.34271389245987, 38.63633695309408],
[-90.34283459186554, 38.63670988696938],
[-90.34292042255402, 38.63693616050973],
[-90.34305989742279, 38.63727556948094],
[-90.34310013055801, 38.63738661033868],
[-90.34315645694733, 38.63737822990258],
[-90.34323692321777, 38.63751441186766],
[-90.34328788518906, 38.63764430827016],
[-90.3433308005333, 38.63776791914426],
[-90.34357488155365, 38.63779515540989],
[-90.34396648406982, 38.637830772049355],
[-90.34404426813126, 38.63787895923926],
[-90.34430980682373, 38.637914575837044],
[-90.34477651119232, 38.637958572786374],
[-90.34510105848312, 38.637989999162194],
[-90.34575551748276, 38.638036091155165],
[-90.34605324268341, 38.6380507567831],
[-90.34712612628937, 38.63813665540059],
[-90.34760892391205, 38.63816598661227],
[-90.34841895103455, 38.638233029336725],
[-90.34915924072266, 38.63843206205552],
[-90.34916192293167, 38.63839644571485],
 /* end Clayton road border */
/* back to 40 */
[-90.34922361373901, 38.63812198979026],
[-90.34926116466522, 38.63781610637643],
[-90.34930676221848, 38.63753326781166],
[-90.3493121266365, 38.63713310171345],
[-90.3493469953537, 38.63659255966724],
[-90.34936845302582, 38.63595563667608],
[-90.3494194149971, 38.63497719460901],
[-90.34948915243149, 38.63421245007612],
[-90.34954279661179, 38.63366560035265],
[-90.34956157207489, 38.63322350806319],
[-90.34956157207489, 38.63322350806319],
[-90.34958839416504, 38.63312922262503],
[-90.34959375858307, 38.633062175126895],
[-90.3496178984642, 38.632972079952516],
[-90.34963399171829, 38.632894556107196],
[-90.34963667392731, 38.63283588935772],
[-90.34965008497238, 38.63278350829083],
[-90.34966349601746, 38.632674555549094],
[-90.34965008497238, 38.63253626913845],
[-90.34965008497238, 38.63239379195151],
[-90.34965008497238, 38.6322576002581],
[-90.34968763589859, 38.63206902671704],
[-90.34981906414032, 38.631790356020495],
/* end I-64/I-170 intersection changes */
/* the eruv along Clayton Road 
[-90.34903317689896, 38.6383419736302],
[-90.34919947385788, 38.63844463252446],
 [-90.34930408000946, 38.63849281930165],
 [-90.34954279661179, 38.638561956794966],
 [-90.34974664449692, 38.6386331892941],
 [-90.34993708133698, 38.63869813651102],
 [-90.35020798444748, 38.63877984421643],
 [-90.35043597221375, 38.63884898143288],
 [-90.35068541765213, 38.6389160235185],
 [-90.35099655389786, 38.639001921099],
 [-90.35136133432388, 38.63908991363573],
 [-90.35159200429916, 38.63913600492139],
 [-90.35191923379898, 38.63918419123377],
 [-90.3524261713028, 38.63925123300581],
 [-90.35284996032715, 38.6393036093466],
 [-90.3532013297081, 38.63933922523647],
 [-90.35404622554779, 38.639429312408296],
 [-90.35446733236313, 38.639490068809096],
 [-90.35471677780151, 38.63950682918645],
 [-90.35518079996109, 38.63956968056666],
 [-90.35559922456741, 38.63963043684845],
 [-90.35598546266556, 38.639689098037195],
 [-90.35637438297272, 38.63976242445557],
 [-90.35696983337402, 38.639881841604975],
 [-90.35738289356232, 38.63997611816129],
 [-90.35789251327515, 38.64010601010246],
 [-90.35852819681168, 38.64026523216079],
 [-90.35951524972916, 38.64050615960278],
 [-90.36005705595016, 38.640640240611],
 [-90.36030918359756, 38.640700995985284],
 [-90.36074101924896, 38.640805746509635],
 [-90.36180853843689, 38.64103829212646],
 [-90.36239862442017, 38.64118494212748],
 [-90.36283850669861, 38.641275026979315],
 [-90.36319524049759, 38.64134835177515],
 [-90.36342591047287, 38.64137139669548],
 [-90.36364316940308, 38.641388156632885],
 [-90.36384969949722, 38.64138606164093],
 [-90.36409378051758, 38.64138606164093],
 [-90.36518812179565, 38.64133997180227],
 [-90.36606252193451, 38.64130016691779],
 [-90.3668001294136, 38.64127293198405],
 [-90.36774158477783, 38.64122893706928],
 [-90.36896198987961, 38.641189132123095],
 [-90.36948770284653, 38.64115770714998],
 [-90.37000805139542, 38.641130472162125],
 [-90.37140280008316, 38.64106133714649],
 [-90.37194192409515, 38.64105295714007],
 [-90.37416279315948, 38.64094611197223],
 [-90.37647217512131, 38.64084974168419],
 [-90.37823975086212, 38.64076803633849],
 [-90.38021922111511, 38.640690520924416],
 [-90.38135647773743, 38.64065281069267],
 [-90.38158714771271, 38.64064233562478],
 [-90.38177490234375, 38.6406234804987],
 [-90.38188755512238, 38.64059624530784],
 [-90.38203239440918, 38.64055853502648],
 [-90.38251250982285, 38.640363698256685],
 [-90.38357198238373, 38.63991117210245],
 [-90.38417547941208, 38.63967233770246],
 [-90.38436591625214, 38.639619961631126],
 [-90.38454830646515, 38.6395738706567],
 [-90.38480311632156, 38.6395256846063],
 [-90.3850981593132, 38.6395005440454],
 [-90.3858169913292, 38.63949844899825],
 [-90.38682818412781, 38.639487973761646],
 [-90.38696497678757, 38.639477498523505],
 [-90.38710445165634, 38.639452357945686],
 [-90.38714468479156, 38.639443977751135],
 [-90.3870964050293, 38.63904172725997],
 [-90.38732171058655, 38.63895163960096],
 [-90.38746386766434, 38.63886993209137],
 [-90.38818001747131, 38.63856824201833],
 [-90.38841605186462, 38.638463488223735],
 [-90.38886934518814, 38.63827493100765],
 [-90.38927972316742, 38.63812198979026],
 [-90.3894191980362, 38.63808218311851],
 [-90.38979470729828, 38.637929241489815],
 [-90.38992881774902, 38.637881054333725],
 [-90.38999050855637, 38.63781820147273],
 [-90.39001196622849, 38.63765059357398],
 [-90.39030700922012, 38.63754164822962],
 [-90.3905537724495, 38.637430607612075],
 [-90.3906798362732, 38.63742222718114],
 [-90.39087563753128, 38.637346803258524],
 [-90.39088100194931, 38.637321661933356],
 [-90.39117336273193, 38.63715614798914],
 [-90.39149791002274, 38.63741803696528],
 [-90.39151400327682, 38.63740965653287],
 [-90.39164274930954, 38.6375521237507],
 [-90.3918519616127, 38.63746831953921],
 [-90.39223819971085, 38.637306996156234],
 [-90.39258688688278, 38.637164528451216],
 [-90.39311796426773, 38.637614976845],
 end eruv along Clayton Road */
/* Restored with I-64 construction */
 [-90.35006046295166, 38.63174006946362],
 [-90.3504467010498, 38.63163949624409],
 [-90.35189509391785, 38.63186578578963],
 [-90.35258173942566, 38.63188254794978],
 [-90.35372972488403, 38.63189931010601],
 [-90.35429835319519, 38.63184902362556],
 [-90.35434126853943, 38.63190769118265],
 [-90.35452365875244, 38.63184902362556],
 [-90.35484552383423, 38.631798737109854],
 [-90.35580039024353, 38.6316897828715],
 [-90.35679817199707, 38.631522160643],
 [-90.35732388496399, 38.631388062578004],
 [-90.35797834396362, 38.63118691501023],
 [-90.35882592201233, 38.63091871737531],
 [-90.35959839820862, 38.630767855764766],
 [-90.36091804504395, 38.630684043621734],
 [-90.3619372844696, 38.63063375628888],
 [-90.36207675933838, 38.630692424840454],
 [-90.36214113235474, 38.63080976179954],
 [-90.36253809928894, 38.630650518737085],
 [-90.36257028579712, 38.63049127532095],
 [-90.36277413368225, 38.630424225355696],
 [-90.36358952522278, 38.6302482188986],
 [-90.36428689956665, 38.63019793126006],
 [-90.36534905433655, 38.63023983762795],
 [-90.36666870117188, 38.63039070034957],
 [-90.36725878715515, 38.63050803780246],
 [-90.36795616149902, 38.630684043621734],
 [-90.36890029907227, 38.63089357379558],
 [-90.36973714828491, 38.6310863410147],
 [-90.37054181098938, 38.631228820800054],
 [-90.37088513374329, 38.63128748886465],
 [-90.37275195121765, 38.63140482484985],
 [-90.375155210495, 38.631522160643],
 [-90.37734389305115, 38.631614352917154],
 [-90.38024067878723, 38.63176521274646],
 [-90.38203239440918, 38.63186578578963],
 [-90.38320183753967, 38.63191607225831],
 [-90.38458585739136, 38.63199988296104],
 [-90.38549780845642, 38.63219264720553],
 [-90.3866457939148, 38.63260331712843],
 [-90.38757920265198, 38.63308941318056],
 [-90.38836240768433, 38.63370959991001],
 [-90.38966059684753, 38.634732058208826],
 [-90.39042234420776, 38.63531870802549],
 [-90.39094805717468, 38.63577126317503],
 [-90.39149522781372, 38.636047823248774],
 [-90.39189219474792, 38.636257337745796],
 [-90.39160251617432, 38.636642842820244],
 [-90.39278268814087, 38.637346803258524],
 [-90.39271831512451, 38.63767363968331],
 /* End of restored section */
 [-90.39424180984497, 38.63719595517519],
 [-90.39576530456543, 38.637430607612075],
 [-90.39557218551636, 38.642684944905334],
 [-90.39544343948364, 38.64767914125833],
 [-90.39529323577881, 38.6520697243323],
 [-90.39514303207397, 38.657767026405864],
 [-90.39499282836914, 38.66214023614242],
 [-90.3948426246643, 38.66776972217229],
 [-90.39387702941895, 38.66780322969269],
 [-90.39387702941895, 38.66842311599133],
 [-90.39473533630371, 38.668557144755646],
 [-90.394606590271, 38.67230984829084],
 [-90.39437055587769, 38.67252763308168],
 [-90.39334058761597, 38.67237685906628],
 [-90.39170980453491, 38.67242711710669],
 [-90.39085149765015, 38.672410364430476],
 [-90.39098024368286, 38.67261139628636],
 [-90.38576602935791, 38.67386783259513],
 [-90.38516521453857, 38.67393484191218],
 [-90.37630319595337, 38.673968346547156],
 [-90.37634611129761, 38.675559798645914],
 [-90.37591695785522, 38.67597859594904],
 [-90.37591695785522, 38.681942003659934],
 [-90.37572383880615, 38.68209275752758],
 [-90.37486553192139, 38.68205925669553],
 [-90.37362098693848, 38.681925253210586],
 [-90.37220478057861, 38.681925253210586],
 [-90.37194728851318, 38.68165724548793],
 [-90.37160396575928, 38.681891752300146],
 [-90.3704023361206, 38.680953720440506],
 [-90.36928653717041, 38.679881668974076],
 [-90.36772012710571, 38.677553251881285],
 [-90.3674840927124, 38.67700045108515],
 [-90.36686182022095, 38.67701720268715],
 [-90.36679744720459, 38.68142273790725],
 [-90.36643266677856, 38.681891752300146],
 [-90.36581039428711, 38.681858251374024],
 [-90.36531686782837, 38.68195875410536],
 [-90.36475896835327, 38.68165724548793],
 [-90.36454439163208, 38.681673995999994],
 [-90.36426544189453, 38.68195875410536],
 [-90.36402940750122, 38.681925253210586],
 [-90.36392211914062, 38.68179124947471],
 [-90.36325693130493, 38.68162374445202],
 [-90.36233425140381, 38.68162374445202],
 [-90.36162614822388, 38.68145623903725],
 [-90.36074638366699, 38.68145623903725],
 [-90.35982370376587, 38.68153999179363],
 [-90.35900831222534, 38.681757748501546],
 [-90.35887956619263, 38.681858251374024],
 [-90.35922288894653, 38.68226026145248],
 [-90.35853624343872, 38.6826120184186],
 [-90.35821437835693, 38.68249476628867],
 [-90.3567123413086, 38.68251151660471],
 [-90.35619735717773, 38.68269576982235],
 [-90.35602569580078, 38.68406927885861],
 [-90.35068273544312, 38.68338252763586],
 [-90.33825874328613, 38.681489740151555],
 [-90.33819437026978, 38.681405987336355],
 [-90.33669233322144, 38.68130548382871],
 [-90.33630609512329, 38.68130548382871],
 [-90.33641338348389, 38.6814394884742]
];
yi_stl.eruvpoints = [];
for (var i = 0; i < yi_stl.eruvdata.length; ++i){
  yi_stl.eruvpoints[i] = new google.maps.LatLng (yi_stl.eruvdata[i][1],yi_stl.eruvdata[i][0]);
}; // for
yi_stl.eruvpoints[yi_stl.eruvdata.length] = new google.maps.LatLng (yi_stl.eruvdata[0][1],yi_stl.eruvdata[0][0]); // connect the ends
yi_stl.location = new google.maps.LatLng (38.66034, -90.346659); // where Young Israel is; center of the eruv

// create a Google map with the eruv marked
// options:
//   infowindows {selector or jQuery} items to be used to create markers with infoWindows in the map. The elements so selected will be
//     used as infoWindows. Each element should have expando properties lat and lng with the latitude and longitude of the
//     marker
//   clean {Boolean} true to use original infowindow (thus remove it from the document and put it in the map. false clones the element
//   type {String} the google map type to show
//   showInfoWindow {Boolean} true to open the first infowindow at startup
//   controls {Boolean} true to show the map type and zoom controls
$.fn.eruv = $.extend(function(opts){
  if (!this.length) return; // don't bother doing anything with nothing
  opts = $.extend({}, arguments.callee['default'], opts);
  var infowindows = $(opts.infowindows);
  var getMarkerOptions; // function to be named later
  var markers = []; // array of the markers added

  if (infowindows.length > 1){
    // create lettered markers. Code from Google's sample
    var baseIcon = new google.maps.Icon();
    baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
    baseIcon.iconSize = new google.maps.Size(20, 34);
    baseIcon.shadowSize = new google.maps.Size(37, 34);
    baseIcon.iconAnchor = new google.maps.Point(9, 34);
    baseIcon.infoWindowAnchor = new google.maps.Point(9, 2);
    baseIcon.infoShadowAnchor = new google.maps.Point(18, 25);
    getMarkerOptions = function (index, title){
      // Create a lettered icon for this point using our icon class
      var letter = String.fromCharCode("A".charCodeAt(0) + index);
      var letteredIcon = new google.maps.Icon(baseIcon);
      letteredIcon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";
      return {icon: letteredIcon, title: title};
    };
  }else{
    // just one infowindow; use the standard icon
    getMarkerOptions = function (index, title){
      return {title: title};
   };
  } // if

  return this.each(function(){
    var $this = $(this);
    var map = new google.maps.Map2(this);
    if (opts.controls) map.addControl(new google.maps.LargeMapControl());
    if (opts.controls) map.addControl(new google.maps.MapTypeControl());
    map.setCenter (yi_stl.location, 13, opts.type);
    map.addOverlay (new google.maps.Polyline (yi_stl.eruvpoints));
    infowindows.each(function(i){
      if (opts.clean){
        if (this.parentNode) this.parentNode.removeChild(this); // pull it out of the DOM
        var node = this;
      }else{
        node = this.cloneNode(true);
      }
      $(node).addClass('made_infowindow');
      var marker = createMarker (new google.maps.LatLng (this.lat, this.lng), node, i);
      markers.push(marker);
      map.addOverlay (marker);
      if (opts.showInfoWindow && i == 0) marker.openInfoWindow(node);
      if (!opts.clean){
        // add clickable link to show on map
        $(this).prepend('<a>Locate On Map</a>').css('cursor', 'pointer').click(function() {
          marker.openInfoWindow(node);
          $('html, body').animate({scrollTop: $this.offset().top}, 500);
        });
      }
    });
  });

  function createMarker (point, infoWindow, index){
    var marker = new google.maps.Marker(point, getMarkerOptions(index, $('h3', infoWindow).text()));
    marker.bindInfoWindow(infoWindow);
    return marker;
  }
},{ // option sets
'default': {clean: true, type: google.maps.NORMAL_MAP, infowindows: [], showInfoWindow: false, controls: true}
});

$(function(){
  if (google.maps.BrowserIsCompatible()){
    $("object.metaobject").metaobjects(); // grab the lat/long data. No harm in calling this twice
    // todo: make these more page-centric and less absolute
    $('.eruv_HYBRID_MAP').eruv({infowindows: '.infowindow', type: google.maps.HYBRID_MAP, showInfoWindow: true});
    $('.eruv_NORMAL_MAP').eruv({infowindows: '.infowindow', type: google.maps.NORMAL_MAP, clean: false});
    $(window).bind('unload', google.maps.Unload);
  }
}); // onDocumentReady

