window.onload = function () 
{
	
	var R = Raphael("paper", 3000, 3000);
        
    var attr = {};
    attr.usaquen = { fill: "#fddab4", stroke: "#fddab4", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.candelaria = { fill: "#ffb98a", stroke: "#ffb98a", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.chapinero = { fill: "#b6d3b6", stroke: "#b6d3b6", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.santafe = { fill: "#efb0b0", stroke: "#efb0b0", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.sancristobal = { fill: "#fddab4", stroke: "#fddab4", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.usme = { fill: "#fde8af", stroke: "#fde8af", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.sumapaz = { fill: "#ffb98a", stroke: "#ffb98a", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.suba = { fill: "#efb0b0", stroke: "#efb0b0", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.barriosunidos = { fill: "#b0c0ef", stroke: "#b0c0ef", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.teusaquillo = { fill: "#cdf7cd", stroke: "#cdf7cd", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.martires = { fill: "#fde8af", stroke: "#fde8af", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.antonionarino = { fill: "#b0c0ef", stroke: "#b0c0ef", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.rafaeluribe = { fill: "#b6d3b6", stroke: "#b6d3b6", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.engativa = { fill: "#b6d3b6", stroke: "#b6d3b6", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.fontibon = { fill: "#fddab4", stroke: "#fddab4", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.kennedy = { fill: "#fde8af", stroke: "#fde8af", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.puentearanda = { fill: "#ffb98a", stroke: "#ffb98a", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.bosa = { fill: "#efb0b0", stroke: "#efb0b0", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.tunjuelito = { fill: "#cdf7cd", stroke: "#cdf7cd", "stroke-width": 1, "stroke-linejoin": "round" };
    attr.ciudadbolivar = { fill: "#b0c0ef", stroke: "#b0c0ef", "stroke-width": 1, "stroke-linejoin": "round" };
                        
    var loc = {};
    loc.usaquen = R.path("m 104.88511,166.81325 127.89787,22.57021 7.08085,-11.06383 -0.88511,-11.94894 3.54043,-3.54042 8.40851,-0.44256 0.44255,-3.54042 -6.19574,-5.31064 -5.75319,0 0.44255,-8.85106 -23.01277,-0.88511 -2.65532,-6.6383 -6.19574,0.88511 0,4.86808 -10.17872,0 -17.70213,-5.75319 0,-10.62127 -11.50638,0 -2.65532,9.73617 -3.54043,0 0,-6.6383 -3.98298,-1.77021 -6.19574,6.19574 0.44255,4.42553 -9.29362,-0.8851 -4.42553,-5.31064 -5.31064,0 0,-4.86809 -4.86808,0 -4.42553,6.19575 -0.88511,14.60425 -3.98298,-1.77021 -11.94893,0 -2.21277,2.65532 -0.44255,17.70213 z").attr(attr.usaquen);
    loc.candelaria = R.path("m 358.02553,215.4941 1.32766,-15.04681 9.73617,-1.77021 -2.21276,-7.96596 -24.78298,0 0.44255,7.96596 12.39149,2.21276 3.09787,14.60426 z").attr(attr.candelaria);
    loc.chapinero = R.path("m 313.32766,203.54516 0.44255,-17.25957 -5.75319,-0.88511 -1.77021,2.65532 -6.19575,-2.21277 -0.44255,-4.42553 -9.29362,-0.44255 -2.65532,-6.19575 -5.31063,-0.44255 -3.54043,3.09787 c 0,0 -0.88511,1.77022 -1.32766,-0.44255 -0.44255,-2.21277 -6.19574,-1.77021 -6.19574,-1.77021 l -0.44256,-3.98298 -3.98298,0 -2.21276,2.21276 -2.65532,-7.5234 -8.85106,-1.32766 -10.17873,3.09787 -1.32766,12.39149 -4.42553,9.73617 76.11915,13.71915 z").attr(attr.chapinero);
    loc.santafe = R.path("m 317.31064,188.49835 0,23.89788 9.73617,-5.31064 33.63404,23.01276 18.14468,-15.04681 0.44256,-9.29361 -11.06383,-5.31064 -6.19575,3.09787 -0.44255,11.50638 -3.54043,4.86809 -3.98298,-7.96596 0,-7.5234 -13.71915,-1.32766 -0.44255,-5.31064 -11.06383,0 -11.50638,-9.29362 z").attr(attr.santafe);
    loc.sancristobal = R.path("m 397.85532,257.0941 2.65532,0.44255 -0.44255,-4.42553 6.63829,-5.75319 16.81702,1.77021 4.42554,-3.54043 1.77021,-6.19574 16.81702,0.88511 7.96596,-8.85107 -12.39149,-12.39149 -22.12766,-2.21276 0.44255,3.98298 -14.60425,-0.44256 0.44255,-8.85106 -5.31064,-1.77021 0.88511,-2.65532 9.73617,-0.44256 -7.96596,-5.75319 -8.85106,-0.44255 -11.50639,6.6383 -0.8851,9.73617 -14.60426,12.39149 29.20851,23.01276 0.88511,4.86809 z").attr(attr.sancristobal);
    loc.usme = R.path("m 484.59574,235.40899 0.88511,-14.60425 -8.85106,-0.44256 c 0,0 0.44255,4.86809 -1.32766,4.86809 -1.77022,0 -3.54043,-0.44256 -3.54043,-0.44256 l -3.54042,7.08086 -11.50639,0 -8.40851,11.06383 -15.93191,0 0,3.98297 -7.52341,6.6383 -14.60425,-1.77021 -6.6383,2.21277 -0.44255,4.42553 7.08085,7.96595 13.71915,-0.8851 1.32766,8.40851 16.81702,0.88511 0.44255,6.19574 11.50638,4.42553 3.98298,-4.86808 19.9149,2.65532 0.8851,-6.6383 5.75319,-7.52341 12.83405,3.54043 1.32766,-14.1617 5.31064,-3.09788 0,-7.5234 -15.48937,1.32766 -8.40851,-5.31064 -8.85106,2.21277 -0.44255,-6.19575 4.42553,-2.21276 -0.44256,-4.86809 3.09788,0.44256 0.8851,3.98297 5.75319,-1.77021 z").attr(attr.usme);
    loc.sumapaz = R.path("m 506.7234,215.05154 -17.70212,1.77022 0,25.66808 17.25957,0 0.44255,-27.4383 z").attr(attr.sumapaz);
    loc.suba = R.path("m 115.06383,172.56644 1.32766,22.12766 6.6383,9.73617 31.42127,0.44255 7.96596,5.75319 2.65532,5.31064 -32.30638,0 -19.02979,15.04681 12.39149,12.83404 5.75319,-3.09787 22.12766,15.48936 -0.44255,18.14468 3.54042,8.85107 3.98298,1.32766 2.65532,-13.2766 42.48511,-41.15745 16.81702,0 c 0,0 12.39149,-10.62127 10.17872,-10.17872 -2.21276,0.44255 -6.19574,-0.44255 -6.19574,-0.44255 l -0.44256,-26.99575 -111.5234,-19.91489 z").attr(attr.suba);
    loc.barriosunidos = R.path("m 230.57021,193.36644 -0.44255,23.01276 7.96596,1.32766 15.48936,12.83405 23.45532,-14.16171 0.44255,-15.0468 -46.91064,-7.96596 z").attr(attr.barriosunidos);
    loc.teusaquillo = R.path("m 280.57872,201.77495 32.74894,6.19574 0.44255,18.14468 -38.05957,23.89788 -19.9149,-16.81702 24.78298,-15.93192 0,-15.48936 z").attr(attr.teusaquillo);
    loc.martires = R.path("m 316.86809,222.57495 0.44255,-6.19575 8.40851,-5.31063 34.07659,21.24255 -13.71914,15.48936 -29.20851,-25.22553 z").attr(attr.martires);
    loc.antonionarino = R.path("m 358.46809,280.99197 -1.32766,-20.35745 -8.40852,-11.50638 15.48937,-17.70213 15.93191,10.62128 c 0,0 -15.04681,13.71915 -15.04681,15.48936 0,1.77021 -1.32766,15.04681 -1.32766,15.04681 l -5.31063,8.40851 z").attr(attr.antonionarino);
    loc.rafaeluribe = R.path("m 381.0383,243.8175 -12.83404,14.60426 0.44255,14.60425 -2.65532,1.77022 6.6383,12.39148 13.71915,-7.96595 7.96595,3.54042 10.62128,-7.5234 16.37447,-0.44255 -0.88511,-4.42554 -15.04681,0.44256 0.88511,-4.86809 -5.75319,-3.98298 -6.6383,-0.8851 0,-7.52341 -12.83404,-9.73617 z").attr(attr.rafaeluribe);
    loc.engativa = R.path("m 165.95745,272.58346 41.15744,-39.38723 17.25958,-0.44256 11.94893,-12.39149 37.61703,31.42128 -38.05958,24.34042 -7.08085,-6.63829 -34.51915,41.15744 3.54043,4.42554 -1.77022,4.42553 -4.86808,-0.88511 -3.09787,7.08085 -3.54043,-1.32766 2.21277,-2.21276 0.44255,-10.17873 -3.54043,0 -6.63829,-13.71915 3.54042,-2.65531 -1.32766,-6.6383 3.98298,-2.21277 0,-3.98298 -5.31064,-3.98298 -4.42553,3.09788 -8.40851,-1.32766 0.88511,-7.96596 z").attr(attr.engativa);
    loc.fontibon = R.path("m 294.74043,242.48984 3.98297,5.75319 -15.0468,12.39149 11.94893,11.94894 -26.55319,20.35745 -7.08085,9.29361 3.54042,7.08085 0.44256,4.42554 -3.09787,0 1.32766,7.08085 2.21276,2.21276 -2.65532,4.86809 -3.54042,-0.88511 -2.65532,4.86809 0,6.63829 -3.98298,0.44256 -1.77021,1.77021 -2.65532,-0.44255 -2.21277,6.19574 -5.31064,-0.8851 -4.86808,-8.40851 -6.6383,0 -3.98298,3.98297 -5.75319,-0.8851 0,-3.54043 -6.6383,-0.44255 -2.21276,-7.96596 -3.54043,-0.44255 -1.32766,-8.40851 -6.6383,-1.32766 1.77022,-4.86809 -2.65532,-2.21276 30.09361,-36.73192 5.31064,7.08085 60.18724,-38.94468 z").attr(attr.fontibon);
    loc.kennedy = R.path("m 272.61277,293.82601 26.11063,-19.02978 23.01277,9.73617 10.62128,-3.98298 2.65532,7.08085 18.14468,9.29361 0.44255,15.48937 -9.29362,11.06383 -2.21276,7.08085 0,6.6383 2.65532,3.09787 0,5.75319 -12.83405,7.96596 -2.65532,4.42553 0,3.54042 2.65532,3.09788 -3.09787,3.54042 -2.65532,-4.86808 -0.8851,-8.40851 3.09787,-3.09788 -2.21277,-3.98298 -8.40851,-0.8851 -3.98298,-8.85107 -18.14468,11.06383 -1.77021,-4.86808 -5.31064,-0.88511 8.85106,-6.63829 -3.98297,-9.73618 8.85106,-7.08085 -4.86809,-15.48936 -7.08085,-0.8851 -0.44255,-3.98298 -3.54043,-0.88511 -4.42553,2.65532 -9.29361,-7.96596 z").attr(attr.kennedy);
    loc.puentearanda = R.path("m 299.16596,240.27708 19.47234,-12.83405 34.51915,33.19149 1.32766,33.63405 -16.81702,-9.73617 -3.09788,-8.85107 -14.1617,4.86809 -21.68511,-11.94894 -7.08085,-7.08085 11.06383,-11.94894 -3.54042,-9.29361 z").attr(attr.puentearanda);
    loc.bosa = R.path("m 352.71489,316.83878 -1.77021,35.84681 3.98298,7.5234 -5.75319,26.55319 -34.51915,0 -4.86809,-18.14468 -10.17872,7.96596 -1.77021,-5.75319 10.17872,-7.08085 -3.98298,-11.06383 11.50639,-2.65532 8.40851,0.8851 -0.88511,14.60426 5.75319,5.75319 5.31064,-3.09787 0,-6.19575 -1.77021,-3.54042 15.04681,-10.62128 0.44255,-12.39149 -2.65532,-0.8851 0.88511,-8.85107 6.63829,-8.85106 z").attr(attr.bosa);
    loc.tunjuelito = R.path("m 356.25532,326.57495 9.29362,0 0.44255,-11.94894 53.54894,-28.3234 3.54042,-5.31064 10.17872,-2.65532 -25.66808,-1.32766 -13.71915,9.73617 -6.6383,-3.98298 -15.48936,7.08085 -7.08085,-10.17872 -6.6383,5.31064 -1.77021,41.6 z").attr(attr.tunjuelito);
    loc.ciudadbolivar = R.path("m 363.33617,350.91537 -1.77021,6.6383 -3.98298,-0.8851 -1.77021,-4.42554 -0.44256,-22.12766 12.83405,-0.44255 0.8851,-13.27659 54.8766,-28.76596 0.44255,-3.54043 12.83404,-5.31064 1.77022,3.98298 -9.73617,7.96596 -1.32766,4.86809 14.60425,9.73617 0.44255,3.09787 -3.09787,-0.44256 0,4.42554 2.65532,0 0.44255,3.54042 -4.86808,6.19575 -8.40851,-0.44256 0,2.21277 -4.86809,-0.44255 0.88511,-2.21277 -6.6383,0.44255 -0.44255,4.42554 6.19574,-0.44256 2.21277,5.75319 -7.5234,0 -3.54043,3.98298 -7.96596,-9.29361 2.65532,-3.09788 3.54043,0 0.44255,-3.09787 -3.09787,0 0,-4.42553 -8.85107,0.44255 -1.32766,3.09787 3.54043,0.88511 -0.88511,5.31064 -8.40851,-3.98298 0,-3.98298 -11.06383,0.88511 0,4.86808 5.31064,3.54043 0,5.75319 5.75319,8.85106 -6.19574,3.54043 -2.65532,-1.32766 0.88511,-4.86809 -2.65532,-0.8851 -2.65532,6.19574 -3.98298,0.44256 0.44255,-2.65532 -11.50638,0 -5.31064,6.19574 1.32766,3.09787 z").attr(attr.ciudadbolivar);
            
    var current = null;
            
    for (var state in loc) 
    {
	
		loc[state].color = Raphael.getColor();
        (function (st, state) 
        {
			st[0].style.cursor = "pointer";
                    
            st[0].onmouseover = function () 
            {
				st.animate({fill: "#333", stroke: "#666"}, 500);
                //st.toFront();
                R.safari();
                document.getElementById(state).style.display = "block";
                current = state;
            };
            st[0].onmouseout = function () 
            {
				document.getElementById(state).style.display = "none";
				st.animate( attr[state] , 500);
                //st.toFront();
                R.safari();
            };
            st[0].onclick = function () 
            {
				window.location = current + ".html";
            };
                    
        })(loc[state], state);
    }
};

