jQuery(function($){


  $(window).on('load', function(){
    set_header_li_num();
    pagination_add_class();
    sp_cont_move_recruit();
  });


  var defW = $(window).width();
  $(window).on('resize',function(){
    var nowW = $(window).width();
    if(nowW != defW){
      defW = nowW;
      sp_cont_move_recruit();
    }
  });


  function set_header_li_num() {
    var liNum = $('.boxGnaviElse01 li').length;
    if(liNum > 0) $('.boxGnaviElse01 ul').addClass('col'+liNum);
  }


  function container_bottom_padding(){
    $('div#container').css('padding-bottom','');
    $('div#container').css('padding-bottom',$('footer').outerHeight()+'px');
  }


  function pagination_add_class(){
    $('.boxPagination li > .prev.page-numbers').parent().addClass('liPrev');
    $('.boxPagination li > .next.page-numbers').parent().addClass('liNext');
  }


  function sp_cont_move_recruit(){
    $('.boxRecruitOne').each(function(){
      if($('.isSp').css('width') == '2px'){
        if($(this).children('.boxRecruitCont').length == 0){
          $(this).find('.boxRecruitOneR .boxRecruitCont').appendTo($(this));
        }
      }else{
        if($(this).children('.boxRecruitCont').length != 0){
          $(this).children('.boxRecruitCont').appendTo($(this).find('.boxRecruitOneR'));
        }
      }
    });
  }


/*
  $(window).on("scroll", function(){
    $('body.home').css('min-width','');
    $('body.home').css('background-position','');
    if($('.isPc').css('width') == '1px'){
      //$('body.home').css("min-width",$(window).width() + $(window).scrollLeft() + 'px');
      //$('body.home').css("background-position",'right -' + $(window).scrollLeft() + 'px top,left top,left top');
    }
  });
*/




});
