Change latin numbers to arabic number by javascript
<p>I have a clock with javascript i want change  latin numbers this clock to arabic number by javascript, i tried as following code, but it doesn't work true. How can fix it?</p>

<p><strong>DEMO:</strong> <a href="http://jsfiddle.net/NdzHg/" rel="nofollow">http://jsfiddle.net/NdzHg/</a></p>

<pre><code>&lt;script type="text/javascript"&gt;
    var interval = self.setInterval("clock()", 1000);
    function clock() {
    var rep = {
        '0': '&amp;#1776;',
        '1': '&amp;#1777;',
        '2': '&amp;#1778;',
        '3': '&amp;#1779;',
        '4': '&amp;#1780;',
        '5': '&amp;#1781;',
        '6': '&amp;#1782;',
        '7': '&amp;#1783;',
        '8': '&amp;#1784;',
        '9': '&amp;#1785;',
    }

        var date = new Date();
        var hourOffset = 4;
        date.setUTCHours(date.getUTCHours(), date.getUTCMinutes());
        var time = date.getTime();
        date.setUTCFullYear(date.getUTCFullYear(), 3, 21);
        var dstStart = date.getTime();
        date.setUTCFullYear(date.getUTCFullYear(), 9, 22);
        var dstEnd = date.getTime();
        if (time &gt; dstStart &amp;&amp; time &lt; dstEnd){ hourOffset = 4;}
        date.setUTCHours(date.getUTCHours() + hourOffset, date.getUTCMinutes() + 30);
        var output = date.getUTCHours() + ":" + date.getUTCMinutes() + ":" + date.getUTCSeconds();
    for (key in rep) {
        str = output.split(key).join(rep[key]);
    }
        $("#clock").html(str);
    }
&lt;/script&gt;
&lt;div id="clock"&gt;&lt;/div&gt;
​
</code></pre>
