diff --git a/about/fellows.en.xhtml b/about/fellows.en.xhtml
new file mode 100644
index 0000000000..6776d9db68
--- /dev/null
+++ b/about/fellows.en.xhtml
@@ -0,0 +1,190 @@
+
+
+
+
+ FSFE's Fellows
+
+
+
+
+
+
+
+
+
+
+
+
+
+ About
+
+ FSFE's Fellows
+
+
+
+ Number of Fellows per country
+
+
+
+ Number of Fellows per millions of inhabitants per country
+
+
+
+
+
diff --git a/graphics/rectangleForMapLegend.png b/graphics/rectangleForMapLegend.png
new file mode 100644
index 0000000000..6ad0c7e20f
Binary files /dev/null and b/graphics/rectangleForMapLegend.png differ
diff --git a/look/jqvmap.css b/look/jqvmap.css
new file mode 100644
index 0000000000..607c9be052
--- /dev/null
+++ b/look/jqvmap.css
@@ -0,0 +1,56 @@
+/*!
+ * jQVMap Version 1.0
+ *
+ * http://jqvmap.com
+ *
+ * Copyright 2012, Peter Schmalfeldt
+ * Licensed under the MIT license.
+ *
+ * Fork Me @ https://github.com/manifestinteractive/jqvmap
+ */
+.jqvmap-label
+{
+ position: absolute;
+ display: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ background: #292929;
+ color: white;
+ font-family: sans-serif, Verdana;
+ font-size: smaller;
+ padding: 3px;
+}
+.jqvmap-zoomin, .jqvmap-zoomout
+{
+ position: absolute;
+ left: 10px;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ background: #000000;
+ padding: 3px;
+ color: white;
+ width: 10px;
+ height: 10px;
+ cursor: pointer;
+ line-height: 10px;
+ text-align: center;
+}
+.jqvmap-zoomin
+{
+ top: 10px;
+}
+.jqvmap-zoomout
+{
+ top: 30px;
+}
+.jqvmap-region
+{
+ cursor: pointer;
+}
+.jqvmap-ajax_response
+{
+ width: 100%;
+ height: 500px;
+}
\ No newline at end of file
diff --git a/scripts/jqvmap/data/jquery.vmap.sampledata.js b/scripts/jqvmap/data/jquery.vmap.sampledata.js
new file mode 100644
index 0000000000..9d018ab761
--- /dev/null
+++ b/scripts/jqvmap/data/jquery.vmap.sampledata.js
@@ -0,0 +1 @@
+var sample_data = {"af":"16.63","al":"11.58","dz":"158.97","ao":"85.81","ag":"1.1","ar":"351.02","am":"8.83","au":"1219.72","at":"366.26","az":"52.17","bs":"7.54","bh":"21.73","bd":"105.4","bb":"3.96","by":"52.89","be":"461.33","bz":"1.43","bj":"6.49","bt":"1.4","bo":"19.18","ba":"16.2","bw":"12.5","br":"2023.53","bn":"11.96","bg":"44.84","bf":"8.67","bi":"1.47","kh":"11.36","cm":"21.88","ca":"1563.66","cv":"1.57","cf":"2.11","td":"7.59","cl":"199.18","cn":"5745.13","co":"283.11","km":"0.56","cd":"12.6","cg":"11.88","cr":"35.02","ci":"22.38","hr":"59.92","cy":"22.75","cz":"195.23","dk":"304.56","dj":"1.14","dm":"0.38","do":"50.87","ec":"61.49","eg":"216.83","sv":"21.8","gq":"14.55","er":"2.25","ee":"19.22","et":"30.94","fj":"3.15","fi":"231.98","fr":"2555.44","ga":"12.56","gm":"1.04","ge":"11.23","de":"3305.9","gh":"18.06","gr":"305.01","gd":"0.65","gt":"40.77","gn":"4.34","gw":"0.83","gy":"2.2","ht":"6.5","hn":"15.34","hk":"226.49","hu":"132.28","is":"12.77","in":"1430.02","id":"695.06","ir":"337.9","iq":"84.14","ie":"204.14","il":"201.25","it":"2036.69","jm":"13.74","jp":"5390.9","jo":"27.13","kz":"129.76","ke":"32.42","ki":"0.15","kr":"986.26","undefined":"5.73","kw":"117.32","kg":"4.44","la":"6.34","lv":"23.39","lb":"39.15","ls":"1.8","lr":"0.98","ly":"77.91","lt":"35.73","lu":"52.43","mk":"9.58","mg":"8.33","mw":"5.04","my":"218.95","mv":"1.43","ml":"9.08","mt":"7.8","mr":"3.49","mu":"9.43","mx":"1004.04","md":"5.36","mn":"5.81","me":"3.88","ma":"91.7","mz":"10.21","mm":"35.65","na":"11.45","np":"15.11","nl":"770.31","nz":"138","ni":"6.38","ne":"5.6","ng":"206.66","no":"413.51","om":"53.78","pk":"174.79","pa":"27.2","pg":"8.81","py":"17.17","pe":"153.55","ph":"189.06","pl":"438.88","pt":"223.7","qa":"126.52","ro":"158.39","ru":"1476.91","rw":"5.69","ws":"0.55","st":"0.19","sa":"434.44","sn":"12.66","rs":"38.92","sc":"0.92","sl":"1.9","sg":"217.38","sk":"86.26","si":"46.44","sb":"0.67","za":"354.41","es":"1374.78","lk":"48.24","kn":"0.56","lc":"1","vc":"0.58","sd":"65.93","sr":"3.3","sz":"3.17","se":"444.59","ch":"522.44","sy":"59.63","tw":"426.98","tj":"5.58","tz":"22.43","th":"312.61","tl":"0.62","tg":"3.07","to":"0.3","tt":"21.2","tn":"43.86","tr":"729.05","tm":0,"ug":"17.12","ua":"136.56","ae":"239.65","gb":"2258.57","us":"14624.18","uy":"40.71","uz":"37.72","vu":"0.72","ve":"285.21","vn":"101.99","ye":"30.02","zm":"15.69","zw":"5.57"};
\ No newline at end of file
diff --git a/scripts/jqvmap/jquery.vmap.js b/scripts/jqvmap/jquery.vmap.js
new file mode 100644
index 0000000000..db70d85d1a
--- /dev/null
+++ b/scripts/jqvmap/jquery.vmap.js
@@ -0,0 +1,1100 @@
+/*!
+ * jQVMap Version 1.0
+ *
+ * http://jqvmap.com
+ *
+ * Copyright 2012, Peter Schmalfeldt
+ * Copyright 2011-2012, Kirill Lebedev
+ * Licensed under the MIT license.
+ *
+ * Fork Me @ https://github.com/manifestinteractive/jqvmap
+ */
+(function ($) {
+
+ var apiParams = {
+ colors: 1,
+ values: 1,
+ backgroundColor: 1,
+ scaleColors: 1,
+ normalizeFunction: 1,
+ enableZoom: 1,
+ showTooltip: 1,
+ borderColor: 1,
+ borderWidth: 1,
+ borderOpacity: 1,
+ selectedRegions: 1,
+ multiSelectRegion: 1
+ };
+
+ var apiEvents = {
+ onLabelShow: 'labelShow',
+ onRegionOver: 'regionMouseOver',
+ onRegionOut: 'regionMouseOut',
+ onRegionClick: 'regionClick',
+ onRegionSelect: 'regionSelect',
+ onRegionDeselect: 'regionDeselect'
+ };
+
+ $.fn.vectorMap = function (options) {
+
+ var defaultParams = {
+ map: 'world_en',
+ backgroundColor: '#a5bfdd',
+ color: '#f4f3f0',
+ hoverColor: '#c9dfaf',
+ selectedColor: '#c9dfaf',
+ scaleColors: ['#b6d6ff', '#005ace'],
+ normalizeFunction: 'linear',
+ enableZoom: true,
+ showTooltip: true,
+ borderColor: '#818181',
+ borderWidth: 1,
+ borderOpacity: 0.25,
+ selectedRegions: null,
+ multiSelectRegion: false
+ }, map = this.data('mapObject');
+
+ if (options === 'addMap') {
+ WorldMap.maps[arguments[1]] = arguments[2];
+ } else if (options === 'set' && apiParams[arguments[1]]) {
+ map['set' + arguments[1].charAt(0).toUpperCase() + arguments[1].substr(1)].apply(map, Array.prototype.slice.call(arguments, 2));
+ } else if (typeof options === 'string' &&
+ typeof map[options] === 'function') {
+ return map[options].apply(map, Array.prototype.slice.call(arguments, 1));
+ } else {
+ $.extend(defaultParams, options);
+ defaultParams.container = this;
+ this.css({ position: 'relative', overflow: 'hidden' });
+
+ map = new WorldMap(defaultParams);
+
+ this.data('mapObject', map);
+
+ for (var e in apiEvents) {
+ if (defaultParams[e]) {
+ this.bind(apiEvents[e] + '.jqvmap', defaultParams[e]);
+ }
+ }
+ }
+ };
+
+ var VectorCanvas = function (width, height, params) {
+ this.mode = window.SVGAngle ? 'svg' : 'vml';
+ this.params = params;
+
+ if (this.mode == 'svg') {
+ this.createSvgNode = function (nodeName) {
+ return document.createElementNS(this.svgns, nodeName);
+ };
+ } else {
+ try {
+ if (!document.namespaces.rvml) {
+ document.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");
+ }
+ this.createVmlNode = function (tagName) {
+ return document.createElement('');
+ };
+ } catch (e) {
+ this.createVmlNode = function (tagName) {
+ return document.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
+ };
+ }
+
+ document.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");
+ }
+
+ if (this.mode == 'svg') {
+ this.canvas = this.createSvgNode('svg');
+ } else {
+ this.canvas = this.createVmlNode('group');
+ this.canvas.style.position = 'absolute';
+ }
+
+ this.setSize(width, height);
+ };
+
+ VectorCanvas.prototype = {
+ svgns: "http://www.w3.org/2000/svg",
+ mode: 'svg',
+ width: 0,
+ height: 0,
+ canvas: null,
+
+ setSize: function (width, height) {
+ if (this.mode == 'svg') {
+ this.canvas.setAttribute('width', width);
+ this.canvas.setAttribute('height', height);
+ } else {
+ this.canvas.style.width = width + "px";
+ this.canvas.style.height = height + "px";
+ this.canvas.coordsize = width + ' ' + height;
+ this.canvas.coordorigin = "0 0";
+ if (this.rootGroup) {
+ var pathes = this.rootGroup.getElementsByTagName('shape');
+ for (var i = 0, l = pathes.length; i < l; i++) {
+ pathes[i].coordsize = width + ' ' + height;
+ pathes[i].style.width = width + 'px';
+ pathes[i].style.height = height + 'px';
+ }
+ this.rootGroup.coordsize = width + ' ' + height;
+ this.rootGroup.style.width = width + 'px';
+ this.rootGroup.style.height = height + 'px';
+ }
+ }
+ this.width = width;
+ this.height = height;
+ },
+
+ createPath: function (config) {
+ var node;
+ if (this.mode == 'svg') {
+ node = this.createSvgNode('path');
+ node.setAttribute('d', config.path);
+
+ if (this.params.borderColor !== null) {
+ node.setAttribute('stroke', this.params.borderColor);
+ }
+ if (this.params.borderWidth > 0) {
+ node.setAttribute('stroke-width', this.params.borderWidth);
+ node.setAttribute('stroke-linecap', 'round');
+ node.setAttribute('stroke-linejoin', 'round');
+ }
+ if (this.params.borderOpacity > 0) {
+ node.setAttribute('stroke-opacity', this.params.borderOpacity);
+ }
+
+ node.setFill = function (color) {
+ this.setAttribute("fill", color);
+ if (this.getAttribute("original") === null) {
+ this.setAttribute("original", color);
+ }
+ };
+
+ node.getFill = function (color) {
+ return this.getAttribute("fill");
+ };
+
+ node.getOriginalFill = function () {
+ return this.getAttribute("original");
+ };
+
+ node.setOpacity = function (opacity) {
+ this.setAttribute('fill-opacity', opacity);
+ };
+ } else {
+ node = this.createVmlNode('shape');
+ node.coordorigin = "0 0";
+ node.coordsize = this.width + ' ' + this.height;
+ node.style.width = this.width + 'px';
+ node.style.height = this.height + 'px';
+ node.fillcolor = WorldMap.defaultFillColor;
+ node.stroked = false;
+ node.path = VectorCanvas.pathSvgToVml(config.path);
+
+ var scale = this.createVmlNode('skew');
+ scale.on = true;
+ scale.matrix = '0.01,0,0,0.01,0,0';
+ scale.offset = '0,0';
+
+ node.appendChild(scale);
+
+ var fill = this.createVmlNode('fill');
+ node.appendChild(fill);
+
+ node.setFill = function (color) {
+ this.getElementsByTagName('fill')[0].color = color;
+ if (this.getAttribute("original") === null) {
+ this.setAttribute("original", color);
+ }
+ };
+
+ node.getFill = function (color) {
+ return this.getElementsByTagName('fill')[0].color;
+ };
+ node.getOriginalFill = function () {
+ return this.getAttribute("original");
+ };
+ node.setOpacity = function (opacity) {
+ this.getElementsByTagName('fill')[0].opacity = parseInt(opacity * 100, 10) + '%';
+ };
+ }
+ return node;
+ },
+
+ createGroup: function (isRoot) {
+ var node;
+ if (this.mode == 'svg') {
+ node = this.createSvgNode('g');
+ } else {
+ node = this.createVmlNode('group');
+ node.style.width = this.width + 'px';
+ node.style.height = this.height + 'px';
+ node.style.left = '0px';
+ node.style.top = '0px';
+ node.coordorigin = "0 0";
+ node.coordsize = this.width + ' ' + this.height;
+ }
+
+ if (isRoot) {
+ this.rootGroup = node;
+ }
+ return node;
+ },
+
+ applyTransformParams: function (scale, transX, transY) {
+ if (this.mode == 'svg') {
+ this.rootGroup.setAttribute('transform', 'scale(' + scale + ') translate(' + transX + ', ' + transY + ')');
+ } else {
+ this.rootGroup.coordorigin = (this.width - transX) + ',' + (this.height - transY);
+ this.rootGroup.coordsize = this.width / scale + ',' + this.height / scale;
+ }
+ }
+ };
+
+ VectorCanvas.pathSvgToVml = function (path) {
+ var result = '';
+ var cx = 0, cy = 0, ctrlx, ctrly;
+
+ return path.replace(/([MmLlHhVvCcSs])((?:-?(?:\d+)?(?:\.\d+)?,?\s?)+)/g, function (segment, letter, coords, index) {
+ coords = coords.replace(/(\d)-/g, '$1,-').replace(/\s+/g, ',').split(',');
+ if (!coords[0]) {
+ coords.shift();
+ }
+
+ for (var i = 0, l = coords.length; i < l; i++) {
+ coords[i] = Math.round(100 * coords[i]);
+ }
+
+ switch (letter) {
+ case 'm':
+ cx += coords[0];
+ cy += coords[1];
+ return 't' + coords.join(',');
+ break;
+
+ case 'M':
+ cx = coords[0];
+ cy = coords[1];
+ return 'm' + coords.join(',');
+ break;
+
+ case 'l':
+ cx += coords[0];
+ cy += coords[1];
+ return 'r' + coords.join(',');
+ break;
+
+ case 'L':
+ cx = coords[0];
+ cy = coords[1];
+ return 'l' + coords.join(',');
+ break;
+
+ case 'h':
+ cx += coords[0];
+ return 'r' + coords[0] + ',0';
+ break;
+
+ case 'H':
+ cx = coords[0];
+ return 'l' + cx + ',' + cy;
+ break;
+
+ case 'v':
+ cy += coords[0];
+ return 'r0,' + coords[0];
+ break;
+
+ case 'V':
+ cy = coords[0];
+ return 'l' + cx + ',' + cy;
+ break;
+
+ case 'c':
+ ctrlx = cx + coords[coords.length - 4];
+ ctrly = cy + coords[coords.length - 3];
+ cx += coords[coords.length - 2];
+ cy += coords[coords.length - 1];
+ return 'v' + coords.join(',');
+ break;
+
+ case 'C':
+ ctrlx = coords[coords.length - 4];
+ ctrly = coords[coords.length - 3];
+ cx = coords[coords.length - 2];
+ cy = coords[coords.length - 1];
+ return 'c' + coords.join(',');
+ break;
+
+ case 's':
+ coords.unshift(cy - ctrly);
+ coords.unshift(cx - ctrlx);
+ ctrlx = cx + coords[coords.length - 4];
+ ctrly = cy + coords[coords.length - 3];
+ cx += coords[coords.length - 2];
+ cy += coords[coords.length - 1];
+ return 'v' + coords.join(',');
+ break;
+
+ case 'S':
+ coords.unshift(cy + cy - ctrly);
+ coords.unshift(cx + cx - ctrlx);
+ ctrlx = coords[coords.length - 4];
+ ctrly = coords[coords.length - 3];
+ cx = coords[coords.length - 2];
+ cy = coords[coords.length - 1];
+ return 'c' + coords.join(',');
+ break;
+
+ default:
+ return false;
+ break;
+ }
+
+ return '';
+
+ }).replace(/z/g, '');
+ };
+
+ var WorldMap = function (params) {
+ params = params || {};
+ var map = this;
+ var mapData = WorldMap.maps[params.map];
+
+ this.selectedRegions = [];
+ this.multiSelectRegion = params.multiSelectRegion;
+
+ this.container = params.container;
+
+ this.defaultWidth = mapData.width;
+ this.defaultHeight = mapData.height;
+
+ this.color = params.color;
+ this.selectedColor = params.selectedColor;
+ this.hoverColor = params.hoverColor;
+ this.hoverOpacity = params.hoverOpacity;
+ this.setBackgroundColor(params.backgroundColor);
+
+ this.width = params.container.width();
+ this.height = params.container.height();
+
+ this.resize();
+
+ jQuery(window).resize(function () {
+ map.width = params.container.width();
+ map.height = params.container.height();
+ map.resize();
+ map.canvas.setSize(map.width, map.height);
+ map.applyTransform();
+ });
+
+ this.canvas = new VectorCanvas(this.width, this.height, params);
+ params.container.append(this.canvas.canvas);
+
+ this.makeDraggable();
+
+ this.rootGroup = this.canvas.createGroup(true);
+
+ this.index = WorldMap.mapIndex;
+ this.label = jQuery('').addClass('jqvmap-label').appendTo(jQuery('body')).hide();
+
+ if (params.enableZoom) {
+ jQuery('').addClass('jqvmap-zoomin').text('+').appendTo(params.container);
+ jQuery('').addClass('jqvmap-zoomout').html('−').appendTo(params.container);
+ }
+
+ map.countries = [];
+
+ for (var key in mapData.pathes) {
+ var path = this.canvas.createPath({
+ path: mapData.pathes[key].path
+ });
+
+ path.setFill(this.color);
+ path.id = map.getCountryId(key);
+ map.countries[key] = path;
+
+ if (this.canvas.mode == 'svg') {
+ path.setAttribute('class', 'jvectormap-region');
+ } else {
+ jQuery(path).addClass('jvectormap-region');
+ }
+
+ jQuery(this.rootGroup).append(path);
+ }
+
+ jQuery(params.container).delegate(this.canvas.mode == 'svg' ? 'path' : 'shape', 'mouseover mouseout', function (e) {
+ var path = e.target,
+ code = e.target.id.split('_').pop(),
+ labelShowEvent = $.Event('labelShow.jqvmap'),
+ regionMouseOverEvent = $.Event('regionMouseOver.jqvmap');
+
+ if (e.type == 'mouseover') {
+ jQuery(params.container).trigger(regionMouseOverEvent, [code, mapData.pathes[code].name]);
+ if (!regionMouseOverEvent.isDefaultPrevented()) {
+ map.highlight(code, path);
+ }
+ if (params.showTooltip) {
+ map.label.text(mapData.pathes[code].name);
+ jQuery(params.container).trigger(labelShowEvent, [map.label, code]);
+
+ if (!labelShowEvent.isDefaultPrevented()) {
+ map.label.show();
+ map.labelWidth = map.label.width();
+ map.labelHeight = map.label.height();
+ }
+ }
+ } else {
+ map.unhighlight(code, path);
+
+ map.label.hide();
+ jQuery(params.container).trigger('regionMouseOut.jqvmap', [code, mapData.pathes[code].name]);
+ }
+ });
+
+ jQuery(params.container).delegate(this.canvas.mode == 'svg' ? 'path' : 'shape', 'click', function (e) {
+ if (!params.multiSelectRegion) {
+ for (var key in mapData.pathes) {
+ map.countries[key].currentFillColor = map.countries[key].getOriginalFill();
+ map.countries[key].setFill(map.countries[key].getOriginalFill());
+ }
+ }
+
+ var path = e.target;
+ var code = e.target.id.split('_').pop();
+
+ jQuery(params.container).trigger('regionClick.jqvmap', [code, mapData.pathes[code].name]);
+ if (!regionClickEvent.isDefaultPrevented()) {
+ if (map.selectedRegions.indexOf(code) !== -1) {
+ map.deselect(code, path);
+ } else {
+ map.select(code, path);
+ }
+ }
+
+ //console.log(selectedRegions);
+
+ });
+
+ if (params.showTooltip) {
+ params.container.mousemove(function (e) {
+ if (map.label.is(':visible')) {
+ var left = e.pageX - 15 - map.labelWidth;
+ var top = e.pageY - 15 - map.labelHeight;
+
+ if(left < 0)
+ left = e.pageX + 15;
+ if(top < 0)
+ top = e.pageY + 15;
+
+ map.label.css({
+ left: left,
+ top: top
+ });
+ }
+ });
+ }
+
+ this.setColors(params.colors);
+
+ this.canvas.canvas.appendChild(this.rootGroup);
+
+ this.applyTransform();
+
+ this.colorScale = new ColorScale(params.scaleColors, params.normalizeFunction, params.valueMin, params.valueMax);
+
+ if (params.values) {
+ this.values = params.values;
+ this.setValues(params.values);
+ }
+
+ if (params.selectedRegions) {
+ if (params.selectedRegions instanceof Array) {
+ for(var k in params.selectedRegions) {
+ this.select(params.selectedRegions[k].toLowerCase());
+ }
+ } else {
+ this.select(params.selectedRegions.toLowerCase());
+ }
+ }
+
+ this.bindZoomButtons();
+
+ if(params.pins) {
+ /*if(params.pinMode) {
+ if(params.pinMode != "id" && params.pinMode != "content") {
+ params.pinMode = "content";
+ }
+ } else {
+ params.pinMode = "content";
+ }*/
+ this.pinHandlers = false;
+ this.placePins(params.pins, params.pinMode);
+ }
+
+ WorldMap.mapIndex++;
+ };
+
+ WorldMap.prototype = {
+ transX: 0,
+ transY: 0,
+ scale: 1,
+ baseTransX: 0,
+ baseTransY: 0,
+ baseScale: 1,
+ width: 0,
+ height: 0,
+ countries: {},
+ countriesColors: {},
+ countriesData: {},
+ zoomStep: 1.4,
+ zoomMaxStep: 4,
+ zoomCurStep: 1,
+
+ setColors: function (key, color) {
+ if (typeof key == 'string') {
+ this.countries[key].setFill(color);
+ this.countries[key].setAttribute("original", color);
+ } else {
+ var colors = key;
+
+ for (var code in colors) {
+ if (this.countries[code]) {
+ this.countries[code].setFill(colors[code]);
+ this.countries[code].setAttribute("original", colors[code]);
+ }
+ }
+ }
+ },
+
+ setValues: function (values) {
+ var max = 0,
+ min = Number.MAX_VALUE,
+ val;
+
+ for (var cc in values) {
+ val = parseFloat(values[cc]);
+ if (val > max) {
+ max = values[cc];
+ }
+ if (val && val < min) {
+ min = val;
+ }
+ }
+
+ this.colorScale.setMin(min);
+ this.colorScale.setMax(max);
+
+ var colors = {};
+ for (cc in values) {
+ val = parseFloat(values[cc]);
+ if (val) {
+ colors[cc] = this.colorScale.getColor(val);
+ } else {
+ colors[cc] = this.color;
+ }
+ }
+ this.setColors(colors);
+ this.values = values;
+ },
+
+ setBackgroundColor: function (backgroundColor) {
+ this.container.css('background-color', backgroundColor);
+ },
+
+ setScaleColors: function (colors) {
+ this.colorScale.setColors(colors);
+
+ if (this.values) {
+ this.setValues(this.values);
+ }
+ },
+
+ setNormalizeFunction: function (f) {
+ this.colorScale.setNormalizeFunction(f);
+
+ if (this.values) {
+ this.setValues(this.values);
+ }
+ },
+
+ highlight: function (cc, path) {
+ path = path || $('#' + this.getCountryId(cc))[0];
+ if (this.hoverOpacity) {
+ path.setOpacity(this.hoverOpacity);
+ } else if (this.hoverColor) {
+ path.currentFillColor = path.getFill() + '';
+ path.setFill(this.hoverColor);
+ }
+ },
+
+ unhighlight: function (cc, path) {
+ path = path || $('#' + this.getCountryId(cc))[0];
+ path.setOpacity(1);
+ if (path.currentFillColor) {
+ path.setFill(path.currentFillColor);
+ }
+ },
+
+ select: function (cc, path) {
+ path = path || $('#' + this.getCountryId(cc))[0];
+ if(this.selectedRegions.indexOf(cc) < 0) {
+ if (this.multiSelectRegion) {
+ this.selectedRegions.push(cc);
+ } else {
+ this.selectedRegions = [cc];
+ }
+ // MUST BE after the change of selectedRegions
+ // Otherwise, we might loop
+ $(this.container).trigger('regionSelect.jqvmap', [cc]);
+ if (this.selectedColor) {
+ path.currentFillColor = this.selectedColor;
+ path.setFill(this.selectedColor);
+ }
+ }
+ },
+
+ deselect: function (cc, path) {
+ path = path || $('#' + this.getCountryId(cc))[0];
+ if(this.selectedRegions.indexOf(cc) >= 0) {
+ this.selectedRegions.splice(this.selectedRegions.indexOf(cc), 1);
+ // MUST BE after the change of selectedRegions
+ // Otherwise, we might loop
+ $(this.container).trigger('regionDeselect.jqvmap', [cc]);
+ path.currentFillColor = path.getOriginalFill();
+ path.setFill(path.getOriginalFill());
+ }
+ },
+
+ isSelected: function(cc) {
+ return this.selectedRegions.indexOf(cc) >= 0;
+ },
+
+ resize: function () {
+ var curBaseScale = this.baseScale;
+ if (this.width / this.height > this.defaultWidth / this.defaultHeight) {
+ this.baseScale = this.height / this.defaultHeight;
+ this.baseTransX = Math.abs(this.width - this.defaultWidth * this.baseScale) / (2 * this.baseScale);
+ } else {
+ this.baseScale = this.width / this.defaultWidth;
+ this.baseTransY = Math.abs(this.height - this.defaultHeight * this.baseScale) / (2 * this.baseScale);
+ }
+ this.scale *= this.baseScale / curBaseScale;
+ this.transX *= this.baseScale / curBaseScale;
+ this.transY *= this.baseScale / curBaseScale;
+ },
+
+ reset: function () {
+ this.countryTitle.reset();
+ for (var key in this.countries) {
+ this.countries[key].setFill(WorldMap.defaultColor);
+ }
+ this.scale = this.baseScale;
+ this.transX = this.baseTransX;
+ this.transY = this.baseTransY;
+ this.applyTransform();
+ },
+
+ applyTransform: function () {
+ var maxTransX, maxTransY, minTransX, minTransY;
+ if (this.defaultWidth * this.scale <= this.width) {
+ maxTransX = (this.width - this.defaultWidth * this.scale) / (2 * this.scale);
+ minTransX = (this.width - this.defaultWidth * this.scale) / (2 * this.scale);
+ } else {
+ maxTransX = 0;
+ minTransX = (this.width - this.defaultWidth * this.scale) / this.scale;
+ }
+
+ if (this.defaultHeight * this.scale <= this.height) {
+ maxTransY = (this.height - this.defaultHeight * this.scale) / (2 * this.scale);
+ minTransY = (this.height - this.defaultHeight * this.scale) / (2 * this.scale);
+ } else {
+ maxTransY = 0;
+ minTransY = (this.height - this.defaultHeight * this.scale) / this.scale;
+ }
+
+ if (this.transY > maxTransY) {
+ this.transY = maxTransY;
+ }
+ else if (this.transY < minTransY) {
+ this.transY = minTransY;
+ }
+ if (this.transX > maxTransX) {
+ this.transX = maxTransX;
+ }
+ else if (this.transX < minTransX) {
+ this.transX = minTransX;
+ }
+
+ this.canvas.applyTransformParams(this.scale, this.transX, this.transY);
+ },
+
+ makeDraggable: function () {
+ var mouseDown = false;
+ var oldPageX, oldPageY;
+ var self = this;
+
+ self.isMoving = false;
+ self.isMovingTimeout = false;
+
+ this.container.mousemove(function (e) {
+
+ if (mouseDown) {
+ var curTransX = self.transX;
+ var curTransY = self.transY;
+
+ self.transX -= (oldPageX - e.pageX) / self.scale;
+ self.transY -= (oldPageY - e.pageY) / self.scale;
+
+ self.applyTransform();
+
+ oldPageX = e.pageX;
+ oldPageY = e.pageY;
+
+ self.isMoving = true;
+ if (self.isMovingTimeout) {
+ clearTimeout(self.isMovingTimeout);
+ }
+
+ self.container.trigger('drag');
+ }
+
+ return false;
+
+ }).mousedown(function (e) {
+
+ mouseDown = true;
+ oldPageX = e.pageX;
+ oldPageY = e.pageY;
+
+ return false;
+
+ }).mouseup(function () {
+
+ mouseDown = false;
+
+ self.isMovingTimeout = setTimeout(function () {
+ self.isMoving = false;
+ }, 100);
+
+ return false;
+
+ });
+ },
+
+ bindZoomButtons: function () {
+ var map = this;
+ this.container.find('.jqvmap-zoomin').click(function(){
+ map.zoomIn();
+ });
+ this.container.find('.jqvmap-zoomout').click(function(){
+ map.zoomOut();
+ });
+ },
+
+ zoomIn: function () {
+ var map = this;
+ var sliderDelta = (jQuery('#zoom').innerHeight() - 6 * 2 - 15 * 2 - 3 * 2 - 7 - 6) / (this.zoomMaxStep - this.zoomCurStep);
+
+ if (map.zoomCurStep < map.zoomMaxStep) {
+ var curTransX = map.transX;
+ var curTransY = map.transY;
+ var curScale = map.scale;
+
+ map.transX -= (map.width / map.scale - map.width / (map.scale * map.zoomStep)) / 2;
+ map.transY -= (map.height / map.scale - map.height / (map.scale * map.zoomStep)) / 2;
+ map.setScale(map.scale * map.zoomStep);
+ map.zoomCurStep++;
+
+ jQuery('#zoomSlider').css('top', parseInt(jQuery('#zoomSlider').css('top'), 10) - sliderDelta);
+
+ map.container.trigger("zoomIn");
+ }
+ },
+
+ zoomOut: function () {
+ var map = this;
+ var sliderDelta = (jQuery('#zoom').innerHeight() - 6 * 2 - 15 * 2 - 3 * 2 - 7 - 6) / (this.zoomMaxStep - this.zoomCurStep);
+
+ if (map.zoomCurStep > 1) {
+ var curTransX = map.transX;
+ var curTransY = map.transY;
+ var curScale = map.scale;
+
+ map.transX += (map.width / (map.scale / map.zoomStep) - map.width / map.scale) / 2;
+ map.transY += (map.height / (map.scale / map.zoomStep) - map.height / map.scale) / 2;
+ map.setScale(map.scale / map.zoomStep);
+ map.zoomCurStep--;
+
+ jQuery('#zoomSlider').css('top', parseInt(jQuery('#zoomSlider').css('top'), 10) + sliderDelta);
+
+ map.container.trigger("zoomOut");
+ }
+ },
+
+ setScale: function (scale) {
+ this.scale = scale;
+ this.applyTransform();
+ },
+
+ getCountryId: function (cc) {
+ return 'jqvmap' + this.index + '_' + cc;
+ },
+
+ getPinId: function (cc) {
+ return this.getCountryId(cc)+'_pin';
+ },
+
+ placePins: function(pins, pinMode){
+ var map = this;
+
+ if(!pinMode || (pinMode != "content" && pinMode != "id")) {
+ pinMode = "content";
+ }
+
+ if(pinMode == "content") {//treat pin as content
+ jQuery.each(pins, function(index, pin){
+ if(jQuery('#'+map.getCountryId(index)).length == 0){
+ return;
+ }
+ //mapData.pathes[code].name
+ var pinIndex = map.getPinId(index);
+ if(jQuery('#'+pinIndex).length > 0){
+ jQuery('#'+pinIndex).remove();
+ }
+ map.container.append('' + pin + '
');
+ });
+ } else { //treat pin as id of an html content
+ jQuery.each(pins, function(index, pin){
+ if(jQuery('#'+map.getCountryId(index)).length == 0){
+ return;
+ }
+ var pinIndex = map.getPinId(index);
+ if(jQuery('#'+pinIndex).length > 0){
+ jQuery('#'+pinIndex).remove();
+ }
+ map.container.append('');
+ jQuery('#'+pinIndex).append(jQuery('#'+pin));
+ });
+ }
+
+ this.positionPins();
+ if(!this.pinHandlers){
+ this.pinHandlers = true;//do only once
+ var positionFix = function(){
+ map.positionPins();
+ };
+ this.container.bind('zoomIn', positionFix)
+ .bind('zoomOut', positionFix)
+ .bind('drag', positionFix);
+ }
+ },
+
+ positionPins: function(){
+ var map = this;
+ var pins = this.container.find('.jqvmap_pin');
+ jQuery.each(pins, function(index, pinObj){
+ pinObj = jQuery(pinObj);
+ var countryId = map.getCountryId(pinObj.attr('for'));
+ var countryObj = jQuery('#' + countryId);
+
+ var bbox = document.getElementById(countryId).getBBox();
+ var position = countryObj.position();
+
+ var scale = map.scale;
+
+ var left = position.left + (bbox.width / 2) * scale - pinObj.width() / 2,
+ top = position.top + (bbox.height / 2) * scale - pinObj.height() / 2;
+
+ pinObj.css('left',left).css('top',top);
+ });
+ },
+
+ getPin: function(cc){
+ var pinObj = jQuery('#'+this.getPinId(cc));
+ return pinObj.html();
+ },
+
+ getPins: function(){
+ var pins = this.container.find('.jqvmap_pin');
+ var ret = new Object();
+ jQuery.each(pins, function(index, pinObj){
+ pinObj = jQuery(pinObj);
+ var cc = pinObj.attr('for');
+ var pinContent = pinObj.html();
+ eval("ret." + cc + "=pinContent");
+ });
+ return JSON.stringify(ret);
+ },
+
+ removePin: function(cc) {
+ jQuery('#'+this.getPinId(cc)).remove();
+ },
+
+ removePins: function(){
+ this.container.find('.jqvmap_pin').remove();
+ }
+ };
+
+ WorldMap.xlink = "http://www.w3.org/1999/xlink";
+ WorldMap.mapIndex = 1;
+ WorldMap.maps = {};
+
+ var ColorScale = function (colors, normalizeFunction, minValue, maxValue) {
+ if (colors) {
+ this.setColors(colors);
+ }
+ if (normalizeFunction) {
+ this.setNormalizeFunction(normalizeFunction);
+ }
+ if (minValue) {
+ this.setMin(minValue);
+ }
+ if (minValue) {
+ this.setMax(maxValue);
+ }
+ };
+
+ ColorScale.prototype = {
+ colors: [],
+
+ setMin: function (min) {
+ this.clearMinValue = min;
+
+ if (typeof this.normalize === 'function') {
+ this.minValue = this.normalize(min);
+ } else {
+ this.minValue = min;
+ }
+ },
+
+ setMax: function (max) {
+ this.clearMaxValue = max;
+ if (typeof this.normalize === 'function') {
+ this.maxValue = this.normalize(max);
+ } else {
+ this.maxValue = max;
+ }
+ },
+
+ setColors: function (colors) {
+ for (var i = 0; i < colors.length; i++) {
+ colors[i] = ColorScale.rgbToArray(colors[i]);
+ }
+ this.colors = colors;
+ },
+
+ setNormalizeFunction: function (f) {
+ if (f === 'polynomial') {
+ this.normalize = function (value) {
+ return Math.pow(value, 0.2);
+ };
+ }
+ else if (f === 'linear') {
+ delete this.normalize;
+ } else {
+ this.normalize = f;
+ }
+ this.setMin(this.clearMinValue);
+ this.setMax(this.clearMaxValue);
+ },
+
+ getColor: function (value) {
+ if (typeof this.normalize === 'function') {
+ value = this.normalize(value);
+ }
+
+ var lengthes = [];
+ var fullLength = 0;
+ var l;
+
+ for (var i = 0; i < this.colors.length - 1; i++) {
+ l = this.vectorLength(this.vectorSubtract(this.colors[i + 1], this.colors[i]));
+ lengthes.push(l);
+ fullLength += l;
+ }
+
+ var c = (this.maxValue - this.minValue) / fullLength;
+
+ for (i = 0; i < lengthes.length; i++) {
+ lengthes[i] *= c;
+ }
+
+ i = 0;
+ value -= this.minValue;
+
+ while (value - lengthes[i] >= 0) {
+ value -= lengthes[i];
+ i++;
+ }
+
+ var color;
+ if (i == this.colors.length - 1) {
+ color = this.vectorToNum(this.colors[i]).toString(16);
+ } else {
+ color = (this.vectorToNum(this.vectorAdd(this.colors[i], this.vectorMult(this.vectorSubtract(this.colors[i + 1], this.colors[i]), (value) / (lengthes[i]))))).toString(16);
+ }
+
+ while (color.length < 6) {
+ color = '0' + color;
+ }
+ return '#' + color;
+ },
+
+ vectorToNum: function (vector) {
+ var num = 0;
+ for (var i = 0; i < vector.length; i++) {
+ num += Math.round(vector[i]) * Math.pow(256, vector.length - i - 1);
+ }
+ return num;
+ },
+
+ vectorSubtract: function (vector1, vector2) {
+ var vector = [];
+ for (var i = 0; i < vector1.length; i++) {
+ vector[i] = vector1[i] - vector2[i];
+ }
+ return vector;
+ },
+
+ vectorAdd: function (vector1, vector2) {
+ var vector = [];
+ for (var i = 0; i < vector1.length; i++) {
+ vector[i] = vector1[i] + vector2[i];
+ }
+ return vector;
+ },
+
+ vectorMult: function (vector, num) {
+ var result = [];
+ for (var i = 0; i < vector.length; i++) {
+ result[i] = vector[i] * num;
+ }
+ return result;
+ },
+
+ vectorLength: function (vector) {
+ var result = 0;
+ for (var i = 0; i < vector.length; i++) {
+ result += vector[i] * vector[i];
+ }
+ return Math.sqrt(result);
+ }
+ };
+
+ ColorScale.arrayToRgb = function (ar) {
+ var rgb = '#';
+ var d;
+ for (var i = 0; i < ar.length; i++) {
+ d = ar[i].toString(16);
+ rgb += d.length == 1 ? '0' + d : d;
+ }
+ return rgb;
+ };
+
+ ColorScale.rgbToArray = function (rgb) {
+ rgb = rgb.substr(1);
+ return [parseInt(rgb.substr(0, 2), 16), parseInt(rgb.substr(2, 2), 16), parseInt(rgb.substr(4, 2), 16)];
+ };
+
+})(jQuery);
diff --git a/scripts/jqvmap/jquery.vmap.min.js b/scripts/jqvmap/jquery.vmap.min.js
new file mode 100644
index 0000000000..8b6d88120f
--- /dev/null
+++ b/scripts/jqvmap/jquery.vmap.min.js
@@ -0,0 +1,12 @@
+/*!
+ * jQVMap Version 1.0
+ *
+ * http://jqvmap.com
+ *
+ * Copyright 2012, Peter Schmalfeldt
+ * Copyright 2011-2012, Kirill Lebedev
+ * Licensed under the MIT license.
+ *
+ * Fork Me @ https://github.com/manifestinteractive/jqvmap
+ */
+(function($){var apiParams={colors:1,values:1,backgroundColor:1,scaleColors:1,normalizeFunction:1,enableZoom:1,showTooltip:1,borderColor:1,borderWidth:1,borderOpacity:1,selectedRegion:1};var apiEvents={onLabelShow:'labelShow',onRegionOver:'regionMouseOver',onRegionOut:'regionMouseOut',onRegionClick:'regionClick'};$.fn.vectorMap=function(options){var defaultParams={map:'world_en',backgroundColor:'#a5bfdd',color:'#f4f3f0',hoverColor:'#c9dfaf',selectedColor:'#c9dfaf',scaleColors:['#b6d6ff','#005ace'],normalizeFunction:'linear',enableZoom:true,showTooltip:true,borderColor:'#818181',borderWidth:1,borderOpacity:0.25,selectedRegion:null},map;if(options==='addMap'){WorldMap.maps[arguments[1]]=arguments[2]}else if(options==='set'&&apiParams[arguments[1]]){this.data('mapObject')['set'+arguments[1].charAt(0).toUpperCase()+arguments[1].substr(1)].apply(this.data('mapObject'),Array.prototype.slice.call(arguments,2))}else{$.extend(defaultParams,options);defaultParams.container=this;this.css({position:'relative',overflow:'hidden'});map=new WorldMap(defaultParams);this.data('mapObject',map);for(var e in apiEvents){if(defaultParams[e]){this.bind(apiEvents[e]+'.jqvmap',defaultParams[e])}}}};var VectorCanvas=function(width,height,params){this.mode=window.SVGAngle?'svg':'vml';this.params=params;if(this.mode=='svg'){this.createSvgNode=function(nodeName){return document.createElementNS(this.svgns,nodeName)}}else{try{if(!document.namespaces.rvml){document.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}this.createVmlNode=function(tagName){return document.createElement('')}}catch(e){this.createVmlNode=function(tagName){return document.createElement('<'+tagName+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}document.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)")}if(this.mode=='svg'){this.canvas=this.createSvgNode('svg')}else{this.canvas=this.createVmlNode('group');this.canvas.style.position='absolute'}this.setSize(width,height)};VectorCanvas.prototype={svgns:"http://www.w3.org/2000/svg",mode:'svg',width:0,height:0,canvas:null,setSize:function(width,height){if(this.mode=='svg'){this.canvas.setAttribute('width',width);this.canvas.setAttribute('height',height)}else{this.canvas.style.width=width+"px";this.canvas.style.height=height+"px";this.canvas.coordsize=width+' '+height;this.canvas.coordorigin="0 0";if(this.rootGroup){var pathes=this.rootGroup.getElementsByTagName('shape');for(var i=0,l=pathes.length;i0){node.setAttribute('stroke-width',this.params.borderWidth);node.setAttribute('stroke-linecap','round');node.setAttribute('stroke-linejoin','round')}if(this.params.borderOpacity>0){node.setAttribute('stroke-opacity',this.params.borderOpacity)}node.setFill=function(color){this.setAttribute("fill",color);if(this.getAttribute("original")===null){this.setAttribute("original",color)}};node.getFill=function(color){return this.getAttribute("fill")};node.getOriginalFill=function(){return this.getAttribute("original")};node.setOpacity=function(opacity){this.setAttribute('fill-opacity',opacity)}}else{node=this.createVmlNode('shape');node.coordorigin="0 0";node.coordsize=this.width+' '+this.height;node.style.width=this.width+'px';node.style.height=this.height+'px';node.fillcolor=WorldMap.defaultFillColor;node.stroked=false;node.path=VectorCanvas.pathSvgToVml(config.path);var scale=this.createVmlNode('skew');scale.on=true;scale.matrix='0.01,0,0,0.01,0,0';scale.offset='0,0';node.appendChild(scale);var fill=this.createVmlNode('fill');node.appendChild(fill);node.setFill=function(color){this.getElementsByTagName('fill')[0].color=color};node.getFill=function(color){return this.getElementsByTagName('fill')[0].color};node.setOpacity=function(opacity){this.getElementsByTagName('fill')[0].opacity=parseInt(opacity*100,10)+'%'}}return node},createGroup:function(isRoot){var node;if(this.mode=='svg'){node=this.createSvgNode('g')}else{node=this.createVmlNode('group');node.style.width=this.width+'px';node.style.height=this.height+'px';node.style.left='0px';node.style.top='0px';node.coordorigin="0 0";node.coordsize=this.width+' '+this.height}if(isRoot){this.rootGroup=node}return node},applyTransformParams:function(scale,transX,transY){if(this.mode=='svg'){this.rootGroup.setAttribute('transform','scale('+scale+') translate('+transX+', '+transY+')')}else{this.rootGroup.coordorigin=(this.width-transX)+','+(this.height-transY);this.rootGroup.coordsize=this.width/scale+','+this.height/scale}}};VectorCanvas.pathSvgToVml=function(path){var result='';var cx=0,cy=0,ctrlx,ctrly;return path.replace(/([MmLlHhVvCcSs])((?:-?(?:\d+)?(?:\.\d+)?,?\s?)+)/g,function(segment,letter,coords,index){coords=coords.replace(/(\d)-/g,'$1,-').replace(/\s+/g,',').split(',');if(!coords[0]){coords.shift()}for(var i=0,l=coords.length;i').addClass('jqvmap-label').appendTo(jQuery('body'));if(params.enableZoom){jQuery('').addClass('jqvmap-zoomin').text('+').appendTo(params.container);jQuery('').addClass('jqvmap-zoomout').html('−').appendTo(params.container)}map.countries=[];for(var key in mapData.pathes){var path=this.canvas.createPath({path:mapData.pathes[key].path});path.setFill(this.color);path.id='jqvmap'+map.index+'_'+key;map.countries[key]=path;jQuery(this.rootGroup).append(path);path.setAttribute('class','jqvmap-region');if(params.selectedRegion!==null){if(key.toLowerCase()==params.selectedRegion.toLowerCase()){path.setFill(params.selectedColor)}}}jQuery(params.container).delegate(this.canvas.mode=='svg'?'path':'shape','mouseover mouseout',function(e){var path=e.target,code=e.target.id.split('_').pop(),labelShowEvent=$.Event('labelShow.jqvmap'),regionMouseOverEvent=$.Event('regionMouseOver.jqvmap');if(e.type=='mouseover'){jQuery(params.container).trigger(regionMouseOverEvent,[code,mapData.pathes[code].name]);if(!regionMouseOverEvent.isDefaultPrevented()){if(params.hoverOpacity){path.setOpacity(params.hoverOpacity)}else if(params.hoverColor){path.currentFillColor=path.getFill()+'';path.setFill(params.hoverColor)}}if(params.showTooltip){map.label.text(mapData.pathes[code].name);jQuery(params.container).trigger(labelShowEvent,[map.label,code]);if(!labelShowEvent.isDefaultPrevented()){map.label.show();map.labelWidth=map.label.width();map.labelHeight=map.label.height()}}}else{path.setOpacity(1);if(path.currentFillColor){path.setFill(path.currentFillColor)}map.label.hide();jQuery(params.container).trigger('regionMouseOut.jqvmap',[code,mapData.pathes[code].name])}});jQuery(params.container).delegate(this.canvas.mode=='svg'?'path':'shape','click',function(e){for(var key in mapData.pathes){map.countries[key].currentFillColor=map.countries[key].getOriginalFill();map.countries[key].setFill(map.countries[key].getOriginalFill())}var path=e.target;var code=e.target.id.split('_').pop();jQuery(params.container).trigger('regionClick.jqvmap',[code,mapData.pathes[code].name]);path.currentFillColor=params.selectedColor;path.setFill(params.selectedColor)});if(params.showTooltip){params.container.mousemove(function(e){if(map.label.is(':visible')){map.label.css({left:e.pageX-15-map.labelWidth,top:e.pageY-15-map.labelHeight})}})}this.setColors(params.colors);this.canvas.canvas.appendChild(this.rootGroup);this.applyTransform();this.colorScale=new ColorScale(params.scaleColors,params.normalizeFunction,params.valueMin,params.valueMax);if(params.values){this.values=params.values;this.setValues(params.values)}this.bindZoomButtons();WorldMap.mapIndex++};WorldMap.prototype={transX:0,transY:0,scale:1,baseTransX:0,baseTransY:0,baseScale:1,width:0,height:0,countries:{},countriesColors:{},countriesData:{},zoomStep:1.4,zoomMaxStep:4,zoomCurStep:1,setColors:function(key,color){if(typeof key=='string'){this.countries[key].setFill(color);this.countries[key].setAttribute("original",color)}else{var colors=key;for(var code in colors){if(this.countries[code]){this.countries[code].setFill(colors[code]);this.countries[code].setAttribute("original",colors[code])}}}},setValues:function(values){var max=0,min=Number.MAX_VALUE,val;for(var cc in values){val=parseFloat(values[cc]);if(val>max){max=values[cc]}if(val&&valthis.defaultWidth/this.defaultHeight){this.baseScale=this.height/this.defaultHeight;this.baseTransX=Math.abs(this.width-this.defaultWidth*this.baseScale)/(2*this.baseScale)}else{this.baseScale=this.width/this.defaultWidth;this.baseTransY=Math.abs(this.height-this.defaultHeight*this.baseScale)/(2*this.baseScale)}this.scale*=this.baseScale/curBaseScale;this.transX*=this.baseScale/curBaseScale;this.transY*=this.baseScale/curBaseScale},reset:function(){this.countryTitle.reset();for(var key in this.countries){this.countries[key].setFill(WorldMap.defaultColor)}this.scale=this.baseScale;this.transX=this.baseTransX;this.transY=this.baseTransY;this.applyTransform()},applyTransform:function(){var maxTransX,maxTransY,minTransX,minTransY;if(this.defaultWidth*this.scale<=this.width){maxTransX=(this.width-this.defaultWidth*this.scale)/(2*this.scale);minTransX=(this.width-this.defaultWidth*this.scale)/(2*this.scale)}else{maxTransX=0;minTransX=(this.width-this.defaultWidth*this.scale)/this.scale}if(this.defaultHeight*this.scale<=this.height){maxTransY=(this.height-this.defaultHeight*this.scale)/(2*this.scale);minTransY=(this.height-this.defaultHeight*this.scale)/(2*this.scale)}else{maxTransY=0;minTransY=(this.height-this.defaultHeight*this.scale)/this.scale}if(this.transY>maxTransY){this.transY=maxTransY}else if(this.transYmaxTransX){this.transX=maxTransX}else if(this.transX1){var curTransX=map.transX;var curTransY=map.transY;var curScale=map.scale;map.transX+=(map.width/(map.scale/ map.zoomStep) - map.width/map.scale)/2;map.transY+=(map.height/(map.scale/ map.zoomStep) - map.height/map.scale)/2;map.setScale(map.scale/map.zoomStep);map.zoomCurStep--;jQuery('#zoomSlider').css('top',parseInt(jQuery('#zoomSlider').css('top'),10)+sliderDelta)}})},setScale:function(scale){this.scale=scale;this.applyTransform()},getCountryPath:function(cc){return jQuery('#'+cc)[0]}};WorldMap.xlink="http://www.w3.org/1999/xlink";WorldMap.mapIndex=1;WorldMap.maps={};var ColorScale=function(colors,normalizeFunction,minValue,maxValue){if(colors){this.setColors(colors)}if(normalizeFunction){this.setNormalizeFunction(normalizeFunction)}if(minValue){this.setMin(minValue)}if(minValue){this.setMax(maxValue)}};ColorScale.prototype={colors:[],setMin:function(min){this.clearMinValue=min;if(typeof this.normalize==='function'){this.minValue=this.normalize(min)}else{this.minValue=min}},setMax:function(max){this.clearMaxValue=max;if(typeof this.normalize==='function'){this.maxValue=this.normalize(max)}else{this.maxValue=max}},setColors:function(colors){for(var i=0;i=0){value-=lengthes[i];i++}var color;if(i==this.colors.length-1){color=this.vectorToNum(this.colors[i]).toString(16)}else{color=(this.vectorToNum(this.vectorAdd(this.colors[i],this.vectorMult(this.vectorSubtract(this.colors[i+1],this.colors[i]),(value)/(lengthes[i]))))).toString(16)}while(color.length<6){color='0'+color}return'#'+color},vectorToNum:function(vector){var num=0;for(var i=0;i
+ * Copyright 2011-2012, Kirill Lebedev
+ * Licensed under the MIT license.
+ *
+ * Fork Me @ https://github.com/manifestinteractive/jqvmap
+ */
+ eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(b($){a 3g={x:1,O:1,1P:1,2G:1,1M:1,2U:1,24:1,2m:1,2t:1,2u:1,26:1};a 2V={4u:\'3D\',4t:\'3r\',4w:\'4d\',4A:\'4e\'};$.4r.4z=b(2A){a 1K={8:\'4p\',1P:\'#54\',A:\'#4V\',1X:\'#3q\',2f:\'#3q\',2G:[\'#4T\',\'#52\'],1M:\'45\',2U:1U,24:1U,2m:\'#50\',2t:1,2u:0.25,26:1S},8;j(2A===\'4I\'){11.3b[1G[1]]=1G[2]}B j(2A===\'3f\'&&3g[1G[1]]){5.2X(\'2W\')[\'3f\'+1G[1].4G(0).4F()+1G[1].23(1)].4K(5.2X(\'2W\'),4P.2s.4M.4L(1G,2))}B{$.4O(1K,2A);1K.D=5;5.1A({3C:\'4J\',4E:\'4Q\'});8=2H 11(1K);5.2X(\'2W\',8);J(a e 1z 2V){j(1K[e]){5.4Z(2V[e]+\'.17\',1K[e])}}}};a 1W=b(n,p,k){5.19=3F.53?\'13\':\'3d\';5.k=k;j(5.19==\'13\'){5.2x=b(3w){u 1D.4Y(5.3A,3w)}}B{4X{j(!1D.3x.1H){1D.3x.4S("1H","3B:3H-3i-3u:3d")}5.1t=b(2p){u 1D.3y(\'<1H:\'+2p+\' 2E="1H">\')}}4U(e){5.1t=b(2p){u 1D.3y(\'<\'+2p+\' 4W="3B:3H-3i.3u:3d" 2E="1H">\')}}1D.4n().4o(".1H","4m:4q(#3z#4j)")}j(5.19==\'13\'){5.E=5.2x(\'13\')}B{5.E=5.1t(\'3h\');5.E.X.3C=\'4l\'}5.3e(n,p)};1W.2s={3A:"3Y://42.41.40/4C/13",19:\'13\',n:0,p:0,E:1S,3e:b(n,p){j(5.19==\'13\'){5.E.T(\'n\',n);5.E.T(\'p\',p)}B{5.E.X.n=n+"1b";5.E.X.p=p+"1b";5.E.1I=n+\' \'+p;5.E.2l="0 0";j(5.Z){a 12=5.Z.2q(\'2a\');J(a i=0,l=12.w;i0){q.T(\'1T-n\',5.k.2t);q.T(\'1T-4B\',\'2v\');q.T(\'1T-4x\',\'2v\')}j(5.k.2u>0){q.T(\'1T-1r\',5.k.2u)}q.18=b(A){5.T("1f",A);j(5.33("21")===1S){5.T("21",A)}};q.2Q=b(A){u 5.33("1f")};q.2M=b(){u 5.33("21")};q.27=b(1r){5.T(\'1f-1r\',1r)}}B{q=5.1t(\'2a\');q.2l="0 0";q.1I=5.n+\' \'+5.p;q.X.n=5.n+\'1b\';q.X.p=5.p+\'1b\';q.4v=11.4R;q.5s=1v;q.y=1W.3n(3c.y);a o=5.1t(\'5C\');o.5D=1U;o.5E=\'0.3G,0,0,0.3G,0,0\';o.5G=\'0,0\';q.2I(o);a 1f=5.1t(\'1f\');q.2I(1f);q.18=b(A){5.2q(\'1f\')[0].A=A};q.2Q=b(A){u 5.2q(\'1f\')[0].A};q.27=b(1r){5.2q(\'1f\')[0].1r=1B(1r*3o,10)+\'%\'}}u q},3t:b(3p){a q;j(5.19==\'13\'){q=5.2x(\'g\')}B{q=5.1t(\'3h\');q.X.n=5.n+\'1b\';q.X.p=5.p+\'1b\';q.X.4c=\'3j\';q.X.1E=\'3j\';q.2l="0 0";q.1I=5.n+\' \'+5.p}j(3p){5.Z=q}u q},3U:b(o,K,N){j(5.19==\'13\'){5.Z.T(\'5y\',\'o(\'+o+\') 5A(\'+K+\', \'+N+\')\')}B{5.Z.2l=(5.n-K)+\',\'+(5.p-N);5.Z.1I=5.n/o+\',\'+5.p/o}}};1W.3n=b(y){a 1w=\'\';a G=0,I=0,1x,1u;u y.28(/([5x])((?:-?(?:\\d+)?(?:\\.\\d+)?,?\\s?)+)/g,b(5F,3k,9,2J){9=9.28(/(\\d)-/g,\'$1,-\').28(/\\s+/g,\',\').2S(\',\');j(!9[0]){9.5v()}J(a i=0,l=9.w;i\').2K(\'17-1c\').2F(F(\'57\'));j(k.2U){F(\'<2D/>\').2K(\'17-46\').3Z(\'+\').2F(k.D);F(\'<2D/>\').2K(\'17-48\').5h(\'o;\').2F(k.D)}8.U=[];J(a P 1z 1a.12){a y=5.E.3E({y:1a.12[P].y});y.18(5.A);y.2N=\'17\'+8.2J+\'2T\'+P;8.U[P]=y;F(5.Z).3I(y);y.T(\'2E\',\'17-5r\');j(k.26!==1S){j(P.3v()==k.26.3v()){y.18(k.2f)}}}F(k.D).4f(5.E.19==\'13\'?\'y\':\'2a\',\'3s 5i\',b(e){a y=e.2d,R=e.2d.2N.2S(\'2T\').3J(),2R=$.3l(\'3D.17\'),2P=$.3l(\'3r.17\');j(e.5j==\'3s\'){F(k.D).2i(2P,[R,1a.12[R].2e]);j(!2P.4h()){j(k.3m){y.27(k.3m)}B j(k.1X){y.22=y.2Q()+\'\';y.18(k.1X)}}j(k.24){8.1c.3Z(1a.12[R].2e);F(k.D).2i(2R,[8.1c,R]);j(!2R.4h()){8.1c.5l();8.4i=8.1c.n();8.4b=8.1c.p()}}}B{y.27(1);j(y.22){y.18(y.22)}8.1c.5k();F(k.D).2i(\'4d.17\',[R,1a.12[R].2e])}});F(k.D).4f(5.E.19==\'13\'?\'y\':\'2a\',\'38\',b(e){J(a P 1z 1a.12){8.U[P].22=8.U[P].2M();8.U[P].18(8.U[P].2M())}a y=e.2d;a R=e.2d.2N.2S(\'2T\').3J();F(k.D).2i(\'4e.17\',[R,1a.12[R].2e]);y.22=k.2f;y.18(k.2f)});j(k.24){k.D.3Q(b(e){j(8.1c.5m(\':5n\')){8.1c.1A({4c:e.2b-15-8.4i,1E:e.2C-15-8.4b})}})}5.1F(k.x);5.E.E.2I(5.Z);5.1O();5.1J=2H 1N(k.2G,k.1M,k.5q,k.5p);j(k.O){5.O=k.O;5.2j(k.O)}5.3X();11.34++};11.2s={K:0,N:0,o:1,32:0,31:0,Y:1,n:0,p:0,U:{},5g:{},59:{},1q:1.4,37:4,1C:1,1F:b(P,A){j(2y P==\'58\'){5.U[P].18(A);5.U[P].T("21",A)}B{a x=P;J(a R 1z x){j(5.U[R]){5.U[R].18(x[R]);5.U[R].T("21",x[R])}}}},2j:b(O){a 1o=0,1j=56.5a,1d;J(a 1i 1z O){1d=4g(O[1i]);j(1d>1o){1o=O[1i]}j(1d&&1d<1j){1j=1d}}5.1J.2w(1j);5.1J.2z(1o);a x={};J(1i 1z O){1d=4g(O[1i]);j(1d){x[1i]=5.1J.3N(1d)}B{x[1i]=5.A}}5.1F(x);5.O=O},49:b(1P){5.D.1A(\'5b-A\',1P)},5f:b(x){5.1J.1F(x);j(5.O){5.2j(5.O)}},2r:b(f){5.1J.2r(f);j(5.O){5.2j(5.O)}},2g:b(){a 2c=5.Y;j(5.n/5.p>5.1m/5.1l){5.Y=5.p/5.1l;5.32=1y.3S(5.n-5.1m*5.Y)/(2*5.Y)}B{5.Y=5.n/5.1m;5.31=1y.3S(5.p-5.1l*5.Y)/(2*5.Y)}5.o*=5.Y/2c;5.K*=5.Y/2c;5.N*=5.Y/2c},3T:b(){5.5e.3T();J(a P 1z 5.U){5.U[P].18(11.5d)}5.o=5.Y;5.K=5.32;5.N=5.31;5.1O()},1O:b(){a 1R,20,1Z,1Y;j(5.1m*5.o<=5.n){1R=(5.n-5.1m*5.o)/(2*5.o);1Z=(5.n-5.1m*5.o)/(2*5.o)}B{1R=0;1Z=(5.n-5.1m*5.o)/5.o}j(5.1l*5.o<=5.p){20=(5.p-5.1l*5.o)/(2*5.o);1Y=(5.p-5.1l*5.o)/(2*5.o)}B{20=0;1Y=(5.p-5.1l*5.o)/5.o}j(5.N>20){5.N=20}B j(5.N<1Y){5.N=1Y}j(5.K>1R){5.K=1R}B j(5.K<1Z){5.K=1Z}5.E.3U(5.o,5.K,5.N)},3V:b(){a 2B=1v;a 29,2h;a 1k=5;5.D.3Q(b(e){j(2B){a 39=1k.K;a 3a=1k.N;1k.K-=(29-e.2b)/1k.o;1k.N-=(2h-e.2C)/1k.o;1k.1O();29=e.2b;2h=e.2C}u 1v}).5c(b(e){2B=1U;29=e.2b;2h=e.2C;u 1v}).5u(b(){2B=1v;u 1v})},3X:b(){a 8=5;a 36=(F(\'#5B\').5z()-6*2-15*2-3*2-7-6)/(5.37-5.1C);5.D.47(\'.17-46\').38(b(){j(8.1C<8.37){a 39=8.K;a 3a=8.N;a 44=8.o;8.K-=(8.n/8.o-8.n/ (8.o * 8.1q)) /2;8.N-=(8.p/8.o-8.p/ (8.o * 8.1q)) /2;8.35(8.o*8.1q);8.1C++;F(\'#2o\').1A(\'1E\',1B(F(\'#2o\').1A(\'1E\'),10)-36)}});5.D.47(\'.17-48\').38(b(){j(8.1C>1){a 39=8.K;a 3a=8.N;a 44=8.o;8.K+=(8.n/(8.o/ 8.1q) - 8.n/8.o)/2;8.N+=(8.p/(8.o/ 8.1q) - 8.p/8.o)/2;8.35(8.o/8.1q);8.1C--;F(\'#2o\').1A(\'1E\',1B(F(\'#2o\').1A(\'1E\'),10)+36)}})},35:b(o){5.o=o;5.1O()},55:b(1i){u F(\'#\'+1i)[0]}};11.43="3Y://42.41.40/4s/43";11.34=1;11.3b={};a 1N=b(x,1M,1p,1V){j(x){5.1F(x)}j(1M){5.2r(1M)}j(1p){5.2w(1p)}j(1p){5.2z(1V)}};1N.2s={x:[],2w:b(1j){5.3W=1j;j(2y 5.1e===\'b\'){5.1p=5.1e(1j)}B{5.1p=1j}},2z:b(1o){5.3O=1o;j(2y 5.1e===\'b\'){5.1V=5.1e(1o)}B{5.1V=1o}},1F:b(x){J(a i=0;i=0){1g-=1s[i];i++}a A;j(i==5.x.w-1){A=5.2Z(5.x[i]).2Y(16)}B{A=(5.2Z(5.3P(5.x[i],5.4a(5.2L(5.x[i+1],5.x[i]),(1g)/(1s[i]))))).2Y(16)}3K(A.w<6){A=\'0\'+A}u\'#\'+A},2Z:b(Q){a 1Q=0;J(a i=0;i