Cursor Magnifier won't work in both Moz and Webkit browsers

I am having difficulty getting the cursor to turn into a magnifier in both Mozilla and Webkit browsers. In the js file, I have this line

cursorcss: 'url(magnify.cur), -moz-zoom-in', //Value for CSS's 'cursor' attribute, added to original image

which works fine with Firefox, however if I do this, neither of them work.

cursorcss: 'url(magnify.cur), -webkit-zoom-in, -moz-zoom-in', 

I can only get one or the other to work, not both at the same time.

I also tried adding this into the html file

 <script type="text/javascript">
$("img").css('cursor', function() {
             if (jQuery.browser.mozilla) {
                return '-moz-zoom-in';
            }
            else if (jQuery.browser.webkit) {
                return '-webkit-zoom-in';
            }
            else {
               return 'pointer'; 
            }
        });
</script>

but that did not work with either of the browsers.

Can anyone tell me how to get this to work?

Thank you for that, it’s perfect.

In css 2 rules

img {cursor:url(magnify.cur),-webkit-zoom-in;}
img {cursor:url(magnify.cur), -moz-zoom-in;}

Also the jQuery script works just return including the image

return 'url(magnify.cur), -moz-zoom-in';

The css works as given.

For the jQuery:

 <script type="text/javascript">
$("img").css('cursor', function() {
             if (jQuery.browser.mozilla) {
                return '[COLOR="Blue"]url(magnify.cur),[/COLOR] -moz-zoom-in';
            }
            else if (jQuery.browser.webkit) {
                return '[COLOR="Blue"]url(magnify.cur),[/COLOR] -webkit-zoom-in';
            }
            else {
               return 'pointer'; 
            }
        });
</script>

Thank you for your reply, can you be a little more explicit? I tried various versions of your suggestions with no success. I am a JS noob.
Thanks