Error in attr when adding function to Object.prototype

Error in attr when adding function to Object.prototype

I have some code where I add a function to object prototype like:
     Object.prototype.merge= (function (object) {
        ...
     });
However, if i use this code with jquery (1.3.2) and then try to use the attr() operator to set an attribute value, it throws an error because (line 1026) tries to call:
<span class="sourceRowText"><span class="whitespace"></span><span class="js-variable">     elem</span><span class="js-punctuation">.</span><span class="js-property">setAttribute</span><span class="js-punctuation">( </span><span class="js-variable">name</span><span class="js-punctuation">, </span><span class="js-string">"" </span><span class="js-operator">+ </span><span class="js-variable">value </span><span class="js-punctuation">)</span><span class="js-punctuation">; 
for all properties of the object including the 'merge' function declared above. </span></span><span class="sourceRowText"><span class="js-punctuation">(where name is now the merge'()' function declared above)</span></span>