var Dashboard=function(){return{initJQVMAP:function(){if(!jQuery().vectorMap){return;} var showMap=function(name){jQuery('.vmaps').hide();jQuery('#vmap_'+name).show();} var setMap=function(name){var map=jQuery('#vmap_'+name);if(map.size()!==1){return;} var data={map:'world_en',backgroundColor:null,borderColor:'#333333',borderOpacity:0.5,borderWidth:1,color:'#c6c6c6',enableZoom:true,hoverColor:'#c9dfaf',hoverOpacity:null,values:sample_data,normalizeFunction:'linear',scaleColors:['#b6da93','#909cae'],selectedColor:'#c9dfaf',selectedRegion:null,showTooltip:true,onLabelShow:function(event,label,code){},onRegionOver:function(event,code){if(code=='ca'){event.preventDefault();}},onRegionClick:function(element,code,region){var message='You clicked "'+region+'" which has the code: '+code.toUpperCase();alert(message);}};data.map=name+'_en';map.width(map.parent().parent().width());map.show();map.vectorMap(data);map.hide();} setMap("world");setMap("usa");setMap("europe");setMap("russia");setMap("germany");showMap("world");jQuery('#regional_stat_world').click(function(){showMap("world");});jQuery('#regional_stat_usa').click(function(){showMap("usa");});jQuery('#regional_stat_europe').click(function(){showMap("europe");});jQuery('#regional_stat_russia').click(function(){showMap("russia");});jQuery('#regional_stat_germany').click(function(){showMap("germany");});$('#region_statistics_loading').hide();$('#region_statistics_content').show();App.addResizeHandler(function(){jQuery('.vmaps').each(function(){var map=jQuery(this);map.width(map.parent().width());});});},initCalendar:function(){if(!jQuery().fullCalendar){return;} var date=new Date();var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();var h={};if($('#calendar').width()<=400){$('#calendar').addClass("mobile");h={left:'title, prev, next',center:'',right:'today,month,agendaWeek,agendaDay'};}else{$('#calendar').removeClass("mobile");if(App.isRTL()){h={right:'title',center:'',left:'prev,next,today,month,agendaWeek,agendaDay'};}else{h={left:'title',center:'',right:'prev,next,today,month,agendaWeek,agendaDay'};}} $('#calendar').fullCalendar('destroy');$('#calendar').fullCalendar({disableDragging:false,header:h,editable:true,events:[{title:'All Day',start:new Date(y,m,1),backgroundColor:App.getBrandColor('yellow')},{title:'Long Event',start:new Date(y,m,d-5),end:new Date(y,m,d-2),backgroundColor:App.getBrandColor('blue')},{title:'Repeating Event',start:new Date(y,m,d-3,16,0),allDay:false,backgroundColor:App.getBrandColor('red')},{title:'Repeating Event',start:new Date(y,m,d+6,16,0),allDay:false,backgroundColor:App.getBrandColor('green')},{title:'Meeting',start:new Date(y,m,d+9,10,30),allDay:false},{title:'Lunch',start:new Date(y,m,d,14,0),end:new Date(y,m,d,14,0),backgroundColor:App.getBrandColor('grey'),allDay:false},{title:'Birthday',start:new Date(y,m,d+1,19,0),end:new Date(y,m,d+1,22,30),backgroundColor:App.getBrandColor('purple'),allDay:false},{title:'Click for Google',start:new Date(y,m,28),end:new Date(y,m,29),backgroundColor:App.getBrandColor('yellow'),url:'http://google.com/'}]});},initCharts:function(){if(!jQuery.plot){return;} function showChartTooltip(x,y,xValue,yValue){$('