jQuery(document).ready(function(){ function image(url,title,img) { this.url = url; this.title = title; this.img = img; } var slideshow_speed = 1000; var masthead_images = new Array(1); masthead_images[0] = new image('/photochristmascards/digitalphotocards.htm','','/images/bin/21.jpg'); function preload(masthead_images,f) { for (var i = 1; i < masthead_images.length; i++) { var img = new Image(691,323); img.src = masthead_images[i].img; var link = document.createElement('a'); link.setAttribute('href',masthead_images[i].url); link.setAttribute('title',masthead_images[i].title); var div = document.createElement('div'); div.setAttribute('class','eachSlide'); jQuery(div).append(img); jQuery(link).append(div); jQuery('#homeMainBox').append(link); } if (typeof f == "function") f(); } preload(masthead_images,function(){ if(masthead_images.length>1) { jQuery('#homeMainBox').append('
'); jQuery('#homeMainBox').cycle({ fx: 'fade', speed: 1000, timeout: 3000, pager: '#homeMainBoxNav', // callback fn that creates a thumbnail to use as pager anchor pagerAnchorBuilder: function(idx, slide) { return '' + slide.title + ''; }, slideExpr: 'a' }); } }) });