$(document).ready(function(){
	$('#header ul').innerfade({
		animationtype: 'fade',
		speed: 750,
		timeout: 5000,
		type: 'sequence',
		containerheight: '864px'
	});
	$('#maincontent ul.rotating').innerfade({
		animationtype: 'fade',
		speed: 750,
		timeout: 3000,
		type: 'sequence',
		containerheight: '400px'
	});
	
	$('#printme').click(function(){
		window.print();
	});
	
	// custom scrollbars
	//$('#maincontent').jScrollPane({showArrows:true});
	
	//$('#header #biocontent').jqm({toTop:true, overlay:70, onHide:myClose});
	$('#header #biocontent').jqm({toTop:true, overlay:70});
	$('#header a.biolink').click(function(event){
		// load content
		$('#header #bioinner').html('');
		$('#header #bioinner').load(this + '?type=11');
		$('#header #biocontent').jqmShow();
		event.preventDefault();
	});
	$('#header #biocontent').jqmAddClose('#bioclose');
	
	//$('#bioclose').click(function(event){
	//alert('here')'
	// 	$('#header #biocontent').jqmHide();
	// 	event.preventDefault();
	//});
});


function stopHeaderInnerfade() {
	$('.innerfade').hide();
}
function startHeaderInnerfade() {
	$('.innerfade').show();
}

// var myClose=function(hash) {
// 	hash.w.fadeOut('2000',function(){ 
// 		hash.o.remove(); 
// 	});
// 	startHeaderInnerfade(); 
// };



function obscureAddMid() {
  document.write('&#64;');
}
function obscureAddEnd() {
  document.write('&#46;');
}
