Jquery function doesn't work properly
<p>My page protection JS file looks like that</p>

<pre><code>(function($){
$.fn.disableSelection = function() {
    return this.each(function() {           
        $(this).attr('unselectable', 'on')
               .css({
                   '-moz-user-select':'none',
                   '-webkit-user-select':'none',
                   'user-select':'none',
                   '-ms-user-select':'none'
               })
               .each(function() {
                   this.onselectstart = function() { return false; };
               });
    });
};
})(jQuery);

var message="Bu səhifədən material kopyalamaq qadağandır!"; 

function clickIE4(){
    if (event.button==2){
        alert(message);
        return false;
    }
}
function clickNS4(e){
    if (document.layers||document.getElementById&amp;&amp;!document.all){
        if (e.which==2||e.which==3){
            alert(message);
            return false;
        }
    }
}
if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS4;
} else if (document.all&amp;&amp;!document.getElementById){
    document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
</code></pre>

<p>All functions work well except $.fn.disableSelection . It must disable selection. But I can select any piece of text. What am I missing?</p>
