// last updated by david 05/12/2009

$(document).ready(function(){
	
	// remove words in input box on focus
	$("input#f_email").focus(function() {  
        if (this.value == "Enter email address"){  
            this.value = '';  
        } 
    });
	
	// remove words in input box on focus
	$("input#f_keywords").focus(function() {  
        if (this.value == "Enter search terms"){  
            this.value = '';  
        } 
    });
	
	// validate contact_form form on keyup and submit
	$("#subscribe_form").validate({

		// rules for field names
		rules: {
			
			f_email: { required: true, email: true } // no comma on last var or IE cracks it
			
		}

	});
	
	// validate contact_form form on keyup and submit
	$("#contact_form").validate({

		// rules for field names
		rules: {
			
			f_name: "required", 
			f_company: "required", 
			f_phone: "required", 
			f_email: { required: true, email: true },
			f_enquiry: "required" // no comma on last var or IE cracks it
			
		}

	});
	
});