For all purposes and goals, you can have the attribute foo = "bar", and this will work anyway. This is how I would encode the inside of your jquery
<script type="text/javascript">
$(document).ready(function() {
$("#hidden_images a").fancybox();
$("#image_slider img").click(function(event) {
window.location = $("#" + $(event.target).attr("longdesc")).attr("href");
});
});
</script>
Works for me on safari, ff and chrome.
Derr, , , , ...
2 AHA Moment, .
$("#" + $(event.target).attr("longdesc")).fancybox().trigger("click");