$(document).ready( function() {
		var textArray = [
			'listening to Robert Johnson on vinyl.',
			'watching Parks and Recreation.',
			'reading Dostoevsky.',
			'checking his iPhone.',
			'from Texas.',
			'on his bike.',
			'cooking pesto.',
			'headed to the Natural History Museum.',
			'sketching.',
			'fat, according to Fernanda.',
			'a fan of Murakami.',
			'a Red Raider.',
			'wearing Chuck Taylors.',
			'unable to grow a beard.',
			'6 ft 1 in tall.',
			'the owner of too many cardigans.',
			'a Beatlemaniac.',
			'too skinny, according to his grandma.',
			'trying to learn spanish.',
			'ready for spring.',
			'born in Hong Kong.',
			'a Leg Beater.',
			'not my real name.',
			'a fan of Radiolab.',
			'saw a whale in Alaska.',
			'craving Robertas pizza.',
			'taking a photo with his Lomo.',
			'drinking tea.'
		];
		$('#text-content').loadText( textArray, 5000 ); 
	});
	// custom jquery plugin loadText()
	$.fn.loadText = function( textArray, interval ) {
		return this.each( function() {
			var obj = $(this);
			obj.fadeOut( 'fast', function() { 
				obj.empty().html( random_array( textArray ) );	
				obj.fadeIn( 'fast' );
			});
			timeOut = setTimeout( function(){ obj.loadText( textArray, interval )}, interval );

		});
		
	}
	
		//public function
	function random_array( aArray ) {
		var rand = Math.floor( Math.random() * aArray.length + aArray.length );
		var randArray = aArray[ rand - aArray.length ];
		return randArray;
	}
