﻿//forTemp
jQuery(document).ready((function($) {
	//btnFlashの設定
	$(function() {
		$('#menuBtns li').btnFlash();
		$('#headerMenuCH a').btnFlash();
	});
	
	//お楽しみちゃんねるの表示・非表示 ++++++++++++++++++++++++++++++
	//for smartPhone++++++++
	var btn6_lock = 0;
	$('#headerMenuCH').css('display','none').animate( {top:'100',opacity:'0'} );
	if ((navigator.userAgent.indexOf('iPhone') > 0 || navigator.userAgent.indexOf('iPad') > 0) || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0) {
		$('#menuBtns .btn6').click(function(){
			if(btn6_lock == 0){
				btn6_lock = 2;
				$('#headerMenuCH').css('display','block').animate( {top:'63',opacity:'1'},{queue:false, duration: 500, easing:'easeInOutQuart'} )
			}
			else if(btn6_lock == 2){
				btn6_lock = 1;
				$('#headerMenuCH').animate( {top:'100',opacity:'0'},{queue:false, duration: 500, easing:'easeInOutQuart', complete:function(){ $(this).css('display','none'); btn6_lock = 0;}} );
			}
		});
	}
	//for PC++++++++
	else {
		$('#menuBtns .btn6').mouseover(function(){
			if(btn6_lock == 0){
				btn6_lock = 2;
				$('#headerMenuCH').css('display','block').animate( {top:'63',opacity:'1'},{queue:false, duration: 500, easing:'easeInOutQuart'} )
			}
		});
		$('#headerMenuCH').mouseleave(function(){
			if(btn6_lock == 2){
				btn6_lock = 1;
				$('#headerMenuCH').animate( {top:'100',opacity:'0'},{queue:false, duration: 500, easing:'easeInOutQuart', complete:function(){ $(this).css('display','none'); btn6_lock = 0;}} );
			}
		});
	}
}));
