convert Jquery code to javascript
<p>Please can any body convert this small code to javascript?</p>

<pre><code>(function($) {
    $(document).ready(function(){
        $("p").click(function () {
            $("p").filter(function(){
                return ($(this).text().search(/(أ|ب|ت|ث|ج|ح|خ|د|ذ|ر|ز|س|ش|ص|ض|ط|ظ|ع|غ|ف|ق|ك|ل|م|ن|ه|و|ي)/) &gt; -1);
            }).addClass("rtl");
        });
    });
})(jQuery);
</code></pre>

<p>I attached this code with jQuery to Google Chrome Extension to fix direction to be RTL when detect Arabic language but it isn't worked when the website contain jQuery version</p>

<p>Please help</p>
