// jQuery_textarea
// 入力フォームにサンプル文字を入れておき、フォーカスで消すスクリプト

$(function(){
	$('input[value=""]').val("質問を検索")
		.css("color","#999"); //フォーカス前のフォントカラー  
    $("input").focus(function(){   
        $(this).css("background-color" , "#FFF6E5");//フォーカス時の背景色
        if(this.value == "質問を検索"){   
        	$(this).val("").css("color","#000");//入力時のフォントカラー 
        }   
    });   
    $("input").blur(function(){   
        $(this).css("background-color" , "#EEEFF2");//未フォーカス時の背景色
        if(this.value == ""){   
            $(this).val("質問を検索")
            	.css("color","#999"); //フォーカス解除後のフォントカラー  
        }   
        if(this.value != "質問を検索"){   
            $(this).css("color","#000");//フォーカス解除後のフォントカラー
             
        }   
    });
    $("input.samp-button").click(function(){
		$('input[value="質問を検索"]').val("");
	});
});