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

		wpshow_page13 = new Slideshow.Flash('weaverpix-page13-slideshow', false, wpoptions_page13.getClean());
	
		// The total number of images
		if (thumbnails_enabled) {
			var count = wpshow_page13.data.images.length;
			$$('.slideshow-page13-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});
			});
		}
	}
});
