// JavaScript Document
		$(function() {
		$('#container-1 ul').tabs({ fxFade: true, fxSpeed: 'fast' }); 
	});

  $(document).ready(function(){
    
    $(".hood").click(function () {
	  $(".hood").removeClass("highlight");
	  $(".countysubregion").removeClass("highlight");
      $(this).addClass("highlight");
    });
	$(".countylevel").click(function () {
		$(".countysubregion").removeClass("highlight");
		$(".countysubregion").removeClass("selected");
	});
	
	$("#upnorth").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('upnorth');
	}
	else{
		plotmetras(upNorth,'upnorth');
		$($(this)).addClass("IconTick");
		}
	});
	
	$("#upwestline").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('upwest');
	}
	else{
		plotmetras(upWestLine,'upwest');
		$($(this)).addClass("IconTick");
		}
	});
	
	$("#hercor").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('hercor');
	}
	else{
		plotmetras(herCor,'hercor');
		$($(this)).addClass("IconTick");
		}
	});
	
	$("#northcentral").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('northcentral');
	}
	else{
		plotmetras(northCentral,'northcentral');
		$($(this)).addClass("IconTick");
		}
	});
	
	$("#mildistrictnorth").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('milnorth');
	}
	else{
		plotmetras(milNorth,'milnorth');
		$($(this)).addClass("IconTick");
		}
	});
	
	$("#upnw").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('upnw');
	}
	else{
		plotmetras(upNw,'upnw');
		$($(this)).addClass("IconTick");
		}
	});
    
	$("#mildistrictwest").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('mildistrictwest');
	}
	else{
		plotmetras(milDistrictWest,'mildistrictwest');
		$($(this)).addClass("IconTick");
		}
	});
	
	$("#elline").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('elline');
	}
	else{
		plotmetras(elLine,'elline');
		$($(this)).addClass("IconTick");
		}
	});
	
	$("#rockisland").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('rockisland');
	}
	else{
		plotmetras(rockIsland,'rockisland');
		$($(this)).addClass("IconTick");
		}
	});
	
	$("#southwest").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('southwest');
	}
	else{
		plotmetras(southWest,'southwest');
		$($(this)).addClass("IconTick");
		}
	});
	
	$("#bnsf").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	destroymarks('bnsf');
	}
	else{
		plotmetras(BNSF,'bnsf');
		$($(this)).addClass("IconTick");
		}
	});
	
	$("#ctablue").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	$('#subblue').removeClass("open");
	$('#subblue').addClass("closed");
	$('#subblue').html(" ");
	destroymarks('Bl');
	}
	else{
		cta('Bl','#0000ff');
		$($(this)).addClass("IconTick");
		$('#subblue').removeClass("closed");
		$('#subblue').addClass("open");
		}
	});
	
	$("#ctared").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	$('#subred').removeClass("open");
	$('#subred').addClass("closed");
	$('#subred').html(" ");
	destroymarks('Re');
	}
	else{
		cta('Re','#990000');
		$($(this)).addClass("IconTick");
		$('#subred').removeClass("closed");
		$('#subred').addClass("open");
		}
	});
	
	$("#ctayellow").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	$('#subyellow').removeClass("open");
	$('#subyellow').addClass("closed");
	$('#subyellow').html(" ");
	destroymarks('Ye');
	}
	else{
		cta('Ye','#f2f261');
		$($(this)).addClass("IconTick");
		$('#subyellow').removeClass("closed");
		$('#subyellow').addClass("open");
		}
	});
	
	$("#ctabrown").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	$('#subbrown').removeClass("open");
	$('#subbrown').addClass("closed");
	$('#subbrown').html(" ");
	destroymarks('Br');
	}
	else{
		cta('Br','#cca166');
		$($(this)).addClass("IconTick");
		$('#subbrown').removeClass("closed");
		$('#subbrown').addClass("open");
		}
	});
	
	$("#ctapurple").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	$('#subpurple').removeClass("open");
	$('#subpurple').addClass("closed");
	$('#subpurple').html(" ");
	destroymarks('Pu');
	}
	else{
		cta('Pu','#cc00cc');
		$($(this)).addClass("IconTick"); 
		$('#subpurple').removeClass("closed");
		$('#subpurple').addClass("open");
		}
	});
	
	$("#ctagreen").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	$('#subgreen').removeClass("open");
	$('#subgreen').addClass("closed");
	$('#subgreen').html(" ");
	destroymarks('Gr');
	}
	else{
		cta('Gr','#00ff00');
		$($(this)).addClass("IconTick"); 
		$('#subgreen').removeClass("closed");
		$('#subgreen').addClass("open");
		}
	});
	
	$("#ctaorange").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	$('#suborange').removeClass("open");
	$('#suborange').addClass("closed");
	$('#suborange').html(" ");
	destroymarks('Or');
	}
	else{
		cta('Or','#ffcc00');
		$($(this)).addClass("IconTick"); 
		$('#suborange').removeClass("closed");
		$('#suborange').addClass("open");
		}
	});
	
	$("#ctapink").click(function () {
	if ($(this).hasClass("IconTick")){
	$($(this)).removeClass("IconTick");
	$('#subpink').removeClass("open");
	$('#subpink').addClass("closed");
	$('#subpink').html(" ");
	destroymarks('Pi');
	}
	else{
		cta('Pi','#ff33ff');
		$($(this)).addClass("IconTick"); 
		$('#subpink').removeClass("closed");
		$('#subpink').addClass("open");
		}
	});




  });
