﻿
$(document).ready( function() {
	$('#feature_bio').hide();
	$('#overlay').hide();
});

function activateLightBox(bioId) {
	
//		$('#feature_bio').css('display', 'block');
//		$('#overlay').css('display','block');
		var pageTop = getPageTop();
		$('#feature_bio_'+bioId).css('top',pageTop+20+'px');
		$('#overlay').slideDown("normal");
		$('#feature_bio_'+bioId).slideDown("normal");
}

function hideLightBox() {
	$('.feature_bio').slideUp("fast");
	$('#overlay').slideUp("fast");
}

function getPageTop() {
	return getResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
	
function getResults (n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}

	