var displayHomePage = {
	init: function() {
		displayHomePage.stylishPhotos();
		displayHomePage.toggleAbout();
	},
	// It's too cumbersome and ugly to add these tags in the markup,
	// so let's make jQuery do the tough work
	stylishPhotos: function() {
		$('img').each(function() {
			this.width = $(this).width();
			if (this.width < 100) {
				// If this is a thumb, add the rounded corners
				this.imgWrap = $(this).parent('span.img-wrap');
				$(this.imgWrap).width(this.width);
				$(this).before('<span class="head"><span></span></span>')
							 .after('<span class="foot"><span></span></span>');
			}
		});
	},
	toggleAbout: function() {
		$('#about p a').click(function(e) {
			e.preventDefault();
			this.extraInfo = $("#about p:not('.intro')");
		  if ( $(this.extraInfo).is(':visible') ) {
				$('p.intro a').show();
		    $(this.extraInfo).slideUp('fast', function() {
					$(e.target).show();
				});
		  } else {
		    $(this.extraInfo).slideDown('fast', function() {
					$('p.intro a').hide();
				});
		  }
		});
	}
}
$(document).ready(displayHomePage.init);