/**
*	Watermarks e.g. an input field with a custom image, div or whatever.
*	
*	@objectId	the css id of the input field
*	@bgPicId	the css id of the watermark
*/
function waterMark( objectId, bgPicId ){

		
};


/**
*	The main function. Runs everytime this file is loaded
*/
$(function(){
	
	bgPic 	= $( "#message_field_image" );
		
	$( "textarea" ).bind( 'click focus', function(){
		
		bgPic.css("display", "none");
	
	});
	
	
	$( "textarea" ).blur( function(){
	
		if( $( "textarea" ).val() == "" ){
			bgPic.css("display", "block");
		}
	
	});
	
	/* Form validation */
	$( "#frm_message" ).validate({
		errorElement: "div",
		
		rules: {
			message: "required",
		    email: {
			       required: true,
			       email: true
		     }
	   },
		
		messages:{
			message: "",
			email: {
				email: "",
				required: ""
			}
		}
	
	});


});