Update file to use jQuery to get height and width

Use jQuery to get height and width of HTML DOM objects instead of directly pulling from HTML DOM.

I only did the change to the normal js and did not update the min.

Please review it and let me know if anything in my additional code looks like crap.