$(function(){
	//Cufon.replace('h1, h2, h3, #masthead h5, .bucket a');
	
	
	
	Cufon.replace('h1, h2, h3, #masthead h5, .bucket a', {
		hover: true
	});
	
	
	
	
if($('#rotate').length) {
	$('#rotate').cycle({
		cleartype:  true,
		cleartypeNoBg:  true,
}); 
 
}

//email spam protection - Example Markup: <span class="email">name[at]domain[dot]com</span>
$('.email').each(function() {
	var $email = $(this);
	var address = $email.text()
	.replace(/\s*\[at\]\s*/, '@')
	.replace(/\s*\[dot\]\s*/g, '.');
	$email.html('<a href="mailto:' + address + '">'+ address +'</a>');
});



//Dynamic Active State
$("#nav a").filter(function() {
	var currentURL = window.location.toString().split("/");
	return $(this).attr("href") == currentURL[currentURL.length-1];
	}).addClass("active");
	
	
	
	if($('form#request').length) {

	var Name = new LiveValidation('Name');
	Name.add( Validate.Presence );

	var Telephone = new LiveValidation('Telephone');
	Telephone.add( Validate.Presence );

	var Company = new LiveValidation('Company');
	Company.add( Validate.Presence );
	
	var Enquiry = new LiveValidation('Enquiry');
	Enquiry.add( Validate.Presence );
	
	

	var Email = new LiveValidation('Email');
	Email.add( Validate.Presence );
	Email.add( Validate.Email );

	}
	
	
	
});




