/*
$(document).ready(function() {
     $(".Content").hide();
     $(".Expand1, .Expand2, .Expand3").bind("click", function(e) {
         $(this).next("div.Content").show();
     });
});
*/

$(document).ready(function(){
	$(".Content").hide();
	$(".Expand1").bind("click", function(e) {
		$(this).next("div.Content").toggle();
		SwapImage($("p.Expand1 img"));
		StopEvent(e);
	});
	$(".Expand2").bind("click", function(e) {
		$(this).next("div.Content").toggle();
		SwapImage($("p.Expand2 img"));
		StopEvent(e);
	});
	$(".Expand3").bind("click", function(e) {
		$(this).next("div.Content").toggle();
		SwapImage($("p.Expand3 img"));
		StopEvent(e);
	});
	$(".Expand4").bind("click", function(e) {
		$(this).next("div.Content").toggle();
		SwapImage($("p.Expand4 img"));
		StopEvent(e);
	});
	$(".Expand5").bind("click", function(e) {
		$(this).next("div.Content").toggle();
		SwapImage($("p.Expand5 img"));
		StopEvent(e);
	});
	$(".Expand6").bind("click", function(e) {
		$(this).next("div.Content").toggle();
		SwapImage($("p.Expand6 img"));
		StopEvent(e);
	});
	$(".ExpandDefault1").triggerHandler("click");
	$(".ExpandDefault4").triggerHandler("click");
	$(".ExpandDefault5").triggerHandler("click");
});

SwapImage = function(image)
{
	var src = image.attr("src");
	var alt = image.attr("alt");
	
	if(src.indexOf("expand.png") >= 0)
	{
		image.attr("src","../images/collapse.png");
		image.attr("alt", "Collapse");
	}
	else
	{
		image.attr("src","../images/expand.png");
		image.attr("alt", "Expand");
	}
};

StopEvent = function(e)
{
	if(e.returnValue){e.returnValue = false;e.cancelBubble = true;}
	if(e.preventDefault){e.preventDefault();e.stopPropagation();}
};