jQuery.noConflict();function ajaxEffect(content){jQuery(content).css({visibility:"hidden"}).fadeIn(1000).css({visibility:"visible"});}jQuery(document).ready(function(){ajaxURL="http://bueltge.de/wp-content/themes/black_label/js/jquery-ajax.php";jQuery("#commentform").submit(function(){if(jQuery.find(".commentlist_ajax")=="" ) jQuery(this).prev().before('<ol id="commentlist" class="commentlist_ajax"></ol>');jQuery("h2").contains("Keine Kommentare").fadeOut(1000,function(){jQuery("h2").contains("Keine Kommentare").remove();jQuery(".commentlist_ajax").before('<h2 id="ajaxheader">Kommentare</h2>');ajaxEffect("#ajaxheader");});jQuery(".commentlist_ajax").append('<li id="loading"><p>Loading...</p></li>');ajaxEffect("#loading");jQuery.ajax({type:"POST",url:ajaxURL,data:jQuery("#commentform input,#commentform textarea").serialize(),dataType:"html",error:function(request){if(jQuery("#ajaxerror")) jQuery("#ajaxerror").remove();jQuery("#loading").fadeOut(1000,function(){jQuery("#loading").remove();if(request.responseText.search(/<title>WordPress &rsaquo;Error<\/title>/) !=-1){var data=request.responseText.match(/<p>(.*)<\/p>/);data='<li id="ajaxerror"><p>Error:'+data[1]+'</p></li>';}else{var data=request.responseText;}jQuery(".commentlist_ajax").append(data);ajaxEffect("#ajaxerror");});},success:function(data){if(jQuery("#ajaxerror")) jQuery("#ajaxerror").remove();jQuery("#loading").fadeOut(1000,function(){jQuery("#loading").remove();jQuery(".commentlist_ajax").append(data);ajaxEffect("#newcomment");jQuery("#commentform textarea").val("");jQuery("#commentform").hide();});}});return false;});});