tqS = { // test quote sliders
	quotes: null,
	tp: [], // array of each slider
	qw: 220, // width of each quote;
	init: function($) {
		tqS.quotes = $('.testQuote'); // find all quotes
		if (tqS.quotes.length > 1) { // see if there are more than one
			tqS.qw = tqS.quotes.width() // get actual width of quotes.
			var tpc = 0;
			var lp = tqS.quotes[0].parentNode; // last parent
			nf = Math.floor($(lp).width()/tqS.qw); // determine how many quotes can fit horizontally
			var cp; // current parent
			tqS.tp[tpc] = { nf: nf, par: lp };
			tqS.quotes.each(function(i, s) { // add additional array items if more than one parent
				cp = s.parentNode;
				if (lp != cp) {
					tpc++;
					nf = Math.floor($(cp).width()/tqS.qw);
					tqS.tp[tpc] = { nf: nf, par: cp };
				}
				lp = cp;
			});
			$(tqS.tp).each(function(i, s) {
				tS = document.createElement('div');
				tS.id = 'testSlider'+i;
				pSs = $('.tpSBack');
				nSs = $('.tpSForward');
				pSs.each(function(i,v) {
					if (v.parentNode.parentNode == s.par) { pS = v; }
				});
				nSs.each(function(i,v) {
					if (v.parentNode.parentNode == s.par) { nS = v; }
				});
				tqS.quotes.each(function(i, z) {
					if (z.parentNode == s.par) {
						s.par.removeChild(z); // remove quote from original parent
						tS.appendChild(z); // add quote to testSlider
					}
				});
				s.par.appendChild(tS);
				$(tS).bxSlider({ displaySlideQty: s.nf, prevSelector: pS, nextSelector: nS, prevText: '',
					nextText: '', auto: true, speed: 1000, pause: 25000 });
			});
			//console.log(tp)
		}
	//$('#slider1').bxSlider();
	}
}

jQuery(document).ready(tqS.init);
