var rsr = Raphael('map', '300', '310'); var regions = []; var Wicklow = rsr.path("M197.696,188.208l0-10.331l-3.374-5.453 l0.001-0.07l0.005-0.791l0.003-0.287l-0.437-0.042l-0.714,0.472l-1.02-0.311l-1.394-1.105l-0.589,0.543l-0.309,0.02l-0.889,0.867 l-0.502-0.096l-0.31-0.559l-0.869-0.021l-0.559-1.215l-0.445-0.039l0.043-0.156l-0.438,0.146l-0.39,2.725l-0.52-0.022l-0.606,0.735 l-1.21-1.038l0.324-1.382l-1.081-0.066l-0.392,0.345l-0.973-1.339l-0.851-0.179c-0.17,0.277-0.39,0.631-0.424,0.679 c-0.034,0.053-0.442,0.062-0.737,0.061l-2.866,3.451l-1.948,0.353l0.826,1.356l-0.974,1.445l0.185,0.021l-0.185-0.021l0.161,2.268 l-6.665,3.114l-2.028,5.718l3.043,4.488l-1.64,2.643l-1.372,2.21l-0.516,0.83l5.609,1.034l-1.636,3.272l4.274,5.633l3.455,2.454 l3.91-2.817l1.981-4.368l0.657-1.447l5.909,0.363l4.886,4.293l2.773-10.23l2.912-7.258L197.696,188.208z").attr({parent: 'Wicklow',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'wicklow'); Wicklow.attr({'id': 'wicklow','name': 'wicklow'}); regions.push(Wicklow); var Wexford = rsr.path("M189.222,202.301l-5.909-0.363 l-0.657,1.447l-1.981,4.368l-3.91,2.817l-2.063-1.464l-1.392-0.989l-0.091-0.12l-0.351-0.463l-1.851,5.894h-4.036l-11.696,26.495 l2.892,3.29l2.332,3.722l0.63,1.005l-1.269,2.539l0.692,0.382l1.885-2.496c0,0,1.653,0.151,1.691,0 c0.039-0.156,0.923-3.577,0.923-3.577l6.503-0.462l3.462,3.654l3.079-1.808l6.925,1.267l0.616-0.729l0.438-2.737l-5.4-9.667 l3.041,0.138l8.582-15.768l-2.626-4.837l3.242-5.06l1.027-1.606l0.158-0.579L189.222,202.301z").attr({parent: 'Wexford',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'wexford'); Wexford.attr({'id': 'wexford','name': 'wexford'}); regions.push(Wexford); var Waterford = rsr.path("M155.286,239.921l-1.17,1.672 l-5.557-1.093l-1.547,2.551l-0.785-0.774l-6.063-5.981l-8.092-1.302l-11.478,0.272l0.41,4.369l1.64,0.819l0.137,3.689l-5.603-0.685 l-1.776-0.819l-2.396,0.201l-0.884,0.072l-0.136,1.776l-4.783,0.548l-2.185,3.547l14.548,16.162l0.407-0.358l4.617,0.73l0.77-2.537 l3.232-0.04l2.077-1.425c0,0,0.615-4.11,0.539-4.226c-0.077-0.117-3.27-2.268-3.27-2.268l2.27-1.85l1.846,1.425l8.503-3.807 c0,0,1.022,0.055,2.36,0.122c2.539,0.123,6.218,0.288,6.218,0.188c0-0.155,0.386-2.039,0.386-2.039l2.539,0.499l-0.04,1.498 l3.463,0.154l2.462-2.921l0.232-4.881L155.286,239.921z").attr({parent: 'Waterford',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'waterford'); Waterford.attr({'id': 'waterford','name': 'waterford'}); regions.push(Waterford); var Tipperary = rsr.path("M 140.164,236.296 140.088,236.221 139.45,230.215 136.262,227.211 135.897,219.017 131.889,209.368 127.152,206.636 126.242,203.509 123.572,198.89 125.591,193.621 123.609,190.653 119.972,189.787 117.203,192.037 118.069,193.076 113.219,199.653 111.23,198.885 103.348,195.846 99.538,197.056 97.361,193.641 93.343,194.028 92.939,202.025 90.999,205.903 91.007,205.953 91.808,210.345 98.841,210.426 103.771,211.314 102.892,215.108 100.942,223.513 95.687,223.594 93.989,228.683 104.741,233.856 104.976,239.436 104.98,239.542 105.146,243.467 107.202,245.237 111.985,244.688 112.121,242.913 113.005,242.841 115.401,242.64 117.177,243.459 122.78,244.144 122.644,240.455 121.004,239.636 120.594,235.267 132.072,234.994 z").attr({parent: 'Tipperary',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'tipperary'); Tipperary.attr({'id': 'tipperary','name': 'tipperary'}); regions.push(Tipperary); var SligoLeitrim = rsr.path("M135.647,114.003l-0.309-1.773 l0.558-5.677c-0.15-0.064-0.304-0.128-0.458-0.193c-3.528-1.479-8.207-3.389-11.042-4.336c-3.821-1.275-7.187-2.452-7.187-2.631 c0-0.417-0.417-4.147-0.417-4.147l-3.094-3.57l-8.523-9.837l6.084-4.975l0.131-0.015l0.239-1.641l0.618-4.288l-4.32,0.326 l-3.616,0.274l-0.002,0.039l-3.193,3.443l-4.741,5.109l-0.926,0.592l-2.377,1.518l-10.649,6.804l5.861,1.66l0.726,3.939 l-2.334,1.088l0.467,3.161l-5.445-3.368c0,0-5.031,0.932-5.239,0.932c-0.207,0-10.477-3.109-10.477-3.109l-2.956,7.205l7.897,5.005 l-2.8,5.259l10.111,5.531l6.354-2.936l1.219,4.179l0.215,0.736l8.471,1.639l8.196-11.249l1.505-2.065l4.1,0.682l0.539,10.9 l6.815,9.394l8.199-6.746l3.097-2.569l0.047,0.046l6.213,7.388l0.883-0.801l2.991-2.712L135.647,114.003z").attr({parent: 'SligoLeitrim',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'sligo-leitrim'); SligoLeitrim.attr({'id': 'sligo-leitrim','name': 'sligo-leitrim'}); regions.push(SligoLeitrim); var RoscommonGalway = rsr.path("M 110.004,145.837 110.726,144.149 110.726,144.15 116.133,131.545 114.429,130.354 115.65,127.61 112.585,123.383 108.835,118.216 108.296,107.315 104.197,106.633 94.495,119.947 86.024,118.308 85.809,117.572 80.012,125.479 81.378,130.257 76.595,139.952 81.55,139.954 86.04,146.384 94.602,160.824 98.438,168.934 104.575,167.718 109.25,168.363 114.748,161.86 114.748,161.86 114.77,161.833 110.083,146.105 z").attr({parent: 'RoscommonGalway',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'roscommon-galway'); RoscommonGalway.attr({'id': 'roscommon-galway','name': 'roscommon-galway'}); regions.push(RoscommonGalway); var Mayo = rsr.path("M 73.862,141.317 76.595,139.952 81.378,130.257 80.012,125.479 85.809,117.572 84.589,113.393 78.235,116.329 75.726,114.956 68.124,110.798 70.924,105.539 63.027,100.533 59.811,98.926 58.827,93.588 32.704,89.718 30.629,94.556 23.575,93.864 21.363,106.995 28.002,97.873 26.48,108.93 29.108,114.044 18.874,114.183 23.99,122.061 41.694,121.923 41.667,122.694 41.418,129.8 29.246,131.736 30.352,141.826 29.788,142.082 46.262,143.229 50.567,146.551 53.23,145.277 57.74,138.039 69.812,141.941 70.173,141.317 z").attr({parent: 'Mayo',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'mayo'); Mayo.attr({'id': 'mayo','name': 'mayo'}); regions.push(Mayo); var Offaly = rsr.path("M 156.324,164.248 151.792,161.349 151.523,160.48 151.357,159.948 151.474,160.025 147.024,157.06 137.887,163.909 136.774,164.742 135.385,164.537 133.334,164.235 129.791,158.671 126.248,157.963 122.704,162.82 114.748,161.86 109.25,168.363 110.093,168.479 111.02,170.102 111.303,170.592 112.378,172.473 107.825,175.547 105.337,177.227 96.387,189.032 99.018,189.96 97.113,193.25 97.361,193.641 99.538,197.056 103.348,195.846 111.23,198.885 113.219,199.653 118.069,193.076 117.203,192.037 119.972,189.787 123.609,190.653 129.325,181.654 127.419,178.019 127.246,176.462 138.502,172.654 141.62,177.672 147.274,176.802 154.046,173.802 154.325,171.499 152.895,171.116 z").attr({parent: 'Offaly',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'offaly'); Offaly.attr({'id': 'offaly','name': 'offaly'}); regions.push(Offaly); var LongfordWestmeath = rsr.path("M 152.75,152.833 146.92,144.641 139.815,141.091 142.77,131.141 143.282,131.821 141.779,129.82 137.856,131.697 133.215,125.741 126.946,118.295 115.65,127.61 114.429,130.354 116.133,131.545 110.726,144.149 110.004,145.837 110.083,146.105 111.83,151.965 112.733,155 114.77,161.833 114.748,161.86 122.704,162.82 126.248,157.963 129.791,158.671 133.334,164.235 136.774,164.742 147.024,157.06 146.829,156.931 151.833,153.467 z").attr({parent: 'LongfordWestmeath',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'longford-westmeath'); LongfordWestmeath.attr({'id': 'longford-westmeath','name': 'longford-westmeath'}); regions.push(LongfordWestmeath); var Louth = rsr.path("M 191.455,116.297 192.308,112.943 191.597,112.371 183.715,106.018 180.965,108 179.977,108.713 171.968,111.851 173.659,116.157 170.891,118.827 167.606,122.053 167.749,122.145 171.211,124.192 174.602,131.41 178.258,131.768 177.366,134.709 179.24,134.976 185.84,141.393 186.627,142.414 186.991,141.579 187.949,142.11 189.682,141.64 189.309,141.348 189.136,141.167 188.509,140.499 187.389,139.08 186.791,129.703 186.567,126.21 187.11,124.132 182.366,123.134 182.213,118.69 182.116,113.901 184.728,114.573 z").attr({parent: 'Louth',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'louth'); Louth.attr({'id': 'louth','name': 'louth'}); regions.push(Louth); var LimerickCity = rsr.path("M88.207,209.755 c0,0-1.794,0.271-1.904,0.108c-0.109-0.163-0.49-1.956-0.49-1.956l-1.359,0.271l-4.021,3.478l-0.002,0.022l-0.165,1.371 l-0.268,2.247l7.013,5.921l2.065,0.163l2.773-2.824l5.869,0.434l0.489-2.499l4.685-1.382l0.879-3.794l-4.93-0.889l-7.033-0.081 l-0.8-4.393h-1.333L88.207,209.755z").attr({parent: 'LimerickCity',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'limerick-city'); LimerickCity.attr({'id': 'limerick-city','name': 'limerick-city'}); regions.push(LimerickCity); var Limerick = rsr.path("M104.741,233.856l-10.752-5.173 l1.698-5.089l5.255-0.081l1.95-8.405l-4.685,1.382l-0.489,2.499l-5.869-0.434l-2.773,2.824l-2.065-0.163l-7.013-5.921l0.268-2.247 l0.165-1.371l-4.235-0.533l-11.424,2.209l-4.865,3.146l-0.355,0.229l-0.534,0.089l-7.204,1.2l-0.057-0.135l-0.027-0.065 l-0.502,0.921l3.154,5.179l-1.878,2.252l1.202,3.153l-1.126,1.276l1.502,2.176l-1.878,2.478l5.02,4.25l0.68-1.001l0.111-0.085 l3.524-2.688l2.916,1.298l3.572,1.59l3.526-1.337c0,0,3.737-4.229,4.021-4.299c0.282-0.071,5.711,0.21,5.711,0.21l5.135,5.907 l0.932,1.07l7.387-0.872l0.37-0.043v-1.621l1.975,0.069l0.211,1.481l7.682,0.254L104.741,233.856z").attr({parent: 'Limerick',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'limerick-county'); Limerick.attr({'id': 'limerick-county','name': 'limerick-county'}); regions.push(Limerick); var Laois = rsr.path("M 156.64,189.886 154.105,190.394 153.814,186.557 158.195,182.521 158.449,182.287 157.292,177.218 153.524,177.798 151.561,174.903 147.274,176.802 141.62,177.672 138.502,172.654 127.246,176.462 127.419,178.019 129.231,181.475 129.325,181.654 123.609,190.653 125.591,193.621 123.572,198.89 126.242,203.509 128.325,203.509 129.822,201.037 135.616,203.379 139.522,202.207 142.191,197.784 147.594,196.484 150.98,200.387 153.389,202.273 157.62,201.558 158.449,196.476 157.117,191.62 z").attr({parent: 'Laois',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'laois'); Laois.attr({'id': 'laois','name': 'laois'}); regions.push(Laois); var Kerry = rsr.path("M54.082,232.777l-1.502-2.176l1.126-1.276 l-1.202-3.153l1.878-2.252l-3.154-5.179l0.502-0.921l-0.408-0.966l-12.284-0.062l-0.873,1.031 c-0.045,0.715-0.098,1.528-0.151,2.391c-0.033,0.508-0.064,1.027-0.098,1.561l-1.741,0.285l-0.291,2.423l-9.82,2.833 c0,0-1.107,2.556-0.9,2.556c0.208,0,2.422,1.244,2.422,1.244l0.068,7.81l3.595,3.109l-5.463,1.315l-6.292-3.113l-3.112,1.312 l-4.08-1.934l-5.4,3.378l-4.21,2.634L2,250.88l3.765,0.154l11.378,0.468l5.257-2.487l6.846,0.623l0.415,1.864l-19.776,9.053 l0.482,2.836l-6.681,2.287l-0.279,1.976l0.669,3.958l7.329-1.172l3.664,6.635l12.588-3.321l11.146-4.876l0.746,1.085l-10.031,7.317 l-2.276,1.103l-0.001,0.005l-0.048,0.018l2.914,3.532l21.349-9.207l2.764-7.828l7.373-2.92l-4.301-3.374l-0.076-0.531l-2.227-15.28 l2.237-3.295l-5.02-4.25L54.082,232.777z").attr({parent: 'Kerry',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'kerry'); Kerry.attr({'id': 'kerry','name': 'kerry'}); regions.push(Kerry); var MeathWest = rsr.path("M 172.335,150.649 169.329,145.187 171.879,138.267 170.695,136.902 166.688,138.356 165.503,134.9 161.95,133.807 159.674,136.63 157.594,130.988 143.282,131.821 142.77,131.141 139.815,141.091 146.92,144.641 152.75,152.833 146.829,156.931 151.357,159.948 151.474,160.025 153.521,158.482 157.031,155.838 163.043,158.295 168.6,156.84 167.872,151.741 170.19,151.173 z").attr({parent: 'MeathWest',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'meath-west'); MeathWest.attr({'id': 'meath-west','name': 'meath-west'}); regions.push(MeathWest); var MeathEast = rsr.path("M183.342,151.24l-0.268-1.34l-1.319-0.133 l-1.654-1.251l0.134-2.167l1.52-0.559l0.231-0.965l1.863,1.225l2.929-1.968l-0.531-0.799l0.38-0.868l-0.787-1.021l-6.601-6.417 l-1.874-0.267l0.892-2.942l-3.656-0.357l-3.39-7.218l-3.557-2.086l-0.072-0.027l-0.488,0.164l-9.25,2.448l1.168,3.835l-1.42,2.462 l2.081,5.642l2.276-2.823l3.553,1.093l1.185,3.456l4.007-1.454l1.184,1.365l-2.55,6.919l3.007,5.462l-2.146,0.524l-1.041,0.255 l-1.277,0.312l0.728,5.1l1.253,1.751l9.083,0.981l0.052-0.417l1.568-1.856l0.354-0.418l-0.148-1.275l0.294-0.5l1.357,0.376 l1.066-0.688l0.13-0.729l0.022-1.016l0.894-0.737c0,0-0.513-0.893-0.582-0.938C183.878,151.329,183.342,151.24,183.342,151.24z").attr({parent: 'MeathEast',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'meath-east'); MeathEast.attr({'id': 'meath-east','name': 'meath-east'}); regions.push(MeathEast); var KildareSouth = rsr.path("M 167.577,182.287 174.242,179.173 174.081,176.906 171.819,176.655 170.693,175.086 169.281,173.124 169.553,167.96 165.384,167.96 164.299,164.248 158.589,163.07 156.324,164.248 154.121,168.659 152.895,171.116 154.325,171.499 154.046,173.802 151.561,174.903 153.524,177.798 157.292,177.218 158.449,182.287 153.814,186.557 154.105,190.394 156.64,189.886 158.449,196.476 165.042,198.212 165.063,198.177 165.58,197.347 168.592,192.494 165.549,188.005 z").attr({parent: 'KildareSouth',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'kildare-south'); KildareSouth.attr({'id': 'kildare-south','name': 'kildare-south'}); regions.push(KildareSouth); var KildareNorth = rsr.path("M179.043,170.3 c-0.17-0.001-0.303-0.004-0.303-0.004l-0.22-1.178l-1.853-0.117l-0.309-0.019l-0.33-0.548l1.562-1.067l-1.644-0.931l-0.274-0.711 l0.602-0.109l-0.383-1.288l0.986-0.984l0.931,0.137l0.492-0.63l-0.684-1.341l1.205-0.976l0.115-0.961l-9.083-0.981l-1.253-1.751 l-0.17,0.043l-5.386,1.412l-6.012-2.457l-3.51,2.644l-2.047,1.543l-0.117-0.078l0.435,1.401l4.531,2.898l2.265-1.177l5.71,1.177 l0.986,3.373l0.1,0.34h4.169l-0.272,5.163l1.412,1.963l1.125,1.568l2.262,0.251l0.974-1.445l-0.826-1.356l1.948-0.353 L179.043,170.3z").attr({parent: 'KildareNorth',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'kildare-north'); KildareNorth.attr({'id': 'kildare-north','name': 'kildare-north'}); regions.push(KildareNorth); var GalwayWest = rsr.path("M80.13,160.414l-0.979,4.042l-8.335,8.941 l-0.923,0.096l1.088-1.604l-2.033-0.259l0.086-1.428l-2.25-1.427l-18.01,1.628l-7.342,0.664l1.037-10.377l-3.719-1.17l-4.674,5.536 l-4.374-1.678l-0.472-0.181l1.039-3.978l-1.903-1.125l-2.684,1.167l-7.007-2.724c0,0-0.478-1.471-0.478-1.6 c0-0.13,2.727-1.73,2.727-1.73l-2.465-0.735l-0.519-6.01l6.051-0.769l2.075-1.934l3.722-1.68l16.474,1.147l4.305,3.321l2.664-1.274 l4.509-7.238l7.607,2.458l4.455,1.439l-6.463,10.76l-4.982,0.416l-0.901,0.075l-0.244,1.837l0.075,0.018L80.13,160.414z M30.366,177.939l13.98,6.389l1.554-2.681l-15.534-5.946V177.939z").attr({parent: 'GalwayWest',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'galway-west'); GalwayWest.attr({'id': 'galway-west','name': 'galway-west'}); regions.push(GalwayWest); var GalwayEast = rsr.path("M 110.093,168.479 104.575,167.718 98.438,168.934 94.602,160.824 86.04,146.384 81.55,139.954 76.595,139.952 73.862,141.317 70.173,141.317 69.812,141.941 69.802,141.937 63.338,152.696 58.356,153.112 57.286,155.042 80.13,160.414 79.151,164.456 70.815,173.397 69.893,173.493 67.4,177.169 71.89,185.144 73.748,188.449 78.125,188.258 87.258,186.737 95.822,189.779 105.337,177.227 112.378,172.473 z").attr({parent: 'GalwayEast',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'galway-east'); GalwayEast.attr({'id': 'galway-east','name': 'galway-east'}); regions.push(GalwayEast); var Dublin = rsr.path("M195.375,158.316l-1.548,0.021 l-0.505-0.33l0.136-1.237l-0.129-2.312l-0.799-0.638l-2.448-1.011l3.14,0.053l1.012-1.65c0,0-2.397-0.799-2.556-0.799 s2.024-0.372,2.024-0.372l1.277-0.959l-0.587-3.724l-0.037-0.014l-2.305-0.731l-2.287-2.909l-0.082-0.063l-1.732,0.47l-0.958-0.532 l-0.744,1.704l0.531,0.799l-2.929,1.968l-1.863-1.225l-0.231,0.965l-1.52,0.559l-0.134,2.167l1.654,1.251l1.319,0.133l0.268,1.34 c0,0,0.537,0.088,0.603,0.134c0.068,0.044,0.582,0.938,0.582,0.938l-0.894,0.737l-0.022,1.016l-0.13,0.729l-1.066,0.688 l-1.357-0.376l-0.294,0.5l0.148,1.275l-1.923,2.274l-0.167,1.378l-1.205,0.976l0.684,1.341l-0.492,0.63l-0.931-0.137l-0.986,0.984 l0.383,1.288l-0.602,0.109l0.274,0.711l1.644,0.931l-1.562,1.067l0.33,0.548l2.162,0.136l0.22,1.178c0,0,0.986,0.027,1.04-0.057 c0.034-0.048,0.253-0.402,0.424-0.679l0.851,0.179l0.973,1.339l0.392-0.345l1.081,0.066l-0.324,1.382l1.21,1.038l0.606-0.735 l0.52,0.022l0.39-2.725l0.438-0.146l-0.043,0.156l0.445,0.039l0.559,1.215l0.869,0.021l0.31,0.559l0.502,0.096l0.889-0.867 l0.309-0.02l0.589-0.543l1.394,1.105l1.02,0.311l0.714-0.472l0.395-0.26l-0.022-0.908l-0.243-0.688l-0.111-1.729l0.709-0.819 l-0.333-1.109l-1.752-1.041l-1.175-0.066l-0.643-0.731l-0.021-0.018l-0.734-1.462l0.773,0.108l0.011-0.56l-0.925-0.086v-0.153 l0.006,0.001l1.477,0.031l-1.882-1.324l1.4,0.082l1.627-1.626l0.853-0.251l0.754,0.116l0.311,0.813l0.581,0.717l1.454-0.251 l0.193-1.143L195.375,158.316z M188.208,159.854L188.208,159.854l0.97,0.552L188.208,159.854z").attr({parent: 'Dublin',fill: '#999999',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'path_u'); Dublin.attr({'id': 'Dublin','name': 'Dublin'}); var Donegal = rsr.path("M 141.97,12.408 137.441,14.093 136.611,19.904 133.453,20.9 131.459,36.01 129.3,35.513 124.481,22.396 103.214,31.029 93.005,46.11 96.014,49.841 91.968,57.875 79.106,61.556 82.011,68.551 104.467,68.863 104.314,71.52 107.93,71.246 112.25,70.92 111.631,75.208 111.392,76.848 116.101,76.31 118.188,75.337 124.401,72.44 115.41,63.87 119.422,60.415 128.963,60.139 142.61,36.488 144.592,33.048 157.284,23.299 z").attr({parent: 'Donegal',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'donegal'); Donegal.attr({'id': 'donegal','name': 'donegal'}); regions.push(Donegal); var Clare = rsr.path("M99.018,189.96l-2.631-0.928l-0.564,0.747 l-8.564-3.042l-9.134,1.521l-4.376,0.191l-1.858-3.305l-4.489-7.975l-0.963,1.421l-12.071-0.13l-6.379,12.847l2.558,1.108 l-5.604,11.199l-1.173,2.345l-1.888-0.248l-5.778,3.961c-4.248,3.918-9.96,9.208-9.83,9.208c0.007,0,0.023,0,0.045-0.002 l0.146,0.662l11.518-1.841l0.191-0.009c-0.003,0.042-0.005,0.089-0.007,0.13l0.873-1.031l12.284,0.062l0.435,1.031l0.057,0.135 l7.738-1.289l0.355-0.229l4.865-3.146l11.424-2.209l4.235,0.533l0.002-0.022l4.021-3.478l1.359-0.271c0,0,0.38,1.793,0.49,1.956 c0.11,0.162,1.904-0.108,1.904-0.108l1.467-3.803h1.333l-0.008-0.049l1.94-3.878l0.404-7.997l4.018-0.388l-0.248-0.39 L99.018,189.96z").attr({parent: 'Clare',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'clare'); Clare.attr({'id': 'clare','name': 'clare'}); regions.push(Clare); var CorkSouthWest = rsr.path("M 96.317,277.738 93.402,278.736 89.258,274.55 86.762,273.682 82.013,275.216 65.482,280.573 58.878,277.637 57.261,280.135 56.089,278.813 56.677,276.468 51.454,272.731 30.105,281.938 27.191,278.406 21.917,280.323 21.292,283.151 16.66,283.778 16.868,286.887 13.412,287.093 13.412,288.336 16.592,289.101 32.358,284.26 36.231,283.846 41.972,280.323 44.322,282.738 27.38,291.719 27.933,293.034 39.828,289.93 28.902,297.255 29.591,299.533 45.29,295.248 48.956,298.426 65.655,292.142 69.214,293.81 71.132,291.184 78.506,291.069 80.566,286.579 86.949,288.419 88.474,284.268 94.152,281.978 95.194,281.56 97.793,279.131 97.564,277.225 z").attr({parent: 'CorkSouthWest',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'cork-south-west'); CorkSouthWest.attr({'id': 'cork-south-west','name': 'cork-south-west'}); regions.push(CorkSouthWest); var CorkNorthCentral = rsr.path("M 96.005,260.173 97.49,261.13 99.674,259.996 95.743,253.144 89.845,253.144 89.32,254.32 88.229,254.232 88.229,249.78 85.17,250.215 84.033,253.01 82.066,252.997 80.012,258.719 76.489,259.453 76.672,259.919 79.131,266.2 88.661,269.13 89.815,268.49 91.812,267.389 96.236,268.019 97.463,268.893 98.321,267.857 95.787,263.009 z").attr({parent: 'CorkNorthCentral',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'cork-north-central'); CorkNorthCentral.attr({'id': 'cork-north-central','name': 'cork-north-central'}); regions.push(CorkNorthCentral); var CorkSouthCentral = rsr.path("M 97.421,276.032 96.916,271.822 97.186,271.79 97.563,268.967 97.463,268.893 96.236,268.019 91.812,267.389 89.815,268.49 88.661,269.13 88.67,269.132 87.23,272.569 86.762,273.682 89.258,274.55 93.402,278.736 96.317,277.738 97.564,277.225 z").attr({parent: 'CorkSouthCentral',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'cork-south-central'); CorkSouthCentral.attr({'id': 'cork-south-central','name': 'cork-south-central'}); regions.push(CorkSouthCentral); var CorkNorthWest = rsr.path("M79.131,266.2l-2.459-6.281l-0.183-0.466 l3.523-0.734l2.054-5.723l-6.165-2.931l5.725-8.361l5.43,1.175l1.013-2.798l-0.718,0.085l-0.932-1.07l-2.107-2.425l-3.027-3.482 c0,0-5.429-0.281-5.711-0.21c-0.283,0.07-4.021,4.299-4.021,4.299l-3.526,1.337l-6.488-2.888l-3.524,2.688l-0.111,0.085 l-2.917,4.296l2.227,15.28l0.076,0.531l4.301,3.374l-7.373,2.92l-2.764,7.828l5.223,3.737l-0.588,2.345l1.172,1.321l1.617-2.498 l6.604,2.936l21.28-6.891l1.908-4.549L79.131,266.2z").attr({parent: 'CorkNorthWest',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'cork-north-west'); CorkNorthWest.attr({'id': 'cork-north-west','name': 'cork-north-west'}); regions.push(CorkNorthWest); var CorkEast = rsr.path("M119.565,264.946l-14.548-16.162 l2.185-3.547l-2.057-1.77l-0.166-3.926l-0.004-0.105l-7.682-0.254l-0.211-1.481l-1.975-0.069v1.621l-0.37,0.043l-6.669,0.787 l-1.013,2.798l-5.43-1.175l-5.725,8.361l6.165,2.931l1.967,0.013l1.137-2.795l3.059-0.435v4.453l1.091,0.088l0.525-1.177h5.897 l3.932,6.852l-2.184,1.135l-1.485-0.958l-0.219,2.836l2.535,4.848l-0.858,1.036l0.101,0.074l-0.377,2.823l3.797-0.473l0.791,4.541 l8.021-1.919l-0.171-0.045c0,0,1.539-0.157,1.578-0.271c0.038-0.117,1.385-3.573,1.5-3.536c0.114,0.037,5.654-0.306,5.654-0.306 l-2.308-1.733L119.565,264.946z").attr({parent: 'CorkEast',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'cork-east'); CorkEast.attr({'id': 'cork-east','name': 'cork-east'}); regions.push(CorkEast); var CavanMonaghan = rsr.path("M173.659,116.157l-0.546-1.393 l-1.145-2.914l-0.138,0.055l-2.684-1.949l0.274-7.055l-4.842-2.195l-8.777-13.645l-4.19-1.321l-6.465,7.778l2.628,3.388 l-0.139,2.349l-4.886,2.828l-1.733,4.217l-0.852,2.073c0,0-1.8-0.783-4.268-1.82l-0.542,5.527l-0.016,0.149l0.309,1.773 l1.433,8.212l-2.991,2.712l-0.883,0.801l0.46,0.549l-0.452-0.537l4.641,5.956l3.923-1.877l0.991,1.321l0.512,0.68l14.312-0.833 l1.42-2.462l-1.168-3.835l9.745-2.564l-0.054-0.061l3.354-3.239L173.659,116.157z").attr({parent: 'CavanMonaghan',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'cavan-monaghan'); CavanMonaghan.attr({'id': 'cavan-monaghan','name': 'cavan-monaghan'}); regions.push(CavanMonaghan); var CarlowKilkenny = rsr.path("M 169.037,202.483 170.673,199.211 165.063,198.177 165.042,198.212 158.449,196.476 157.62,201.558 153.389,202.273 150.98,200.387 147.594,196.484 142.191,197.784 139.522,202.207 135.616,203.379 129.822,201.037 128.325,203.509 126.242,203.509 127.152,206.636 131.889,209.368 135.897,219.017 136.262,227.211 139.45,230.215 140.088,236.221 140.164,236.296 146.227,242.277 147.011,243.051 148.559,240.5 154.116,241.593 155.286,239.921 166.982,213.427 171.018,213.427 172.869,207.533 z").attr({parent: 'CarlowKilkenny',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.55',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'carlow-kilkenny'); CarlowKilkenny.attr({'id': 'carlow-kilkenny','name': 'carlow-kilkenny'}); regions.push(CarlowKilkenny); var NorthernIreland = rsr.path("M220.417,87.466l0.855-5.991l-5.423-16.26 l-13.129,1.998l-0.573-1.711l8.276-7.703l-1.995-5.849L197.01,36.69l-2.284-9.415L179.17,22.14l-13.845,6.276l-8.134-0.855 l-3.567,9.129l-11.014-0.202l-13.646,23.651l-9.542,0.276l-4.012,3.456l8.991,8.57l-6.213,2.897l-2.087,0.973l-4.709,0.538 l-0.131,0.015l-6.084,4.975l8.523,9.837l3.094,3.57c0,0,0.417,3.73,0.417,4.147c0,0.18,3.365,1.356,7.187,2.631 c2.834,0.947,7.514,2.857,11.042,4.336c0.154,0.064,0.308,0.128,0.458,0.193c2.468,1.037,4.268,1.82,4.268,1.82l0.852-2.073 l1.733-4.217l4.886-2.828l0.139-2.349l-2.628-3.388l6.465-7.778l4.19,1.321l8.777,13.645l4.842,2.195l-0.274,7.055l2.684,1.949 l0.138-0.055l8.009-3.138l0.988-0.712l2.75-1.982l7.882,6.353l0.99,0.626l8.561-6.276l0.288-3.28l2.709-7.133l8.708,0.288 l4.424-8.273l-1.997-1.854h-3.571l0.859-14.264l4.565,8.129l-0.141,4.994L220.417,87.466z").attr({parent: 'NorthernIreland',fill: '#FFFFFF',stroke: '#999999',"stroke-width": '0.77',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'path_ae'); NorthernIreland.attr({'id': 'NorthernIreland','name': 'NorthernIreland'}); // Bounding box for expanded Dublin constituencies var Joiningline = rsr.path("M 209.069,82.5 189.763,141.704 209.069,214.431 298.731,214.431 298.731,82.5 z").attr({parent: 'Joiningline',fill: '#FFFFFF',stroke: '#999999',"stroke-miterlimit": '10','stroke-width': '1','stroke-opacity': '1'}).data('id', 'path_af'); var DunLaoghaire = rsr.path("M285.256,196.128l-0.438-6.97l2.823-3.308 l-1.324-4.468l-6.979-4.2l-4.683-0.266l-2.556-2.949l-0.084-0.076l0.197,0.402l-1.657,0.426l-3.06,0.789l3.714,3.937 c0,0-0.362,4.412-0.362,4.568c0,0.158,2.906,3.257,2.906,3.257l-0.467,3.309l1.243,1.05l-0.103,1.89l-2.074-0.052l-0.078,6.325 l0.012,0.008l5.557,4.46l4.058,1.247l4.417-2.945l-0.088-3.665L285.256,196.128z").attr({parent: 'DunLaoghaire',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dun-laoghaire'); DunLaoghaire.attr({'id': 'dun-laoghaire','name': 'dun-laoghaire'}); regions.push(DunLaoghaire); var DublinWest = rsr.path("M 255.248,162.519 254.299,160.683 254.076,154.674 249.29,154.424 245.437,152.953 251.531,146.697 251.35,146.768 243.782,134.386 243.263,137.319 239.018,140.097 233.611,138.582 232.447,140.599 233.028,145.735 225.374,154.911 224.71,160.464 226.538,160.718 226.706,163.243 228.786,163.917 231.862,160.297 238.934,161.812 242.679,159.623 244.756,162.82 245.062,162.745 247.754,162.063 248.838,163.749 253.259,163.787 255.917,163.81 z").attr({parent: 'DublinWest',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dublin-west'); DublinWest.attr({'id': 'dublin-west','name': 'dublin-west'}); regions.push(DublinWest); var DublinSouthWest = rsr.path("M 258.092,184.252 258.864,180.286 257.4,177.717 257.307,176.889 256.97,176.671 253.775,177.152 253.772,177.199 252.091,176.918 248.989,176.401 246.922,172.213 243.581,176.333 241.631,172.901 231.712,177.791 232.312,185.636 229.042,194.876 229.903,196.795 230.218,196.863 233.605,197.58 237.486,202.986 239.036,201.59 243.345,201.853 242.05,207.43 246.877,211.616 249.29,208.648 251.356,208.737 252.911,197.754 254.66,197.16 256.021,192.268 254.555,191.646 254.791,187.444 z").attr({parent: 'DublinSouthWest',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dublin-south-west'); DublinSouthWest.attr({'id': 'dublin-south-west','name': 'dublin-south-west'}); regions.push(DublinSouthWest); var DublinSouthCentral = rsr.path("M 255.248,162.519 255.917,163.81 253.259,163.787 248.838,163.749 247.754,162.063 245.062,162.745 244.987,164.309 238.509,167.417 241.631,172.901 243.581,176.333 246.922,172.213 248.989,176.401 252.091,176.918 253.772,177.199 253.775,177.152 253.885,174.693 254.071,170.431 257.889,167.655 257.949,164.883 258.298,164.979 258.784,164.733 z").attr({id: 'DublinSouthCentral',parent: 'DublinSouthCentral',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dublin-south-central'); DublinSouthCentral.attr({'id': 'dublin-south-central','name': 'dublin-south-central'}); regions.push(DublinSouthCentral); var DublinRathdown = rsr.path("M273.285,190.579l0.467-3.309 c0,0-2.906-3.1-2.906-3.257c0-0.156,0.362-4.568,0.362-4.568l-3.714-3.937l-2.86-1.519l-1.553-0.824l-1.203,2.908l-4.414,0.519 l-0.19,0.031l0.126,1.095l1.464,2.569l-0.771,3.966l-3.301,3.192l-0.236,4.202l1.465,0.622l-1.361,4.892l-0.179,0.632l1.768,0.155 l2.233,4.902l3.456,0.079l1.231,2.253l2,0.391l3.538-3.502l1.23-0.076l2.348-2.194l-0.012-0.008l0.078-6.325l2.074,0.052 l0.103-1.89L273.285,190.579z").attr({parent: 'DublinRathdown',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dublin-rathdown'); DublinRathdown.attr({'id': 'dublin-rathdown','name': 'dublin-rathdown'}); regions.push(DublinRathdown); var DublinNorthWest = rsr.path("M 266.279,145.663 258.512,145.843 253.398,145.957 251.531,146.697 245.437,152.953 249.29,154.424 254.076,154.674 254.257,154.684 261.024,159.45 262.021,157.686 262.058,157.616 262.476,156.83 265.494,151.129 263.872,149.804 z").attr({parent: 'DublinNorthWest',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dublin-north-west'); DublinNorthWest.attr({'id': 'dublin-north-west','name': 'dublin-north-west'}); regions.push(DublinNorthWest); var DublinMidwest = rsr.path("M229.042,194.876l3.271-9.241 l-0.601-7.845l9.919-4.89l-3.122-5.483l6.479-3.108l0.075-1.564l-0.306,0.075l-2.077-3.198l-3.746,2.189l-7.072-1.514l-3.076,3.62 l-2.08-0.674l-0.168-2.525l-1.828-0.253l-4.796,3.937l2.727,5.408l-1.965,2.537l-3.707-0.551l-3.926,3.973l1.53,5.186l-2.401,0.442 l1.09,2.869l6.543,3.752l-6.214,4.303l1.305,2.207l8.618,0.552l0.874,4.745c0,0,3.925,0.109,4.144-0.221 c0.132-0.199,1.008-1.627,1.688-2.74l-0.315-0.068L229.042,194.876z").attr({parent: 'DublinMidwest',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dublin-mid-west'); DublinMidwest.attr({'id': 'dublin-mid-west','name': 'dublin-mid-west'}); regions.push(DublinMidwest); var DublinFingal = rsr.path("M286.088,122.873 c0,0-9.539-3.219-10.173-3.219c-0.635,0,8.059-1.502,8.059-1.502l5.086-3.862l-2.331-15.02l-9.333-3.001l-9.331-12.015 l-6.997,1.931l-3.815-2.147l-2.973,6.866l2.122,3.217l-11.661,7.941l-7.426-4.936l-0.922,3.888l-6.053,2.251l-0.535,8.738 l6.588,5.043l5.252,0.541l1.067,5.404c0,0,2.139,0.36,2.407,0.541c0.266,0.18,2.312,3.783,2.312,3.783l-3.558,2.972l-0.091,4.099 l7.568,12.382l0.182-0.071l1.867-0.74l5.114-0.114l7.767-0.18l11.51-0.261l5.212-0.119l-0.517-9.322l-3.179-2.576l-9.752-4.075 l12.507,0.214L286.088,122.873z").attr({parent: 'DublinFingal',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dublin-fingal'); DublinFingal.attr({'id': 'dublin-fingal','name': 'dublin-fingal'}); regions.push(DublinFingal); var DublinCentral = rsr.path("M 266.938,160.007 265.956,159.948 262.092,157.726 262.021,157.686 261.024,159.45 254.257,154.684 254.076,154.674 254.299,160.683 255.917,163.81 256.236,164.428 257.949,164.883 258.298,164.979 259.757,164.243 265.215,164.366 268.526,165.217 268.551,165.224 274.436,165.346 z").attr({parent: 'DublinCentral',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dublin-central'); DublinCentral.attr({'id': 'dublin-central','name': 'dublin-central'}); regions.push(DublinCentral); var DublinBaySouth = rsr.path("M 269.079,168.001 272.167,168.436 272.211,166.179 268.526,165.833 268.526,165.217 265.215,164.366 259.757,164.243 258.784,164.733 258.298,164.979 257.949,164.883 257.889,167.655 257.043,168.271 254.071,170.431 253.885,174.693 253.775,177.152 256.97,176.671 257.274,176.624 257.273,176.622 257.464,176.591 261.877,176.072 263.081,173.165 267.494,175.508 270.554,174.719 272.211,174.293 272.014,173.891 z").attr({parent: 'DublinBaySouth',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dublin-bay-south'); DublinBaySouth.attr({'id': 'dublin-bay-south','name': 'dublin-bay-south'}); regions.push(DublinBaySouth); var DublinBayNorth = rsr.path("M295.499,153.782l-0.77,4.605 l-5.786,1.016l-2.313-2.887l-1.233-3.278l-3.014-0.469l-3.39,1.013l-6.479,6.557l-5.575-0.332l-0.982-0.059l-3.936-2.262 l0.455-0.856l3.019-5.701l-1.623-1.325l2.408-4.141l11.51-0.261l5.212-0.119l-0.54,4.988l2.008,1.326l6.172-0.075L295.499,153.782z M274.037,160.428l2.193,1.402l5.325-5.342l-1.563-0.904L274.037,160.428z").attr({parent: 'DublinBayNorth',fill: '#e4e4e4',stroke: '#999999',"stroke-width": '0.54',"stroke-miterlimit": '10','stroke-opacity': '1'}).data('id', 'dublin-bay-north'); DublinBayNorth.attr({'id': 'dublin-bay-north','name': 'dublin-bay-north'}); regions.push(DublinBayNorth); // Define party colours, default, 'blank' FF, FG, LAB, SF, AAA-PBP, GP, SD, RI, IO var partyColours = ["#e2e2e2","#2f3590","#40b34f","#088560","#c72831","#c4568b","#168dcd","#b4d144","#1dafec","#000000"] var party =["fg","ff","sf","lab","aaa-pbp","ri","gp","sd","io"]; // Define opacities for party strength var partyHeat= ["0","0.15","0.5","0.8","1"]; // Set colour chart to null jq('#heatMapValues ul li span').css("backgroundColor", partyColours[0]); // Load external JSON file of final heatmap data jq.getJSON('/cstatic/static/general-election/json/heatmap.json', function(data){ heatmapData = data; }); // Initialise the select menu to use select2 jq('#partySelector').select2({minimumResultsForSearch: -1 }); jq( "#partySelector" ).change(function() { // Get party colour from select menu var mySelection = jq(this).prop('selectedIndex'); // Get party code (eg ff) var partySelected = party[mySelection-1]; // Sets constituency color by party jq.each(regions, function (index, element) { // For each constituency (place) a value needs to used based on the party selected via 'party' var place = this.data('id'); jq.each(heatmapData.finalData, function(key, val) { if (val.Constituency == place) { heat = val[partySelected]; // Gets party value based on Constituency matched } }); // Determines if a party has been selected and sets opacity to indicate 'heat map' value if (mySelection !=0) { this.animate({'fill-opacity':partyHeat[heat]}, 750); // Animates the fill of each constituency - fillOpacity is really important! Al } else { this.node.style.fillOpacity = 1.0 // Sets opacity to 1 if the default value of the select menu } // Sets constituency colour based on selection via the array partyColours this.node.setAttribute('fill', partyColours[mySelection]); }); // Sets the color chart below to the party selected jq('#heatMapValues ul li div.background').delay(1000).css("backgroundColor", partyColours[mySelection]) });