window.addEvent('domready', function() {
	
	// The data for the slideshow
	var wpdata_page3 = new Hash({'files/73CA0AA5-scraper-07.jpg':{caption: 'scraper-07.jpg', href: 'files/73CA0AA5-scraper-07.jpg', thumbnail: 'files/73CA0AA5-scraper-07-t.jpg', target: '_self'},'files/0D9EF258-scraper-01.jpg':{caption: 'scraper-01.jpg', href: 'files/0D9EF258-scraper-01.jpg', thumbnail: 'files/0D9EF258-scraper-01-t.jpg', target: '_self'},'files/98760D56-scraper-02.jpg':{caption: 'scraper-02.jpg', href: 'files/98760D56-scraper-02.jpg', thumbnail: 'files/98760D56-scraper-02-t.jpg', target: '_self'},'files/CBCF9378-scraper-03-Edit.jpg':{caption: 'scraper-03-Edit.jpg', href: 'files/CBCF9378-scraper-03-Edit.jpg', thumbnail: 'files/CBCF9378-scraper-03-Edit-t.jpg', target: '_self'},'files/344F454B-scraper-04-Edit.jpg':{caption: 'scraper-04-Edit.jpg', href: 'files/344F454B-scraper-04-Edit.jpg', thumbnail: 'files/344F454B-scraper-04-Edit-t.jpg', target: '_self'},'files/6AD51491-scraper-05.jpg':{caption: 'scraper-05.jpg', href: 'files/6AD51491-scraper-05.jpg', thumbnail: 'files/6AD51491-scraper-05-t.jpg', target: '_self'},'files/C9D31E34-scraper-07-Edit.jpg':{caption: 'scraper-07-Edit.jpg', href: 'files/C9D31E34-scraper-07-Edit.jpg', thumbnail: 'files/C9D31E34-scraper-07-Edit-t.jpg', target: '_self'},'files/95473AC2-scraper-09.jpg':{caption: 'scraper-09.jpg', href: 'files/95473AC2-scraper-09.jpg', thumbnail: 'files/95473AC2-scraper-09-t.jpg', target: '_self'},'files/25CD910F-scraper-011.jpg':{caption: 'scraper-011.jpg', href: 'files/25CD910F-scraper-011.jpg', thumbnail: 'files/25CD910F-scraper-011-t.jpg', target: '_self'}});
	
	// The options for the slideshow
	var wpoptions_page3 = new Hash({width: 430,height: 540,resize: false,captions: false,controller: true,random: false,paused: false,preload: false,overlap: false,loop: true,delay: 4000,duration: 2000,pan: 100,zoom: 50,color: '#FFFFFF',thumbnails: false,thumbnailsOnTopOrBottom: true,thumbnail_width: 60,thumbnail_height: 60,linked: true,loader: {'animate': ['files/loader-#.png', 12]},classes: [	 'slideshow-page3', '', '', '',	 '', '', '', '',	 '', '', '', '',	 '', '', '', '']});
	
	// If thumbnails are enabled
	var thumbnails_enabled = wpoptions_page3.thumbnails;
	
	// If thumbnails are on top
	var thumbnailsOnTopOrBottom = wpoptions_page3.thumbnailsOnTopOrBottom;
	
	// The thumbnail
	var thumbnail = $$('.slideshow-page3-thumbnails ul li')[0];
	var thumbnail_height = wpoptions_page3.thumbnail_width;
	var thumbnail_width = wpoptions_page3.thumbnail_height;
	
	// The thumbnail div
	/*var thumbnail_wrapper = $$('.slideshow-page3-thumbnails ul')[0];
	var thumbnail_wrapper_height = thumbnail_wrapper.getStyle('height').toInt();
	var thumbnail_wrapper_width = thumbnail_wrapper.getStyle('width').toInt();*/
	
	if (typeof(wpember_page3) != 'undefined') {
		wpdata_page3.combine(wpember_page3);
	}
	
	if (typeof(wpflickr_page3) != 'undefined') {
		wpdata_page3.combine(wpflickr_page3);
	}
	
	if (typeof(wplocal_page3) != 'undefined') {
		wpdata_page3.combine(wplocal_page3);
	}
	
	if (typeof(wppicasa_page3) != 'undefined') {
		wpdata_page3.combine(wppicasa_page3);
	}
	// The slideshow
	wpshow_page3 = new Slideshow.KenBurns('weaverpix-page3-slideshow', wpdata_page3.getClean(), wpoptions_page3.getClean());
	
	// The total number of images
	if (thumbnails_enabled) {
		var count = wpdata_page3.getLength();
		$$('.slideshow-page3-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_page3;
	var sb_page3 = SqueezeBox.assign($$('#weaverpix-page3-slideshow .slideshow-page3-images a'), {
		onOpen: function() {
			sb_state_page3 = wpshow_page3.paused;
			wpshow_page3.pause(1);
		},
		onClose: function() {
			wpshow_page3.pause(sb_state_page3);
		}
	});
});


