Fixed two jQuery plugin issues.

Fixed bug where jQuery plugin would break attr function in jQuery 1.7.2.
Fixed so encoding option gets applied when using jQuery val() or attr() to
extract the contents.