$(document).ready( function(){  
  $('div.bio p').css( {'height':'auto', 'overflow' : 'visible' } );
  $('div.bio p').truncate({max_length: 270});
  $("div.bio img.bg").css( "cursor", "pointer" );

  $("div.bio a.more").click( function () {
     $(this).parent().siblings("img.bg").animate( {opacity: 0 }, 1000 );
     $(this).parent().siblings("h3").animate( {top: "370px"}, 500 );
     return false;
  });

  $("div.bio a.less").click( function () {
     $(this).parent().siblings("img.bg").animate( {opacity: "1.0"}, 1500 );
     $(this).parent().siblings("h3").animate( {top: "140px"}, 1500 );
     return false;
  });

  $("div.bio img.bg").click( function () {

if( ! $(this).siblings().is(':animated') ){

    var params, txtparams, hidden;
    var position = $(this).position();

    if( $(this).css('opacity') == 0 ){
      params = { 'opacity': '1.0' };
      hidden = false;
    }else{
      params = { 'opacity': 0 };
      hidden = true;
    }

    if( hidden ){
      $(this).siblings("p").css('display','none');
      $(this).siblings('p:eq(0)').show( "slide", { direction: "up" }, 1500 );
      txtparams = { 'top': '380px' };
    }else{
      $(this).siblings('p').css('display','none');
      $(this).siblings("p:eq(1)").show( "slide", { direction: "down" }, 1500 );
      //$(this).siblings("p:eq(1)").show();
      txtparams = { 'top': '140px' };
    }
    $(this).animate( params, 1500 );
    $(this).siblings("h3").animate( txtparams, 1500 );
  }
    return false;
  });

});