$(document).ready(function(){
        //AJAXrequest先の設定
        var destination = "http://www.sevensenses.jp/bbpink/ajax.php";

        //準備
        $("ul.navi").hover(function(){
	    $(this).css("cursor","pointer"); 
        },function(){
            $(this).css("cursor","default"); 
	});
        $("ul.sublist").css("display", "none");

        //昔の記事
	$('ul.navi > li').click(function(){
                $(this).children().slideToggle("slow");
	});

        //コメントボタン
        $("#commentButton").click(function() {
		jQuery.post(destination, { comment     : "1",
			    aid         : $("input[id=articleId]").val(),
			    name        : $("input[id=name]").val(),
			    email       : $("input[id=email]").val(),
			    url         : $("input[id=url]").val(),
			    commentBody : $("textarea[id=commentBody]").val()
			    },
		    function(text){
			$("#commentList").slideUp("slow");
			$("#commentList").append(text);
			$("#commentList").slideDown("slow");
		    } );
	});

});

function tree(id) {
    var target = "\#" + id;
    $(target).toggle("slow");
}

function clearComment(areaId, initialValue) {
    var target = "\#" + areaId;
    if ($(target).val() == initialValue) {
        $(target).val("");
    } else if ($(target).val() == "") {
        $(target).val(initialValue);
    }
}

Hatena.Star.Token = 'f16cccf0f0e4894d1667c60fcb4d924876f1d50d';
Hatena.Star.SiteConfig = {
    entryNodes: {
	'div.article': {
	    uri: 'h2 a',
	    title: 'h2',
	    container: 'h2'
	}
    }
};