$(document).ready( function()
{
	$('form.search').validate();
	$('form.notify').validate({
								submitHandler : handleSubmitForm
								});
});

function handleSubmitForm( form )
{
	if( $('input[name="email"]' , form ).attr( 'value' ) == $('input[name="email_confirm"]' , form ).attr( 'value' ) )
	{
		form.submit();
	}
	else
	{
		$('span#email_confirm_error' , form ).text( 'email does not match' );
	}
}
