var Testi = {
	
	data: [
		{b:'Adam Lashinsky', w:'An ultrafast video-conferencing service', i:'/img/presses/press_adam.gif'},
		{b:'Chris Shipley', w:'VSee has the potential to be the Skype of video messaging', i:'/img/presses/press_chris.gif'},
		{b:'David Carr', w:'[VSee] could be used to improve convoy security', i:'/img/presses/press_david.gif'},
		{b:'John Markoff', w:'Video over today\'s cellular telephone networks at good quality', i:'/img/presses/press_john.gif'},
		{b:'Larry Greenemeier', w:'Ultra low-bandwidth, high-quality videoconferencing', i:'/img/presses/press_larry.gif'},
		{b:'Leslie Walker', w:'Image quality is greatly improved over previous services', i:'/img/presses/press_leslie.gif'},
		{b:'Liz Gannes', w:'[VSee] delivers high quality without hogging too much bandwidth', i:'/img/presses/press_liz.gif'},
		{b:'Michael Miller', w:'[VSee] makes sure you get good pictures at all ends of the conversation', i:'/img/presses/press_michael.gif'},
		{b:'Rafe Needleman', w:'People appeared much more lifelike than other systems', i:'/img/presses/press_rafe.gif'},
		{b:'Robin Good', w:'One of the best performing video conferencing technologies', i:'/img/presses/press_robin.gif'},
		{b:'Sharon Anderson', w:'Used for virtual interviews at the world\'s largest security exercise', i:'/img/presses/press_sharon.gif'}
	],
	
	randOrd : function() {
		return (Math.round(Math.random())-0.5);
	},
	
	randomizeData: function() {
		this.data.sort(Testi.randOrd);
	},
	
	//Pick any n quotes from the data list.
	pick: function(n) {
		if (n == undefined) n = 3;
		this.randomizeData();
		var newArray = [];
		for (var i=0;i<n;i++) {
			newArray.push(this.data[i]);
		}
		return newArray;
	},
	
	shape: function(obj) {
		var testi = $(document.createElement('div'));
		var imgP = $(document.createElement('p'));
		var img = $(document.createElement('img'));
		//var by = $(document.createElement('p'));
		var by = $(document.createElement('span'));
		var msg = $(document.createElement('p'));
		
		testi.addClass('testi');
		imgP.addClass('img');
		//by.addClass('by');
		msg.addClass('msg');
		
		img.attr('src', obj.i);
		by.html(obj.b);
		msg.html('"'+obj.w+'", ');
		msg.append(by)
		imgP.append(img);
		
		testi.append(imgP).append(msg);
		return testi;
	},
	
	render: function() {
		var picked = this.pick();
		
		$('#testi-box-div').empty();
		
		$.each(picked, function(i, o) {
			$('#testi-box-div').append(Testi.shape(o));
		});
	}
	
};
