$(function() {
    // "More" link
    var $more = $('#content a.more');
    $more.css({'display' : 'inline-block'});
    var $article = $('#content div.article');
    var articleHeight = $article.height();
    $article.hide().height(0);
    $more.click(function (e) {
	    e.preventDefault();
	    if ($article.is(':visible')) {
		$article.stop().animate({ height: 0 }, { duration: 500, complete: function () {
		    $article.hide();
		} });
		$more.text('More').removeClass('less').addClass('more');
	    } else {
		$article.show().stop().animate({ height : articleHeight }, { duration: 500 });
		$more.text('Less').addClass('less').removeClass('more');
	    }
    });
})
