jquery change img attribute name without loosing atribute values
<h2>Background</h2>

<p>I generate dynamic php gallery in which it is possible to drag images by using jquery UI.</p>

<p>All images has option to be cropped.</p>

<p>Image that are listed first in a gallery are the "title image" of the gallery and have a different crapping ratio as non "title images".</p>

<h2>Problem</h2>

<p>I echo out all images with attribute <code>'ondblclick="open_original=(21, 153)"'</code>.
I need to figure out how i can change <code>open_original</code> to <code>open_original_main</code> only for the first images of the gallery so they can have different cropping ratio.</p>

<p>If I use <code>.attr()</code> then i lose all my attribute values and i cant get them back. Is there any way to just replace their function names?</p>

<p>My jquery for this problem so far:</p>

<pre><code>$(".galOf .gallery_nav:first-child .img_thumb img").ready(function(){
    $(this.ondblclick).replace("open_original","open_original_main");
});
</code></pre>

<p>I know <code>.replace()</code> is not a function, just read info....</p>
