node–.tpl.php and colorbox

Hi there, I’m using colorbox inside the node. The issue is when inside the colorbox I’m trying to generate an <script> jQuery(‘a.reference<?php print $i ?>’).colorbox( { opacity:0.25, html: “<div><strong>Book Title: </strong><?php if (property_exists($noderef, ‘field_references_booktitle’)) {print $noderef->title_field[‘und’][0][‘value’];} ?></div>”+ “<div><strong>Author: </strong><?php if (property_exists($noderef, ‘field_references_author’)) { print $noderef->field_references_author[‘und’][0][‘value’];[…]