// JavaScript Document


$(document).ready(function() {
	
	/*--Homepage Splash--*/
		
	$(function() {
		$("#splash li div").each(function(){
			var backgroundimage = $("img",this).attr("src")
			$(this).css('background','url('+ backgroundimage +') 0px -135px')
		});
	});  
	
	$('#splash li img').click(function () {
		$(this).removeClass('active');
	});
			
	$('#splash li img').hover(function () {
		$(this).fadeOut(0).addClass('active').fadeIn(300);
	},
	
	function () {
		$(this).fadeOut(100)
			.queue(function(){ $(this).removeClass('active').fadeIn(0).dequeue() });
	});
	
	$('#close-welcome,#welcome').click(function(){
		$('#welcome').fadeOut('slow');		
	});
	
	/*--Fonts--*/
	
	Cufon.replace('h1,h2,h3,h4,#header .nav li,#welcome p');
	Cufon.replace('.button, button',{textShadow: '#f5f8e1 0px 1px'});
	
	/*-- Fancybox --*/	

	$("#splash li a, #office-photos a, #folio-items a").fancybox({
		'titlePosition' : 'over'
	});
	
	/*-- Filter --*/	
	
		
		
	
});

