window.addEvent('domready', function() {
	
	// The data for the slideshow
	var wpdata_page5 = new Hash({'index_files/5DF680F3-CindyPic3.jpg':{caption: 'CindyPic3.jpg', href: 'index_files/5DF680F3-CindyPic3.jpg', thumbnail: 'index_files/5DF680F3-CindyPic3-t.jpg'},'index_files/852906A5-CindyPic4.jpg':{caption: 'CindyPic4.jpg', href: 'index_files/852906A5-CindyPic4.jpg', thumbnail: 'index_files/852906A5-CindyPic4-t.jpg'},'index_files/CDEC8744-CindyPic5.jpg':{caption: 'CindyPic5.jpg', href: 'index_files/CDEC8744-CindyPic5.jpg', thumbnail: 'index_files/CDEC8744-CindyPic5-t.jpg'},'index_files/0ED08695-CindyPic6.jpg':{caption: 'CindyPic6.jpg', href: 'index_files/0ED08695-CindyPic6.jpg', thumbnail: 'index_files/0ED08695-CindyPic6-t.jpg'},'index_files/78568F5C-GaryCindyOct09.jpg':{caption: 'GaryCindyOct09.jpg', href: 'index_files/78568F5C-GaryCindyOct09.jpg', thumbnail: 'index_files/78568F5C-GaryCindyOct09-t.jpg'}});
	
	// The options for the slideshow
	var wpoptions_page5 = new Hash({width: 300,height: 300,resize: 'width',captions: false,controller: true,random: false,paused: false,preload: false,overlap: true,loop: true,delay: 4000,duration: 1000,pan: 100,zoom: 50,color: '#FFFFFF',thumbnails: false,thumbnailsOnTopOrBottom: true,thumbnail_width: 60,thumbnail_height: 60,linked: true,loader: {'animate': ['index_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);
	}
	
	if (typeof(wppicasa_page5) != 'undefined') {
		wpdata_page5.combine(wppicasa_page5);
	}
	// The slideshow
	wpshow_page5 = new Slideshow('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});
	});
});
window.addEvent('domready', function() {
	var sb_state_page5;
	var sb_page5 = SqueezeBox.assign($$('#weaverpix-page5-slideshow .slideshow-page5-images a'), {
		onOpen: function() {
			sb_state_page5 = wpshow_page5.paused;
			wpshow_page5.pause(1);
		},
		onClose: function() {
			wpshow_page5.pause(sb_state_page5);
		}
	});
});


