function verifyForm() {
	var sError='';
	if(document.enquiry.Name.value.length==0) sError += ' * You must enter your name.\n';
	if(document.enquiry.Email.value.length==0) sError += ' * You must enter your email address.\n';
	if(document.enquiry.Enquiry.value.length==0) sError += ' * You must enter an enquiry.\n'; 
	
	if(sError!='') {
		alert('The following errors have occured:\n\n' + sError);
		return false;
	}
	return true;
}


$(function() {

	var x = $('#product .images img');
	$('#product .images img').addClass('thumb');
	$('#product .images').append('<div id="mainimg" style="min-height: ' + x.clientHeight + ';"><img src="' + x.attr('src') + '" alt="" /></div>');
	
	$('#product .images').delegate('.thumb', 'click', function() {
		$('#mainimg img').attr('src', $(this).attr('src'));
	});

	// Placeholder support for older browsers
	if (!supportsPlaceholder()) {
		
		// Unsupported so roll our own
		$('input[type=text][placeholder]').each(function() {
			
			// Set them up for page load
			if ($(this).val() == '')
				$(this).val($(this).attr('placeholder')).addClass('placeholder');

			// Add focus event
			$(this).focus(function() {
				if ($(this).val() == $(this).attr('placeholder')) {
					$(this).val('');
					$(this).removeClass('placeholder');
				}
			});

			// Add blur event
			$(this).blur(function() {
				if ($(this).val().length == 0) {
					$(this).val($(this).attr('placeholder'));
					$(this).addClass('placeholder');
				}
			});

		});

		// Form submit placeholder replace
		$('form').submit(function() {
			
			// Loop through all text inputs in the form with a placeholder
			$(this).find('input[type=text][placeholder]').each(function () {
				
				// If the value is the placeholder, remove it
				if ($(this).attr('placeholder') == $(this).val())
					$(this).val('');

			});

		});

	}

});

// Check for browser placeholder support, return boolean
function supportsPlaceholder() {
	var e = document.createElement('input');
	return 'placeholder' in e;
}
