$(function(){
//ロールオーバー設定
	
	$("li a img,p a img,input").each(function() {
		var off = this.src;
		var dot = this.src.lastIndexOf('.');
		var on = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
		$(this).hover(
			function() { this.src = on; },
			function() { this.src = off; }
		);
	});
	
/*	$("textarea").keyup(function(){
		var counter = $(this).val().length;
		$("#countUp").text(counter);
		if(counter >= 500){
			$("#countUp").text("500文字を越えています").css("color","#ee1717");
		}
	});*/
																									  
});

function checkTextArea(target,maxlength){
	if ( target.value.length >= maxlength ) {
		target.value = target.value.substr(0,maxlength)
		target.focus();
	} 
}
