// JavaScript Document
var slideshowItems = new Array();

slideshowItems[1] = new Array();
slideshowItems[1]['image'] = 'slideshow1.jpg';
slideshowItems[1]['text'] = 'All around us, the past is alive';

slideshowItems[2] = new Array();
slideshowItems[2]['image'] = 'slideshow2a.jpg';
slideshowItems[2]['text'] = 'But where time has taken its toll,';

slideshowItems[3] = new Array();
slideshowItems[3]['image'] = 'slideshow2b.jpg';
slideshowItems[3]['text'] = 'But where time has taken its toll,';

slideshowItems[4] = new Array();
slideshowItems[4]['image'] = 'slideshow3b.jpg';
slideshowItems[4]['text'] = 'We can restore buildings to their original beauty';

slideshowItems[5] = new Array();
slideshowItems[5]['image'] = 'slideshow3a.jpg';
slideshowItems[5]['text'] = 'We can restore buildings to their original beauty';

slideshowItems[6] = new Array();
slideshowItems[6]['image'] = 'slideshow4.jpg';
slideshowItems[6]['text'] = 'Down to every last detail';

slideshowItems[7] = new Array();
slideshowItems[7]['image'] = 'slideshow5.jpg';
slideshowItems[7]['text'] = 'With our award-winning craftmanship';

slideshowItems[8] = new Array();
slideshowItems[8]['image'] = 'slideshow6.jpg';
slideshowItems[8]['text'] = 'We can handle your toughest projects.';

function slideshow() {
	$("#slideshowFront").fadeTo(3500, 1.0, function() {
		$("#slideshowFront").fadeTo(4000, 0.0, function() {
			$("#slideshowFront").css("background-image", "url(/imgs/slideshow/"+slideshowItems[3]['image']+")");
			$("#slideshowFront").html('<p class="noShow">'+slideshowItems[3]['text']+'</p>');
			$("#slideshowFront").fadeTo(750, 0.0, function() {
				$("#slideshowFront").fadeTo(4000, 1.0, function() {
					$("#slideshowBack").css("background-image", "url(/imgs/slideshow/"+slideshowItems[4]['image']+")");
					$("#slideshowBack").html('<p class="noShow">'+slideshowItems[4]['text']+'</p>');
					$("#slideshowFront").fadeTo(2000, 1.0, function() {
						$("#slideshowFront").fadeTo(4000, 0.0, function() {
							$("#slideshowFront").css("background-image", "url(/imgs/slideshow/"+slideshowItems[5]['image']+")");
							$("#slideshowFront").html('<p class="noShow">'+slideshowItems[5]['text']+'</p>');
							$("#slideshowFront").fadeTo(750, 0.0, function() {
								$("#slideshowFront").fadeTo(4000, 1.0, function() {
									$("#slideshowBack").css("background-image", "url(/imgs/slideshow/"+slideshowItems[6]['image']+")");
									$("#slideshowBack").html('<p class="noShow">'+slideshowItems[6]['text']+'</p>');
									$("#slideshowFront").fadeTo(2000, 1.0, function() {
										$("#slideshowFront").fadeTo(4000, 0.0, function() {
											$("#slideshowFront").css("background-image", "url(/imgs/slideshow/"+slideshowItems[7]['image']+")");
											$("#slideshowFront").html('<p class="noShow">'+slideshowItems[7]['text']+'</p>');
											$("#slideshowFront").fadeTo(2000, 0.0, function() {
												$("#slideshowFront").fadeTo(4000, 1.0, function() {
													$("#slideshowBack").css("background-image", "url(/imgs/slideshow/"+slideshowItems[8]['image']+")");
													$("#slideshowBack").html('<p class="noShow">'+slideshowItems[8]['text']+'</p>');
													$("#slideshowFront").fadeTo(2000, 1.0, function() {
														$("#slideshowFront").fadeTo(4000, 0.0, function() { 
															$("#slideshowFront").fadeTo(5000, 0.0, function() { 
																$("p.replay").hide();
																$("p.replay").toggleClass("noShow");
																$("p.replay").fadeIn();
															});
														});
													});
												});
											});
										});
									});
								});
							});
						});
					});
				});
			});
		});
	});
}