Ok, so the script does run and output the class name in text correctly - so that's good. However, I can't get an additional class tag added for some reason.
Earlier today someone in the Shopify Forums suggest I try a jQuery snippet as follows:
var classes = ['foo', 'bar'];
$("body.templateIndex").addClass(classes[Math.floor(Math.random() * classes.length)]);
But still... no dice. If it helps, the page i'm working on is located here:
Any ideas would really be appreciated.