var testimonials=new Array(
	{ "text":"You (Pio Lombardo) and your team did an absolutely magnificent job that will be long remembered by all of us as the standard against which all such efforts will be measured.",
	  "name":"Selectman Richard Wheeler<br />Town of Concord, MA" },
	{ "text":"It is relevant to note that the alternative system recommended by Lombardo Associates was not identified by previous engineering studies and was more cost-effective than the previously proposed conventional system.",
	  "name":"John Brandt<br />Chairman, Board of Sewer Commissioners<br />Hingham, MA" },
	{ "text":"We were impressed with Mr. Lombardo's technical knowledge, depth of experience, professional integrity, and customer service. I am looking forward to working with him on future projects.",
	  "name":"Sandy Yee<br />Manager, Water/Wastewater Programs<br />Johnson &amp; Johnson Worldwide Environmental Affairs" },
	{ "text":"Mr. Lombardo demonstrated a strong command of wastewater and business management issues as he constantly sought opportunities in projects that would produce value for the customer",
	  "name":"John M. Kehoe, Jr.<br />President and CEO<br />Wheelabrator Technologies, Inc.<br />Hampton, NH" },
	{ "text":"I most heartily endorse Pio Lombardo in any role for an alternative [wastewater management] technology concept or project with local and regional governments.",
	  "name":"James Kreissl<br />US Environmental Protection Agency<br />Cincinnati, OH" },
	{ "text":"Lombardo Associates did an excellent job in leading such a diverse group as our committee to a common decision.",
	  "name":"Ralph Goneau<br />Chairman, Citizens Advisory Committee<br />Woodstock, NY" },
	{ "text":"The quality of Pio Lombardo' work is best exemplified by the recognition of his peers through his receipt of national Engineering Excellence awards. Pio is a man of unique competence in wastewater management matters.",
	  "name":"John Briscoe<br />Former Senior Water Advisor<br />World Bank" },
	{ "text":"Accessibility to Township residents as well as Township officials throughout the study process was invaluable, as excellent communication alleviated many potential misunderstandings.",
	  "name":"Floyd West<br />Mayor, Bass River Township<br />New Gretna, NJ " },
	{ "text":"Lombardo Associates demonstrated prompt and efficient business practices in the preparation of all requested information and completed necessary changes in the same manner.",
	  "name":"Joseph E. Kun<br />President, Monongolia County Commission<br />Morgantown, WV" },
	{ "text":"Of all the environmental engineers we talked with, it was Mr. Lombardo who proposed the innovative procedure for the Towns of Seekonk, Rehoboth, and Swansea.",
	  "name":"Michael Lindbloom<br />Chairman, Board of Selectmen<br />Rehoboth, MA " },
	{ "text":"We have found Mr. Lombardo to be a competent engineer... to have a political and public relations sensitivity that is unique in his profession....What sets Mr. Lombardo apart is his ability to develop an engineering solution to a problem that is tailored to the specific needs of the project at hand.",
	  "name":"Thomas C. McRae<br />President, Winthrop Rockefeller Foundation<br />Little Rock, AR" },
	{ "text":"Mr. Lombardo has consistently pursued innovative and environmentally protective wastewater plans.",
	  "name":"Esther Snyder<br />Executive Director, Association for the Preservation of Cape Cod<br />Orleans, MA" },
	{ "text":"Thanks forthe on-going \"get it done\", \"whatever it takes to deliver a quality product\" approach.  I feel very fortunate to have you as my colleague on the (new 25 MGD Water Treatment Plant and distribution system rehabilitation) project !",
	  "name":"Paul Eisenhardt<br />The Eisenhardt Group<br />San Francisco, CA" }
);
var news=new Array(
	{ "text":"Producing Water Meeting CA Title 22 Unrestricted Water Reuse Standards",
	"url":"/pdfs/100518-Malibu-Decentralized-WW-Project-Profile.pdf" },
	{ "text":"Residential Nitrex&trade; systems achieving TN &lt;3 mg/l in Maryland",
	"url":"/pdfs/090721 Nitrex Single Family Package.pdf#page=3" },
	{ "text":"School retrofit Nitrex&trade; system achieving TN &lt;2 mg/l in NC",
	"url":"/pdfs/090721 Nitrex Multi Family Institutional Package.pdf#page=3" },
	{ "text":"MassDEP confirms Nitrex&trade; is permittable on Cape Cod",
	"url":"/pdfs/news.pdf#page=2" },
	{ "text":"PhosRID&trade; achieving 99% TP removal on Nantucket",
	"url":"/pdfs/phos-rid.pdf" }
);
var resources=new Array(
	{ "text":"MassDEP confirms Nitrex&trade; is permittable on Cape Cod",
	"url":"/pdfs/news.pdf#page=2" },
	{ "text":"LAI teams with AMEC to Advance Wastewater &amp; Nitrate Treatment Technologies",
	"url":"/pdfs/AMEC Announcement.pdf" },
	{ "text":"US EPA's Opinion that Nitrex&trade; Produces Effluent with 2.2 mg/l TN",
	"url":"/pdfs/US EPA Chapter 6 Decentralized Pages 6-15 to 6-18.pdf" },
	{ "text":"US EPA Recommends Use of Permeable Reactive Barriers (PRB)",
	"url":"/pdfs/US EPA Chapter 6 Decentralized Pages 6-3 to 6-5 Nitrogen-Reduction Implementation Measures.pdf" }
);
var currentNews=1;
var currentResource=1;
$('document').ready(function(){
	var n=Math.ceil((Math.random()*testimonials.length)-1);
	$('#t-text').html(testimonials[n]['text']);
	$('#t-name').html(testimonials[n]['name']);
	setInterval("setTestimonial();",9000);

	var h="<div><span>"+news[0]['text']+"</span>";
	if(news[0]['url']!=""){
		h+='<br />[<a href="'+news[0]['url']+'">View More</a>]';
	}
	h+="</div>";
	h+="<div><span>"+news[1]['text']+"</span>";
	if(news[1]['url']!=""){
		h+='<br />[<a href="'+news[1]['url']+'">View More</a>]';
	}
	h+="</div>";
	$('#news-body').html(h);
	setInterval("setNews();",9000);

	h="<div><span>"+resources[0]['text']+"</span>";
	if(resources[0]['url']!=""){
		h+='<br />[<a href="'+resources[0]['url']+'">View More</a>]';
	}
	h+="</div>";
	h+="<div><span>"+resources[1]['text']+"</span>";
	if(resources[1]['url']!=""){
		h+='<br />[<a href="'+resources[1]['url']+'">View More</a>]';
	}
	h+="</div>";
	$('#resource-body').html(h);
	setInterval("setResources();",9000);

});
function setTestimonial(){
	var n=Math.ceil((Math.random()*testimonials.length)-1);
	$('#testimonial').fadeOut(1400,
		function(){ 
			$('#t-text').html(testimonials[n]['text']);
			$('#t-name').html(testimonials[n]['name']);
			$('#testimonial').fadeIn(1400); 
		});
}
function setNews(){
	currentNews=currentNews==news.length-1?0:++currentNews;
	var t=new Array(currentNews,currentNews==news.length-1?0:++currentNews);
	$('#news-body').fadeOut(1400,
		function(){ 
			var h="<div><span>"+news[t[0]]['text']+"</span>";
			if(news[t[0]]['url']!=""){
				h+='<br />[<a href="'+news[t[0]]['url']+'">View More</a>]';
			}
			h+="</div>";
			h+="<div><span>"+news[t[1]]['text']+"</span>";
			if(news[t[1]]['url']!=""){
				h+='<br />[<a href="'+news[t[1]]['url']+'">View More</a>]';
			}
			h+="</div>";
			$('#news-body').html(h);
			$('#news-body').fadeIn(1400); 
		});
}
function setResources(){
	currentResource=currentResource==resources.length-1?0:++currentResource;
	var t=new Array(currentResource,currentResource==resources.length-1?0:++currentResource);
	$('#resource-body').fadeOut(1400,
		function(){ 
			var h="<div><span>"+resources[t[0]]['text']+"</span>";
			if(resources[t[0]]['url']!=""){
				h+='<br />[<a href="'+resources[t[0]]['url']+'">View More</a>]';
			}
			h+="</div>";
			h+="<div><span>"+resources[t[1]]['text']+"</span>";
			if(resources[t[1]]['url']!=""){
				h+='<br />[<a href="'+resources[t[1]]['url']+'">View More</a>]';
			}
			h+="</div>";
			$('#resource-body').html(h);
			$('#resource-body').fadeIn(1400); 
		});
}
