$(document).ready(function(){


	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});


	/* twitter feed 
	$.get('scripts/tweets.php', function(data) { 
		var $items = $(data).find('item'); 
		$items.each(function(index) { 
			if (index == 6){
				return false
			};
			var $item = $(this); 
			var $raw_title = $item.find('title').text(); 
			var $title = $raw_title.replace('gabromanato:', '').replace(/http:.+/, ''); 
			var $raw_date = $item.find('pubDate').text(); 
			var $date = $raw_date.replace('+0000', ''); 
			var $link = $item.find('link').text(); 
			var html = $('<li></li>').html('<a href="'+$link+'">'+$title+ '<span>'+$date+'</span></a>'); 
			html.appendTo('.news-feed'); 
			}); 
	})
	.error(function() {
		var html = $('<li><a>News could not be obtained at this time.</a></li>'); 
		html.appendTo('.news-feed');
	})
	*/

	// main navigation
	$("ul.topnav li a").hover(function() { 
		$(this).addClass("subhover");
		$(this).parent().find("ul.subnav").slideDown('fast').show(); 
		$(this).parent().hover(function() {
			$(this).find("a").addClass("subhover");
		}, function(){	
			$(this).find("a").removeClass("subhover");
			$(this).parent().find("ul.subnav").slideUp('fast'); 
		});
	});

});
	
