var Layout = {
	
	navRendered: false,
	
	//Render NAV dropdowns
	renderNav: function() {
		
		if (!this.navRendered) {
			this.navRendered = true;
		}else{
			return;
		}
		
		var round = true;
		//I know it's deprecated.. but I just need to know if this is IE7.
		if (jQuery.browser.msie && jQuery.browser.version=='7.0') {
			round = false;
		}
		
		$('#nav ul li').each(function() {
			$(this).mouseenter(function() {
				$(this).children('ul').show();
				$(this).children('a').addClass('hover');
				if (round) $(this).children('ul').siblings('a').corner('bottom 1px');
			}).mouseleave(function() {
				$(this).children('ul').hide();
				$(this).children('a').removeClass('hover');
				if (round) $(this).children('ul').siblings('a').corner('bottom 5px');
			});
		});
				
		if (round) $('#nav ul li a').corner("5px");
		$('#nav ul li ul').siblings('a').corner('bottom 1px');
		$('#nav ul li ul li a').uncorner();
		$('#nav ul li ul').corner('bottom 5px');
		if (round) $('#nav ul li a.selected').corner("5px");
		
		//hack to change all address to localhost. For lionel only.
		var loc = window.location.toString();
		if (loc.match(/localhost/)) {
			$('#nav ul li').each(function() {
				var href = $(this).children('a').attr('href');
				if (!href.match(/blog/))
					$(this).children('a').attr('href', 'http://localhost:8022'+href);
			});
			
			$('#banner').attr('href', 'http://localhost:8022/');
		}
		
		$('#sidebar h2').corner('top 5px')
		$('#sidebar ul').corner('5px');
		
	}
};