// メニューバー $ ( function () { setTimeout ( function () { var windowWidth = $ ( window ) .width () ; if ( windowWidth > 900 ) { var hmo = $ ( "#global-nav" ) .offset () .top ; console .log ( hmo ) ; $ ( window ) .on ( "scroll" , function () { var hms = $ ( window ) .scrollTop () ; if ( hmo <= hms ) { $ ( "#global-nav" ) .addClass ( "menupara" ) ; $ ( 'div[name="global-nav"]' ) .addClass ( "menu-list-script" ) ; $ ( ".listbox" ) .css ( { position : "fixed" , top : "58px" , width : "230px" } ) ; $ ( "main" ) .css ( "margin-top" , "58px" ) ; } else { $ ( "#global-nav" ) .removeClass ( "menupara" ) ; $ ( 'div[name="global-nav"]' ) .removeClass ( "menu-list-script" ) ; $ ( ".listbox" ) .css ( { position : "absolute" , top : hmo + 58 , width : "230px" } ) ; $ ( "main" ) .css ( "margin-top" , "0" ) ; } } ) ; } } , 0 ) ; } ) ; //文字サイズ変更 $ ( function fs () { var windowWidth = $ ( window ) .width () ; var p1 = 17.5 ; var h1 = 30 ; var h2 = 25 ; var h3 = 22.5 ; var ba = 20 ; function fsSSfunc () { $ ( "#sizeSS , #sizeSSr" ) .removeClass ( "not-chosen" ) .addClass ( "chosen" ) ; $ ( "#sizeS , #sizeSr , #sizeM , #sizeMr , #sizeL , #sizeLr , #sizeLL , #sizeLLr" ) .removeClass ( "chosen" ) .addClass ( "not-chosen" ) ; var a = 2 ; var b = a + 1 ; if ( windowWidth > 900 ) { $ ( ".content" ) .css ( { fontSize : p1 * 0.8 ** a + "px" } ) ; $ ( "h1" ) .css ( { fontSize : h1 * 0.8 ** a + "px" } ) ; $ ( "h2 , .link-content , .summary-title , .note-title , .footer-title , .con-text span , .character-text font" ) .css ( { fontSize : h2 * 0.8 ** a + "px" } ) ; $ ( "h3" ) .css ( { fontSize : h3 * 0.8 ** a+ "px" } ) ; $ ( ".before-bottom , .after-bottom" ) .css ( { fontSize : ba * 0.8 ** a + "px" } ) ; } else { $ ( ".content" ) .css ( { fontSize : p1 * 0.8 **b + "px" } ) ; $ ( "h1" ) .css ( { fontSize : h1 * 0.8 ** b + "px" } ) ; $ ( "h2 , .link-content , .summary-title , .note-title , .footer-title , .con-text span , .character-text font" ) .css ( { fontSize : h2 * 0.8 ** b + "px" } ) ; $ ( "h3" ) .css ( { fontSize : h3 * 0.8 ** b + "px" } ) ; $ ( ".before-bottom , .after-bottom" ) .css ( { fontSize : ba * 0.8 ** b + "px" } ) ; } } function fsSfunc () { $ ( "#sizeS , #sizeSr" ) .removeClass ( "not-chosen" ) .addClass ( "chosen" ) ; $ ( "#sizeSS , #sizeSSr , #sizeM , #sizeMr , #sizeL , #sizeLr , #sizeLL , #sizeLLr" ) .removeClass ( "chosen" ) .addClass ( "not-chosen" ) ; var a = 1 ; var b = a + 1 ; if ( windowWidth > 900 ) { $ ( ".content" ) .css ( { fontSize : p1 * 0.8 ** a + "px" } ) ; $ ( "h1" ) .css ( { fontSize : h1 * 0.8 ** a + "px" } ) ; $ ( "h2 , .link-content , .summary-title , .note-title , .footer-title , .con-text span , .character-text font" ) .css ( { fontSize : h2 * 0.8 ** a + "px" } ) ; $ ( "h3" ) .css ( { fontSize : h3 * 0.8 ** a+ "px" } ) ; $ ( ".before-bottom , .after-bottom" ) .css ( { fontSize : ba * 0.8 ** a + "px" } ) ; } else { $ ( ".content" ) .css ( { fontSize : p1 * 0.8 **b + "px" } ) ; $ ( "h1" ) .css ( { fontSize : h1 * 0.8 ** b + "px" } ) ; $ ( "h2 , .link-content , .summary-title , .note-title , .footer-title , .con-text span , .character-text font" ) .css ( { fontSize : h2 * 0.8 ** b + "px" } ) ; $ ( "h3" ) .css ( { fontSize : h3 * 0.8 ** b + "px" } ) ; $ ( ".before-bottom , .after-bottom" ) .css ( { fontSize : ba * 0.8 ** b + "px" } ) ; } } function fsMfunc () { $ ( "#sizeM , #sizeMr" ) .removeClass ( "not-chosen" ) .addClass ( "chosen" ) ; $ ( "#sizeSS , #sizeSSr , #sizeS , #sizeSr , #sizeL , #sizeLr , #sizeLL , #sizeLLr" ) .removeClass ( "chosen" ) .addClass ( "not-chosen" ) ; var a = 0 ; var b = a + 1 ; if ( windowWidth > 900 ) { $ ( ".content" ) .css ( { fontSize : p1 * 0.8 ** a + "px" } ) ; $ ( "h1" ) .css ( { fontSize : h1 * 0.8 ** a + "px" } ) ; $ ( "h2 , .link-content , .summary-title , .note-title , .footer-title , .con-text span , .character-text font" ) .css ( { fontSize : h2 * 0.8 ** a + "px" } ) ; $ ( "h3" ) .css ( { fontSize : h3 * 0.8 ** a + "px" } ) ; $ ( ".before-bottom , .after-bottom" ) .css ( { fontSize : ba * 0.8 ** a + "px" } ) ; } else { $ ( ".content" ) .css ( { fontSize : p1 * 0.8 ** b + "px" } ) ; $ ( "h1" ) .css ( { fontSize : h1 * 0.8 ** b + "px" } ) ; $ ( "h2 , .link-content , .summary-title , .note-title , .footer-title , .con-text span , .character-text font" ) .css ( { fontSize : h2 * 0.8 ** b + "px" } ) ; $ ( "h3" ) .css ( { fontSize : h3 * 0.8 ** b + "px" } ) ; $ ( ".before-bottom , .after-bottom" ) .css ( { fontSize : ba * 0.8 ** b + "px" } ) ; } } function fsLfunc () { $ ( "#sizeL , #sizeLr" ) .removeClass ( "not-chosen" ) .addClass ( "chosen" ) ; $ ( "#sizeSS , #sizeSSr , #sizeS , #sizeSr , #sizeM , #sizeMr , #sizeLL , #sizeLLr" ) .removeClass ( "chosen" ) .addClass ( "not-chosen" ) ; var a = 1 ; if ( windowWidth > 900 ) { $ ( ".content" ) .css ( { fontSize : p1 * 1.2 ** a + "px" } ) ; $ ( "h1" ) .css ( { fontSize : h1 * 1.2 ** a + "px" } ) ; $ ( "h2 , .link-content , .summary-title , .note-title , .footer-title , .con-text span , .character-text font" ) .css ( { fontSize : h2 * 1.2 ** a + "px" } ) ; $ ( "h3" ) .css ( { fontSize : h3 * 1.2 ** a+ "px" } ) ; $ ( ".before-bottom , .after-bottom" ) .css ( { fontSize : ba * 1.2 ** a + "px" } ) ; } else { $ ( ".content" ) .css ( { fontSize : p1 * 1.2 ** a * 0.8 + "px" } ) ; $ ( "h1" ) .css ( { fontSize : h1 * 1.2 ** a * 0.8 + "px" } ) ; $ ( "h2 , .link-content , .summary-title , .note-title , .footer-title , .con-text span , .character-text font" ) .css ( { fontSize : h2 * 1.2 ** a * 0.8 + "px" } ) ; $ ( "h3" ) .css ( { fontSize : h3 * 1.2 ** a * 0.8 + "px" } ) ; $ ( ".before-bottom , .after-bottom" ) .css ( { fontSize : ba * 1.2 ** a * 0.8 + "px" } ) ; } } function fsLLfunc () { $ ( "#sizeLL , #sizeLLr" ) .removeClass ( "not-chosen" ) .addClass ( "chosen" ) ; $ ( "#sizeSS , #sizeSSr , #sizeS , #sizeSr , #sizeM , #sizeMr , #sizeL , #sizeLr" ) .removeClass ( "chosen" ) .addClass ( "not-chosen" ) ; var a = 2 ; if ( windowWidth > 900 ) { $ ( ".content" ) .css ( { fontSize : p1 * 1.2 ** a + "px" } ) ; $ ( "h1" ) .css ( { fontSize : h1 * 1.2 ** a + "px" } ) ; $ ( "h2 , .link-content , .summary-title , .note-title , .footer-title , .con-text span , .character-text font" ) .css ( { fontSize : h2 * 1.2 ** a + "px" } ) ; $ ( "h3" ) .css ( { fontSize : h3 * 1.2 ** a+ "px" } ) ; $ ( ".before-bottom , .after-bottom" ) .css ( { fontSize : ba * 1.2 ** a + "px" } ) ; } else { $ ( ".content" ) .css ( { fontSize : p1 * 1.2 ** a * 0.8 + "px" } ) ; $ ( "h1" ) .css ( { fontSize : h1 * 1.2 ** a * 0.8 + "px" } ) ; $ ( "h2 , .link-content , .summary-title , .note-title , .footer-title , .con-text span , .character-text font" ) .css ( { fontSize : h2 * 1.2 ** a * 0.8 + "px" } ) ; $ ( "h3" ) .css ( { fontSize : h3 * 1.2 ** a * 0.8 + "px" } ) ; $ ( ".before-bottom , .after-bottom" ) .css ( { fontSize : ba * 1.2 ** a * 0.8 + "px" } ) ; } } function fsLS () { var fsLoad = $ ( "#size .chosen , #btn-fs .chosen" ) .attr ( "id" ) ; if ( fsLoad == "sizeSS" || fsLoad == "sizeSSr" ) { fsSSfunc () ; } else if ( fsLoad == "sizeS" || fsLoad == "sizeSr" ) { fsSfunc () ; } else if ( fsLoad == "sizeL" || fsLoad == "sizeLr" ) { fsLfunc () ; } else if ( fsLoad == "sizeLL" || fsLoad == "sizeLLr" ) { fsLLfunc () ; } else { fsMfunc () ; } } setTimeout ( fsLS , 500 ) ; $ ( "#sizeSS , #sizeSSr" ) .click ( fsSSfunc ) ; $ ( "#sizeS , #sizeSr" ) .click ( fsSfunc ) ; $ ( "#sizeM , #sizeMr" ) .click ( fsMfunc ) ; $ ( "#sizeL , #sizeLr" ) .click ( fsLfunc ) ; $ ( "#sizeLL , #sizeLLr" ) .click ( fsLLfunc ) ; setTimeout ( fs , 750 ) ; } ) ; //ふきだし $(function() { $(".inview_re").on("inview",function(event,isInView,visiblepartX,visiblepartY) { if(isInView){ $(this).stop().addClass("is-show"); } else{ $(this).stop().removeClass('is-show'); } }); }); //topボタン $(function(){ var topBtn=$('#Top'); topBtn.hide(); $(window).scroll(function(){ if($(this).scrollTop()>300){ topBtn.fadeIn(); }else{ topBtn.fadeOut(); } }); topBtn.click(function(){ $('body,html').animate({ scrollTop: 0},500); return false; }); })