jQuery(document).ready(function() {
	if( jQuery('#slideshow').length ){
		jQuery(function() {
			jQuery('#slideshow').cycle({
					timeout: 6000,
					pager: '#nav',
					slideExpr: 'img'
				});
			}); 	
	}
	
	if( jQuery('#howItWorks').length ) {
		var arLink = new Array();
		var arTitle = new Array();
		arLink[0] = 'http://'+document.domain+'/'+jQuery("#howItWorks a.internal-link").attr('href');
		arLink[1] = 'http://'+document.domain+'/'+jQuery("#climateAndEnviroment a.internal-link").attr('href');
		arLink[2] = 'http://'+document.domain+'/'+jQuery("#valuableFertilizer a.internal-link").attr('href');
		arTitle[0] = jQuery("#howItWorks a.internal-link").attr('title');
		arTitle[1] = jQuery("#climateAndEnviroment a.internal-link").attr('title');
		arTitle[2] = jQuery("#valuableFertilizer a.internal-link").attr('title');
		jQuery("#howItWorks").attr("title",arTitle[0]);
		jQuery("#howItWorks").bind("click", function() {
			document.location.href = arLink[0];
		});
		jQuery("#climateAndEnviroment").attr("title",arTitle[1]);
		jQuery("#climateAndEnviroment").bind("click", function() {
			document.location.href = arLink[1];
		});
		jQuery("#valuableFertilizer").attr("title",arTitle[2]);
		jQuery("#valuableFertilizer").bind("click", function() {
			document.location.href = arLink[2];
		});
	}
	if(jQuery('#getInTouch').length){
		jQuery("#getInTouch").css('cursor','pointer');
		jQuery("#getInTouch").bind("click", function() {
			$link = jQuery("#getInTouch").find('a');
			document.location.href = $link.attr('href');
		});
	}
	if(jQuery('#getInTouch_sub1').length){
		jQuery("#getInTouch_sub1").css('cursor','pointer');
		jQuery("#getInTouch_sub1").bind("click", function() {
			$link = jQuery("#getInTouch_sub1").find('a');
			document.location.href = $link.attr('href');
		});
	}
	
});
