Get specified texts in a div, than search for them in a different div
<p>I am trying to get texts from a div, than i want to search for these titles on the same page, but in a different div. And if one of the title exist there, i want to put some text after it. I tried to do it, but i don't know what is the problem. Last time i tried it with this jquery code:</p>

<pre><code>var cim = $.trim($('.hirblokk span.comments:contains("új")').parent(".hirblokk").children("h3").text());
jQuery.each(cim, function(X) {
    $("ul.s_hir.show li.hir a:contains(X)").find("small").append(" (Új!)");
    return (this == cim.length);
});
</code></pre>

<p>As you can see i put the texts what i wanted to 'cim'(it is working). Than i tried (line 3) to check if one of the  'ul.s_hir.show li.hir a' contains one of the text, and if it containes, i put (append) something in the small tag (there is a small tag inside a tag : Text..)(this is not working). I tried it in more ways, but none of them worked.
If i write:</p>

<pre><code>$("ul.s_hir.show li.hir a:contains(a)").find("small").append(" (Új!)");
</code></pre>

<p>than it will put ' (Új)' after every <em>small</em> tag when the <em>a</em> contains a character. So it looks like the problem is how i want to check if it <em>a</em> contains one of the text.
Oh, and i can get more than whan text for example: 'I am new' and 'Oh, hello darling' and only one of them contains *ul.s_hir.show li.hir a*</p>
