jQuery(document).ready(function(a){function c(c,d){var e=a(b).find("span").text("@"+d.val).end().find("small").text("("+(d.meta||d.val)+")").end();c.append(e)}if($comment=a(mcaCommentTextarea),$comment.length>0){var b="
";$comment.sew({values:mcaAuthors,elementFactory:c}),a(".mca-button").on("click",function(){a(".mca-fired").removeClass("mca-fired"),a(".mca-prevent-elem").removeClass("mca-prevent-elem"),a(".mca-comment-text-wrapper").removeClass("mca-comment-text-wrapper");var b=a(this).attr("data-target"),c=a(".mca-author"),d=null,e=!1;a(this).parents(".mca-author").addClass("mca-fired"),c.each(function(f){return a(this).hasClass("mca-fired")&&(e=!0),e&&d||f==c.length-1?(d.addClass("mca-prevent-elem").parent().addClass("mca-comment-text-wrapper"),a("body,html").animate({scrollTop:d.offset().top-200},200),!1):(a(this).attr("data-name")==b&&(d=a(this)),void 0)})})}});