/*
 * SimpleModal Basic Modal Dialog
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2009 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: basic.js 212 2009-09-03 05:33:44Z emartin24 $
 *
 */

jQuery.noConflict();

jQuery(document).ready(function () {
	
	jQuery("div.modal, div.modal p.back").hide();
	jQuery("span.person").addClass("on");
	
	var peopleID = new Array(
		"brendan-montano",
		"debi-mazar",
		"janet-taylor",
		"peter-ashenden"
	);
	
	jQuery("span.person, ul#participants li").click(function (e) {
		e.preventDefault();
		
		var currentPerson = jQuery(this).attr("class");
		var currentTemp = currentPerson.split(" ");
		for(i=0; i<currentTemp.length; i++){
			for(x=0;x<peopleID.length;x++) {
				if (currentTemp[i] == peopleID[x]) {
					currentPerson = currentTemp[i];
				}
			}
		}
		
		jQuery("div.modal."+currentPerson).modal();
		
		// find scroll to accomodate width of container div
		var wDiv = jQuery.getScrollbarWidth() + jQuery("div#simplemodal-container").width();
		jQuery("div#simplemodal-container").css("width",wDiv);
		
	});

});