(function($) {
  $(function(){
    addTableSequence();	//※テーブルの行・列のクラスに連番を追加
    addSequence('li, .Paragraph');	//※指定要素のクラスに連番を追加
    addEvenOdd('ul, ol, tbody');	//※指定要素の子要素のクラスにeven,oddを追加
    //addEmpty();	//※空要素のクラスにemptyを追加
    addWidgetClass();
    addClearFix();
  });
  function addSequence(target) {setSequence(target,'No');}
  function addTableSequence() {setSequence('tr','tr'); setSequence('th,td','cell');}
  function setSequence(target,classname) {var i=1; $(target).each(function(){$(this).addClass(classname+i);if($(this).is(":last-child")){i=1;}else{i++;}});}
  function addEvenOdd(target) {$(target).each(function(){$(this).children(':odd').addClass('even');$(this).children(':even').addClass('odd');});}
  function addEmpty() {$('body :empty').addClass('empty');}
  function addWidgetClass(){$('body .SideMenuBlock ul ul').addClass('LinkList');$('body .children .children').addClass('GrandChildren');$('body .children .children .children').addClass('GrandGrandChildren');$('body .children .children .children .children').addClass('GrandGrandGrandChildren clearfix');}
  function addClearFix() {$('body ul .children').addClass('clearfix');}
})(jQuery);
