$(document).ready(function(){
	// Add a lil form bot trap and then add the ajax snazziness
	if ($('#signup').length>0)
	{
		$('#signup').append('<input type="hidden" name="secretsquirrel" value="ihatebots" />');
		$('#signup').FormValidate({
			phpFile: "/ajax/contact.php",
			ajax: true
		});
	}
	
	removeBG();
	$(window).resize(removeBG);
});

Cufon.replace('h1, h2, .call span');


function removeBG()
{
	// This is a hack to remove the background dark fade when the page isn't tall enough
	var windowheight = $(window).height();
	var elemheight = $('body').height();
	if (elemheight <= windowheight){
		$('#container').css('background','none');
	}
}