/*
 *  Document   : readyDashboard.js
 *  Author     : pixelcave
 */
var ReadyDashboard=function(){return{init:function(){$('[data-toggle="counter"]').each(function(){var o=$(this);o.countTo({speed:1e3,refreshInterval:25,onComplete:function(){o.data("after")&&o.html(o.html()+o.data("after"))}})});var o={type:"line",width:"200px",height:"109px",tooltipOffsetX:-25,tooltipOffsetY:20,lineColor:"#9bdfe9",fillColor:"#9bdfe9",spotColor:"#555555",minSpotColor:"#555555",maxSpotColor:"#555555",highlightSpotColor:"#555555",highlightLineColor:"#555555",spotRadius:3,tooltipPrefix:"",tooltipSuffix:" Sales",tooltipFormat:"{{prefix}}{{y}}{{suffix}}"};$("#widget-dashchart-sales").sparkline("html",o);var t=$("#chart-classic-dash"),i=[[1,1900],[2,2300],[3,3200],[4,2500],[5,4200],[6,3100],[7,3600],[8,2500],[9,4600],[10,3700],[11,4200],[12,5200]],l=[[1,850],[2,750],[3,1500],[4,900],[5,1500],[6,1150],[7,1500],[8,900],[9,1800],[10,1700],[11,1900],[12,2550]],a=[[1,130],[2,330],[3,220],[4,350],[5,150],[6,275],[7,280],[8,380],[9,120],[10,330],[11,190],[12,410]],e=[[1,"Jan"],[2,"Feb"],[3,"Mar"],[4,"Apr"],[5,"May"],[6,"Jun"],[7,"Jul"],[8,"Aug"],[9,"Sep"],[10,"Oct"],[11,"Nov"],[12,"Dec"]];$.plot(t,[{label:"Earnings",data:i,lines:{show:!0,fill:!0,fillColor:{colors:[{opacity:.6},{opacity:.6}]}},points:{show:!0,radius:5}},{label:"Sales",data:l,lines:{show:!0,fill:!0,fillColor:{colors:[{opacity:.6},{opacity:.6}]}},points:{show:!0,radius:5}},{label:"Tickets",data:a,lines:{show:!0,fill:!0,fillColor:{colors:[{opacity:.6},{opacity:.6}]}},points:{show:!0,radius:5}}],{colors:["#5ccdde","#454e59","#ffffff"],legend:{show:!0,position:"nw",backgroundOpacity:0},grid:{borderWidth:0,hoverable:!0,clickable:!0},yaxis:{show:!1,tickColor:"#f5f5f5",ticks:3},xaxis:{ticks:e,tickColor:"#f9f9f9"}});var s=null,r=null;t.bind("plothover",function(o,t,i){if(i){if(s!==i.dataIndex){s=i.dataIndex,$("#chart-tooltip").remove();var l=(i.datapoint[0],i.datapoint[1]);r=0===i.seriesIndex?"$ <strong>"+l+"</strong>":1===i.seriesIndex?"<strong>"+l+"</strong> sales":"<strong>"+l+"</strong> tickets",$('<div id="chart-tooltip" class="chart-tooltip">'+r+"</div>").css({top:i.pageY-45,left:i.pageX+5}).appendTo("body").show()}}else $("#chart-tooltip").remove(),s=null})}}}();