$(".thing div a:not(:first-child)").css ( {
	'display' : 'none',	'opacity' : '0', 'height' : '1px'
});

$("#twitter_update_list li:not(:first-child)").css ( {
	'display' : 'none',	'opacity' : '0', 'height' : '0px'
});

$('.thing').hover(
	function () { // hover on
		$(this).children().children().stop(); 
		$(this).children().children().animate ( { 
			'height' : '90px', 'opacity' : '1', 'margin-top' : '10px'
		});
		$(this).css( 'background-color', '#7f98ae');
	},
	function hoveroff () { // hover off
		$(this).children().children(':not(:first)').stop();
		$(this).children().children(':not(:first)').animate ( { 
			'height' : '0px', 'opacity' : '0', 'margin-top' : '0px' }, 200, function () {
				$('.thing div a:not(:first-child)').css('display', 'none');
				$('#twitter_update_list li:not(:first-child)').css( 'display', 'none' );
		});
		$(this).children().children(':first').animate ( { 'opacity' : '0.6' } );
		$(this).css( 'border', '2px solid #3d566c');
		$(this).css( 'background-color', '#5f788e');
	}
);

$('#sites').parent().children('.thingtitle').css ( 'background', 'url(icon-sites.png) top left no-repeat' );
$('#photos').parent().children('.thingtitle').css ( 'background', 'url(icon-photos.png) top left no-repeat' );
$('#twitter_update_list').parent().children('.thingtitle').css ( 'background', 'url(icon-notes.png) top left no-repeat' );
$('#travels').parent().children('.thingtitle').css ( 'background', 'url(icon-travels.png) top left no-repeat' );
$('#drawings').parent().children('.thingtitle').css ( 'background', 'url(icon-drawings.png) top left no-repeat' );
$('#contact').parent().children('.thingtitle').css ( 'background', 'url(icon-contact.png) top left no-repeat' );
$('#contact').parent().children('.thingtitle:hover').css ( { 'text-decoration' : 'none', 'cursor' : 'default' } );
$('#sites').parent().children('.thingtitle:hover').css ( { 'text-decoration' : 'none', 'cursor' : 'default' } );
$('#travels').parent().children('.thingtitle:hover').css ( { 'text-decoration' : 'none', 'cursor' : 'default' } );

$("#flickr a").clone().prependTo("#photos");
$("#photos a").attr({ target: "_blank" });
$("#twitter_update_list li a").attr({ target: "_blank" });

$("#container").fadeTo("slow", 1);

$("#photos a:not(:first-child)").css ( {
	'display' : 'none',	'height' : '0px'
});
