/*------------------------------------------------------------------------------
 デバイス / meteViewport
------------------------------------------------------------------------------*/
if ((navigator.userAgent.indexOf('Android') > 0 && navigator.userAgent.indexOf('Mobile') > 0) || navigator.userAgent.indexOf('iPod') > 0 || (navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPad') == -1)) {
	document.write('<meta name="viewport" content="width=device-width, initial-scale=1">');
}else if(navigator.userAgent.indexOf('Android') > 0 || navigator.userAgent.indexOf('iPad') > 0){
	document.write('<meta name="viewport" content="width=1324">');
}
/*------------------------------------------------------------------------------
 事業内容 / hover / 光 /アニメーション
------------------------------------------------------------------------------*/
$(function(){
	$('.business #section1 .center dl').prepend('<div class="reiya"></div>');
	$('.reiya').css('width','550%').css('height','475px').css('position','absolute').css('opacity','0.03');
			$('.business #section1 .center dl:nth-child(1)').hover(function(){
			$('.business #section1 .center dl:nth-child(1) .reiya').css('z-index','10000');
			$('.business #section1 .center dl:nth-child(1) .reiya').animate({left:'2000'},900);
		},function(){
			$('.business #section1 .center dl:nth-child(1) .reiya').css('z-index','-20000');
			$('.business #section1 .center dl:nth-child(1) .reiya').animate({left:'-2000'},50);
		});
			$('.business #section1 .center dl:nth-child(2)').hover(function(){
			$('.business #section1 .center dl:nth-child(2) .reiya').css('z-index','10000');
			$('.business #section1 .center dl:nth-child(2) .reiya').animate({left:'2000'},900);
		},function(){
			$('.business #section1 .center dl:nth-child(2) .reiya').css('z-index','-20000');
			$('.business #section1 .center dl:nth-child(2) .reiya').animate({left:'-2000'},50);
		});
			$('.business #section1 .center dl:nth-child(3)').hover(function(){
			$('.business #section1 .center dl:nth-child(3) .reiya').css('z-index','10000');
			$('.business #section1 .center dl:nth-child(3) .reiya').animate({left:'2000'},900);
		},function(){
			$('.business #section1 .center dl:nth-child(3) .reiya').css('z-index','-20000');
			$('.business #section1 .center dl:nth-child(3) .reiya').animate({left:'-2000'},50);
		});
			$('.business #section1 .center dl:nth-child(4)').hover(function(){
			$('.business #section1 .center dl:nth-child(4) .reiya').css('z-index','10000');
			$('.business #section1 .center dl:nth-child(4) .reiya').animate({left:'2000'},900);
		},function(){
			$('.business #section1 .center dl:nth-child(4) .reiya').css('z-index','-20000');
			$('.business #section1 .center dl:nth-child(4) .reiya').animate({left:'-2000'},50);
		});
			$('.business #section1 .center dl:nth-child(5)').hover(function(){
			$('.business #section1 .center dl:nth-child(5) .reiya').css('z-index','10000');
			$('.business #section1 .center dl:nth-child(5) .reiya').animate({left:'2000'},900);
		},function(){
			$('.business #section1 .center dl:nth-child(5) .reiya').css('z-index','-20000');
			$('.business #section1 .center dl:nth-child(5) .reiya').animate({left:'-2000'},50);
		});
			$('.business #section1 .center dl:nth-child(6)').hover(function(){
			$('.business #section1 .center dl:nth-child(6) .reiya').css('z-index','10000');
			$('.business #section1 .center dl:nth-child(6) .reiya').animate({left:'2000'},900);
		},function(){
			$('.business #section1 .center dl:nth-child(6) .reiya').css('z-index','-20000');
			$('.business #section1 .center dl:nth-child(6) .reiya').animate({left:'-2000'},50);
		});
	});
/*------------------------------------------------------------------------------
 事業内容 / hover / 右下の more /アニメーション
------------------------------------------------------------------------------*/
$(function(){
	$('.business #section1 .center dl').append('<div class="mobox"></div>');
	$('.mobox').css('width','90px').css('height','90px').css('position','absolute').css('bottom','2px').css('right','0').css('z-index','9999').css
	('background-image','url(image/b-more.png)');
	$(".mobox").css('background-position','right bottom');
	$(".mobox").css('background-repeat','no-repeat');
	$(".mobox").css('background-size','100%');
			$('.business #section1 .center dl:nth-child(1)').hover(function(){
			$('.business #section1 .center dl:nth-child(1) .mobox').css('background-image','url(image/active2-more.png)').animate({backgroundSize: '105%'}, 300);
		},function(){
			$('.business #section1 .center dl:nth-child(1) .mobox').css('background-image','url(image/b-more.png)').animate({backgroundSize: '100%'}, 300);
		});
			$('.business #section1 .center dl:nth-child(2)').hover(function(){
			$('.business #section1 .center dl:nth-child(2) .mobox').css('background-image','url(image/active2-more.png)').animate({backgroundSize: '105%'}, 300);
		},function(){
			$('.business #section1 .center dl:nth-child(2) .mobox').css('background-image','url(image/b-more.png)').animate({backgroundSize: '100%'}, 300);
		});
			$('.business #section1 .center dl:nth-child(3)').hover(function(){
			$('.business #section1 .center dl:nth-child(3) .mobox').css('background-image','url(image/active2-more.png)').animate({backgroundSize: '105%'}, 300);
		},function(){
			$('.business #section1 .center dl:nth-child(3) .mobox').css('background-image','url(image/b-more.png)').animate({backgroundSize: '100%'}, 300);
		});
			$('.business #section1 .center dl:nth-child(4)').hover(function(){
			$('.business #section1 .center dl:nth-child(4) .mobox').css('background-image','url(image/active2-more.png)').animate({backgroundSize: '105%'}, 300);
		},function(){
			$('.business #section1 .center dl:nth-child(4) .mobox').css('background-image','url(image/b-more.png)').animate({backgroundSize: '100%'}, 300);
		});
			$('.business #section1 .center dl:nth-child(5)').hover(function(){
			$('.business #section1 .center dl:nth-child(5) .mobox').css('background-image','url(image/active2-more.png)').animate({backgroundSize: '105%'}, 300);
		},function(){
			$('.business #section1 .center dl:nth-child(5) .mobox').css('background-image','url(image/b-more.png)').animate({backgroundSize: '100%'}, 300);
		});
			$('.business #section1 .center dl:nth-child(6)').hover(function(){
			$('.business #section1 .center dl:nth-child(6) .mobox').css('background-image','url(image/active2-more.png)').animate({backgroundSize: '105%'}, 300);
		},function(){
			$('.business #section1 .center dl:nth-child(6) .mobox').css('background-image','url(image/b-more.png)').animate({backgroundSize: '100%'}, 300);
		});
	});
/*------------------------------------------------------------------------------
 お問い合わせ / 法人 / 個人 /アニメーション
------------------------------------------------------------------------------*/
$(function(){
	$('#fadebox').css('z-index','9993'); 
	$('#fadebox').fadeIn(1000);

$('#fadebox').prepend('<div><p>インターネットによるお問い合わせ<br>「個人」「法人」「採用に関するお問い合わせ」いづれかをお選びください。</p><ul><li>法人のお客様はこちら</li><li>採用に関するお問い合わせはこちら</li><!--<li>個人のお客様はこちら</li>--></ul></div>');
	$('#fadebox div ul li').wrapInner('<span></span>');
	$('#fadebox ul li').animate({left:'0'},800);
});
$(function(){
	$('#fadebox ul li:first-child').click(function(){
		location.href = "form1.php";
	});

	$('#fadebox ul li:nth-child(2)').click(function(){
		location.href = "form2.php";
	});
/*
	$('#fadebox ul li:last-child').click(function(){
		location.href = "form3.php";
	});
*/
});
/*------------------------------------------------------------------------------
 TOPページ / Youtube
------------------------------------------------------------------------------*/
$(function(){
	$('.index header').prepend('<div id="youtube"><img src="image/youtube.jpg" alt=""></div>');
	var $w = $(window).width(); //現在のwindow幅を取得
	$('#youtube').hide();
	if($w > 768){
		$('#youtube').fadeIn(1500);
	}
	var $windowHieght = $(window).height();
	
	$('.index #youtube').click(function(){

		//alert('クリックされた');
		$('.index #wrap').css('opacity','0.2').css('display','none');
		$('body').prepend('<div id="youtube-box"><div class="in"><iframe width="100%" height="100%" src="https://www.youtube.com/embed/HEP_ja_qVd0?showinfo=0&rel=0" frameborder="0" allowfullscreen></iframe></div></div>');

		$('.index #youtube-box').css('height',$windowHieght).css('position','fixed').css('width','100%');
		$('.index #youtube-box .in').css('opacity','0');
		$('.index #youtube-box .in').animate({opacity:'1'},1200);
		$('.index #youtube-box .in').css('border','1px solid #fff').css('width','0px').css('height','0px');
		$('.index #youtube-box .in').animate({width:'60%'},300);
		$('.index #youtube-box .in').animate({height:'60%'},300,function(){$(this).css('border','1px solid #000');});
		//$('.index #youtube-box .in').css('background','#f00');
		setTimeout(function() {
			$('.index #youtube-box').css('background-image','url(image/bg4.gif)');
			$('.index #youtube-box').css('background-position','left top');
			$('.index #youtube-box').css('background-repeat','no-repeat');
			$('.index #youtube-box').css('background-size','100% 80%');
			$('.index #youtube-box').css('background-color','#040204');
		}, 1500);

		$('body').append('<div class="close"><a href="./">× 閉じる</a></div>');
		$('.index .close a').css('color','#fff').css('position','fixed').css('right','18px').css('bottom','18px').css('cursor','pointer').css('z-index','9999');
	});

});
/*------------------------------------------------------------------------------
 TOP / section1
------------------------------------------------------------------------------*/
$(function(){
	$('.index #section1 .middle dl:nth-child(1)').click(function(){
		location.href = "single.php?id=1";
	});
	$('.index #section1 .middle dl:nth-child(2)').click(function(){
		location.href = "single.php?id=2";
	});
	$('.index #section1 .middle dl:nth-child(3)').click(function(){
		location.href = "single.php?id=3";
	});
	$('.index #section1 .bottom dl:nth-child(1)').click(function(){
		location.href = "single.php?id=4";
	});
	$('.index #section1 .bottom dl:nth-child(2)').click(function(){
		location.href = "single.php?id=5";
	});
	$('.index #section1 .bottom dl:nth-child(3)').click(function(){
		location.href = "single.php?id=6";
	});
});
/*------------------------------------------------------------------------------
 リクナビへ
------------------------------------------------------------------------------*/
/*
$(function(){
	$('.recruit .middle dl').click(function(){
		window.open().location.href = "https://job.rikunabi.com/2018/";
	});
});
*/
/*------------------------------------------------------------------------------
 事業案内リンク / URLパラメーター
------------------------------------------------------------------------------*/
$(function(){
	$('.business #section1 .center dl:nth-child(1)').click(function(){
		location.href = "single.php?id=1";
		//alert('1つ目がクリックされました');
	});
	$('.business #section1 .center dl:nth-child(2)').click(function(){
		location.href = "single.php?id=2";
		//alert('2つ目がクリックされました');
	});
	$('.business #section1 .center dl:nth-child(3)').click(function(){
		location.href = "single.php?id=3";
		//alert('3つ目がクリックされました');
	});
	$('.business #section1 .center dl:nth-child(4)').click(function(){
		location.href = "single.php?id=4";
		//alert('4つ目がクリックされました');
	});
	$('.business #section1 .center dl:nth-child(5)').click(function(){
		location.href = "single.php?id=5";
		//alert('5つ目がクリックされました');
	});
	$('.business #section1 .center dl:nth-child(6)').click(function(){
location.href = "single.php?id=6";
		//alert('6つ目がクリックされました');
	});
});
/*------------------------------------------------------------------------------
 よくあるご質問 / Q&A / アニメーション
------------------------------------------------------------------------------*/
$(function(){
		$('.faq #section1 .center dt').append('<i class="icon1 fa fa-chevron-down" aria-hidden="true"></i>'); // ↑
		$('.faq #section1 .center dt').prepend('<i class="icon2 fa fa-chevron-up" aria-hidden="true"></i>'); // ↓
		$('.icon2').hide();
});
$(function(){
	$(".faq #section1 .center dt").on("click", function() {
		$(this).next().slideToggle();
		$(this).toggleClass("active");
		if($(this).hasClass('active')){
			//alert('ついている');
			$(this).children('i.icon1').css('display','none');
			$(this).children('i.icon2').css('display','block');
		}else{
			//alert('ついていません');
			$(this).children('i.icon1').css('display','block');
			$(this).children('i.icon2').css('display','none');
		}
	});
});
/*------------------------------------------------------------------------------
 スマホの時だけＴＥＬリンク有効
------------------------------------------------------------------------------*/
//テキスト
function smtel(telno){
    if((navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPod') == -1) || navigator.userAgent.indexOf('Android') > 0 && navigator.userAgent.indexOf('Mobile') > 0){
        document.write('<a class="tel-link" href="tel:'+telno+'">'+telno+'</a>');
        }else{
        document.write('<span class="tel-link">'+telno+'</span>');
    }
}
//画像
$(function(){
    var ua = navigator.userAgent;
    if(ua.indexOf('iPhone') > 0 && ua.indexOf('iPod') == -1 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0 && ua.indexOf('SC-01C') == -1 && ua.indexOf('A1_07') == -1 ){
        $('.tel-link img').each(function(){
            var alt = $(this).attr('alt');
            $(this).wrap($('<a>').attr('href', 'tel:' + alt.replace(/-/g, '')));
        });
    }
});
/*------------------------------------------------------------------------------
 ウィンドウサイズをリサイズ後 768より小さい、もしくは、等しかったらTRUE
------------------------------------------------------------------------------*/
if ((navigator.userAgent.indexOf('Android') > 0 && navigator.userAgent.indexOf('Mobile') > 0) || navigator.userAgent.indexOf('iPod') > 0 || (navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPad') == -1)) {
// SP
}else if(navigator.userAgent.indexOf('Android') > 0 || navigator.userAgent.indexOf('iPad') > 0){
// iPad
}else{
// PC
	$(function(){
		var timer = false;
		$(window).resize(function(){
			var $win = $(window).width();
			if($win <= 768){
				if(timer !== false){
					clearTimeout(timer);
				}
				timer = setTimeout(function(){
					//リロードする
					location.reload();
				}, 200);
			}
		});
	});
}
/*------------------------------------------------------------------------------
 section1 〜 section4 〜 footer をフェードインさせる
------------------------------------------------------------------------------*/
if ((navigator.userAgent.indexOf('Android') > 0 && navigator.userAgent.indexOf('Mobile') > 0) || navigator.userAgent.indexOf('iPod') > 0 || (navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPad') == -1)) {
// SP
}else if(navigator.userAgent.indexOf('Android') > 0 || navigator.userAgent.indexOf('iPad') > 0){
// iPad
}else{
// PC
	$(function(){
		var $w = $(window).width(); //現在のwindow幅を取得
		if($w > 1024){
				$('.index #section1').css('opacity','0');
				$('.index #section2').css('opacity','0');
				$('.index #section3').css('opacity','0');
				$('.index #section4').css('opacity','0');
			$(window).scroll(function(){ // スクロール毎にイベントが発火します。
				var scr_count = $(document).scrollTop();
				if(scr_count > 136){
					$('.index #section1').animate({opacity:'1'}, 1200);
				}
				if(scr_count > 1750){
					$('.index #section2').animate({opacity:'1'}, 1200);
				}
				if(scr_count > 2700){
					$('.index #section3').animate({opacity:'1'}, 1200);
				}
				if(scr_count > 3485){
					$('.index #section4').animate({opacity:'1'}, 1200);
				}
			});
		}
	});
}
/*------------------------------------------------------------------------------
 現在のスクロールの量をリアルタイムで表示
------------------------------------------------------------------------------*/
$(function(){
	$('#sv').css('border','1px solid #ccc').css('color','#fff').css('background','#124488').css('z-index','10000').css('padding','25px');
	$(window).scroll(function() {
		$('#sv').text('現在のスクロール値：' + $(this).scrollTop());
	});
});
/*------------------------------------------------------------------------------
 ヘッダー / NEWS / アニメーション
------------------------------------------------------------------------------*/
$(function(){
	$('#new ul li a').css('overflow','hidden');
	$('#new ul li a b').css('position','relative').css('right','-2000px');
	$('#new ul li a b').animate({right:'0'},500);
});
/*------------------------------------------------------------------------------
 スライド / テキスト / アニメーション
------------------------------------------------------------------------------*/
$(function(){
	$('#mainImage #slide dl dt img').css('marginLeft','-2500px');
	$('#mainImage #slide dl dd img').css('marginLeft','-2500px');
	$('#mainImage #slide dl dt img').animate({marginLeft:'5%'},800);
	$('#mainImage #slide dl dd img').animate({marginLeft:'5%'},1000);
	$('#mainImage #slide dl').after('<div id="box"><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b></div>');
	$('#box').css('display','block').css('marginLeft','9%');
	$('#box b').css('display','inline-block');
	$('#box b:nth-child(1)').css('marginLeft','-1000px');
	$('#box b:nth-child(2)').css('marginLeft','-1000px');
	$('#box b:nth-child(3)').css('marginLeft','-1000px');
	$('#box b:nth-child(5)').css('marginLeft','-1000px');
	$('#box b:nth-child(4)').css('marginLeft','-1000px');
	$('#box b:nth-child(6)').css('marginLeft','-1000px');
	$('#box b:nth-child(7)').css('marginLeft','-1000px');
	$('#box b:nth-child(8)').css('marginLeft','-1000px');
	$('#box b:nth-child(9)').css('marginLeft','-1000px');
	$('#box b:nth-child(10)').css('marginLeft','-1000px');
	$('#box b:nth-child(11)').css('marginLeft','-1000px');
	$('#box b:nth-child(12)').css('marginLeft','-1000px');
	$('#box b:nth-child(13)').css('marginLeft','-1000px');
	$('#box b:nth-child(1)').animate({marginLeft:'0'},1000);
	$('#box b:nth-child(2)').animate({marginLeft:'0'},1050);
	$('#box b:nth-child(3)').animate({marginLeft:'0'},1080);
	$('#box b:nth-child(4)').animate({marginLeft:'0'},1110);
	$('#box b:nth-child(5)').animate({marginLeft:'0'},1140);
	$('#box b:nth-child(6)').animate({marginLeft:'0'},1170);
	$('#box b:nth-child(7)').animate({marginLeft:'0'},1200);
	$('#box b:nth-child(8)').animate({marginLeft:'0'},1230);
	$('#box b:nth-child(9)').animate({marginLeft:'0'},1250);
	$('#box b:nth-child(10)').animate({marginLeft:'0'},1270);
	$('#box b:nth-child(11)').animate({marginLeft:'0'},1290);
	$('#box b:nth-child(12)').animate({marginLeft:'0'},1300);
	$('#box b:nth-child(13)').animate({marginLeft:'0'},1320);
});
/*------------------------------------------------------------------------------
 グロナビ / アニメーション
------------------------------------------------------------------------------*/
$(function(){
	$('#gnav ul li').css('opacity','1');
	$('#gnav ul li:nth-child(1)').css('marginLeft','-500px');
	$('#gnav ul li:nth-child(2)').css('marginLeft','-500px');
	$('#gnav ul li:nth-child(3)').css('marginLeft','-500px');
	$('#gnav ul li:nth-child(4)').css('marginLeft','-500px');
	$('#gnav ul li:nth-child(5)').css('marginLeft','-500px');
	$('#gnav ul li:nth-child(6)').css('marginLeft','-500px');
	$('#gnav ul li:nth-child(1)').animate({marginLeft:'0'},300);
	$('#gnav ul li:nth-child(2)').animate({marginLeft:'0'},400);
	$('#gnav ul li:nth-child(3)').animate({marginLeft:'0'},500);
	$('#gnav ul li:nth-child(4)').animate({marginLeft:'0'},600);
	$('#gnav ul li:nth-child(5)').animate({marginLeft:'0'},700);
	$('#gnav ul li:nth-child(6)').animate({marginLeft:'0'},800);
});
/*---------------------------------------------------------------------------------------------------
fadeSlide ver.1 / ヘッダー
1. スライド / フェード
2. ページャー無し
3. タイマー有り
4. インジケータ無し　← つける！
5. インパクトのある、アニメート、箇所 ← つける！
---------------------------------------------------------------------------------------------------*/
$(function(){
	// 変数
	var $height =800; // 高さ
	var $interval = 3000; // 切り替わりの間隔（ミリ秒）
	var $fade_speed = 1000; // フェード処理の早さ（ミリ秒）
	// CSS
	$('#slide').css({
		margin:'0 auto',
		position:'relative'
	});
	$('#slide img').css({
		position:'absolute',
		left:'0',
		top:'0'
	});
	$("#slide ul li").css({
		"position":"relative",
		"overflow":"hidden",
		"height":$height
	});
	// 消す / 位置
	$("#slide ul li").hide().css({
		"position":"absolute",
		"top":0,
		"left":0
	});
	// 1つ目にクラス
	$("#slide ul li:first").addClass("active").show();
	// フェードアウト / フェードイン
	setInterval(function(){
		// 変数
		var $active = $("#slide ul li.active");
		var $next = $active.next("li").length?$active.next("li"):$("#slide ul li:first");
		// 3秒 / リムーブクラス / アドクラス
		$active.fadeOut($fade_speed).removeClass("active");
		$next.fadeIn($fade_speed).addClass("active");
	},$interval);
});
/*------------------------------------------------------------------------------
 グロナビ / クリック
------------------------------------------------------------------------------*/
/*
$(function(){
	$('#gnav ul li:nth-child(1)').click(function(){
		alert('COMINSOON');
	});
	$('#gnav ul li:nth-child(2)').click(function(){
		alert('COMINSOON');
	});
	$('#gnav ul li:nth-child(3)').click(function(){
		alert('COMINSOON');
	});
	$('#gnav ul li:nth-child(4)').click(function(){
		alert('COMINSOON');
	});
	$('#gnav ul li:nth-child(5)').click(function(){
		alert('COMINSOON');
	});
	$('#gnav ul li:nth-child(6)').click(function(){
		alert('COMINSOON');
	});
});
*/
/*------------------------------------------------------------------------------
 グロナビ / クリック / イベント
------------------------------------------------------------------------------*/
$(function(){
$('.index #section1 dd').after('<div class="more"><span>詳しく見る</span></div>')
		$('.more').click(function(){
			//alert('クリックされた'); jqueryであとでリンク貼る!
		});
});
/*------------------------------------------------------------------------------
 section1 / クリック / イベント / 詳しく見る / ボタン
------------------------------------------------------------------------------*/
$(function(){
	var pageTop = $('.page-top');
	pageTop.hide();
	$(window).on("scroll",function(){
		if($(this).scrollTop() > 20){ 
			$(".page-top").fadeIn();
		}else{
			$(".page-top").fadeOut();
		}
	});
	/* ページTOPへ / ボタン */
	pageTop.click(function (){
		$('body, html').animate({scrollTop:0}, 500, 'swing');
		return false;
	});
});
/*------------------------------------------------------------------------------
 ページトップボタンが下部から 10%の位置にきたら、fiexd 固定を解除
------------------------------------------------------------------------------*/

if ((navigator.userAgent.indexOf('Android') > 0 && navigator.userAgent.indexOf('Mobile') > 0) || navigator.userAgent.indexOf('iPod') > 0 || (navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPad') == -1)) {
// SP
}else if(navigator.userAgent.indexOf('Android') > 0 || navigator.userAgent.indexOf('iPad') > 0){
// iPad
}else{
	$(function(){
		$(window).bind("scroll", function(){
		scrollHeight = $(document).height();
		scrollPosition = $(window).height() + $(window).scrollTop();
			if ( (scrollHeight - scrollPosition) / scrollHeight <= 0.10) {
			//alert('テスト');//スクロールの位置が下部10%の範囲に来た場合
				$('.page-top ').removeClass('fixed');
				$('.page-top ').addClass('static');
				$('#recbtn').css('display','none');
			} else {
				$('.page-top ').removeClass('static');
				$('.page-top ').addClass('fixed');
				$('#recbtn').css('display','block');
			}
		});
	});
}
/*------------------------------------------------------------------------------
 header 〜 toggle フェード
------------------------------------------------------------------------------*/
$(function(){
	$('.photo').css('width','96%').css('display','block').css('margin','0 auto').css
	('font-size','17px').css('color','#000').css('overflow','hidden');
	$('.down-nav').css('display','none');
	$('.down-nav dl:nth-child(1)').css('left','-2000px');
	$('.down-nav dl:nth-child(2)').css('left','-2000px');
	$('.down-nav dl:nth-child(3)').css('right','-2000px');
	$('.down-nav dl:nth-child(4)').css('right','-2000px');
	$('.down-nav dl:nth-child(5)').css('left','-2000px');
	$('header .in p img.hanbaga').click(function(){ 
	$('.down-nav').toggleClass('open');
		if($('.down-nav').hasClass('open')){
			//alert('ついている');
			$('.down-nav').fadeIn(1600);
			$('body').css('position','fixed');
			$('body').css('width','100%');
			$('.down-nav dl:nth-child(2)').animate({left:'0'},1000);
			$('.down-nav dl:nth-child(1)').animate({left:'0'},1200);
			$('.down-nav dl:nth-child(3)').animate({right:'0'},1000);
			$('.down-nav dl:nth-child(4)').animate({right:'0'},1200);
			$('.down-nav dl:nth-child(5)').animate({left:'0'},1200);
		}else{
			//alert('ついていない');
			$('.down-nav').fadeOut(1000);
			$('body').css('position','static');
			$('.down-nav dl:nth-child(1)').css('left','-2000px');
			$('.down-nav dl:nth-child(2)').css('left','-2000px');
			$('.down-nav dl:nth-child(3)').css('right','-2000px');
			$('.down-nav dl:nth-child(4)').css('right','-2000px');
			$('.down-nav dl:nth-child(5)').css('left','-2000px');
		}
	});
});
/*------------------------------------------------------------------------------
 ドロワー メニューの中
------------------------------------------------------------------------------*/
$(function(){
	$('.down-nav .in dl dd.downnavi__close a').click(function(){
		$('.down-nav').removeClass('open');
		//alert('クリックされた');
		if($('.down-nav').hasClass('open')){
			//alert('ついている');
			$('.down-nav').fadeIn(1600);
			$('body').css('position','fixed');
			$('body').css('width','100%');
			$('.down-nav dl:nth-child(2)').animate({left:'0'},1000);
			$('.down-nav dl:nth-child(1)').animate({left:'0'},1200);
			$('.down-nav dl:nth-child(3)').animate({right:'0'},1000);
			$('.down-nav dl:nth-child(4)').animate({right:'0'},1200);
			$('.down-nav dl:nth-child(5)').animate({left:'0'},1200);
		}else{
			//alert('ついていない');
			$('.down-nav').fadeOut(1000);
			$('body').css('position','static');
			$('.down-nav dl:nth-child(1)').css('left','-2000px');
			$('.down-nav dl:nth-child(2)').css('left','-2000px');
			$('.down-nav dl:nth-child(3)').css('right','-2000px');
			$('.down-nav dl:nth-child(4)').css('right','-2000px');
			$('.down-nav dl:nth-child(5)').css('left','-2000px');
		}
	});
});

/*------------------------------------------------------------------------------
 ドロワー メニューの中 / CLOSEボタン / ホバー
------------------------------------------------------------------------------*/
$(function(){
	$(".down-nav .in dl dd.downnavi__close a").mouseover(function(){
		$(this).animate({opacity:'0.8'},500);
	}).mouseout(function(){
		$(this).animate({opacity:'1'},500);
	});
});
/*------------------------------------------------------------------------------
 SPのスライド / テキスト
------------------------------------------------------------------------------*/
$(function(){
	var $w = $(window).width(); //現在のwindow幅を取得
	if($w > 768){
	}else{
		$('#mainImage').prepend('<div class="slide-box"><img src="image/slidetext.png" alt=""></li>');
		$('.slide-box').css('position','absolute').css('width','60%').css('height','80px').css('z-index','20000').css('margin','50px 0 0 -100%');
		$('.slide-box img').css('width','100%').css('display','block');
		$('.slide-box').animate({marginLeft:'2%'},900);
	}
});
/*------------------------------------------------------------------------------
 GoogleMap
------------------------------------------------------------------------------*/
function initMap() {
      // 地図の初期中心座標を指定
      var latLng = new google.maps.LatLng(34.936257, 136.645493);
      var map = new google.maps.Map(
        // getElementByIdには、地図を表示するための領域に
        // 指定したidを設定すること。（今回は「map」）
        document.getElementById("map"),
        {
          zoom: 17,  // 地図の初期拡大率
          center: latLng, // 先ほど設定した中心座標を設定
          scrollwheel: false  // マウスホイールで拡縮しなくなる
        }
      );
    // マーカーの設定
    var markerImg = {
      url: 'image/mlogo.png'  // マーカーの画像ファイルを指定
    };
    var marker = new google.maps.Marker({
      position: latLng,
      map: map,
      icon: markerImg
    });
    // 地図をグレースケールに
	/*
    var mapStyle = [
      {
          "stylers": [
            { "saturation": -100 }
          ]
      }
    ];
    var mapType = new google.maps.StyledMapType(mapStyle);
    map.mapTypes.set('GrayScaleMap', mapType);
    map.setMapTypeId('GrayScaleMap');
	*/
}
$(function(){
	$('.voice-staff .box').hover(
		function(){  
			$(this).animate({opacity:'.7'},300);
		},
		function(){
			$(this).animate({opacity:'1'},300);
		}
	);
});
$(function(){
	$('.staff01').click(function(){
		location.href = "voice-single.php?id=1";
	});
	$('.staff02').click(function(){
		location.href = "voice-single.php?id=2";
	});
	$('.staff03').click(function(){
		location.href = "voice-single.php?id=3";
	});
	$('.staff04').click(function(){
		location.href = "voice-single.php?id=4";
	});
});
/*------------------------------------------------------------------------------
 福利厚生SPリンク
------------------------------------------------------------------------------*/
$(function(){
	/* head */
	var $w = $(window).width(); //現在のwindow幅を取得
	var reculu = $('.recruit #section1 .recruitText p');
	if($w <= 768){
		var hanImg = $('header .in p img');
		hanImg.before('<div class="hukuri"></div>');
		var hukuri = $('.hukuri');
		hukuri.css({
			width:'50px',
			height:'50px',
			display:'block',
			backgroundImage:'url(../image/banner_sp0702.png)',
			backgroundPosition:'center center',
			backgroundRepeat:'no-repeat',
			backgroundSize:'96%',
			position:'absolute',
			right:'60px'
		});
		hukuri.on('click',function(){
			//alert('スマホ福利厚生がクリックされた');
			window.open().location.href = "https://www.fukuri.jp/contents/files/fukuri/img/eigyo/c1/index.html?compname=";
		});
	}
	/* recuru */
	reculu.on('click',function(){
		window.open().location.href = "https://www.fukuri.jp/contents/files/fukuri/img/eigyo/c1/index.html?compname=";
	});
	reculu.css({
		border:'1px solid #0094dc'
	}).append('<div class="kuwasikuha">詳しくはコチラをクリック</div>');
	$('.kuwasikuha').css({
		position:'relative',
		Zindex:'-1',
		letterSpacing:'2px',
		display:'inline-block',
		background:'url("../image/more-img.png") no-repeat right 14px center',
		backgroundSize:'14px',
		backgroundColor:'#0094dc',
		padding:'19px 0 16px',
		width:'80%',
		color:'#FFF',
		lineHeight:'0.5em',
		fontSize:'13px',
		borderRadius:'10px',
		margin:'10px auto 0',
		textAlign:'center'
	});
});
