// JavaScript Document
$(document).ready(function(){	
	/* コンテンツごとのIDを割り振る */
	var url=String(document.location);
	var paths = url.split('/');
	var id = paths[3]+paths[4];
	id = id.replace('\.html','');
	id = id.replace(/\?.*$/,'');
	$("#makebanner td[width=640]:eq(0)").attr('id',id);
	
	/* 全体設定 */
	$("#makebanner td[width=640]:eq(0)").attr('class','contents-body');
	$("#makebanner td[width=150]:eq(0)").attr('width','184px');
	$("#makebanner td[width=640]:eq(0)").css("width","719px");
	$("#makebanner td[width=640]:eq(0)").find("> table").css("width","699px");
	$("#makebanner td[width=640]:eq(0)").find("> table").eq(0).css("margin","0 auto");
	$("#makebanner td[width=640]:eq(0)").find("> table td").eq(0).hide();
	$("#makebanner td[width=640]:eq(0)").find("> table").eq(0).css("margin-top","10px");
	
	/* トップページ */
	$("#NewItem table").eq(0).find("tr").eq(0).hide();
	$("#Recommend td").attr('width','');
	$("#NewItem td").attr('width','');
	$("#Owner > table").eq(0).attr('width','');
	$("#Owner img").eq(1).attr('width',200);
	$("#Owner img").eq(1).css('border','1px solid #e2e2e2');
	$("#Owner img").eq(1).css('padding','5px');
	$("#Owner img").eq(1).css('margin-left','5px');
	
	/* 注文照会 */
	$("#shopconfirm > table").eq(0).find("table").css("width","699px");
	$("#shopconfirm > table td").show();
	$("#shopconfirm > table td").eq(0).find('br').remove();
	/* 会員登録約款 */
	$("#makebanner td[width=640]:eq(0)").find("> form table td").eq(0).hide();
	$("#makebanner td[width=640]:eq(0)").find("> form table").eq(0).css("margin-top","10px");
	/* 商品カテゴリ */
	if(id.indexOf('shopbrand') != -1){
		$("#makebanner td[width=640]:eq(0)").find("> table td").eq(0).show();
	}
	/* ご利用案内 */
	if(id == 'htmlinfo'){
		$("#makebanner .woong").find('br').eq(0).remove();
	}
	/* 特定商取引に関する法律に基づく表記 */
	$("#htmlordercontract > table").find("table").eq(0).find("table").eq(1).find("td").css("padding-left","10px");
	$("#htmlordercontract > table").find("table").eq(0).find("table").eq(0).find("td").eq(0).hide();
	$("#htmlordercontract > table").find("table").eq(0).find("table").eq(0).find("td").eq(1).html('<img src="/design/baistone2112/htmlordercontract.gif" alt="特定商取引に関する法律に基づく表示" />');
	$("#htmlordercontract > table").find("table").eq(0).find("table").eq(0).find("tr").eq(1).hide();
	$("#htmlordercontract > table").find("table").eq(0).find("table").eq(0).find("tr").eq(2).hide();
	$("#htmlordercontract > table").find("table").eq(0).find("table").eq(0).find("tr").eq(3).hide();
	
	/* 独自ページ */
	$("#htmlnewpage").find("> table td").eq(0).show();
	
	/* 商品検索 */
	$("#shopshopbrand td").show();
	
	/* 商品詳細ページ */
	$("#ProductInfo td").show();
	
	/* 店長日記 */
	$("#ownerowner").find("> table td").eq(0).show();
	$("#ownerowner").find("> table").css("width","auto");
	
	/* カテゴリリスト */
	$("#CategoryList td").show();
	$("#CategoryGroup td").attr('width','auto');
	
});
