$(function() {
	$('.slideNav li a').each(function() {
		var elem = $(this);					  
		var hashLink = $(this).attr("href").replace("#", "");
		if (!elem.hasClass("selected")) {
			var content = $("#"+ hashLink);
			content.hide();
		}
		elem.click(slide);				  
	});
});

function slide() {
	var hashLink = $(this).attr("href").replace("#", "");
	var holder = '#' + $(this).parent().parent().attr('id'); // get the holding container
	$(holder + ' a.selected').removeClass('selected');
	$(this).addClass("selected");
	var content = $("#"+ hashLink);
	content.siblings().hide();
	content.hide();
	content.fadeIn(800);
	return false;
}
