What you have posted is not PHP code but JQuery.
Try this instead:
<script type="text/javascript">
$("selector").threesixty({images:[array of images], method:'click', direction:'forward', sensibility: 1});
</script>
not sure about the [array of images] thing. I would assume that needs to be replaced with a javascript array with image URLs.