
/*
This code was based on a code example from the article "Javascript navigation - cleaner, not meaner" by Christian Heilmann
but has been gutted and rewritten by revolutionary JavaScript ninjas on a mission from God.

*/

$(document).ready(function () {
	$('#toggleable div').hide().parent().find('#maindefault, #maindefault div, div.sep, #fjs-flickr, #fjs-flickr div, #fjs-flickrnav_strip,').show();
	$('#toggle a, #toggle2 a').click(function () {
		var target = this.href.match(/#(\w.+)/)[1];
		$('#toggle a, #toggle2 a').removeClass('current');
		$('#toggleable div').hide();
		$('#'+target + ', #' + target + ' div, #fjs-flickrnav_strip').show();
		$(this).addClass('current');
		this.blur();
		if (target.match(/\d{4}$/)) {
			$('h1').addClass('noshow');
		} else {
			$('h1').removeClass('noshow');
		}
		return false;
	});
});
