By Dimitri 14 April, 2009 - 14:45
<?php
drupal_add_js(path_to_theme() .'/jquery.cycle.js', 'theme');
drupal_add_js("
$(document).ready(function(){
$('#photos').cycle({
fx: 'fade',
speed: 2500,
timeout: 0,
pager: '#pnav'
});
});
", 'inline');
// set the name of the imagecache rule
$imagecache = 'page';
if (count($node->field_image) && $node->field_image[0]['fid'] != 0) {
if (count($node->field_image)> 1) {
$images = '<div id="photos" class="cycle">';
}
else {
$images = <div id="photos" class="single">?>