function tabswitching(e){var o=$("header li",_tabconts),t=$(".list",_tabconts);o.removeclass("active"),o.eq(e).addclass("active"),t.addclass("hide"),t.eq(e).removeclass("hide")}var consoleloglocal=function(e){"localhost.yorozukensetsu"==document.domain&&console.log(e)},getqueries=function(){var e={},e={w:window.innerwidth,h:window.innerheight,wide:1280,tab:1024,sp:767,nav:70,navsp:50};return e.wide<=e.w?e.device="wide":e.w<=e.tab?e.w<=e.sp?e.device="sp":e.device="tab":e.device="pc",consoleloglocal(e.device),e};_winobj=$(window),_htmlobj=$("html"),_queries=getqueries(),settimeout(function(){_htmlobj.addclass("cont-view")},200);var _resizetimer=!1;_winobj.on("resize",function(e){_resizetimer!==!1&&cleartimeout(_resizetimer),_resizetimer=settimeout(function(){_queries=getqueries(),_htmlobj.removeclass("sp-nav-view")},200)});var _infocontflg=!!$.cookie("infocontflg")&&$.cookie("infocontflg");_infocontflg&&"sp"!=_queries.device&&_htmlobj.addclass("info-view"),$("#trigger-menu").click(function(){_htmlobj.removeclass("info-view").toggleclass("sp-nav-view")}),$("#trigger-info").click(function(){_htmlobj.removeclass("sp-nav-view").toggleclass("info-view"),_htmlobj.hasclass("info-view")?$.cookie("infocontflg",!0,{expires:30,path:"/"}):$.cookie("infocontflg","",{expires:-1,path:"/"})});var _tabconts=$("#global-info"),_infocontnum=$.cookie("infocontnum")?$.cookie("infocontnum"):0;tabswitching(_infocontnum),$("header li",_tabconts).click(function(){_infocontnum=$("header li",_tabconts).index(this),tabswitching(_infocontnum),$.cookie("infocontnum",_infocontnum,{expires:30,path:"/"})});var _ttlimg=$("#tinymce > .page-ttl"),_ttl=$(".inner > .inner",_ttlimg),_lastscrolltop=0;_winobj.scroll(function(e){var o=$(this).scrolltop();_ttlimg.css("margintop",o/6*-1),_ttl.css("margintop",o/3*-1),o>_lastscrolltop||0==o?_htmlobj.removeclass("scroll-up").addclass("scroll-down"):_htmlobj.removeclass("scroll-down").addclass("scroll-up"),_lastscrolltop=o}),$("#global-bnrs").bxslider({mode:"horizontal",loop:!0,auto:!0,autohover:!0,pause:4e3,controls:!1});var linktouchstart=function(){_thisanchor=$(this),_touchpos=_thisanchor.offset().top,_movecheck=function(){nowpos=_thisanchor.offset().top,_touchpos==nowpos&&_thisanchor.addclass("touch")},settimeout(_movecheck,100)},linktouchend=function(){_thisanchor=$(this),_hoverremove=function(){_thisanchor.removeclass("touch")},settimeout(_hoverremove,500)};$('a[href^="#"]').click(function(){var e=$(this.hash);if("undefined"==typeof e[0])return console.log("not valid"),!1;var o=$(e[0]).offset().top,t=!window.chrome&&"webkitappearance"in document.documentelement.style?"body":"html";return $(t).animate({scrolltop:o},600,"easeinoutcubic"),!1});var _newnewscount=$("#side-news-articles").find(".news-new").length;if(_newnewscount){var html="";html+='',html+=_newnewscount,html+="",$("#trigger-info").append(html)}(navigator.useragent.match(/msie 10/i)||navigator.useragent.match(/trident\/7\./)||navigator.useragent.match(/edge\/12\./))&&$("body").on("mousewheel",function(){event.preventdefault();var e=event.wheeldelta,o=window.pageyoffset;window.scrollto(0,o-e)});