$(document).ready(function() {  

$('ul.recent').hide();

var authorIndex = $('span.author-index');
var entryIndex  = $('span.entry-index');
var recenth3   = $('h3.recent');
var h3currentBorder = recenth3.css('border-bottom-style');
recenth3.css('border-bottom-style', 'none');
$('p.author-bio span.toggle').toggle();

$("a.indexSwitch").click( // toggle author and all authors index
    function () {
		if ( authorIndex.is(':visible') ) {
			authorIndex.css('display','none');
			entryIndex.css('display','block');
		}
		else {
			entryIndex.css('display','none');
			authorIndex.css('display','block');
		}
   });

$('p.author-bio').click(
    function() {
        $('span.toggle', this).toggle();
    });

recenth3.toggle(
    function() {
        $('img', this).attr("src", "/img/unfolded.gif");
        $(this).css('border-bottom-style', h3currentBorder);
        $(this).next('ul.recent').slideDown();
        var prevBio = $(this).prev('p.author-bio');
        $('span.toggle', prevBio).toggle();
   },
    function() {
        $('img', this).attr("src", "/img/folded.gif");
        $(this).css('border-bottom-style', 'none');
        $(this).next('ul.recent').slideUp();
        var prevBio = $(this).prev('p.author-bio');
        $('span.toggle', prevBio).toggle();
    });






}); //End document.ready
