Use {literal}
before using any {
or }
and use {/literal}
after using {
or }
because text between {
and }
in template are spoused to be default keywords defined in phpfox libraries.
For Example you will type your current code as below :
{literal}
<script>
$(document).ready(
function() {
$('html').niceScroll();
}
);
</script>
{/literal}
And you can also try {r}
for {
and {l}
for }
Like as below :
<script>
$(document).ready(
function() {r}
$('html').niceScroll();
{l}
);
</script>