window.addEvent('domready', function() {
	
	// The data for the slideshow
	var wpdata_page0 = new Hash({'files/96FC91ED-S-ST2569_FiredSlate_Main.jpg':{caption: 'A company that comes highly recommended by customers for doing exactly what they say they will', href: 'files/96FC91ED-S-ST2569_FiredSlate_Main.jpg', thumbnail: 'files/96FC91ED-S-ST2569_FiredSlate_Main-t.jpg', target: '_self'},'files/14D34AE7-S_W2519_AgedHickory_ Main.jpg':{caption: 'Appreciated for their ability to live up to all expectations', href: 'files/14D34AE7-S_W2519_AgedHickory_ Main.jpg', thumbnail: 'files/14D34AE7-S_W2519_AgedHickory_ Main-t.jpg', target: '_self'},'files/40CF159A-FB13_MercuryFiber_Main.jpg':{caption: 'Offering excellent advise this very pleasant, friendly team provides a great service', href: 'files/40CF159A-FB13_MercuryFiber_Main.jpg', thumbnail: 'files/40CF159A-FB13_MercuryFiber_Main-t.jpg', target: '_self'},'files/F113ED82-S-W2524_WeatheredOak_XL_Cameo.jpg':{caption: 'Phill is a perfectionist in every way - he personally made an inspection both before the job and after completion', href: 'files/F113ED82-S-W2524_WeatheredOak_XL_Cameo.jpg', thumbnail: 'files/F113ED82-S-W2524_WeatheredOak_XL_Cameo-t.jpg', target: '_self'},'files/6912F9D0-FB21_CarbonFiber_Cameo.jpg':{caption: 'They offer good advice and their ideas and designs are backed up with excellent results', href: 'files/6912F9D0-FB21_CarbonFiber_Cameo.jpg', thumbnail: 'files/6912F9D0-FB21_CarbonFiber_Cameo-t.jpg', target: '_self'},'files/512BD7F8-S-W2515_RusticSmokedWood_Cameo.jpg':{caption: 'I have dealt with this firm for many years and they just get better and better. I always have a laugh with Phill and Clio', href: 'files/512BD7F8-S-W2515_RusticSmokedWood_Cameo.jpg', thumbnail: 'files/512BD7F8-S-W2515_RusticSmokedWood_Cameo-t.jpg', target: '_self'},'files/655D81F7-BB22_Vamp_CheckerBlock_Cameo.jpg':{caption: 'Extremely professional and knowledgeable, Swales were helpful throughout the entire process of replacing our floors.', href: 'files/655D81F7-BB22_Vamp_CheckerBlock_Cameo.jpg', thumbnail: 'files/655D81F7-BB22_Vamp_CheckerBlock_Cameo-t.jpg', target: '_self'},'files/7542DDFA-BB24_Desire_Main.jpg':{caption: 'Offering excellent advice they provided quality workmanship', href: 'files/7542DDFA-BB24_Desire_Main.jpg', thumbnail: 'files/7542DDFA-BB24_Desire_Main-t.jpg', target: '_self'},'files/6E1126F0-DP38_StudZinc_Cameo.jpg':{caption: 'All costings were agreed before any work commenced and everything was completed on time', href: 'files/6E1126F0-DP38_StudZinc_Cameo.jpg', thumbnail: 'files/6E1126F0-DP38_StudZinc_Cameo-t.jpg', target: '_self'},'files/2A44C862-DP38_StudZinc_Main.jpg':{caption: 'They are happy people who make you feel welcome', href: 'files/2A44C862-DP38_StudZinc_Main.jpg', thumbnail: 'files/2A44C862-DP38_StudZinc_Main-t.jpg', target: '_self'},'files/DEBC8A77-EA29_EuropeanSlate_Cameo.jpg':{caption: 'Amtico flooring, a speciality of Swales, is a fantastic product', href: 'files/DEBC8A77-EA29_EuropeanSlate_Cameo.jpg', thumbnail: 'files/DEBC8A77-EA29_EuropeanSlate_Cameo-t.jpg', target: '_self'},'files/A0E4F8CC-FB13_MercuryFiber_Cameo.jpg':{caption: 'Their sales showroom is supported by a totally professional services for measuring and laying floors', href: 'files/A0E4F8CC-FB13_MercuryFiber_Cameo.jpg', thumbnail: 'files/A0E4F8CC-FB13_MercuryFiber_Cameo-t.jpg', target: '_self'},'files/059561C5-FB44_BronzeFiber_Cameo.jpg':{caption: 'Appointment times are punctual and well controlled programmes often result in floors being completed ahead of schedule', href: 'files/059561C5-FB44_BronzeFiber_Cameo.jpg', thumbnail: 'files/059561C5-FB44_BronzeFiber_Cameo-t.jpg', target: '_self'},'files/0841CF0E-W767_LimedGreyWood_Cameo2.jpg':{caption: 'I liked the ideas and recommendations during the planning and design process that came foward from the Swales team.', href: 'files/0841CF0E-W767_LimedGreyWood_Cameo2.jpg', thumbnail: 'files/0841CF0E-W767_LimedGreyWood_Cameo2-t.jpg', target: '_self'},'files/8EC566E3-FB21_CarbonFiber_Main.jpg':{caption: 'They try to be flexbile to customers needs, my screeding was carried out before the agreed date so as not to hold up a kitchen fitting.', href: 'files/8EC566E3-FB21_CarbonFiber_Main.jpg', thumbnail: 'files/8EC566E3-FB21_CarbonFiber_Main-t.jpg', target: '_self'},'files/F87925C1-EC30_ExposedConcrete_Cameo.jpg':{caption: 'Excellent work and a fine personal service that I have used more than once.', href: 'files/F87925C1-EC30_ExposedConcrete_Cameo.jpg', thumbnail: 'files/F87925C1-EC30_ExposedConcrete_Cameo-t.jpg', target: '_self'}});
	
	// The options for the slideshow
	var wpoptions_page0 = new Hash({width: 900,height: 500,resize: 'fill',captions: true,controller: false,random: false,paused: false,preload: false,overlap: false,loop: true,delay: 5000,duration: 1000,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-page0', '', '', '',	 '', '', '', '',	 '', '', '', '',	 '', '', '', '']});
	
	// If thumbnails are enabled
	var thumbnails_enabled = wpoptions_page0.thumbnails;
	
	// If thumbnails are on top
	var thumbnailsOnTopOrBottom = wpoptions_page0.thumbnailsOnTopOrBottom;
	
	// The thumbnail
	var thumbnail = $$('.slideshow-page0-thumbnails ul li')[0];
	var thumbnail_height = wpoptions_page0.thumbnail_width;
	var thumbnail_width = wpoptions_page0.thumbnail_height;
	
	// The thumbnail div
	/*var thumbnail_wrapper = $$('.slideshow-page0-thumbnails ul')[0];
	var thumbnail_wrapper_height = thumbnail_wrapper.getStyle('height').toInt();
	var thumbnail_wrapper_width = thumbnail_wrapper.getStyle('width').toInt();*/
	
	if (typeof(wpember_page0) != 'undefined') {
		wpdata_page0.combine(wpember_page0);
	}
	
	if (typeof(wpflickr_page0) != 'undefined') {
		wpdata_page0.combine(wpflickr_page0);
	}
	
	if (typeof(wplocal_page0) != 'undefined') {
		wpdata_page0.combine(wplocal_page0);
	}
	
	if (typeof(wppicasa_page0) != 'undefined') {
		wpdata_page0.combine(wppicasa_page0);
	}
	// The slideshow
	wpshow_page0 = new Slideshow.KenBurns('weaverpix-page0-slideshow', wpdata_page0.getClean(), wpoptions_page0.getClean());
	
	// The total number of images
	if (thumbnails_enabled) {
		var count = wpdata_page0.getLength();
		$$('.slideshow-page0-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_page0;
	var sb_page0 = SqueezeBox.assign($$('#weaverpix-page0-slideshow .slideshow-page0-images a'), {
		onOpen: function() {
			sb_state_page0 = wpshow_page0.paused;
			wpshow_page0.pause(1);
		},
		onClose: function() {
			wpshow_page0.pause(sb_state_page0);
		}
	});
});


