﻿$(function() {
	var showWhat = null;
	$(".SelectionLinks a").click(function() {
	showWhat = $(this).attr("href");
	if ($("#KeynoteSpeakers li:visible").is(showWhat)) {
			window.location = showWhat;
			return false;
		}
		$("#KeynoteSpeakers li:visible").slideUp();
		$("#KeynoteSpeakers li:visible").queue(function() {
			showSpeaker();
			$(this).dequeue();
		});
	});
	function showSpeaker() {
		$(showWhat).slideDown('fast');
		window.location = showWhat;

	}
});
$(window).load(function() {
	// Grab window.location and split at "#"
	var urlStr = null;
	urlStr = window.location + "";
	var urlParamPos = urlStr.indexOf("#");
	if (urlParamPos > 0) {
		var whichParam = urlStr.substring(urlParamPos, urlStr.length);
	} else {
		return false
	}
	function startAnim() {
		if ($("#KeynoteSpeakers li:visible").is(whichParam)) {
			window.location = whichParam;
			return false;
		}
		$("#KeynoteSpeakers li:visible").slideUp();
		$(whichParam).slideDown('fast');
		window.location = whichParam;
	}
	startAnim()

});