window.addEvent('domready', function() {
	
	// The data for the slideshow
	var wpdata_page5 = new Hash({'files/76D656D5-Banner1.jpg':{caption: 'Haitian American Nursing Association', href: '../gallery/gallery.php', thumbnail: 'files/76D656D5-Banner1-t.jpg'},'files/0EBF4022-Banner2.jpg':{caption: 'Special Mission to Haiti', href: '../gallery/gallery.php', thumbnail: 'files/0EBF4022-Banner2-t.jpg'},'files/19C83D7B-Banner3.jpg':{caption: 'Click here to view the Gallery', href: '../gallery/gallery.php', thumbnail: 'files/19C83D7B-Banner3-t.jpg'}});
	
	// The options for the slideshow
	var wpoptions_page5 = new Hash({width: 480,height: 150,resize: false,captions: true,controller: false,random: false,paused: false,preload: false,overlap: true,loop: true,delay: 2000,duration: 1000,pan: 100,zoom: 50,color: '#FFFFFF',thumbnails: true,thumbnailsOnTopOrBottom: false,thumbnail_width: 70,thumbnail_height: 70,linked: false,loader: {'animate': ['files/loader-#.png', 12]},classes: [	 'slideshow-page5', '', '', '',	 '', '', '', '',	 '', '', '', '',	 '', '', '', '']});
	
	// If thumbnails are enabled
	var thumbnails_enabled = wpoptions_page5.thumbnails;
	
	// If thumbnails are on top
	var thumbnailsOnTopOrBottom = wpoptions_page5.thumbnailsOnTopOrBottom;
	
	// The thumbnail
	var thumbnail = $$('.slideshow-page5-thumbnails ul li')[0];
	var thumbnail_height = wpoptions_page5.thumbnail_width;
	var thumbnail_width = wpoptions_page5.thumbnail_height;
	
	// The thumbnail div
	/*var thumbnail_wrapper = $$('.slideshow-page5-thumbnails ul')[0];
	var thumbnail_wrapper_height = thumbnail_wrapper.getStyle('height').toInt();
	var thumbnail_wrapper_width = thumbnail_wrapper.getStyle('width').toInt();*/
	
	if (typeof(wpember_page5) != 'undefined') {
		wpdata_page5.combine(wpember_page5);
	}
	
	if (typeof(wpflickr_page5) != 'undefined') {
		wpdata_page5.combine(wpflickr_page5);
	}
	
	if (typeof(wplocal_page5) != 'undefined') {
		wpdata_page5.combine(wplocal_page5);
	}

	// The slideshow
	wpshow_page5 = new Slideshow.KenBurns('weaverpix-page5-slideshow', wpdata_page5.getClean(), wpoptions_page5.getClean());
	
	// The total number of images
	var count = wpdata_page5.getLength();
	$$('.slideshow-page5-thumbnails ul').each(function(el) {
	  var width = thumbnail_width;
	  var height = thumbnail_height;
	  
	  if (thumbnailsOnTopOrBottom) {
		width = width * count;
	  } else {
		height = height * count;
	  }
	  
	  el.setStyles({'width': width, 'height': height});
	});
});