
// disaster = 0, cleanair = 1, cleanwater = 2, fta = 3, labor = 4, food = 5, climate = 6, taxes = 7, dairy = 8


var intros = ["A sound farm program benefits all Americans: from the producers in the field to the consumer's table, including a significant investment in nutrition programs. Farm Bureau believes farm and food policies are a wise investment in our nation's health, and the future of American-grown food, fuel, fiber and feed. Current disaster packages...",
			  "Regulations and laws should not unfairly restrict and hinder agricultural producers. Whether or not Congress passes cap-and-trade legislation, farmers may well have to face stricter requirements under the Clean Air Act. The Environmental Protection Agency (EPA) has issued and 'endangerment finding,' under which it proposes to regulate GHGs as a pollutant under the Clean Air Act. This could cause significant impacts on agriculture - particularly livestock operations.",
			  "The success of the Clean Water Act (CWA) over its 37 year history has been its structure of shared responsibility. This approach allows states to protect truly ecologically important and environmentally sensitive areas within their borders while, at the same time, preserving the authorities of states and local communities over their own land and water use planning. Any legislation that would delete the term 'navigable'...",
			  "With 95 percent of consumers living outside the United States, the future prosperity of American agriculture depends largely on the ability to sell to foreign markets. Farm Bureau will strive to continue its work to open markets, expand economic development and support a strong rules-based trading system.",
			  "Farmers need comprehensive, fundamental changes in immigration laws and regulations to ensure a legal and stable labor force. The agricultural sector relies on workers for planting, cultivating, harvesting and processing of high-value commodities with an estimated farm value of more than $40 billion annually. Farm Bureau supports comprehensive immigration reform and a usable worker program that address American agriculture's needs.",
			  "Consumers have a reasonable expectation that the food products they buy are safe. All consumers should have confidence in the safety of their food, whether grown domestically or imported. Though the U.S. food protection system is among the best in the world, producers and consumers agree that improvement is always an important goal...",
			  "Farm Bureau advocates policies that will create a diverse domestic energy supply to fuel America's economic growth and prosperity and strengthen America's energy independence. Further development and use of renewable energy sources such as ethanol, biodiesel, biomass and wind are critical to our nation's energy future. At the same time, we should increase the exploration and production of oil and gas here at home and develop nuclear energy with adequate safeguards to ensure its safe and environmentally sound use.",
			  "Farm Bureau supports the more than 2 million farms across rural landscape - individuals, family partnerships and family cooperatives that own 98 percent of American farms. A simple, fair and less burdensome tax system that protects farms from generation-to-generation, keeps farms in production, and reduces the taxes on farms and ranches is a Farm Bureau priority.",
			  "In late 2008, converging factors led to an evaporation of the U.S. dairy export market. First and foremost, the global economic recession virtually halted the trade of products, while a stronger dollar also made our products more expensive in the marketplace. In addition, dairy producers were caught in a classic 'price-cost squeeze' with farm milk prices declining sharply from record highs while feed costs remain high. Dairy prices have risen since 2009, but the nation's..."
			 ];
