Added IE 8 support

Modified the code and added a jQuery replaceWith function call to add
support for IE 8