You can use the following to check for specific value within the href of the a elements:
$("a[href*=mydomain]").click(function () {
this.target = "_blank";
});
This is not case insensitive though, I'm not sure that there is an easier way to do this other than parsing out the href, casing it and then comparing it. Sort of like this: