It would be easier for the script to simply add a css class in the body tag based on the template id. Then use that class to style in css whatever elements on the page you want to style.
Code:
<script>$(document).ready(function(){
$('body').addClass('pagetemplate-', pageData['pagetemplateid']);
});
</script>
Then in CSS:
Code:
.pagetemplateid-93 #outer-wrapper {
background-color: red;
}