window.addEvent('domready', function() {
	
	// The slideshow
	if (typeof(wpshow_page12) == 'undefined'){
	
		// The options for the slideshow
		wpoptions_page12 = new Hash({width: 130,height: 260,resize: 'fill',replace: [/(\.[^\.]+)$/, '$1'],captions: false,controller: false,random: false,paused: false,preload: true,overlap: true,loop: true,delay: 0,duration: 4000,pan: 100,zoom: [0, 0],color: '#FFFFFF',thumbnails: false,thumbnailsOnTopOrBottom: true,thumbnail_width: 70,thumbnail_height: 40,thumbnail_offset: 20,linked: false,loader: {'animate': ['index_files/block_3/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('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});
			});
		}
	}
});
