var RG = window.RG || {};

RG.twitter = {
	load: function() {
		var $tweetWrap = $(".tweet");
		
		$tweetWrap.html('<ul id="twitter_update_list"></ul>');
		
		$.getScript("http://twitter.com/javascripts/blogger.js");
		$.getScript("http://twitter.com/statuses/user_timeline/RealGravity.json?callback=twitterCallback2&count=1", function() {
		});
	}
}

$(document).ready(function(){
	
	// fancify buttons
	//$(".btn").button();
	
	// initialize menu
	
	$("nav .pages").wijmenu({
		orientation: "horizontal",
		//showDelay: 0,
		showAnimation: { animated:"fade", duration: 400, easing: null }
	});
	// 
	// $("#footer nav .pages").wijmenu({
	// 	orientation: "horizontal",
	// 	showDelay: 0,
	// 	slidingAnimation: { direction: "up", duration: 400}
	// });
	// 
	
	// load twitter last tweet
	RG.twitter.load();

	// set up tooltips
	/*
	$(".hasTooltip").each(function(elm) {
		var $elm = $(this);
		$elm.bind("click",function(e) { e.preventDefault(); }).wijtooltip({
			content: $($elm.attr("href")).html(),
			position: { my: 'center bottom', at: 'center top' }
		});
	});
	*/
});


