// JavaScript Document

var contentFeatureLayers=["first","second","third","forth"]

function showFeatureContent(layer){$(".selected").removeClass("selected");
$(".features").hide();
window.location.hash=layer;
$("#show_"+layer).show();
$("#click_"+layer).addClass("selected")
frames['secret_tracker'].location.href='/track_'+layer;};

$(document).ready
(
	function()
	{
		jQuery.each
		(
			contentFeatureLayers,function(i,contentFeatureLayers)
			{
				$("#click_"+contentFeatureLayers).click
				(
					function()
					{
						showFeatureContent(contentFeatureLayers);
					}
				);
			}
		);
		
		if(window.location.hash)
		{
			selectedItem=window.location.hash.split('#')[1]
		}
		else
		{
			selectedItem='first';
		}
		
			showFeatureContent(selectedItem);
	}
);


