First, that is Javascript and not PHP.
Second, using Jquery selectors like that is incredibly slow, as you're essentially asking JQuery to find any and all elements on the page (not just form elements) that have an attribute called name that's equal to either 'email_1' or 'email_2'. To make it faster try:
$('input[name=email_1]')
It will run a lot more quickly and won't cause problems later with other elements on the page that have a matching name attribute. The key is to be specific with selectors in this order:
ID
tag
class
attribute
The code you've given won't work at all, and I'm surprised you don't see any errors in your browser. The quotes are all over the place and, well just and... Try something like this instead:
if($('input[name=email]').val() != $('input[name=email_1]').val())
As brad mentioned before as well, you need to do this again in PHP as well, because circumventing Javascript validation is as simple as turning it off in the browser.