$(document).ready(function(){
	
	// remove words in input boxes on focus
	$("input#UserName").focus(function() {  
        if (this.value == "Username"){  
            this.value = '';  
        } 
    });
	$("input#Password").focus(function() {  
        if (this.value == "Password"){  
            this.value = '';  
        } 
    });
	$("input#Keywords").focus(function() {  
        if (this.value == "Search"){  
            this.value = '';  
        } 
    });
	
	// validate form#enquiry_form on keyup and submit	
	if ( $("#contact_form").length > 0 ) {
	
		// validate contact_form form on keyup and submit
		$("#contact_form").validate({

			// rules for field names
			rules: {
			
				f_first_name: "required", 
				f_last_name: "required", 
				f_email: { required: true, email: true },
				f_company: "required", 
				f_position: "required", 
				f_location: "required", 
				f_phone: "required", 
				f_address: "required" // no comma on last var or IE cracks it
			
			}

		});
	
	}
	
});