var animationDuration = 600;
var inClick = false;
function initAccordian(){
    $('.profile-link').click(function (e) {
        e.stopPropagation();
        document.location = $(this).attr('href');
    });
    $('.tabs').click(function(){
    if(!inClick) {
        inClick = true;
        $(this).toggleClass('current');
        if ($(this).hasClass('current')){
            $(this).find(" .see-more-less").find(' .txt').text('see less');
            $(this).find("h3").fadeOut(animationDuration);
            $(this).find(" .main-content").fadeIn(animationDuration);
            $(this).animate({height: $(this).find('.main-content').height()+30}, animationDuration);
            var container = $(this).find(".author-image");
            $(this).find(".author-image").animate({height:150,width:220},animationDuration, function () {
            //$(this).find(".author-image").animate({height:150,width:220,opacity:"toggle",queue:true},animationDuration, function () {
                //container.attr('src','/wp-content/themes/hgm/images/writer-padgett-220x150.jpg');
                //container.fadeTo(1,animationDuration);
                inClick = false;});
        }
        else {
            $(this).find(".see-more-less .txt").html('see more');
            $(this).find("h3").fadeIn("slow");
            $(this).find(".main-content").fadeOut(animationDuration);
            //$(this).find(".author-image").attr('src','/wp-content/themes/hgm/images/writer-padgett-100x75.jpg');
            $(this).find(" .author-image").animate({height:75,width:110},{ queue:false, duration:animationDuration });
            $(this).animate({height: 75}, animationDuration, function () { inClick = false;});
        }
        
        $(this).find(" .see-more-less").toggleClass('see-less');
        $(this).find(" .see-more-less").toggleClass('see-more');
        
    }
    });
    
}



