document.observe('dom:loaded', function(){
	$$('ul.tabs li').each(function(el) {
		el.observe('click',function(ev){
			var element = Event.element(ev);
			if (element.tagName == 'A') {element = element.up(); }
			// hide all tabs
			$$('.tab-content').each(function(el) { el.hide(); });
			
			// show the selected one.
			$(element.id+'-content').show();
			
			// change the tabs
			$$('ul.tabs li').each(function(el) { el.className = "off"; });
			element.className = "on";
			
			Event.stop(ev);			
		});	
	});
	
	$('flight-map-button').observe('click',function(ev) {
		window.open('http://www.flightstats.com/go/AirportTracker/airportTracker.do?airport=SDF&guid=34b64945a69b9cac:77262c21:1221d8eaa3c:-1e07','realtimemap',"status=0,toolbar=0,location=0,menubar=0,resizable=1,scrollbars=0,width=930,height=730");
		Event.stop(ev);
	});
});
