// source --> https://headma.jp/wp-content/uploads/burst/js/burst.min.js?ver=1776225671 
let burst = {"tracking":{"isInitialHit":true,"lastUpdateTimestamp":0,"beacon_url":"https:\/\/headma.jp\/wp-content\/plugins\/burst-statistics\/endpoint.php","ajaxUrl":"https:\/\/headma.jp\/wp-admin\/admin-ajax.php"},"options":{"cookieless":0,"pageUrl":false,"beacon_enabled":0,"do_not_track":0,"enable_turbo_mode":0,"track_url_change":0,"cookie_retention_days":30,"debug":0},"goals":{"completed":[],"scriptUrl":"https:\/\/headma.jp\/wp-content\/plugins\/burst-statistics\/assets\/js\/build\/burst-goals.js?v=1775316870","active":[]},"cache":{"uid":null,"fingerprint":null,"isUserAgent":null,"isDoNotTrack":null,"useCookies":null}};burst.tracking=burst.tracking||{isInitialHit:!0,lastUpdateTimestamp:0,ajaxUrl:""},burst.should_load_ecommerce=burst.should_load_ecommerce||!1,burst.cache=burst.cache||{uid:null,fingerprint:null,isUserAgent:null,isDoNotTrack:null,useCookies:null},burst.goals?.active&&(burst.goals.active=burst.goals.active.map(t=>({...t,ID:parseInt(t.ID,10)}))),burst.goals?.completed&&(burst.goals.completed=burst.goals.completed.map(t=>parseInt(t,10)));let pageIsRendered=new Promise(t=>{document.prerendering?document.addEventListener("prerenderingchange",t,{once:!0}):t()}),burst_get_cookie=(burst.goals?.active?.some(t=>!t.page_url||""===t.page_url||t.page_url===burst.options.pageUrl)&&import(burst.goals.scriptUrl).then(t=>t.default()),t=>{var e,r=t+"=";for(e of document.cookie.split(";"))if(0===(e=e.trim()).indexOf(r))return Promise.resolve(e.substring(r.length));return Promise.reject(!1)}),burst_set_cookie=(t,e)=>{let r="";var s="https:"===location.protocol?";secure":"",a=new Date,a=(a.setTime(a.getTime()+864e5*burst.options.cookie_retention_days),";expires="+a.toGMTString());r=r&&";domain="+r,document.cookie=""+t+`=${e};SameSite=Strict${s}${a}${r};path=/`},burst_use_cookies=()=>{var t;return null!==burst.cache.useCookies?burst.cache.useCookies:(t=navigator.cookieEnabled&&!burst.options.cookieless,burst.cache.useCookies=t)};function burst_enable_cookies(){burst.options.cookieless=!1,burst_use_cookies()&&burst_uid().then(t=>burst_set_cookie("burst_uid",t))}let burst_uid=()=>null!==burst.cache.uid?Promise.resolve(burst.cache.uid):burst_get_cookie("burst_uid").then(t=>burst.cache.uid=t).catch(()=>{var t=burst_generate_uid();return burst_set_cookie("burst_uid",t),burst.cache.uid=t}),burst_generate_uid=()=>Array.from({length:32},()=>Math.floor(16*Math.random()).toString(16)).join(""),burst_fingerprint=()=>null!==burst.cache.fingerprint?Promise.resolve(burst.cache.fingerprint):new ThumbmarkJS.Thumbmark({exclude:[],permissions_to_check:["geolocation","notifications","camera","microphone","gyroscope","accelerometer","magnetometer","ambient-light-sensor","background-sync","persistent-storage"]}).get().then(t=>{var t=t.thumbmark,e=t+"|"+[screen.availWidth+"x"+screen.availHeight,screen.width+"x"+screen.height,screen.colorDepth,window.devicePixelRatio||1,navigator.hardwareConcurrency||0,navigator.deviceMemory||0,navigator.maxTouchPoints||0,(new Date).getTimezoneOffset(),navigator.cookieEnabled?"1":"0","undefined"!=typeof Storage?"1":"0","undefined"!=typeof indexedDB?"1":"0",navigator.onLine?"1":"0",navigator.languages?navigator.languages.slice(0,3).join(","):navigator.language,navigator.platform,navigator.oscpu||"",navigator.connection&&navigator.connection.effectiveType||"","ontouchstart"in window?"1":"0",void 0!==window.orientation?"1":"0",window.screen.orientation&&window.screen.orientation.type||""].filter(t=>""!==t).join("|");let r=0;for(let t=0;t<e.length;t++){var s=e.charCodeAt(t);r=(r<<5)-r+s,r&=r}t=Math.abs(r).toString(16).padStart(8,"0")+t.substring(8);return burst.cache.fingerprint=t}).catch(t=>(console.error(t),null)),burst_get_time_on_page=()=>{var t;return"undefined"==typeof TimeMe?Promise.resolve(0):(t=TimeMe.getTimeOnCurrentPageInMilliseconds(),TimeMe.resetAllRecordedPageTimes(),TimeMe.initialize({idleTimeoutInSeconds:30}),Promise.resolve(t))},burst_is_user_agent=()=>{var t;return null!==burst.cache.isUserAgent?burst.cache.isUserAgent:(t=/bot|spider|crawl|slurp|mediapartners|applebot|bing|duckduckgo|yandex|baidu|facebook|twitter/i.test(navigator.userAgent),burst.cache.isUserAgent=t)},burst_is_do_not_track=()=>{var t;return null!==burst.cache.isDoNotTrack?burst.cache.isDoNotTrack:burst.options.do_not_track?(t="1"===navigator.doNotTrack||"yes"===navigator.doNotTrack||"1"===navigator.msDoNotTrack||"1"===window.doNotTrack||1===navigator.globalPrivacyControl,burst.cache.isDoNotTrack=t):burst.cache.isDoNotTrack=!1},burst_log_tracking_error=({status:t=0,error:e="",data:r={}})=>{burst.options.debug&&burst.tracking.ajaxUrl&&fetch(burst.tracking.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"burst_tracking_error",status:t,error:e,data:r})})},burst_beacon_request=e=>{var t=new Blob([e],{type:"application/json"});burst.options.debug?fetch(burst.tracking.beacon_url,{method:"POST",body:t,keepalive:!0,headers:{"Content-Type":"application/json"}}).then(t=>{t.ok||burst_log_tracking_error({status:0,error:"sendBeacon failed",data:e})}).catch(t=>{burst_log_tracking_error({status:0,error:t?.message||"sendBeacon failed",data:e})}):navigator.sendBeacon(burst.tracking.beacon_url,t)},burst_api_request=t=>{let s=JSON.stringify(t.data||{});return new Promise(r=>{var t;burst.options.beacon_enabled?(burst_beacon_request(s),r({status:200,data:"ok"})):(t=Math.random().toString(36).substring(2,9),wp.apiFetch({path:"/burst/v1/track/?token="+t,keepalive:!0,method:"POST",data:s}).then(t=>{var e=t.status||200;r({status:e,data:t.data||t}),200!==e&&burst_log_tracking_error({status:e,error:"Non-200 status",data:s})}).catch(t=>{r({status:200,data:"ok"}),burst_log_tracking_error({status:0,error:t?.message||"Burst tracking request failed",data:s})}))})};async function burst_update_hit(t=!1,e=!1){var r;await pageIsRendered,burst_is_user_agent()||burst_is_do_not_track()||(burst.tracking.isInitialHit?burst_track_hit():!e&&Date.now()-burst.tracking.lastUpdateTimestamp<300||(document.dispatchEvent(new CustomEvent("burst_before_update_hit",{detail:burst})),[e,r]=await Promise.all([burst_get_time_on_page(),t?Promise.all([burst_uid(),burst_fingerprint()]):(burst_use_cookies()?burst_uid:burst_fingerprint)()]),t={fingerprint:t?r[1]:!burst_use_cookies()&&r,uid:t?r[0]:!!burst_use_cookies()&&r,url:location.href,time_on_page:e,completed_goals:burst.goals.completed,should_load_ecommerce:burst.should_load_ecommerce},(0<e||!1!==t.uid)&&(await burst_api_request({data:t}),burst.tracking.lastUpdateTimestamp=Date.now())))}async function burst_track_hit(){var e=burst.tracking.isInitialHit;if(burst.tracking.isInitialHit=!1,await pageIsRendered,e){if(!(burst_is_user_agent()||burst_is_do_not_track()||Date.now()-burst.tracking.lastUpdateTimestamp<300)){document.dispatchEvent(new CustomEvent("burst_before_track_hit",{detail:burst}));var[e,r]=await Promise.all([burst_get_time_on_page(),(burst_use_cookies()?burst_uid:burst_fingerprint)()]);let t=0;for(;!document.body&&t++<200;)await new Promise(t=>setTimeout(t,2));document.body||console.warn("Burst: missing page_id attribute, not able to resolve body element.");r={uid:!!burst_use_cookies()&&r,fingerprint:!burst_use_cookies()&&r,url:location.href,referrer_url:document.referrer,user_agent:navigator.userAgent||"unknown",device_resolution:window.screen.width*window.devicePixelRatio+"x"+window.screen.height*window.devicePixelRatio,time_on_page:e,completed_goals:burst.goals.completed,page_id:document.body?.dataset?.burst_id??document.body?.dataset?.b_id??0,page_type:document.body?.dataset?.burst_type??document.body?.dataset?.b_type??"",should_load_ecommerce:burst.should_load_ecommerce};document.dispatchEvent(new CustomEvent("burst_track_hit",{detail:r})),await burst_api_request({method:"POST",data:r}),burst.tracking.lastUpdateTimestamp=Date.now()}}else burst_update_hit()}function burst_init_events(){let t=()=>{burst.options.track_url_change&&(burst.tracking.isInitialHit=!0,burst_track_hit())};!burst.options.enable_turbo_mode||"loading"!==document.readyState?burst_track_hit():document.addEventListener("load",burst_track_hit),document.addEventListener("visibilitychange",()=>{"hidden"!==document.visibilityState&&"unloaded"!==document.visibilityState||burst_update_hit()}),document.addEventListener("pagehide",()=>burst_update_hit()),document.addEventListener("click",t=>{let r=t.target.closest("a");r&&!burst.goals?.active?.some(e=>{if("clicks"!==e.type)return!1;if(!e.selector||""===e.selector.trim())return console.warn(e.selector,"does not exist"),!1;try{return r.closest(e.selector)}catch(t){return console.warn("Invalid selector for goal:",e.selector,t),!1}})&&burst_update_hit(!1,!1)},!0),document.addEventListener("burst_fire_hit",()=>burst_track_hit()),document.addEventListener("burst_enable_cookies",()=>{burst_enable_cookies(),burst_update_hit(!0)});let e=history.pushState,r=(history.pushState=function(){e.apply(this,arguments),t()},history.replaceState);history.replaceState=function(){r.apply(this,arguments),t()},window.addEventListener("popstate",t)}document.addEventListener("wp_listen_for_consent_change",t=>{"allow"===t.detail.statistics&&burst_init_events()}),"function"==typeof wp_has_consent&&!wp_has_consent("statistics")||burst_init_events(),window.burst_uid=burst_uid,window.burst_use_cookies=burst_use_cookies,window.burst_fingerprint=burst_fingerprint,window.burst_update_hit=burst_update_hit;
// source --> https://headma.jp/wp-content/themes/lotus_tcd039/js/jquery.easing.1.3.js?ver=3.1.3 
/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */;
// source --> https://headma.jp/wp-content/themes/lotus_tcd039/js/jscript.js?ver=3.1.3 
jQuery(document).ready(function($){

  $("a").bind("focus",function(){if(this.blur)this.blur();});
  $("a.target_blank").attr("target","_blank");

  //return top button
	var topBtn = $('#return_top');	
	topBtn.removeClass('active');
	$(window).scroll(function () {
		if ($(this).scrollTop() > 100) {
			topBtn.addClass('active');
		} else {
			topBtn.removeClass('active');
		}
	});

  //category widget
  $(".collapse_category_list li").hover(function(){
     $(">ul:not(:animated)",this).slideDown("fast");
     $(this).addClass("active");
  }, function(){
     $(">ul",this).slideUp("fast");
     $(this).removeClass("active");
  });

  //comment tab
  $("#trackback_switch").click(function(){
    $("#comment_switch").removeClass("comment_switch_active");
    $(this).addClass("comment_switch_active");
    $("#comment_area").animate({opacity: 'hide'}, 0);
    $("#trackback_area").animate({opacity: 'show'}, 1000);
    return false;
  });

  $("#comment_switch").click(function(){
    $("#trackback_switch").removeClass("comment_switch_active");
    $(this).addClass("comment_switch_active");
    $("#trackback_area").animate({opacity: 'hide'}, 0);
    $("#comment_area").animate({opacity: 'show'}, 1000);
    return false;
  });


function mediaQueryClass(width) {

 if (width > 770) { //PC

   $("html").removeClass("mobile");
   $("html").addClass("pc");

   $(".menu_button").css("display","none");

   $("#global_menu").show();

   $("#global_menu li").hover(function(){
     $(">ul:not(:animated)",this).slideDown("fast");
     $(this).addClass("active");
   }, function(){
     $(">ul",this).slideUp("fast");
     $(this).removeClass("active");
   });

 } else { //smart phone

   $("html").removeClass("pc");
   $("html").addClass("mobile");

   $("#global_menu li").off('hover');
   $("#global_menu ul ul").removeAttr('style');

   $(".menu_button").css("display", "block");
   $('.menu_button').off('click');

   $(".menu_button").on('click',function() {
     if($(this).hasClass("active")) {
       $(this).removeClass("active");
       $('#global_menu').hide();
       return false;
     } else {
       $(this).addClass("active");
       $('#global_menu').show();
       return false;
     };
   });

   $(".child_menu_button").remove();
   $('#global_menu li > ul').parent().prepend("<span class='child_menu_button'><span class='icon'></span></span>");
   $("#global_menu .child_menu_button").on('click',function() {
     if($(this).parent().hasClass("open")) {
       $(this).parent().removeClass("open");
       return false;
     } else {
       $(this).parent().addClass("open");
       return false;
     };
   });

   $("#global_menu li.menu-item-has-children a").hover(function(){
     $(this).prev().addClass("active");
   }, function(){
     $(this).prev().removeClass("active");
   });

 };
};

function viewport() {
    var e = window, a = 'inner';
    if (!('innerWidth' in window )) {
        a = 'client';
        e = document.documentElement || document.body;
    }
    return { width : e[ a+'Width' ] , height : e[ a+'Height' ] };
}

var ww = viewport().width;
var timer = false;

mediaQueryClass(ww);

$(window).bind("resize orientationchange", function() {

  if (timer !== false) {
    clearTimeout(timer);
  }
  timer = setTimeout(function() {
    var ww = viewport().width;
    mediaQueryClass(ww);
  }, 200);

})

});
// source --> https://headma.jp/wp-content/themes/lotus_tcd039/js/functions.js?ver=3.1.3 
jQuery(document).ready(function($){

	/**
	* スマホ用固定フッターバー
	*/
	if ($(".footer-bar02-share").length) {
		$(".footer-bar02-share, #modal-overlay").on("click", function() {
			$("#modal-content, #modal-overlay").toggleClass("hide");			
			return false;
		});	
		$("#modal-overlay, #modal-content").on("touchmove", function(e) {
			e.preventDefault();
		});
	}
	if ($(".footer-bar02").length) {
		var footerBar02 = $(".footer-bar02");  
		$(".footer-bar01").css({
			"padding-bottom": $(".footer-bar02").height() + "px"
		});
		$("#pagetop").css({
			"bottom": $(".footer-bar02").height() + "px"
		});
  		footerBar02.hide();
  		$(window).scroll(function () {
    		if ($(this).scrollTop() > 100) {
    			footerBar02.fadeIn("slow");
    		} else {
      			footerBar02.fadeOut();
    		}
		}); 
	}
});
// source --> https://headma.jp/wp-content/themes/lotus_tcd039/js/comment.js?ver=3.1.3 
/*
Author: mg12
Author URI: http://www.neoease.com/
*/
(function() {

function $(id) {
	return document.getElementById(id);
}

function reply(authorId, commentId, commentBox) {
	var author = MGJS.$(authorId).innerHTML;
	var insertStr = '<a href="#' + commentId + '">@' + author.replace(/\t|\n|\r\n/g, "") + '</a> \n';

	appendReply(insertStr, commentBox);
}

function quote(authorId, commentId, commentBodyId, commentBox) {
	var author = MGJS.$(authorId).innerHTML;
	var comment = MGJS.$(commentBodyId).innerHTML;

	var insertStr = '<blockquote cite="#' + commentBodyId + '">';
	insertStr += '\n<a href="#' + commentId + '">' + author.replace(/\t|\n|\r\n/g, "") + '</a> :';
	insertStr += comment.replace(/\t/g, "");
	insertStr += '</blockquote>\n';

	insertQuote(insertStr, commentBox);
}

function appendReply(insertStr, commentBox) {
	if(MGJS.$(commentBox) && MGJS.$(commentBox).type == 'textarea') {
		field = MGJS.$(commentBox);

	} else {
		alert("The comment box does not exist!");
		return false;
	}

	if (field.value.indexOf(insertStr) > -1) {
		alert("You've already appended this reply!");
		return false;
	}

	if (field.value.replace(/\s|\t|\n/g, "") == '') {
		field.value = insertStr;
	} else {
		field.value = field.value.replace(/[\n]*$/g, "") + '\n\n' + insertStr;
	}
	field.focus();
}

function insertQuote(insertStr, commentBox) {
	if(MGJS.$(commentBox) && MGJS.$(commentBox).type == 'textarea') {
		field = MGJS.$(commentBox);

	} else {
		alert("The comment box does not exist!");
		return false;
	}

	if(document.selection) {
		field.focus();
		sel = document.selection.createRange();
		sel.text = insertStr;
		field.focus();

	} else if (field.selectionStart || field.selectionStart == '0') {
		var startPos = field.selectionStart;
		var endPos = field.selectionEnd;
		var cursorPos = startPos;
		field.value = field.value.substring(0, startPos)
					+ insertStr
					+ field.value.substring(endPos, field.value.length);
		cursorPos += insertStr.length;
		field.focus();
		field.selectionStart = cursorPos;
		field.selectionEnd = cursorPos;

	} else {
		field.value += insertStr;
		field.focus();
	}
}


window['MGJS'] = {};
window['MGJS']['$'] = $;
window['MGJS_CMT'] = {};
window['MGJS_CMT']['reply'] = reply;
window['MGJS_CMT']['quote'] = quote;

})();