
	$("#source").html($("#destination .staff-person").clone());
	
	Cufon.replace('.cufon', { hover: true, fontFamily: 'Neo-sans' })('.neosans', { hover: true, fontFamily: 'Neo-sans' })
		('h1', { hover: true, fontFamily: 'Neo-sans' })('#content-header', { hover: true, fontFamily: 'Neo-sans' })
		('h2', { hover: true, fontFamily: 'Neo-sans' })('h3', { hover: true, fontFamily: 'Neo-sans' })
		('.ingress', { hover: true, fontFamily: 'Neo-sans' });
	Cufon.replace('.galliard', { hover: true, fontFamily: 'Galliard' });
	Cufon.now();
	
	function browserWindowWidth() {
		var browserWinWidth = 0;
		if( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			browserWinWidth = window.innerWidth;
		} else if( document.documentElement && ( document.documentElement.clientWidth ) ) {
			//IE 6+ in 'standards compliant mode'
			browserWinWidth = document.documentElement.clientWidth;
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			browserWinWidth = document.body.clientWidth;
		}
		return browserWinWidth;
	}


(function($) { /* some code that uses $ */ 

	var cufonWidth = browserWindowWidth();
	$(window).resize(function() {
			
		if ((browserWindowWidth() > 768 && cufonWidth <= 768) || 
			(browserWindowWidth() <= 768 && cufonWidth > 768) ||
			(browserWindowWidth() > 400 && cufonWidth <= 400) || 
			(browserWindowWidth() <= 400 && cufonWidth > 400)  ) {
			cufonWidth = browserWindowWidth();
			Cufon.refresh();
			Cufon.now();
		}
	});


	$('a.up-link[href^="#"], #Anchors a[href^="#"]').click(function(event){		
		event.preventDefault();
		var scrollTo = (this.hash == '') ? 0 : $(this.hash).offset().top;
		$('html,body').animate({scrollTop:scrollTo}, 500);
	});

	$(".lightbox").fancybox({
		nextEffect: 'fade',
		prevEffect: 'fade' 
	});
	
	$("#staff-filter-options input:radio").click(function() {
		var classList = '.' + $(this).val();
		$('#destination').quicksand( 
			$("#source").find(classList), 
			{ 
				useScaling: false,
				enhancement: function() {
					//Cufon.refresh();
					//Cufon.now();
				}
			},
			function() {
				//Cufon.replace('h3', { hover: true, fontFamily: 'Neo-sans' });
				//Cufon.refresh();
			});
	});
	
		
	$('#togglemenu').click(function() {
	  $('.menu').slideToggle('slow', function() {
	    // Animation complete.
	  });
	});
	
	$(window).resize(function() {
		if ($("#togglemenu").css('visibility') == 'hidden' && $(".menu").css('display') == 'none') {
			$(".menu").css('display', '');
		}
	});

	

})(jQuery)
