I am using this way to display content in Lightbox:

<a href="search.php" rel="lightmodal">Search</a>

It works OK, but only when this link is loaded with whole page. When I create this link with ajax, lightbox for this link doesn't work. Is there any workaround?
thanks
Tomas