// XHTML STRICT does not allow target tag on anchors,
// must add programmatically
$(document).ready(function() {
	$('a').each(function() {
		if ($(this).attr("rel") == "external") {
			$(this).attr('target', '_blank');
		}
	});
});

$(document).ready(function() {
  $('#navigation a').each(function() {
    href  = $(this).attr('href');
    title = document.title.substring(0, document.title.indexOf(' ')).toLowerCase();
    path  = location.pathname.substring(0, location.pathname.length - 1);

    if (href == path || href.indexOf(title) > 0) {
      $(this).addClass('focus')
    }
  })
});

$(document).ready(function() {
	$("a.group").fancybox({
		'zoomOpacity'			: true,
		'padding'				: 8,
		'zoomSpeedIn'			: 500,
		'zoomSpeedOut'			: 500,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack',
		'centerOnScroll'		: true
	});
});
