//JS QUERY--DOCUMENT READY
$(document).ready(function(){
	//$('#reports_preview_block').tabs();
	
	$('#button-state').bind('click', 
							   function() {
									resetStates();
									$(this).attr('src', 'img/tab_state_on.gif');
									$('#state_report').show();
									return false;
							   });
	
	$('#button-zipcode').bind('click', 
							   function() {
									resetStates();
									$(this).attr('src', 'img/tab_zipcode_on.gif');
									$('#zip_report').show();
									return false;
							   });
	
	$('#button-county').bind('click', 
							   function() {
									resetStates();
									$(this).attr('src', 'img/tab_county_on.gif');
									$('#county_report').show();
									return false;
							   });
	
	$('#button-national').bind('click', 
							   function() {
									resetStates();
									$(this).attr('src', 'img/tab_national_on.gif');
									$('#nation_report').show();
									return false;
							   });
	$('#main_nav li').hover(function(){
			$(this).addClass('hover');
		},
		function(){
			$(this).removeClass('hover');
	});
	$('#list_tabs').tabs();
});
	
function resetStates() {
	$('#button-state').attr('src', 'img/tab_state_off.gif');
	$('#button-zipcode').attr('src', 'img/tab_zipcode_off.gif');
	$('#button-county').attr('src', 'img/tab_county_off.gif');
	$('#button-national').attr('src', 'img/tab_national_off.gif');
	
	$('.report_container').hide();
}

