$(window).on("load",(function(){var t=function(){d3.select("#pie-calendar");var t,r=1380,n=820,e=10,a=40,o="#EAEAEA",l="#FFFFFF",d=0,u=(new Date).getMonth(),c=["January","February","March","April","May","June","July","August","September","October","November","December"];function s(){return r-10}function f(){return n-40}function g(){return s()/7}function h(){return f()/5}function p(){var t=new Date;return t.setMonth(u+d),t.getMonth()}function m(){var t=new Date;return t.setMonth(u+d),t.getFullYear()}return{calendarWidth:r,calendarHeight:n,gridXTranslation:e,gridYTranslation:a,gridWidth:s(),gridHeight:f(),cellWidth:g(),cellHeight:h(),getDatesGroup:function(){return t},setDatesGroup:function(r){t=r},incrementCounter:function(){d+=1},decrementCounter:function(){d-=1},monthToDisplay:p(),monthToDisplayAsText:function(){return c[p()]},yearToDisplay:m,gridCellPositions:function(){var t=[];for(y=0;y<5;y++)for(x=0;x<7;x++)t.push([x*g(),y*h()]);return t}(),daysInMonth:function(){var t=[],r=new Date(m(),p(),1).getDay(),n=new Date(m(),p(),0).getDate();for(i=1;i<=r;i++)t.push([n-r+i,o]);var e=new Date(m(),p()+1,0).getDate();for(i=1;i<=e;i++)t.push([i,l]);var a=35-t.length;for(i=1;i<=a;i++)t.push([i,o]);return t.slice(0,35)}}}();function r(){t.decrementCounter(),e()}function n(){t.incrementCounter(),e()}function e(r,n){$("#currentMonth").text(t.monthToDisplayAsText()+" "+t.yearToDisplay());var e=t.daysInMonth(),i=t.gridCellPositions;t.datesGroup.selectAll("text").data(e).attr("x",(function(t,r){return i[r][0]})).attr("y",(function(t,r){return i[r][1]})).attr("dx",20).attr("dy",20).attr("transform","translate("+t.gridXTranslation+","+t.gridYTranslation+")").text((function(t){return t[0]})),t.calendar.selectAll("rect").data(e).style("fill",(function(t){return t[1]})),a()}function a(){var r=function(){for(var t=[],r=0;r<35;r++)t.push([Math.floor(100*Math.random()),Math.floor(100*Math.random()),Math.floor(100*Math.random())]);return t}(),n=t.cellWidth/3,e=d3.layout.pie(),a=d3.scale.ordinal().range(["#99B898","#FECEA8","#FF847C","#E84A5F","#F8B195","#F67280","#C06C84"]),o=d3.svg.arc().innerRadius(0).outerRadius(n),l=[];for(i=0;i