<div class="dashboard-wrapper">
  <div class="main-container">
    <div class="row-fluid">
        <div class="span12"> <!--begin span12 -->
			<div class="widget">
			    <div class="widget-header">
			      <div class="title">
			        <span class="fs1" aria-hidden="true" data-icon="&#xe0a0;"></span> Current Statistics
			      </div>
				  <!-- Begin Title Buttons-->
				  <div class="tools pull-right">
				  	<div class="btn-group">
				  		<a id="change_to_bar_graph" class="btn btn-small">
			                  <span data-icon="&#xe14b;"></span>
			            </a>
						<a id="change_to_pie_charts" class="btn btn-small">
				              <span data-icon="&#xe096;"></span>
				        </a>
				  	</div>	
				  </div>
				  <!-- End Title Buttons-->
			    </div>
			    <div id="charts_body" class="widget-body">
				      <%#= render partial: "dashboard_stats" %>
			    </div>
				<div class="clearfix">
		        </div>
			  </div>
			</div>	
			<center><b>Need help using this portal? Check out the <a href="doc?doc=README_FOR_APP">Readme</a></b></center>
        </div> <!-- end span12 -->
    </div>
  </div>
</div>




<script type="text/javascript">

function makeActive(){
  $('li[id="home"]').addClass('active');
};

$("#change_to_bar_graph").click(function(event) {
	event.preventDefault();
	$("#charts_body").empty()
	$("#charts_body").load(<%= sanitize change_graph_dashboard_index_path(:graph => "bar_graph").inspect %>);
	
})

$("#change_to_pie_charts").click(function(event) {
	event.preventDefault();
	$("#charts_body").empty()
	$("#charts_body").load(<%= sanitize change_graph_dashboard_index_path(:graph => "pie_charts").inspect %>);
})

$(document).ready(
  makeActive,
  $("#charts_body").load(<%= sanitize change_graph_dashboard_index_path(:graph => "pie_charts").inspect %>)
);
</script>




