function clearBox(input) {
	if(input.value=input.defaultValue) {
		input.value = '';
		input.style.color = '#333';
	}
}

function resetBox(input) {
	if(!input.value) {
		input.value = input.defaultValue;
		input.style.color = '#ccc';
	}
}

function validateEmail(email){
	var myEmail = email.value;

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myEmail))){
		alert('Please enter a valid email address');
		return false;
	}

	return true;
}

function loadMap() {
  if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"));
		var point = new GLatLng(51.4628, -0.13909);
		
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(point, 15);
	
		function createMarker(point, html) {
			var marker = new GMarker(point);
			marker.openInfoWindowHtml(html);
			return marker;
		}
	
		map.addOverlay(createMarker(point, '<strong>Bamboo Travel Ltd</strong><br />Spectrum House<br />Bromell\'s Road. SW4 0BN'));

  }
}

// user on enquiries form to check the value of
// the title select. if the value equals other
// then show the alt_title input box
function checkTitleValue(title) {
	if(title == 'other') {
		$('#alt_title').show();
	}
	else {
		$('#alt_title input').val('');
		$('#alt_title').hide();
	}
	return false;
}

$(function() {
	$('#evoluted img').css( "opacity", 0.30 );
	$('a#evoluted')
		.mouseover(function() {
												$(this).children().stop().animate( {opacity: 1}, 750 ) 
												})
		.mouseout(function() { 
												$(this).children().stop().animate( {opacity: 0.30}, 750 ) 
												});
});

