YUI().use('node-menunav', function(Y) {
	Y.on("contentready", function() {
		this.plug(Y.Plugin.NodeMenuNav);
	}, "#hd");
});
var C; 
YUI().use('yui2-carousel', 'yui2-animation', 'event', 'node', function(Y) {
	Y.on('available', function(e) {	
		Y.all("img").setStyle('visibility',"visible");
		Y.all("img").setStyle('height',330);
		var YAHOO = Y.YUI2;
		var carousel = new YAHOO.widget.Carousel("imgContainer", {
			numVisible: 1,
			autoPlayInterval: 2000,	
			revealAmount: 0,
			animation : {
				speed : 0.8
			},
			isCircular: true,
		});
		carousel.render();
		carousel.startAutoPlay();
	}, "#imgContainer");
});
YUI().use('yql', 'event', function(Y) {
	var query = "select * from weather.forecast where location=94025";
	Y.YQL(query, function(response) {
		if(response.query.results){
			var temp = response.query.results.channel.item.condition.temp;
			Y.on('available', function() {
				Y.one('div#weather').appendChild(Y.Node.create('<h4>'+temp+'</h4>'));
			}, 'div#weather');
		}
	});
});
YUI().use('jsonp','jsonp-url', function(Y) {
	var url = 'http://search.twitter.com/search.json?q=dave';
	Y.jsonp(url, function(response) {
		console.log(response);
	});	
});

