$(function(){
	//ページスクローラー
	$("a[href*='#']").easingScroll({
  easing: "easeOutExpo",
  duration: "800"
	});
	
  $('#Gallery li a').lightBox();
  $('.FeatureImg a').lightBox();
  $('#ProductGallery a').lightBox();
  $('#CorpResultsGallery a').lightBox();
  $('#RankA .SampleImg a').lightBox();
  $('#RankB .SampleImg a').lightBox();
  $('#RankC .SampleImg a').lightBox();
  $('#RankD .SampleImg a').lightBox();
  $('#RankE .SampleImg a').lightBox();
  $('#RankL .SampleImg a').lightBox();
  $('.DetailImg a').lightBox();
  $('.LwfEntryImg a').lightBox();
  $('.WoodImage a').lightBox();
  $('.TapeImage a').lightBox();
	$('#KeyVisualContent').cycle({
		fx:'fade',
		speed:'slow',
		timeout:5000,
		pager:'#KeyVisualSlider',
		pagerAnchorBuilder: function(idx, slide) {
			return '#KeyVisualSlider li:eq(' + (idx) + ') a';
		}
	});
	$('#NewsList').cycle({
		fx:'scrollLeft',
    easing:'easeOutExpo', 
		timeout: 5000
	});
	$('#LineupContent').cycle({
		fx:'fade',
		timeout:0,
		pager:'#LineupTab',
		pagerAnchorBuilder: function(idx, slide) {
			return '#LineupTab li:eq(' + (idx) + ') a';
		}
	});
	$('#LineupKeyVisual').cycle({
		fx:'fade',
		speed:'slow',
		timeout:5000,
	});
	$(".RankList:first").css("display","block");
	$(".RankList:eq(6)").css("display","block");
	$("select[name=number]").change(function(){
		var num = this.selectedIndex;
		$(".RankList").css("display","none");
		$(".RankList").eq(num).css("display","block");
		$(".RankList").eq(num+6).css("display","block");
		$(".SampleImg input").attr("checked",false);
	});
	$("#OrderStep01 .SampleImg input").click(function() {
		$("#OrderStep01 .SampleImg input").parent().css("background-color","");
		$(this).parent().css("background","#E6E6E6");
	});
	$("#OrderStep01 .SampleImg input:checked").parent().css("background","#E6E6E6");
	$("#OrderStep02 .SampleImg input").click(function() {
		$("#OrderStep02 .SampleImg input").parent().css("background-color","");
		$(this).parent().css("background","#E6E6E6");
	});
	$("#OrderStep02 .SampleImg input:checked").parent().css("background","#E6E6E6");
	$("#WoodSelect input").click(function() {
		$("#WoodSelect input").parent().parent().css("background-color","");
		$(this).parent().parent().css("background","#E6E6E6");
	});
	$("#WoodSelect input:checked").parent().parent().css("background","#E6E6E6");
	$("#TapeSelect input").click(function() {
		$("#TapeSelect input").parent().parent().css("background-color","");
		$(this).parent().parent().css("background","#E6E6E6");
	});
	$("#TapeSelect input:checked").parent().parent().css("background","#E6E6E6");
	$("#OrderStep02 .OptionSelect input").click(function() {
		$("#OrderStep02 .OptionSelect input").parent().css("background-color","");
		$(this).parent().css("background","#E6E6E6");
	});
	$("#OrderStep02 .OptionSelect input:checked").parent().css("background","#E6E6E6");
	$("#OrderStep03 .OptionSelect input").click(function() {
		$("#OrderStep03 .OptionSelect input").parent().css("background-color","");
		$(this).parent().css("background","#E6E6E6");
	});
	$("#OrderStep03 .OptionSelect input:checked").parent().css("background","#E6E6E6");
	$("#OrderStep04 .OptionSelect input").click(function() {
		$("#OrderStep04 .OptionSelect input").parent().css("background-color","");
		$(this).parent().css("background","#E6E6E6");
	});
	$("#OrderStep04	 .OptionSelect input:checked").parent().css("background","#E6E6E6");
	$(".OptionSelect a").click(function(){
		$("#Transport").slideToggle();
		return false;
	});
	//画像ギャラリー
	$("#DetailImg li a").click(function(){
			$("#DetailEnlargement img").before("<img src='"+$(this).attr("href")+"' alt='' />");
			$("#DetailEnlargement img:last").fadeOut("fast",function(){
					$(this).remove()
			});
			return false;
	});
	
	$("#UtilityNav a").corner("2px");
	
	$(".Specs tr:nth-child(odd)").css("background-color", "#F3F3F3");
	$(".Specs table tr:nth-child(odd)").css("background", "none");
	$("#ProductSpecs tr:nth-child(odd)").css("background-color", "#F3F3F3");
	$("#ProductSpecs table tr:nth-child(odd)").css("background", "none");
	$("#Form tr:nth-child(odd)").css("background", "#EEE");
	$("#Form tr:nth-child(even)").css("background", "#FAFAFA");
	$("#Infomation tr:nth-child(odd)").css("background-color", "#F3F3F3");
})
