Fixed plugin for jQuery 1.9 compatability