function buttonSwap()
{
	$(".imgButton")
		.mouseover(function()
		{
			var id = $(this).children("img").attr("id");
			if(id == "bt_kakunin")
			{
				$(this).children("img").attr("src","/img/bt_kakunin_1.gif");
			}
			else if(id == "bt_submit")
			{
				$(this).children("img").attr("src","/img/bt_submit_1.gif");
			}
			else if(id == "bt_naosu")
			{
				$(this).children("img").attr("src","/img/bt_naosu_1.gif");
			}
			else if(id == "bt_kakutei")
			{
				$(this).children("img").attr("src","/img/bt_kakutei_1.gif");
			}
			else if(id == "bt_clear")
			{
				$(this).children("img").attr("src","/img/bt_clear_1.gif");
			}
		})
		.mouseout(function()
		{
			var id = $(this).children("img").attr("id");
			if(id == "bt_kakunin")
			{
				$(this).children("img").attr("src","/img/bt_kakunin_0.gif");
			}
			else if(id == "bt_submit")
			{
				$(this).children("img").attr("src","/img/bt_submit_0.gif");
			}
			else if(id == "bt_naosu")
			{
				$(this).children("img").attr("src","/img/bt_naosu_0.gif");
			}
			else if(id == "bt_kakutei")
			{
				$(this).children("img").attr("src","/img/bt_kakutei_0.gif");
			}
			else if(id == "bt_clear")
			{
				$(this).children("img").attr("src","/img/bt_clear_0.gif");
			}
		});
	
	$("#shipping_address_flag")
		.click(function()
		{
			shipping_addressCheck(this);
		});
}

function shipping_addressCheck(t)
{
	if($(t).attr("checked") == true)
	{
		$("#shipping_address_prefInput").val("").attr("disabled","disabled").css("background-color","#EEE");
		$("#shipping_address_localInput").val("").attr("disabled","disabled").css("background-color","#EEE");
		$("#shipping_zip_code_firstInput").val("").attr("disabled","disabled").css("background-color","#EEE");
		$("#shipping_zip_code_lastInput").val("").attr("disabled","disabled").css("background-color","#EEE");
	}
	else
	{
		$("#shipping_address_prefInput").removeAttr("disabled").css("background-color","#FFF");
		$("#shipping_address_localInput").removeAttr("disabled").css("background-color","#FFF");
		$("#shipping_zip_code_firstInput").removeAttr("disabled").css("background-color","#FFF");
		$("#shipping_zip_code_lastInput").removeAttr("disabled").css("background-color","#FFF");
	}
}

$(function()
{
	buttonSwap();
	shipping_addressCheck("input[type='checkbox']");
});