jQuery.fn.plusToggle = function() {
	var myShowCopy = $(this).find('div.show_copy');
    var myHideCopy = $(this).find('div.hide_copy');
	if (myShowCopy.is(':visible')) {
		myShowCopy.hide();
		myHideCopy.show();
	}
	else if (myShowCopy.is(':hidden')) {
		myShowCopy.show();
		myHideCopy.hide();
	}
};

$(function() {
    // Get all extra content divs 
    var lowerExtraContent = $('div.lower_extra_content');
	var upperExtraContent = $('div.upper_extra_content');
    // Hide all extra content divs 
    lowerExtraContent.hide();
	upperExtraContent.hide();
    // Get all divs with class show_copy
    var showCopy = $('div.show_copy');
    // Get all divs with class hide_copy
    var hideCopy = $('div.hide_copy');
    // Hide all hide_copy divs
    hideCopy.hide();
    // Get all toggle buttons
    var toggleButton = $('div.content_toggle');
    // Apply click function to current button being clicked
    $(toggleButton).click(function() {
		// Get current button
		var currentButton = $(this);
		// Get the buttons subsequent element
		var myNextContent = currentButton.next();
		// Get the buttons previous element
		var myPrevContent = currentButton.prev();
		// Find out if next element has desired class
		if (myNextContent.hasClass("lower_extra_content")) {
			// Slide open and close extra content
			(myNextContent).slideToggle('slow');
			// Switch open close instruction
			currentButton.plusToggle();
		} // Find out if previous element has desired class
		else if (myPrevContent.hasClass("upper_extra_content")) {
			// Slide open and close extra content
			(myPrevContent).slideToggle('slow');
			// Switch open close instruction
			currentButton.plusToggle();
		} 
	});
});


