var tweetuser;
var trycount = 0;
function getTweet(){
	var html;
	var tweetText;
	var tweetlist = "";
	// count : 取得件数
	//取得するURLの作成
	var wurl = "http://twitter.com/statuses/user_timeline/" + tweetuser + ".json?callback=?&count=3";

	jQuery.getJSON(wurl,
		function(tweet){
			jQuery.each(tweet, function(n){
				// リンクなどの書き換え
				tweetText = this.text.replace(/((http:|https:)\/\/[\x21-\x26\x28-\x7e]+)/gi, "<a href='$1'>$1</a>");
				tweetText = tweetText.replace(/@([a-zA-Z0-9]+)?/gi, "<a href='http://twitter.com/$1' target='_blank'>@$1</a>");

				html = '<div class="twtr-timeline" style="height: 100%;">';
				html += '	<div class="twtr-tweets">';
				html += '		<div class="twtr-reference-tweet"></div>';
				html += '		<div id="tweet-id-1" class="twtr-tweet">';
				html += '			<div class="twtr-tweet-wrap"> ';
				html += '				<div class="twtr-avatar"> ';
				html += '					<div class="twtr-img">';
				html += '						<a target="_blank" href="http://twitter.com/intent/user?screen_name="' + tweetuser + '>';
				html += '							<img alt="Makita_K" src="images/tweet.png">';
				html += '						</a>';
				html += '					</div> ';
				html += '				</div> ';
				html += '				<div class="twtr-tweet-text"> ';
				html += '					<p> ';
				html += '						<a target="_blank" href="http://twitter.com/intent/user?screen_name=' +  tweetuser +'" class="twtr-user">田口恵麻＜エマ＞</a>' + tweetText;
				html += '					</p> ';
				html += '				</div> ';
				html += '			</div>';
				html += '		</div>';
				html += '	</div>';
				html += '</div>';

				tweetlist += html;
			});
			if (tweetlist.length > 0){
				var container = document.getElementById("tweetlist");		//出力先
				container.innerHTML = tweetlist;
			}
		}
	);

}

