$(window).load(function(){ 
	var $startHeight = $('.gallery img:eq(0)').height();
	$('#thumbs li:eq(0)').addClass('active');
	$('div.project').hide();
	$('div.project:eq(0)').show();
	$('#thumbs li a').click(function(){
		var $this = $(this);
		var $id = $($this.attr('href'));
		$('#thumbs li').removeClass('active');
		$('div.project').hide();
		$($id).fadeIn();
		$(this).parent().addClass('active');
		return false;
	});
	
	var count = $('div#container > div.project').size();
	for (var i=1; i <= count; ++i) {
		$('#gallery'+i).cycle ({
			speed: 300,
			timeout: 0,
			next: '#next'+i,
			prev: '#prev'+i,
			pager: '#pager'+i
		});
	}
	
	$('#thumbs li').hover(
	  function () {
	    $(this).fadeTo(300,1);
	  }, 
	  function () {
	    $(this).fadeTo(300,0.65);
	  }
	);
});

// ask benjam how to automate counting for generating the project, next, prev, and pager IDs. Also for automatically generating the Photo count in the index list

