//Function to change the text and background image for the home page's feature box
//JMA 11/29/06

$(document).ready(function() {
    MM_preloadImages('images/home-tabs/home-tabs-new-over-page.jpg', '/images/home-tabs/home-tabs-new-over-kids.jpg', '/images/home-tabs/home-tabs-new-over-lobbying.jpg', '/images/home-tabs/home-tabs-new-over-member.jpg', '/images/home-tabs/home-tabs-new-over-oralhistory.jpg');
}); 

function setFeature(feature) {
	//set the content
	var content = new String("");
	var bgImage = new String("");
	
	switch(feature) {
		case "clerk":
			content="<h2>About the Clerk's Office</h2>"
				+ "<ul>"
				+ "	<li><a href='/about/duties.aspx'>Duties of the Clerk</a></li>"
				+ "	<li><a href='/about/offices.aspx'>Offices &amp; Services</a></li>"
				+ "	<li><a href='/about/history.aspx'>History of the Office</a></li>"
				+ "	<li><a href='/about/press/index.aspx'>Press Releases</a></li>"
			+ "	</ul>";
			bgImage = "/images/main_clerk.jpg";
			break;
			
		case "mem":
			content="<h2>Member Information</h2>"
				+ "<ul>"
				+ "	<li><a href='/member_info/index.aspx'>Member Lists and Directories</a></li>"
				+ "	<li><a href='/member_info/leadership.aspx'>Leadership Information</a></li>"
				+ "	<li><a href='/member_info/cong.aspx'>Congressional Profile</a></li>"
				+ "	<li><a href='/member_info/election.aspx'>Election Information</a></li>"
				+ "	<li><a href='/member_info/vacancies.aspx'>Current Vacancies</a></li>"
			+ "	</ul>";
			bgImage = "/images/main_mem.jpg";
			break;
		
		case "comm":
			content="<h2>Committee Information</h2>"
				+ "<ul>"
				+ "	<li><a href='/committee_info/index.aspx'>Committee Lists and Directories</a></li>"
				+ "	<li><a href='/committee_info/commact.aspx'>Committee Activities</a></li>"
				//+ "	<li><a href='/redirect.aspx?url=http://thomas.loc.gov/cp/cpquery.html&title=THOMAS:+Committee+Reports'>Committee Reports</a></li>"
			+ "	</ul>";
			bgImage = "/images/main_comm.jpg";
			break;
		
		case "legis":
			content="<h2>Legislative Activities</h2>"
				+ "<ul>"
				+ "	<li><a href='/legislative/index.aspx'>Legislative Schedules and Proceedings</a></li>"
				+ "	<li><a href='/legislative/legvotes.aspx'>Legislation and Votes</a></li>"
				+ "	<li><a href='/legislative/housedoc.aspx'>House Documents</a></li>"
				+ "	<li><a href='/legislative/legprocess.aspx'>The Legislative Process</a></li>"
			+ "	</ul>";
			bgImage = "/images/main_legis.jpg";
			break;
				
		case "art":
			content="<h2>Art &amp; History</h2>"
				+ "<ul>"
				+ "	<li><a href='" + ArtHistoryWebRoot + "/art_artifacts/'>Art, Artifacts, &amp; Architecture</a></li>"
				+ "	<li><a href='" + ArtHistoryWebRoot + "/house_history/index.aspx'>House History</a></li>"
				+ "	<li><a href='" + ArtHistoryWebRoot + "/mem_bio/index.aspx'>Historical Biographical Information</a></li>"
				+ "	<li><a href='" + ArtHistoryWebRoot + "/highlights.aspx'>Weekly Historical Highlights</a></li>"
			+ "	</ul>";
			bgImage = "/images/main_art.jpg";
			break;
					
		case "pd":
			content="<h2>Public Disclosure</h2>"
				+ "<ul>"
				+ "	<li><a href='/public_disc/index.aspx'>Lobbying Disclosure</a></li>"
				+ "	<li><a href='/public_disc/index.aspx'>Reports and Filings</a></li>"
			+ "	</ul>";
			bgImage = "/images/main_pd.jpg";
			break;
		
		case "library":
			content="<h2>House Library</h2>"
				+ "<ul>"
				+ "	<li><a href='" + LibraryWebRoot + "/collection.aspx'>Library Collection</a></li>"
				+ "	<li><a href='" + LibraryWebRoot + "/qa-index.aspx'>Q &amp; A</a></li>"
				+ "	<li><a href='" + LibraryWebRoot + "/reference-index.aspx'>Reference Desk</a></li>"
				+ "	<li><a href='" + LibraryWebRoot + "/links.aspx'>Resources</a></li>"
				+ "	<li><a href='http://www.surveymonkey.com/s.aspx?sm=1lAP6feota7nVlfxfTGcJQ%3d%3d#q1 ' target='_blank'>Feedback</a></li>"
			+ "	</ul>";
			bgImage = "/images/main_library.jpg";
			break;
		/*
		case "kids":
			content="<h2>Kids in the House</h2>"
				+ "<ul>"
				+ "	<li><a href='http://kids.clerk.house.gov/congress/members/first_day/index.html'>First Day of Congress</a></li>"
				+ "	<li><a href='http://kids.clerk.house.gov/games/index.html'>Fun and Games</a></li>"
				+ "	<li><a href='http://kids.clerk.house.gov/laws/index.html'>How Laws Are Made</a></li>"
				+ "	<li><a href='http://kids.clerk.house.gov/time/index.html'>Time Traveler</a></li>"
			+ "	</ul>";
			bgImage = "/images/main_kids.jpg";
			break;
		*/
		default:
			case "clerk":
			content="<h2>About the Clerk's Office</h2>"
				+ "<ul>"
				+ "	<li><a href='/about/duties.aspx'>Duties of the Clerk</a></li>"
				+ "	<li><a href='/about/history.aspx'>History of the Clerk's Office</a></li>"
				+ "	<li><a href='/about/offices.aspx'>Offices under the Clerk</a></li>"
			+ "	</ul>";
			bgImage = "/images/main_clerk.jpg";
			break;
	}
	if (document.getElementById("section_features") != null)
	{
		//set the content
		document.getElementById("section_features").innerHTML=content;
		//change the background image
		document.getElementById('section_features').style.background='url('+ bgImage +')';
	}
}
