window.addEvent('domready', function() {
	
	// The slideshow
	if (typeof(wpshow_page12) == 'undefined'){
	
		// The options for the slideshow
		wpoptions_page12 = new Hash({width: 200,height: 101,resize: false,replace: [/(\.[^\.]+)$/, '$1'],captions: true,controller: false,random: false,paused: false,preload: false,overlap: true,loop: true,delay: 2000,duration: 4000,pan: 100,zoom: [50, 50],color: '#FFFFFF',thumbnails: false,thumbnailsOnTopOrBottom: true,thumbnail_width: 40,thumbnail_height: 40,thumbnail_offset: 20,linked: false,loader: {'animate': ['files/loader-#.png', 12]},classes: [	 'slideshow-page12', '', '', '',	 '', '', '', '',	 '', '', '', '',	 '', '', '', '']});
	
		// If thumbnails are enabled
		var thumbnails_enabled = wpoptions_page12.thumbnails;
	
		// If thumbnails are on top
		var thumbnailsOnTopOrBottom = wpoptions_page12.thumbnailsOnTopOrBottom;
	
		// The thumbnail
		var thumbnail = $$('.slideshow-page12-thumbnails ul li')[0];
		var thumbnail_height = wpoptions_page12.thumbnail_height;
		var thumbnail_width = wpoptions_page12.thumbnail_width;
		var toffset = wpoptions_page12.thumbnail_offset;

		wpshow_page12 = new Slideshow.KenBurns('weaverpix-page12-slideshow', false, wpoptions_page12.getClean());
	
		// The total number of images
		if (thumbnails_enabled) {
			var count = wpshow_page12.data.images.length;
			$$('.slideshow-page12-thumbnails ul').each(function(el) {
			  var width = thumbnail_width + toffset;
			  var height = thumbnail_height + toffset;
	  
			  if (thumbnailsOnTopOrBottom) {
				width = width * count;
			  } else {
				height = height * count;
			  }
	  
			  el.setStyles({'width': width, 'height': height});
			});
		}
	}
});
