var version, browser;

$(function(){
		   
	jQuery.each(jQuery.browser, function(i, val){ //ブラウザの判別
		if(i == "version"){ //バージョンの取得
        	version = val;
		}else if(val){ //種類の取得
			browser = i;
		}
	});
	

	/* ==
	
	　共通
	
	============================================================================================== */
	/*　クラスの設定
	---------------------------------------------------------------------------------------------- */
	//$(".gnav li:last-child").addClass("lastChild");
	//$(".footer li:last-child").addClass("lastChild");
	$(".topicpath li:last-child").addClass("current");
	$(".container > .main > .section > .ad li:odd").addClass("odd"); //トップページ：何でダイワハウスなんだ？
	$(".kyoten .condition fieldset div:last").css("borderBottom", "none"); //お近くのダイワハウス
	$(".level2 .section .bnr").find("li:odd").addClass("odd"); //第2階層：バナー
	//$(".recoFooter > .contents > div:last").addClass("lastChild"); //レコメンドフッター

	//第2階層：アイテムリスト
	$("#live .section div.itemList").find("div:odd").addClass("odd");
	$("#utilize .section .floatL div.itemList").find("div:odd").addClass("odd");
	$(".level2 .section .floatR ul.itemList").find("li:odd").addClass("odd");
	$(".level2 .section .itemList").find("div:nth-child(1)").addClass("firstChild");
	$("#live .section .itemList").find("div:nth-child(2)").addClass("firstChild");
	$("#utilize .section .floatL .itemList").find("div:nth-child(2)").addClass("firstChild");


	/* お知らせ・ニュースとか
	---------------------------------------------------------------------------------------------- */
	//通常
	$(".container .info > div").hover(function(){
		$(this).css("backgroundColor", "transparent");
	},function(){
		$(this).css("backgroundColor", "#f4f4f4");
	});
	$(".container .info > div:last-child dd").css("background", "none");

	//項目別
	$(".container .infoItem > div").hover(function(){
		$(this).css("backgroundColor", "transparent");
	},function(){
		$(this).css("backgroundColor", "#f4f4f4");
	});
	$(".container .infoItem > div:last-child dd").css("background", "none");


	/* ==
	
	　トップページ
	
	============================================================================================== */
	/* マウスオーバー処理
	---------------------------------------------------------------------------------------------- */
	$(".container #news > dl").hover(function(){
		$(this).css("backgroundColor", "transparent");
	},function(){
		$(this).css("backgroundColor", "#f4f4f4");
	});
	$(".container #news > dl:last").children("dd").css("backgroundImage", "none");
	
	
	/* ニュースリリースのPDFアイコン処理
	---------------------------------------------------------------------------------------------- */
	$(".container .info > div").each(function(){
		if($(this).find("dd > a").length){
			if($(this).find("dd > a").attr("href").indexOf(".pdf") != -1){
				$(this).find("dt").css({
					backgroundImage: "url(/common/images/renew2009/ic_pdf.gif)",
					backgroundPosition: "right 3px"
				});
			}
		}
	});
	



	/* イベントキャンペーンマウスオーバー処理
	---------------------------------------------------------------------------------------------- */
	$(".container #eventcampaign > dl").hover(function(){
		$(this).css("backgroundColor", "transparent");
	},function(){
		$(this).css("backgroundColor", "#f4f4f4");
	});
	$(".container #eventcampaign > dl:last").children("dd").css("backgroundImage", "none");

});



/* ==

　コンテンツ紹介（分譲住宅トップ、注文住宅共通フッター）
　※※実行のコントロールは「/common/js/fontSize.js」に設定あり※※

============================================================================================== */
function setHeight(){

	var introH = 0;
	$("#intro div.intro").each(function(){	
		$(this).css("height", "auto");
		var thisH = $(this).height();
		if(introH < thisH){ introH = thisH; }
	});
	
	introH = parseInt(introH + 25);
	
	$("#intro div.intro").css("height", introH + "px");

}

