text: var Numberspin;
  
  (function() {
  	'use strict';
  
  	Numberspin = function(options) {
  		const opt = options || {};
  
  		this.elements = document.querySelectorAll(opt.elemSel);
  		this.values = [];
  
  		for (var i = 0; i < this.elements.length; i++) {
  			this.values[i] = +this.elements[i].getAttribute('data-value');
  			this.elements[i].innerHTML = 0;
  		}
  
  		function draw(elem, num) {
  			if (opt.format) {
  				const numStr = String(num);
  
  				elem.innerHTML = numStr.replace(/(\d)?(?=(\d{3})+$)/g, '$1 ');
  			} else {
  				elem.innerHTML = num;
  			}
  		}
  
  		this.animate = function(duration) {
  			animate((progress) => {
  				for (var i = 0; i < this.elements.length; i++) {
  					let num = Math.round(this.values[i] * progress);
  
  					if (num < 0) {
  						num = 0;
  					}
  
  					draw(this.elements[i], num);
  				}
  			}, duration);
  		}
  	}
  })();
  
  
  /*
  function Numberspin(elem, opt) {
  	var def = {
  		animation: 1
  	},
  	opt = opt || {},
  	options = $.extend({}, def, opt),
  	interval = null,
  	animate = false,
  	$Elem = $(elem),
  	curVal = 0,
  	val = $Elem.html().replace(/[\s]/g, ''),
  	pattern = val.match(/[\.,]/),
  	endVal = +val.replace(/[\D]/g, '');
  
  	$Elem.html(0);
  
  	this.start = function() {
  		
  		if (!animate) {
  			animate = true;
  			spin();
  		}
  	}
  
  	function spin() {
  
  		interval = setTimeout(function run() {
  
  				if (curVal < endVal) {
  
  					if (options.animation == 1) {
  
  						var d = endVal - curVal;
  
  						if (d > 1213214321321) {
  							curVal = curVal + 1213214321321;
  						} else if (d > 3214321321) {
  							curVal = curVal + 3214321321;
  						} else if (d > 4321321) {
  							curVal = curVal + 4321321;
  						} else if (d > 321321) {
  							curVal = curVal + 321321;
  						} else if (d > 32321) {
  							curVal = curVal + 32321;
  						} else if (d > 2321) {
  							curVal = curVal + 2321;
  						} else if (d > 1321) {
  							curVal = curVal + 1321;
  						} else if (d > 321) {
  							curVal = curVal + 321;
  						} else if (d > 21) {
  							curVal = curVal + 21;
  						} else {
  							curVal++;
  						}
  
  
  					} else if (options.animation == 2) {
  
  						var endValArr = String(endVal).split(''),
  						curValArr = String(curVal).split('');
  
  						for (var i = 0; i < endValArr.length; i++) {
  							if (curValArr[i]) {
  								if (curValArr[i] < endValArr[i] && curValArr[i-1] == endValArr[i-1]) {
  									curValArr[i]++;
  								}
  							} else if (curValArr[i-1] && curValArr[i-1] == endValArr[i-1]) {
  								curValArr[i] = 0;
  							}
  
  						}
  
  						curVal = curValArr.join('');
  
  					}
  
  					var output = String(curVal);
  
  					if (pattern) {
  						output = output.replace(new RegExp('(\\d{'+ pattern.index +'})'), '$1'+ pattern[0]);
  						output = output.replace(new RegExp('(\\d)?(?=(\\d{3})+?\\'+ pattern[0] +')', 'g'), '$1 ');
  					} else {
  						output = output.replace(/(\d)?(?=(\d{3})+$)/g, '$1 ');
  					}
  					
  					$Elem.html(output);
  
  					setTimeout(run, 85);
  
  				} else {
  					stop();
  				}
  
  		}, 1);
  
  	}
  
  	function stop() {
  		clearTimeout(interval);
  	}
  
  }
  
  var numberspinObj = [], i = 0, ind;
  function numberspin(elem, opt) {
  	if ($(elem)[0].ind == undefined) {
  		$(elem)[0].ind = ind = i;
  	} else {
  		ind = $(elem)[0].ind;
  	}
  
  	if (!(numberspinObj[elem+ind] instanceof Numberspin)) {
  		numberspinObj[elem+ind] = new Numberspin(elem, opt);
  	}
  	i++;
  
  	return numberspinObj[elem+ind];
  }
  */