﻿$(function() {
	var animation = {
		hideSpeed: 1000,
		showSpeed: 1000
	};

	$("div.newsPage a.expander").click(function(evt) {
		var	$a = $(this),
				$story = $a.parent().find("div.story");
				
		evt.preventDefault();
		if ($story.is(":visible")) {
			$story.hide(animation.hideSpeed, function() {
				$a.text("Expand").removeClass("expanded").addClass("collapsed");
			});
		} else {
			$story.show(animation.showSpeed, function() {
				$a.text("Collapse").removeClass("colapsed").addClass("expanded");
			});
		}
		
	});
});