Cufon.replace('h1, #sidebar h2', { color: '-linear-gradient(#594c47, #312622)' });
Cufon.replace('#nav li, #topnav li', { hover: true });
Cufon.replace('h2');

$(document).ready(function() {
	
	$('li:last-child').addClass('last');
			
	$('.box-list li').each(function(index) {
		$(this).find('img').hide();
		var bg = $(this).find('img').attr('src');
		$(this).css('background-image', 'url('+bg+')');
	});	
	
	$('.employees li').hover(
	  function () {
	    $(this).parent().find('li').width(111);
		$(this).width(291);
		//$(this).parent().find('li').animate({width: 111},'fast');
		//$(this).animate({width: 291},'fast');
	  }, 
	  function () {
	   	$(this).parent().find('li').width(147)
		//$(this).parent().find('li').animate({width: 147},'fast');
	  }
	);
	
	bee = '<span id="bee">Bee<span>';
	
	$('.about #sidebar, .work #title-box p, .news #title-box p, .team #sidebar,').append(bee);
	
	$('#cases-nav li:not(.first)').click(function(){
		window.location=$(this).find('a').attr("href");
	});
	

	$('.portfolio-list li:nth-child(3n)').css('margin-right','0');
	$('.portfolio-list li').hover(function(){
		$(this).css('background-color','#f9f9f9');
	}, function() {
		$(this).css('background-color','');
	});
	
	$('.blank').click(function() {
		window.open($(this).attr('href'));
		return false;
	});
	
	
	/********************************************* EXTRAS */
	$('#slide-show-mar img').click(function() {
		var flashvars = {
		}; 
		var params = {
			menu: "false",
			wmode: 'transparent',
			scale: 'no-scale'
		};
		var attributes = {
			id: "slide-show-mar",
			name: "slide-show-mar"
		};
		swfobject.embedSWF("swf/march/loaderSlideShow.swf", "slide-show-mar", "715px", "361px", "9.0.0","expressInstall.swf", flashvars, params, attributes);
	});
	$('#slide-show-feb img').click(function() {
		var flashvars = {
		}; 
		var params = {
			menu: "false",
			wmode: 'transparent',
			scale: 'no-scale'
		};
		var attributes = {
			id: "slide-show-feb",
			name: "slide-show-feb"
		};
		swfobject.embedSWF("swf/february/loaderSlideShow.swf", "slide-show-feb", "715px", "361px", "9.0.0","expressInstall.swf", flashvars, params, attributes);
	});
	
	$("#slide-show-jan a").fancybox({
		'padding'			: 0,
		'autoScale'			: false,
		'width'				: '1200px',
		'height'			: '660px',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});
	$("a.vert-ad").fancybox({
		'padding'			: 0,
		'autoScale'			: false,
		'width'				: '485px',
		'height'			: '700px',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});
	$("a.ad").fancybox({
		'padding'			: 0,
		'autoScale'			: false,
		'width'				: '830px',
		'height'			: '600px',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});

});

