$(function(){
/* dtとddに偶数のときの行に背景色
	--------------------------------------*/
  $("dl.news_dl").each(function(){
    $(this).find("dd:odd").addClass("even");
  });


	/* footerリンクの右側に線
	--------------------------------------*/
		$("#footer ul li:last-child").css({"border-right":"solid #FEFEFE 1px","padding-right":"6px"});


	/* usedcarのページ内のスクロールする<li>の改行
	--------------------------------------*/
		$("#used_scroll ul li img:nth-child(3n)").css({"clear":"both","border":"solid #CCCCCC 1px"});

	
	/* page_linkの幅を<li>の数によって変える
	--------------------------------------*/
		$(".page_link li").each(function () {
			li_w = 950/$(".page_link li").length;
			$(this).css({"width":li_w,
									"border-right":"solid #FFFFFF 1px"
									});
			$(".page_link li:last-child").css("border-right","none");
		});


	/* 施工事例内のテキストp.exのスタイル
	--------------------------------------*/
	$(".sekourei img").each(function () {
		h = $(this).attr('height');
		$(this).parent().css({"height":h,
											 "position":"relative"});
	});
		


	/* お問合わせはこちらのバナー
	--------------------------------------*/
	$(".go_contact").each(function () {
		$("p+.go_contact").css("top","-20px");
		$(this).css("clear","both");
	});
		
		
	/* 最初のタイトルのマージンを調整
	--------------------------------------*/
		$("h3+h4").css("margin-top","0px");


	/* repairのフローの最後の矢印をけす
	--------------------------------------*/
		$(".repair_flow li:last-child").css({"background":"none","padding":"0"});

	/* partsのフローの番号
	--------------------------------------*/
	$(".flow_box").each(function (i) {
		i = i+1;
		$(this).css("background","url(img/parts/flow_no"+i+".gif) no-repeat 15px 15px");
	});


});

/* scrollしてpagetopに */
$(function(){
		$(".go_pagetop a").click(function(){
			if ($(this).attr('href') == '#all_area') {
			 $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
		}
	 //return false;
		})
	
});


