$(document).ready(
	function() {

		//
		// BEGIN script for "Transfer Of Wealth" county select menu
		$("#county_url").change(
			function() {
				window.location.href = $("#county_url").val();
			}
		);

		$("form.affiliated_fund_search #region").change(
			function() {
				window.location.href = $("form.affiliated_fund_search #region").val();
			}
		);

		$("form.affiliated_fund_search #town").change(
			function() {
				window.location.href = $("form.affiliated_fund_search #town").val();
			}
		);

		$("form.affiliated_fund_search #county").change(
			function() {
				window.location.href = $("form.affiliated_fund_search #county").val();
			}
		);

		$("form.affiliated_fund_search #category").change(
			function() {
				window.location.href = $("form.affiliated_fund_search #category").val();
			}
		);
		// END script for "Transfer Of Wealth" county select menu
		//
		
		//
		// BEGIN handling "prev/next month" links for calendar
		calendar_nav_links();
		// END handling "prev/next month" links for calendar
		//

		//
		// BEGIN "donor stories" and "community stories" tabs
		$("#stories_addl_info > ul").tabs().tabs('equalize');
		// END "donor stories" and "community stories" tabs
		//

	}
);

calendar_nav_links = function() {

	$('th.prev_month a').click(
		function() {
			$('#calendar_nav').load(this.href, calendar_nav_links);
			return false;
		}
	);

	$('th.next_month a').click(
		function() {
			$('#calendar_nav').load(this.href, calendar_nav_links);
			return false;
		}
	);
	
};