/* 
    dosanite js
    
 */

jQuery(function(){
    //miniNaviの追従
//    $('#miniNavi').scrollFollow({speed: 500, offset: getWindowHeight() - $('#miniNavi > .dosanite_slideshow').size()*120 - 60  } );
    //ナビゲーションのクリックのトグル動作
    $('#widgetWrapper > div.widget > ul > li.cat-item > a').click(function(){
        $(this).toggleClass('open').next().toggle('fast');
    });
    //エントリーのクリックのトグル動作
    $('#articles > div.entry > div.footer > .comments').prevAll('h3').click(function(){
        $(this).next().toggle('fast').next().toggle('fast');
    });
    //初回のHTML修正処理
    $(window).ready(function(){
        $('#widgetWrapper > div.widget > ul > li.cat-item > ul').hide().prevAll('a').removeAttr('href').removeAttr('title');
        $('li.current-cat').parent('ul').prevAll('a').click();
        $('#articles > div.entry > div.footer > .comments').hide();
        $('#articles > div.entry > div.footer > .comment-post').hide();
    });
});
/*
function getWindowHeight(){
  if(window.innerHeight) return window.innerHeight; // Mozilla, Opera, NN4
  if(document.documentElement && document.documentElement.clientHeight){ // 以下 IE
   return document.documentElement.clientHeight;
  }
  else if(document.body && document.body.clientHeight){
   return document.body.clientHeight;
  }
  return 0;
}
*/