$(function() {

	// convert email addresses
	$("span.mail").each(function() {
		var address = $(this).text();
		address = address.replace(/ at /, "@");
		address = address.replace(/ dot /g, ".");
		var link = $(this).attr("title") || address;
		$(this).html('<a href="mailto:'+address+'">'+link+'</a>');
	});

	// handle portfolio section
	$("#porfolio-container").css({ overflow : "hidden" });
	$("#porfolio-container img:gt(0)").hide();
	$("#next").click(function() {
		var curr = $("#porfolio-container img:visible");
		var next = ($(curr).next().attr("src") != undefined) ? $(curr).next() : $("#porfolio-container img:first");
		$(curr).hide();
		$(next).show();
		return false;
	});

});
