$(document).ready(function(){
	$(".fadein h2").delay(800).fadeIn(1500);
	$(".fadein p.fp01").delay(1000).fadeIn(1500);
	$(".fadein p.fp02").delay(1500).fadeIn(1500);
	$(".fadein ol li#cr02").delay(3200).fadeIn(2000);
	$(".fadein ol li#cr03").delay(3600).fadeIn(2000);
	$(".fadein ol li#cr04").delay(4000).fadeIn(2000);
	$(".fadein ol li#cr05").delay(4400).fadeIn(2000);
	$(".fadein ol li#cr06").delay(4800).fadeIn(2000);
	$(".fadein ol li#cr07").delay(5200).fadeIn(2000);
	$(".fadein ol li#cr08").delay(5600).fadeIn(2000);
	$(".works ol.plan").delay(500).fadeIn(1000);
});


$(document).ready(function(){
	$(".about dl dd").eq(5).addClass("end");
	$(".works ol.plan li").eq(2).addClass("end");
	$(".works ol.plan li").eq(5).addClass("end");
	$(".works #detail ol li :first").addClass("on");
});


$(document).ready(function(){
 allwidth = $('.works #detail ol li').size();	
 gohan = 0;
 for (j=0; j<allwidth; j++){
	 pan = ($(".works #detail ol li").eq(j).width())+10;
	 
	 if(j==0){
		 pan = ($(".works #detail ol li").eq(j).width());
	 }
	 
	 gohan += pan;
	}
	//alert(gohan);
	$(".works #detail ol").css("width",gohan);
	$(".works #detail ol li:first-child").addClass("first");
});


$(document).ready(function(){
 sec = 100;
 out = 200;
 articles = $('ol.item li').size();
 for (i=0; i<=articles; i++){
	 $("ol.item li").eq(i).addClass("fade"+i);
	 $("ol.item li.fade"+i).delay(sec*i).fadeIn(out);
	}
});


//$(function(){
//	$("#business ol li a").click(function(){
//		$("#business p.fp01 img").hide();
//		$("#business p.fp01 img").fadeIn("midium");
//		$("#business p.fp01 img").attr("src",$(this).attr("href"));
//		return false;
//	});
//});


$(function() {
	var num = 1;
	$('#menu ul li')
	.each(function(){
		$(this).css('background', 'url(/common/images/menu0'+num+'_on.png) no-repeat 0 0')
		num++;
	})
	.find('img').hover(
		function(){  
			$(this).stop().animate({'opacity' : '0'}, 400);  
		},
		function(){
			$(this).stop().animate({'opacity' : '1'}, 400);
		}
	); 
});


$(function() {
	var num = 1;
	$('.profile #sub ul li')
	.each(function(){
		$(this).css('background', 'url(/profile/images/menu0'+num+'_on.png) no-repeat 0 0')
		num++;
	})
	.find('img').hover(
		function(){  
			$(this).stop().animate({'opacity' : '0'}, 400);  
		},
		function(){
			$(this).stop().animate({'opacity' : '1'}, 400);
		}
	); 
});


$(function() {
	var num = 1;
	$('.works #sub ul li')
	.each(function(){
		$(this).css('background', 'url(/works/images/category0'+num+'_on.png) no-repeat 0 0')
		num++;
	})
	.find('img').hover(
		function(){  
			$(this).stop().animate({'opacity' : '0'}, 400);  
		},
		function(){
			$(this).stop().animate({'opacity' : '1'}, 400);
		}
	); 
});

window.onload = function(){
	document.getElementById("nextButton").disabled = true;
	
	document.getElementById("Accept").onclick = function(){
		document.getElementById("nextButton").disabled = false;
	}
	
	document.getElementById("NG").onclick = function(){
		document.getElementById("nextButton").disabled = true;
	}
	
}

function nextPage(){
	rcheck = document.getElementById("Accept").checked;
	if(rcheck){
		document.location = "https://ssl.alpha-mail.ne.jp/o-range.co.jp/contact/";
		}
}

