somebody help bind this code to that tag <?php get_footer(); ?> in the file plugin_prettyphoto.php
I want to put all the scripts at the bottom of the template
Code:
<script type="text/javascript">
$(document).ready(function(){
var $sel = $("a[rel='prettyPhoto[<?php echo $id; ?>]']");
<?php i18n_gallery_replace_nojs_links($gallery, '$sel'); ?>
$sel.prettyPhoto({
<?php if (i18n_gallery_check($gallery,'autostart',false) && $pic == null) echo "autoplay_slideshow: true, "; ?>
<?php if (@$gallery['theme']) echo "theme: ".json_encode($gallery['theme']).", "; ?>
<?php if (intval(@$gallery['interval'])) echo "slideshow: ".intval(@$gallery['interval']).", "; ?>
social_tools: false
<?php foreach ($gallery as $key => $value) if (substr($key,0,2) == 'x-') { ?>
,<?php echo substr($key,2); ?>: <?php echo preg_match('/^(null|true|false|\d+)$/',$value) ? $value : json_encode($value); ?>
<?php } ?>
});
<?php if (i18n_gallery_is_goto_image($pic)) { ?>
if (window.location.href.indexOf('#') < 0) $("a[rel='prettyPhoto[<?php echo $id; ?>]']:eq(<?php echo (int) $pic; ?>)").trigger('click');
<?php } else if (i18n_gallery_check($gallery,'autostart',false)) { ?>
if (window.location.href.indexOf('#') < 0) $("a[rel='prettyPhoto[<?php echo $id; ?>]']:eq(0)").trigger('click');
<?php } ?>
<?php if ($pageSize >= 1) { ?>
$('.gallery-<?php echo $id; ?>').pagify({ pageSize:<?php echo $pageSize; ?>, items:'.gallery-thumb'});
<?php } ?>
});
</script>
I want to put all the scripts at the bottom of the template