",i=0;i"}this.silent?this.log("[silent mode] The number of colors should fit the number of ranges. Exit!",!0):alert("The number of colors should fit the number of ranges. Exit!")},this.objectID=(new Date).getUTCMilliseconds(),this.log("Creating new geostats object"),"undefined"!=typeof s&&00&&(L.popup().setLatLng(t.results[0].latlng).setContent(t.results[0].text).openOn(i),i.setView(t.results[0].latlng))}),L.TopoJSON=L.GeoJSON.extend({addData:function(t){if("Topology"===t.type)for(key in t.objects)geojson=topojson.feature(t,t.objects[key]),L.GeoJSON.prototype.addData.call(this,geojson);else L.GeoJSON.prototype.addData.call(this,t)}});var s=function(t,e){L.popup().setLatLng(t).setContent(e).openOn(i)},n={1:"ledna",2:"února",3:"března",4:"dubna",5:"května",6:"června",7:"července",8:"srpna",9:"září",10:"října",11:"listopadu"},o=L.control({position:"topleft"});o.onAdd=function(t){var i=L.DomUtil.create("div","mntselector");return i.innerHTML='',i.firstChild.onmousedown=i.firstChild.ondblclick=L.DomEvent.stopPropagation,i},o.addTo(i),$(".mntselector").on("change",function(t){l(t.target.value)});var a=new L.TopoJSON;$.getJSON("./data/zony.topo.json").done(t);var r=new L.TopoJSON,l=function(t){function e(e){var o=[];e.objects.binned.geometries.forEach(function(i){i.properties["cnt_"+t]>0&&o.push(i.properties["cnt_"+t])});var a=new geostats(o).getClassQuantile(5),l=a.map(function(t){return parseInt(t)}),h=chroma.scale(["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"]).domain(l);r.addData(e),r.eachLayer(function(i){if(i.feature.properties["cnt_"+t]>0){var e=h(i.feature.properties["cnt_"+t]).hex();i.setStyle({fillColor:e,fillOpacity:.6,color:"white",weight:.5,opacity:1}),i.on("click",function(i){s(i.latlng,"Vozidel zaparkovaných v placené zóně neoprávněně během měsíce "+n[t]+": "+i.target.feature.properties["cnt_"+t])})}else r.removeLayer(i)}),r.addTo(i)}r.clearLayers(),$.getJSON("./data/binned.topo.json").done(e)};l(1)}(),$(function(){!function(t){var i=t.Series,e=t.each;i.prototype.getContext=function(){return this.canvas||(this.canvas=document.createElement("canvas"),this.canvas.setAttribute("width",this.chart.chartWidth),this.canvas.setAttribute("height",this.chart.chartHeight),this.image=this.chart.renderer.image("",0,0,this.chart.chartWidth,this.chart.chartHeight).add(this.group),this.ctx=this.canvas.getContext("2d")),this.ctx},i.prototype.canvasToSVG=function(){this.image.attr({href:this.canvas.toDataURL("image/png")})},t.wrap(t.seriesTypes.heatmap.prototype,"drawPoints",function(){var t=this.getContext();t?(e(this.points,function(i){var e,s,n=i.plotY;void 0===n||isNaN(n)||null===i.y||(e=i.shapeArgs,s=i.pointAttr&&i.pointAttr[""]||i.series.pointAttribs(i),t.fillStyle=s.fill,t.fillRect(e.x,e.y,e.width,e.height))}),this.canvasToSVG()):this.chart.showLoading("Your browser doesn't support HTML5 canvas, please use a modern browser")}),t.seriesTypes.heatmap.prototype.directTouch=!1}(Highcharts);var t;Highcharts.setOptions({lang:{months:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"]}}),$.get("./data/heatmap.csv",function(i){Highcharts.chart("container",{data:{csv:i,parsed:function(){t=+new Date}},chart:{type:"heatmap",margin:[60,10,80,50]},credits:{enabled:!1},title:{text:null,align:"left",x:40},subtitle:{text:"Vozidla neoprávněně zaparkovaná v placených a vyhrazených zónách",align:"left",x:40},xAxis:{type:"datetime",min:Date.UTC(2016,0,1),max:Date.UTC(2016,11,20),labels:{align:"left",x:5,y:14,format:"{value:%B}"},showLastLabel:!1,tickLength:16},yAxis:{title:{text:null},labels:{format:"{value}:00"},minPadding:0,maxPadding:0,startOnTick:!1,endOnTick:!1,tickPositions:[0,6,12,18,24],tickWidth:1,min:0,max:23,reversed:!0},colorAxis:{stops:[[0,"#fee5d9"],[.25,"#fcae91"],[.5,"#fb6a4a"],[.75,"#de2d26"],[1,"#a50f15"]],min:1,max:74,startOnTick:!1,endOnTick:!1,labels:{format:"{value} vozidel"}},series:[{borderWidth:0,nullColor:"#EFEFEF",colsize:864e5,tooltip:{headerFormat:"Zachyceno ",pointFormat:"{point.x:%e. %m. %Y} ve {point.y} hodin: {point.value} vozidel"},turboThreshold:Number.MAX_VALUE}]})})}),function(){function t(t){return console.log("click"),t.preventDefault(),window.open(this.getAttribute("href"))}function i(t){return t.preventDefault(),window.open(this.getAttribute("href"),"","width=550,height=265")}var e,s,n,o,a,r,l,h,c;for(document.querySelector("a#scroll-btn").addEventListener("click",function(t){var i,e,s,n,o,a,r;return t.preventDefault(),i=document.querySelector("#content"),e=window.pageYOffset||document.documentElement.scrollTop,s=ig.utils.offset(i).top,n=s-e,o=Date.now(),a=600,r=function(){var t,i,s;return t=Date.now()-o,i=t/a,i>1&&(i=1),s=e+n*Math.sin(i*(Math.PI/2)),window.scrollTo(0,s),1>i?window.requestAnimationFrame(r):void 0},window.requestAnimationFrame(r)}),e=0,n=(s=document.querySelectorAll("a[href^='http:'],a[href^='https:']")).length;n>e;++e)o=s[e],"logo"!==o.id&&(null!=(a=o.classList)&&a.contains("share")||o.addEventListener("click",t));for(e=0,n=(s=document.querySelectorAll("a.share")).length;n>e;++e)o=s[e],o.addEventListener("click",i);r=!0,l=document.querySelector("body > header"),h=null!=(s=document.querySelector("#opener").classList)?s.contains("no-cover-img"):void 0,c=function(){var t,i,e,s;return t=document.body.scrollTop||document.documentElement.scrollTop,i=h?1:window.innerHeight,t>=i&&r?(null!=(e=l.classList)&&e.remove("at-top"),r=!1):i>t&&!r?(null!=(s=l.classList)&&s.add("at-top"),r=!0):void 0},window.addEventListener("scroll",c),c()}.call(this),function(){}.call(this);