$(document).ready(function() {


	$('a.fancyb').fancybox({
		'titlePosition'		: 'over',
		'overlayColor'      : '#000',
		'overlayOpacity'    : 0.8,
		'padding'           : '5px',
		'titleShow'         : false
	});
	
	$(".videopop").fancybox({
		'autoScale'			: false, 
		'type'				: 'iframe',
		'overlayColor'      : '#000',
		'overlayOpacity'    : 0.8,
		'width'             : '75%',
		'height'            : '75%',
		'padding'           : '5px',
		'centerOnScroll'    : true
	});
	
	
	
	$('#people-list li').hover(
	function() {
		$(this).children('div').slideDown('fast');
	},
	function() {
		$(this).children('div').slideUp('fast');
	});
	
	
	$('#master-maplink').click(function() {
		$('#contactcontainer').fadeOut('slow', function() {
			$('#mapcontainer').fadeIn('slow');
		})
		return false;
	});
	
	
	

	

});





window.onload = function() {
    setLinks();
}

function setLinks() {
    if (!document.getElementsByTagName) return false;
    var links = document.getElementsByTagName("a");
    if (links.length == 0) return false;
    for (var i = 0; i < links.length; i++) {
        var relation = links[i].getAttribute("rel");
        if (relation == "external") {
            links[i].onclick = function() {
                return !window.open(this.href);
            }
        }
    }
}


