
/* WWF-Philippines
 * Alter main headings image on home page
 * Requires JQuery 
 * http://wwf.org.ph
 * by PJ Villarta
 */
 
$("document").ready(function(){
	$("#slider img").hover(
		function(){
			$(this).stop().animate({"opacity": "0.5"}, "slow");
		},
		function(){
			$(this).stop().animate({"opacity": "1"}, "slow");
		}
	);
	
    $("#btnOndoy").hover(
		function(){
			$('#mainbannerimg').css('background-image', 'url(_imgs/mainbanner_ondoy.jpg)');
			$('#headline').html('Climate Change');
			$('#subtext').html('Climate Change is humanity\'s greatest threat. Very soon, storms and droughts will be stronger and more widespread. Unchecked, the human and economic damage shall be enormous – unless we act now.');
		},   
		function(){
			$('#mainbannerimg').stop().animate({"opacity": "1"}, "slow");
		}
	);
	
	$("#btnFishSchool").hover(
		function(){
           $('#mainbannerimg').css('background-image', 'url(_imgs/mainbanner_fishschool.jpg)');
		   $('#headline').html('Food Security');
		   $('#subtext').html('Conserving coral reefs secures tomorrow’s sources of food. A single-square kilometer of healthy coral reef can produce as much as 30-tonnes of seafood yearly.');
		},   
		function(){
			$('#mainbannerimg').stop().animate({"opacity": "1"}, "slow");
		}
	);
	
	$("#btnWhaleShark").hover(
		function(){
           $('#mainbannerimg').css('background-image', 'url(_imgs/mainbanner_whaleshark.jpg)');
		   $('#headline').html('Biodiversity Conservation');
		   $('#subtext').html('Saving endangered species improves lives.');
		},   
		function(){
			$('#mainbannerimg').stop().animate({"opacity": "1"}, "slow");
		}
	);
	
	$("#btnWater").hover(
		function(){
           $('#mainbannerimg').css('background-image', 'url(_imgs/mainbanner_water.jpg)');
		   $('#headline').html('Water Management');
		   $('#subtext').html('Water is the most important resource in the world. Though over 70% of the planet is covered in water, less than 1% is available for human consumption.');
		},   
		function(){
			$('#mainbannerimg').stop().animate({"opacity": "1"}, "slow");
		}
	);
	
	$("#btnHamilo").hover(
		function(){
           $('#mainbannerimg').css('background-image', 'url(_imgs/mainbanner_1.jpg)');
		   $('#headline').html('Sustainable Development');
		   $('#subtext').html('WWF works with major land development companies to ensure that ecological footprint concepts and social equity are integrated into all residential and commercial development projects.');
		},   
		function(){
			$('#mainbannerimg').stop().animate({"opacity": "1"}, "slow");
		}
	);
	
	$("#btnTeacher").hover(
		function(){
           $('#mainbannerimg').css('background-image', 'url(_imgs/mainbanner_teacher.jpg)');
		   $('#headline').html('Environmental Education');
		   $('#subtext').html('WWF embarks on various education campaigns. For over a decade, its environmental education programmes have been teaching children of all ages eco-solutions – forming a new corps of eco-warriors for the next generation. ');
		},   
		function(){
			$('#mainbannerimg').stop().animate({"opacity": "1"}, "slow");
		}
	);
	
});

