var names = [ 'Bill Chapman','Mark Josef','Wayne Seguin','Eric Schweichler'];
var titles = [ "Senior Partner / Developer","Senior Partner / Developer","Senior Partner / Architech & Systems Administrator","Developer / UI Designer"];
var texts = ["For the better part of two decades Bill has been heavily involved in computing, professionally and academically. He has worked in just about every area of the industry from positions in phone support and computer repair to software architecture and project management. Bil has been Working With Rails for over four years and credits the ruby language for renewing excitement for computing. ","Mark has been Working with Rails for over five years and is credited for introducing the rest of this team to the framework. Mark holds undergraduate degrees in Computer Science, Philosophy, Mathematics and Linguistics and a masters in Mathematics. He is an avid reader and devotes an entire room of his apartment to his army of books.","Wayne has been Working With Rails for well over four years now and comes well recommended. Wayne has a bachelors degree in Computer Science and a Masters degree in Mathematics. Wayne's hobbies include spending time with his children, hacking, Magic the Gathering and Disc Golf.","4"];
var photos = ["/images/team/bill.png","/images/team/mark.png","/images/team/wayne.png","/images/team/eric.png"];

function showBio(p) {
	$("#bio_name").html(names[p]);
	$("#bio_title").html(titles[p]);
	$("#bio_text").html(texts[p]);
	$("#bio_photo").attr("src",photos[p]);
}

(function($) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.preLoadImages = function() {
    var args_len = arguments.length;
    for (var i = args_len; i--;) {
      var cacheImage = document.createElement('img');
      cacheImage.src = arguments[i];
      cache.push(cacheImage);
    }
  }
})(jQuery)

$(document).ready(function(){
	
	jQuery.preLoadImages("images/team/bill.png","images/team/mark.png","images/team/wayne.png","images/team/eric.png");
	
	$(document).pngFix(); 

	$(".team_icons li").hover(
	  function () {
		$(this).css("background","#ddd");
		$(this).css("cursor","pointer");

	  }, 
	  function () {
		$(this).css("background","");
		$(this).css("cursor","default");
	  }
	);
	
	$(".team_icons li").click(
	  function () {
		showBio(this.id);
	});
	
	
 });
 
 
