document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <script src=\'http://code.jquery.com/jquery-latest.js\' type=\'text/javascript\'></script>
  2. <b:if cond=\'data:blog.pageType == &quot;item&quot;\'>
  3. <script type=\'text/javascript\'>
  4. //<![CDATA[
  5. if(typeof jQuery != \'undefined\') {
  6.   $(function() {
  7.     $(\'a.smoothvscroll\').bind(\'click\',function(event){
  8.       var $anchor = $(this);
  9.       $(\'html, body\').stop().animate({
  10.         scrollTop: $($anchor.attr(\'href\')).offset().top
  11.       }, "slow");
  12.       event.preventDefault();
  13.     });
  14.   });
  15. }
  16. // functions for show/hide comments
  17. function showhideElm(ele, showhide) {
  18.   if(!ele) return;
  19.   if(showhide == "toggle") {
  20.     if(typeof jQuery == \'undefined\')
  21.     {
  22.       if(ele.style.display != "none")
  23.         ele.style.display = "none";
  24.       else
  25.         ele.style.display = "block";
  26.     }
  27.     else
  28.       $(ele).slideToggle();
  29.   }
  30.   else if(showhide == "hide")
  31.   {
  32.     if(typeof jQuery == \'undefined\')
  33.       ele.style.display = "none";
  34.     else
  35.       $(ele).slideUp("slow");
  36.   }
  37.   else if(showhide == "show")
  38.   {
  39.     if(typeof jQuery == \'undefined\')
  40.       ele.style.display = "block";
  41.     else
  42.       $(ele).slideDown("slow");
  43.   }
  44. }
  45. function toggleComment(event, elm)
  46. {
  47.   var txt=\'\';
  48.   if (window.getSelection)
  49.     txt = window.getSelection();
  50.   else if (document.getSelection)
  51.     txt = document.getSelection();
  52.   else if (document.selection)
  53.     txt = document.selection.createRange().text;
  54.   var target = event.target ? event.target : event.srcElement;
  55.   if (target.nodeType != 1)
  56.     target = target.parentNode;
  57.   if (target.nodeName.toLowerCase() == \'a\' || target.nodeName.toLowerCase() == \'img\' || txt != \'\')
  58.     return;
  59.   elm=getCommentBodyElm(elm);
  60.   showhideElm(elm, "toggle");
  61. }
  62. function getCommentBodyElm(elm)
  63. {
  64.   if(elm.className=="admin-comment" || elm.className=="normal-comment")
  65.     elm=elm.firstChild;
  66.   while(elm && (elm.nodeType != 1 || (elm.className != "comment-body" && elm.className != "comment-body-author")))
  67.     elm = elm.nextSibling;
  68.   return elm;
  69. }
  70. function showhideComments(showhide)
  71. {
  72.   var elements = document.getElementsByTagName("*");
  73.   for(var i=0 ; i<elements.length ; i++)
  74.     if(elements[i].className=="normal-comment" || elements[i].className=="admin-comment")
  75.       showhideElm(getCommentBodyElm(elements[i]), showhide);
  76. }
  77. function showComments()
  78. {
  79.   showhideComments("show");
  80.   return true;
  81. }
  82. function hideComments()
  83. {
  84.   showhideComments("hide");
  85.   return true;
  86. }
  87. //]]>
  88. </script>
  89. </b:if>
');