//Pattern Cファイル

	//ReTweet
	var formShowFlg=false;
	
	$(document).ready( function(){
		$.ajaxSetup({ cache: false });
		$("#rtbutton").click(function() {
			//var comment = 'RT:@'+$("#p_login_id").attr("value") +" "+ $("#tcomment").text()+location;
			var comment = 'RT:@'+$("#p_login_id").attr("value") +" "+ $("#tcomment").text();
			$("#commenttext").val(comment);
			});

		$("form.replyForm").hide();

		var showFlg=false;
		
		$("span.reply").toggle(function() {
			var index = $("span.reply").index(this);
			$("form.replyForm:eq("+index+")").show("slow");
			
		},function() {
			var index = $("span.reply").index(this);
			$("form.replyForm:eq("+index+")").hide("slow");
		});
		$("span.reply").hover(function (){
			
			}
		)
		$("input.comment,#commenttext").keyup(function(){
		      //countString('title', 'title_length', $(this).value);
			countString($(this), $(this).val().length,150);
		 });
		$("form").submit(function() {
			$(":submit", this).attr("disabled","disabled");
			}); 
	});
	
function addFavorite( l,elm ){
	$.get(l+"");
	elm.hide('slow');
}
/*
function countString_b(element,input_len,max_len){
		$("div.alert").remove();
		str_len=max_len-input_len;
		if(str_len<=0){
			$(element).before('<div class="alert">入力可能文字数をオーバーしています</div>');
			$(element).css('color','#FF0000');
		}else{
			$(element).css('color','#000000');
			$(element).before('<div class="alert">入力可能な文字数はあと'+str_len+'文字です</div>');
		}
	}
*/