glow.ready(function() {		
	glow.dom.get("#tabbed div.event-promo > h2").css("display", "none");
	glow.dom.get("#tabbed").addClass("glow-enabled");
	glow.dom.get("div#d-tab1").addClass("selected");
	glow.dom.get("ul#tab-list li a#a-tab1").addClass("selected");
	
	function switchMainPanel(obj) {
		glow.dom.get("#tab-list li a").each(function () {
			if (glow.dom.get(this).attr("id") == "a-" + obj) {
				glow.dom.get(this).addClass("selected");	
			} else {
				glow.dom.get(this).removeClass("selected");
			}
		});
		glow.dom.get("#tabbed div.event-promo").removeClass("selected");
		glow.dom.get("#d-" + obj).addClass("selected");
	}
	
	glow.dom.get("#tab-list li a").each(function () {
		var myId = glow.dom.get(this).attr('id');
		var ident = myId.substring(2, myId.length);
		glow.events.addListener(this, 'click', function () {
			//this.focus();
			switchMainPanel(ident);
			return false;	
		});
	
	});
	
});	
