var $j = jQuery; // avoid conflicts with other libraries

//on page load call all of our sitewide functions
$j(document).ready(function(){
	nestContent();
});

/** EXPANDY! **/
function nestContent() {

	var nestedArea = $j('.nested');
	var expander = $j('.expander');
	var expandNoIcon = $j('.expandNoIcon');
	var helpImg = '<img src="/research/.SITEPARTS/.images/.sitecons/help.png" alt="help" style="width:12px;" />';

	nestedArea.hide();
	expander
		.append(' [<span> + </span>]')
		.click(function(){
			var associatedArea = $j(this).nextAll('.nested');
			var nestStatusIcon = $j(this).find('span');
			associatedArea.slideToggle('normal');
			nestStatusIcon.html((nestStatusIcon.text() == ' + ')? ' &minus; ':' + ');
		});
	expandNoIcon
		.click(function(){
			var associatedArea = $j(this).nextAll('.nested');
			associatedArea.slideToggle('normal');
		})
		.addClass("expander");

}
