﻿$(document).ready(function() {

	//画像の切り替え
	$("img.swap-image").hover(
		function() {
			$(this).attr("src", $(this).attr("src").replace('_off', "_on"));
		},
		function() {
			$(this).attr("src", $(this).attr("src").replace('_on', "_off"));
		}
	);

	$("input.image-swap").hover(
		function() {
			$(this).attr("src", $(this).attr("src").replace('_off', "_on"));
		},
		function() {
			$(this).attr("src", $(this).attr("src").replace('_on', "_off"));
		}
	 );


	//ログイン入力ボックス
	//TODO : 画像パス
	var id_image_url = 'http://corum.ndoors.jp/image/common/login/bg_input_id.gif';
	var pw_image_url = 'http://corum.ndoors.jp/image/common/login/bg_input_pw.gif';

	$(".login-inputid")
	.css({ 'background-image': (($(this).val() == '') ? 'url(' + id_image_url + ')' : 'none') })
	.focus(function() {
		$(this).css({ 'background-image': 'none' });
	})
	.blur(function() {
		if ($(this).val() == '') {
			$(this).css({ 'background-image': 'url(' + id_image_url + ')' });
		}
	});

	$(".login-inputpw")
	.css({ 'background-image': (($(this).val() == '') ? 'url(' + pw_image_url + ')' : 'none') })
	.focus(function() {
		$(this).css({ 'background-image': 'none' });
	})
	.blur(function() {
		if ($(this).val() == '') {
			$(this).css({ 'background-image': 'url(' + pw_image_url + ')' });
		}
	});

});


function showComingSoon() {
	alert("現在準備中です");
}
