Changed implementation for rdiscount support

Implemented rdiscount support in main toc.js file