
$(document).ready(function() {             
              
	// open "external" links in a new window (standards compliant XHTML strict)
	$('a[rel=external]').click(function(evt) {
		window.open($(this).attr('href'));
		return false;
	});
			              
	
	// forms
	$("form .button input").hover(function() {
		$(this).addClass('hover');
	},function(){
		$(this).removeClass('hover');
	});

	$("form input").focus(function() {
		$(this).addClass('active');
	});
	
	$("form input").blur(function() {
		$(this).removeClass('active');
	});

	$("form textarea").focus(function() {
		$(this).addClass('active');
	});
	
	$("form textarea").blur(function() {
		$(this).removeClass('active');
	});

	$('form.validate').validate();
	
	//hide email and add the hidden email_To on submit
  $(".form-email").submit(function() {
    var s1 = 'info';
    var s2 = '@';
    var s3 = 'sprintenergy.com.au';
    $(this).append('<input type="hidden" name="recipient" value="' + s1 + s2 + s3 + '" />');
  });
  
	

});
