Hexo多说评论jQuery版本

上文介绍了为hexo添加多说评论,用的是原生js方式,需要外挂一个js文件,十分啰嗦。
参考了jQuery的帮助文档,发现用jQuery更方便、简洁。
comment.ejs全文如下,其中<!--likaci xxx -->之间部分为添加内容,具体效果参见下方评论框。

<% if (config.disqus_shortname && page.comments){ %>
<!--likaci js init begin-->
<script type="text/javascript"> 
$(document).ready(function(){
   $("#Disqus_bt").mouseover(function(){
     $("#Disqus_bt").css("background-color","#E6EFC2")
     $("#duoshuo_bt").css("background-color","#f5f5f5")
     $(".ds-thread").animate({ height: 'hide', opacity: 'hide' }, 'slow');
     $("#disqus_thread").animate({ height: 'show', opacity: 'show' }, 'slow');
   });
   $("#duoshuo_bt").mouseover(function(){
     $("#Disqus_bt").css("background-color","#f5f5f5")
     $("#duoshuo_bt").css("background-color","#DFF4FF")
     $(".ds-thread").animate({ height: 'show', opacity: 'show' }, 'slow');
     $("#disqus_thread").animate({ height: 'hide', opacity: 'hide' }, 'slow');
   });
});
</script> 
<!--likaic js init end-->
<!--likaci css style begin-->
<style type="text/css">
#Disqus_bt,#duoshuo_bt { padding: 5px 10px 5px 7px; line-height: 17px; display: block; float: left; margin: 0 0 0 9px; background-color: #f5f5f5; border: 1px solid #dedede; border-top: 1px solid #eee; border-left: 1px solid #eee; }
#Disqus_bt{color: #336699}
#duoshuo_bt{color: #d12f19}
</style>
<!--likaci css style end-->
<section id="comment">
  <h1 class="title" style="float:left"><%= __('comment') %></h1>
  <div id="duoshuo_bt" >多说</div>
  <div id="Disqus_bt" >Disqus</div>
  <div style="clear:both"></div>
  <div id="disqus_thread" style="display:none">
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  </div>
<!--likaci add duoshuo begin-->
    <div class="ds-thread"></div>
    <script type="text/javascript">
    var duoshuoQuery = {short_name:"yourshortname"};
    (function() {
        var ds = document.createElement('script');
        ds.type = 'text/javascript';ds.async = true;
        ds.src = 'http://static.duoshuo.com/embed.js';
        ds.charset = 'UTF-8';
        (document.getElementsByTagName('head')[0] 
        || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
    </script>
<!--likaci add duoshuo end-->
</section>
<% } %>