function changeCounty(val) {
	weatherFrame = document.getElementById("weather");
	weatherFrame.src = "http://news.bbc.co.uk/weather/forecast/" + val + "/Next3DaysEmbed.xhtml?target=_parent";
}

function initMenu() {
	$('#menu table').hide();
	$('#menu table:first').show();
	$('#menu li h3').click(
		function() {
			var checkElement = $(this).next();
			if ((checkElement.is('table')) && (checkElement.is(':visible'))) {
				return false;
			}
			if ((checkElement.is('table')) && (!checkElement.is(':visible'))) {
				$('#menu table:visible').slideUp('normal');
				checkElement.slideDown('normal');
				return false;
			}
		}
	);
}

function sendPage() {
	window.location = "mailto:?subject=" + document.title + "&body=I%20thought%20you%20might%20be%20interested%20in%20this%20page%20on%20the%20Hayes%20Fuels%20website%3A%0D%0A%0D%0APage%3A%20%20" + document.title + "%0D%0A%0D%0AAddress%3A%20%20" + window.location;
}

jQuery(document).ready(function($){

	var path = location.pathname.substring(0).toLowerCase();
	if (path != "/") {
		// we're not on the home page
		//$('#further-info').hide();
	}
	
	// hide sms details
	$("#sms-order").hide();
	
	//$(".products td").each(function(index) {
	//	if (index % 2 != 0) $(this).addClass('even');
	//})
								
	$('ul.sf-menu').superfish({disableHI:true});
	/*
	$('ul.sf-menu ul li:first-child').each(function() {
		$(this).addClass("first");
	});
	*/
	
	$(".sendtf").click(function() {
	//	sendPage();
	});
	
	$('#flash-banner').cycle({
		fx: 'fade',
		speed: 1500,
		timeout: 6000
	});

	// change z-indexes so IE behaves
	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
});
