var $hp_slides=['dori','tim','hugh','keith'];$(document).ready(function(){$('.link').bind('click',function(e){e.stopPropagation();$this=$(this);var target_id=$(this).attr('id').substring(6);$target=$('#bio_for_'+target_id);$wrapper=$this.parent().parent().parent().find('.exploded-wrapper');$row=$this.parent().parent().parent();$row_num=$row.attr('id').substring(4)-1;var targetOffset=($row_num*158)+235;$('html,body').animate({scrollTop:targetOffset},500);$('.selected').remove();$this.parent().append('<div class="selected"></div>');$('.selected').fadeIn();window.location.hash=target_id+'-'+$this.attr('title');$target.find('.screenshots li').hide().css('zIndex','5');$target.find('.screenshots li:first-child').show().css('zIndex','10');$k=0;$total=$target.find('.screenshots li').size();if($wrapper.css('display')=='block'){$wrapper.css('height',$wrapper.outerHeight()+30);$wrapper.find('.exploded').not($target).slideUp('fast');$target.slideDown('slow',function(){$wrapper.animate({height:$(this).outerHeight()},500);})}
else{$('.exploded-wrapper, .exploded').slideUp(function(){$wrapper.show();});$target.slideDown('fast');}})
$('.arrow.left').bind('click',function(e){e.stopPropagation();$this=$(this);$k--;if($k<0)$k=$total-1;show_slide($k,$this.parent().find('.screenshots'));})
$('.arrow.right').bind('click',function(e){$this=$(this);$k++;if($k>=$total)$k=0;e.stopPropagation();show_slide($k,$this.parent().find('.screenshots'));})
$('.close').click(function(){$('.selected').remove();$('.exploded-wrapper, .exploded').slideUp('fast',function(){$(this).hide();});})
if(window.location.hash!=''){$('#'+window.location.hash.substring(1)+' a').trigger('click')
$('#'+window.location.hash.substring(1)).append('<div class="selected"></div>');$('.selected').show();}});function handle(e){e.data.elem.html(e.frameCount);}
$k=0;$slides='';$total='';$viewport_width='';$viewport_height='';$bot='';$circles='';$thumbs='';$interval=0;function next_slide(){$k++;if($k>=$total)$k=0;show_slide($k);}
function prev_slide(){$k--;if($k<0)$k=$total-1;show_slide($k);}
function show_slide(key,$wrapper){var $current=$wrapper.find('li:eq('+key+')');$wrapper.find('li').css('zIndex','5');$current.css('zIndex','10');$current.fadeIn('fast',function(){$wrapper.find('li').not($current).hide();});}
