Added IE8 compatibility using jQuery.