/*
var intros = ["A sound farm program benefits all Americans: from the producers in the field to the consumer's table, including a significant investment in nutrition programs. Farm Bureau believes farm and food policies are a wise investment in our nation's health, and the future of American-grown food, fuel, fiber and feed. Current disaster packages... do not provide all farmers with assistance when they are faced with natural disasters, ad hoc disaster assistance will be necessary at times.",
			  "Regulations and laws should not unfairly restrict and hinder agricultural producers. Whether or not Congress passes cap-and-trade legislation, farmers may well have to face stricter requirements under the Clean Air Act. The Environmental Protection Agency (EPA) has issued and 'endangerment finding,' under which it proposes to regulate GHGs as a pollutant under the Clean Air Act. This could cause significant impacts on agriculture - particularly livestock operations.",
			  "The success of the Clean Water Act (CWA) over its 37 year history has been its structure of shared responsibility. This approach allows states to protect truly ecologically important and environmentally sensitive areas within their borders while, at the same time, preserving the authorities of states and local communities over their own land and water use planning. Any legislation that would delete the term 'navigable' from the CWA, a term that appears in the current law more than 80 times and is the sole limit on the federal government's authority, would up-end the foundation of this success.",
			  "With 95 percent of consumers living outside the United States, the future prosperity of American agriculture depends largely on the ability to sell to foreign markets. Farm Bureau will strive to continue its work to open markets, expand economic development and support a strong rules-based trading system.",
			  "Farmers need comprehensive, fundamental changes in immigration laws and regulations to ensure a legal and stable labor force. The agricultural sector relies on workers for planting, cultivating, harvesting and processing of high-value commodities with an estimated farm value of more than $40 billion annually. Farm Bureau supports comprehensive immigration reform and a usable worker program that address American agriculture's needs.",
			  "Consumers have a reasonable expectation that the food products they buy are safe. All consumers should have confidence in the safety of their food, whether grown domestically or imported. Though the U.S. food protection system is among the best in the world, producers and consumers agree that improvement is always an important goal. Due to rapid developments and changes in the way foods are produced, processed, marketed and consumed, some systems need to be updated.",
			  "Farm Bureau advocates policies that will create a diverse domestic energy supply to fuel America's economic growth and prosperity and strengthen America's energy independence. Further development and use of renewable energy sources such as ethanol, biodiesel, biomass and wind are critical to our nation's energy future. At the same time, we should increase the exploration and production of oil and gas here at home and develop nuclear energy with adequate safeguards to ensure its safe and environmentally sound use.",
			  "Farm Bureau supports the more than 2 million farms across rural landscape - individuals, family partnerships and family cooperatives that own 98 percent of American farms. A simple, fair and less burdensome tax system that protects farms from generation-to-generation, keeps farms in production, and reduces the taxes on farms and ranches is a Farm Bureau priority.",
			  "In late 2008, converging factors led to an evaporation of the U.S. dairy export market. First and foremost, the global economic recession virtually halted the trade of products, while a stronger dollar also made our products more expensive in the marketplace. In addition, dairy producers were caught in a classic 'price-cost squeeze' with farm milk prices declining sharply from record highs while feed costs remain high. Dairy prices have risen since 2009, but the nation's 60,000 dairy farmers are still struggling from a tremendous loss of equity in 2008 and 2009."
			 ];
*/

var fighting = ['tab_ft_disaster.gif',
				'tab_ft_cleanair.gif',
				'tab_ft_water.gif',
				'tab_ft_fta.gif',
				'tab_ft_labor.gif',
				'tab_ft_food.gif',
				'tab_ft_climate.gif',
				'tab_ft_estate.gif',
				'tab_ft_dairy.gif'
			   ];

var callout = ['callout_disaster.gif',
				'callout_cleanair.gif',
				'callout_water.gif',
				'callout_fta.gif',
				'callout_labor.gif',
				'callout_food.gif',
				'callout_climate.gif',
				'callout_estate.gif',
				'callout_dairy.gif'
			   ];			  

var images = ['tab_disaster.jpg', 
			  'tab_cleanair.jpg',
			  'tab_water.jpg',
			  'tab_fta.jpg',
			  'tab_labor.jpg',
			  'tab_food.jpg',
			  'tab_climate.jpg',
			  'tab_estate.jpg',
			  'tab_dairy.jpg'
			 ];

var tab = ['tab_disaster.gif', 
		   'tab_cleanair.gif',
		   'tab_water.gif',
		   'tab_fta.gif',
		   'tab_labor.gif',
		   'tab_food.gif',
		   'tab_climate.gif',
		   'tab_estate.gif',
		   'tab_dairy.gif'
			 ];

