(Bug 4816) Use .prop instead of .attr

Adjustment for jQuery 1.6+, which makes .attr applicable only for HTML
attributes and .prop the one to use for Javascript properties.
Merge pull request #200 from afuna/randomicon-bug4816

(Bug 4816) Use .prop instead of .attr