


/*====================================================================================================================*/
/*===== クリック時にボタンを凹ませるスクリプト =======================================================================*/
/*====================================================================================================================*/



$(function(){



/*===== クリック・放した時・領域を外れた時の設定 ===================*/

$("button").mouseover
	(
	 function()
		{
		 $button = $(this);
		 point();
		}
	);


$("button").mousedown
	(
	 function()
		{
		 $button = $(this);
		 on();
		}
	);


$("button").mouseup
	(
	 function()
		{
		 $button = $(this);
		 off();
		}
	);


$("button").mouseout
	(
	 function()
		{
		 $button = $(this);
		 off();
		}
	);

/*==================================================================*/



});



/*===== ボタンを変化させるスタイル =================================*/

function point()
	{
	 $button.css(
		{
		 "background-position": "right bottom"
		}
	 );
	}


function on()
	{
	 $button.css(
		{
		 "position": "relative" ,
		 "top": "1px" ,
		 "left": "1px"
		}
	 );
	}


function off()
	{
	 $button.css(
		{
		 "background-position": "left top" ,
		 "position": "relative" ,
		 "top": "0px" ,
		 "left": "0px"
		}
	 );
	}

/*==================================================================*/



/*====================================================================================================================*/
/*====================================================================================================================*/
/*====================================================================================================================*/



