var pipwerks = {
	validate_comments: function (){
		var comment = document.getElementById("comment"),
			author = document.getElementById("author"),
			email = document.getElementById("email"),
			code = document.getElementById("code");
		var no_go = function (field, msg){
			alert(msg);
			field.focus();
			return false;
		};
		if(!comment.value){ return no_go(comment, "Please enter a comment"); }
		if(!author.value){ return no_go(author, "Please enter your name"); }
		if(!email.value){ return no_go(email, "Please enter your email address so we know you're not a spammer. We'll keep it private, we promise."); }
		if(email.value.indexOf("@") === -1 || email.value.indexOf(".") === -1){ return no_go(email, "Please enter a valid email address."); }
		if(!code.value){ return no_go(code, "Please enter the secret code so we know you're not a spammer."); }
		if(!/^hutchison$/i.test(code.value)){ 
			return no_go(code, "Please let us know you're not a spam-bot by entering the correct anti-spam code.");
		}
		return true;
	}
};

//Google Analytics
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1394306-2']);
_gaq.push(['_trackPageview']);
(function() {
	var ga = document.createElement('script');
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	ga.setAttribute('async', 'true');
	document.documentElement.firstChild.appendChild(ga);
})();