// Davide L Rizzo : Website : JavaScript Document

$(function(){
	
	//External links open in new window
	$("a[href^='http'], a[href$='pdf']").attr('target','_blank');
	
	//Shadowbox galleries
	$(".gallery").each(function (i) {
		$(this).find("a:gt(0)").hide();
		$(this).find("a:first").text("Show gallery");
	});
	
	//Expanding/Collapsing sections
	$(".collapse").hide();
	$(".show").show();
	$("#about .show").toggle(
		function () {
			$(this).text("Hide Skills Chart...");
			$(this).siblings(".collapse").show("slow");
		},
		function () {
			$(this).text("Show Skills Chart...");
			$(this).siblings(".collapse").hide("slow");
		}
	);
	$("#folio .show").toggle(
		function () {
			$(this).text("Less...");
			$(this).next(".collapse").show("slow");
		},
		function () {
			$(this).text("More...");
			$(this).next(".collapse").hide("slow");
		}
	);

});