jQuery(function( $ ){
	$.easing.backout = function(x, t, b, c, d){
		var s=1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	};
	$('#scroller').scrollShow({
		view:'#view',
		content:'#images',
		easing:'backout',
		wrappers:'link,crop',
		navigators:'a[id]',
		navigationMode:'sr',
		circular:true,
		start:0
	});
	$('#gallery-scroller').scrollShow({
		view:'#gallery-view',
		content:'#gallery-images',
		easing:'backout',
		wrappers:'link,crop',
		navigators:'a[id]',
		navigationMode:'sr',
		circular:true,
		start:0
	});
 });


function IsEmpty(aTextField) {
   if((aTextField.value.length==0) ||
   (aTextField.value==null)) {
      return true;
   }
   else { return false; }
}
function checkForm(form) {
	var error = "0";
	var errors = "The following errors occured:\n\n";	
	if (IsEmpty(form.name)) {
		error = "1";
		errors += "- Please enter your name\n";
	}
	if (IsEmpty(form.email)) {
		error = "1";
		errors += "- Please enter your email address\n";
	}
	if (IsEmpty(form.subject)) {
		error = "1";
		errors += "- Please enter a subject to your enquiry\n";
	}
	if (IsEmpty(form.message)) {
		error = "1";
		errors += "- Please enter your message/question\n";
	}
	if (error == "1") {
		alert(errors);
		return false;
	}
	return true;
}