var idVals = ['tab_disaster', 'tab_cleanair', 'tab_water', 'tab_fta', 'tab_labor', 'tab_food', 'tab_climate', 'tab_estate', 'tab_dairy'];


var whereStand = ['<li>Crop disaster programs leave many farmers without hope for meaningful assistance when they are hardest hit by natural disasters.</li><li>Agricultural disasters occur every year, and in 2009 many of these disasters occurred on farms that will not be eligible for assistance under SURE.</li>',
				  '<li>Farm Bureau works with policy makers at all levels to assure that legislation and regulations do not adversely impact our ability to provide safe and abundant food, does not regulate or mandate unjustifiable production methods or practices, and recognizes the positive role of agriculture...</li>',
				  '<li>Farm Bureau opposes any bill that deletes the term "navigable" and redefines "waters of the United States" to include "ALL" interstate and intrastate waters will significantly expand federal regulation and oversight of agricultural activities on private land...</li>',
				  '<li>The positive impact of exports will be diminished as long as the United States is not moving forward with an agricultural trade agenda.</li><li>While the U.S. is not opening markets through new trade agreements, many other countries are negotiating bilateral...</li>',
				  "<li>Farm Bureau supports comprehensive immigration reform that addresses American agriculture's needs.</li><li>Farmers need comprehensive changes in existing immigration laws and regulations to ensure they have a legal and stable labor force now and in the future...</li>",
				  '<li>Consumers, retailers, distributors, processors and producers are demanding that new steps be taken to assure the safety of food and feed products in the U.S.</li><li>However, there is concern that too many new standards will unnecessarily complicate the marketplace,..</li>',
				  '<li>Cap-and-trade proposals will have a negative and significant impact on agriculture.</li><li>The development of a national energy policy that provides for increased exploration and use of domestic energy resources, with additional access for exploration and production...</li>',
				  '<li>Farm Bureau believes that tax policy should encourage private initiative, economic growth, equity and simplicity.</li><li>Farm Bureau believes that fiscal policy should encourage economic stability, increase productivity, promote economic prosperity and improve our competitive...</li>',
				  '<li>Many in the dairy industry believe that the current dairy program did not provide an adequate safety net for farmers when prices plummeted in 2009.</li><li>Farm Bureau believes the current program includes federal milk marketing orders under which Grade A fluid milk is "pooled"...</li>'
				 ]

var ids = ['3000', '3001', '3002', '3003', '2578', '3004', '3005', '3006', '3007'];
var titles = ['Disaster Assistance', 
			  'the Clean Air Act', 
			  'the Clean Water Act', 
			  'Free Trade Agreements',
			  'Labor & Immigration',
			  'Food Safety & Labeling',
			  'Climate Change / Energy Policy',
			  'Estate & Capital Gains Taxes', 
			  'Dairy Policy'
			 ];

			 
	switchTabs = function(tabClicked){
		$("#tabs").attr("src", ("/resources/fbact/images/" + tab[tabClicked]));
		$("#theTabContent").fadeTo(500,0,function() {
			$("#tabPhoto").attr("src", ("/resources/fbact/images/" + images[tabClicked]));
			$("#tabCallout").attr("src", ("/resources/fbact/images/" + callout[tabClicked]));
			$("#tabContReading").attr("href", ("/issue.jsf?issueId=" + ids[tabClicked]));
			$("#tabIntro").html(intros[tabClicked]);
			$("#tabNewsTitle").html("Latest News on " + titles[tabClicked]);
			
			$("#tabWhereStand").find('li').remove();
			$("#tabWhereStand").append(whereStand[tabClicked]);
			
			$("#tabNews").find('li').hide();
			$("#tabNews").find('li.'+idVals[tabClicked]).css("visibility", "visible");
			$("#tabNews").find('li.'+idVals[tabClicked]).css("display", "block");
			
			
			
	      }).fadeTo(500,1);
	}
