YUI({
	modules : {
		"google-tracking": {
			fullpath: "http://www.google-analytics.com/ga.js"
		},
		"prettify": {
			fullpath: "http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"
		},
		"recent-tweets": {
			fullpath: "http://akshayp.github.com/sandbox/recent-tweets/recent-tweets.js",
			requires: ['node', 'transition', 'event', 'substitute', 'widget', 'base', 'yql']
		},
		"modernizer": {
			fullpath: "http://html5shiv.googlecode.com/svn/trunk/html5.js"
		}
	}
}).use('node-base','event-base','google-tracking','recent-tweets', function(Y) {
	
	/*Page Tracker*/
	var pageTracker = _gat._getTracker("UA-10284621-2");
	pageTracker._trackPageview();
	
	if(Y.UA.ie < 9 && Y.UA.ie > 5) { Y.use("modernizer", function(){ prettyPrint(); }); }
	
	Y.on("domready", function(e) {
		
		if(Y.one(".prettyprint")) {  Y.use('prettify', function(){ prettyPrint(); }); }
		
		/*Render Tweets*/
		var tweets = new Y.RecentTweets({ srcNode: '.tweets' });
		tweets.render();	
		
		/*Mobile Nav*/
		Y.one(".mobile-more").on('click', function(e) {
			e.preventDefault();
			Y.one('#hd').toggleClass('hide-mobile-nav');
		});
	});
	
});
