(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.