var ARA = {
	init: function(){
		ARA.activateCufon();
		//ARA.positionTwitBird();
		ARA.twitterFeed();
		ARA.carousel.init();
	},
	
	activateCufon: function(){
		// Activate cufon for project titles
		Cufon.replace('h2', { fontFamily: 'Museo 500' });
		//Cufon.replace('.item .details p', {
		//	hover: {
		//		color: 'white'
		//	}

		//});
	},
	
	positionTwitBird: function(){
		var twitBird = $('#twitBird');
		var defPos = $('.contentRow:nth-child(2)').position().top;
		
		twitBird.css({
			'top' : defPos
		});	
	},
	
	twitterFeed: function(){
	},	
	
	carousel: {
		init: function(){
			ARA.carousel.buttons();
			ARA.carousel.activateCarousel();
		},
	
		buttons: function(){
			// Carosuel Btns Animations
			$('#prevBtn').hover(
				function () {
					$(this).stop().animate({left: '-42px'}, 150);
				}, 
				function () {
					$(this).stop().animate({left: '-34px'}, 150);
				}
		    );
		    
			$('#nextBtn').hover(
				function () {
					$(this).stop().animate({right: '-46px'}, 150);
				}, 
				function () {
					$(this).stop().animate({right: '-38px'}, 150);
				}
		    );			
		},
		
		activateCarousel: function(){
			$('#carousel').itemSlider({
				nextBtn: '#nextBtn',
				prevBtn: '#prevBtn',
				loop: false,
				speed: 630
			});
		}		
	}
}


$(function(){ 
	ARA.init();
	
	// TWITTER FEED
	getTwitters('tweetsList', {
		id: 'itsmeara', 
		count: 3, 
		clearContents: true,
		enableLinks: true, 
        ignoreReplies: true,
		withFriends: false,
		template: '%text% <span class="tweetTime">%time%</span>',
		onTimeout: function () {
			this.innerHTML = '<p>Twitter is taking too long... <br /> <a href="http://twitter.com/itsmeara">Click Here</a> to view my Twitter homepage.</p>';
		},
		onTimeoutCancel: false
	});

});