var fact = $("#fact");
var i = 0;
var facts = [
	'Simpsons aficionado',
	'Pepsi connoisseur',
	'Pop Tart enthusiast',
	'trouble-maker',
	'aspiring iOS developer',
	'tinkerer',
	'horse thief',
	'carbon-based lifeform',
	'apple fan-boy',
	'Calvin &amp; Hobbes lover',
	'amateur Mythbuster',
	'conversational terrorist',
	'atheist',
	'fixie-hater',
	'honorary Harlem Globetrotter',
	'son-of-a-bitch',
	'dumb dumb',
	'X-Files fan',
	'90&rsquo;s music snob',
	'ufologist'
];

$(function() {

	function newPhrase() {

		fact.html(facts[i]);
		
		i++;
		
		if ( i == facts.length ) i = 0;
	}
	
	function switchPhrase() {
		fact.fadeOut( 200, "swing", function(){
		
			fact.html(newPhrase());
		}).fadeIn(200, "swing");
	}

	setInterval(switchPhrase, 5000);
});
