var do_comments_update=true;var queued_comments="";function live_blogging_handle_data(a){live_blogging_handle_entry(JSON.parse(a))}function live_blogging_poll(a){jQuery.post(live_blogging.ajaxurl,{action:"live_blogging_poll",liveblog_id:a},function(b){for(entry in b){live_blogging_handle_entry(b[entry])}},"json");setTimeout(function(){live_blogging_poll(a)},15000)}function live_blogging_handle_entry(b){var a="#liveblog-entry-"+b.id;if("entry"==b.type){if(0==jQuery(a).length){if("bottom"==live_blogging.update_effect){jQuery("#liveblog-"+b.liveblog).append('")}else{jQuery("#liveblog-"+b.liveblog).prepend('")}jQuery(a).fadeTo(0,0,function(){jQuery(this).css("margin-bottom",((-1*jQuery(a).height())+3)+"px");jQuery(this).css("display","block");jQuery(this).css("position","relative");jQuery(this).animate({marginBottom:0},1000,"swing",function(){jQuery(this).fadeTo("slowly",1)})})}else{jQuery(a).html(b.html)}}else{if("delete-entry"==b.type){jQuery(a).remove()}else{if("comments"==b.type){if(do_comments_update){jQuery(".commentlist").html(b.html);setup_toggle_comment_updating()}else{queued_comments=b.html}}}}}function setup_toggle_comment_updating(){jQuery(".comment-reply-link").click(function(){do_comments_update=false;jQuery("#cancel-comment-reply-link").click(function(){do_comments_update=true;if(""!=queued_comments){jQuery(".commentlist").html(queued_comments);queued_comments="";setup_toggle_comment_updating()}})})}jQuery(setup_toggle_comment_updating);