In the head of your page between your script tags you should just have the event listener, it shouldn't be inside anything else. Here is how it should look:
<script>
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
initalizeData();
FastClick.attach(document.body);
startSnapper();
$('input[name=topcoat]').change(function(){schoolValueChanged() });
}
</script>
That's the way I've seen it in the documentation and that's the way I've done it in all of my Cordova projects. And if you're using any other event listeners they should be added after deviceready is called.