		Cufon.replace('h1')('h2')('h3')('blockquote')('.cptn')('#navigation a')('ul.testimonials span');

	  $(document).ready(function() {
	  	jQuery.fn.fadeToggle = function(speed, easing, callback) { 
		   return this.animate({opacity: 'toggle'}, speed, easing, callback); 
			}; 
	  
	  	$('#grid').hide();
	  	
	  	$('#gridToggle').fadeTo('1','.3');
	  
	  	$('#gridToggle').click(function() { 
	  		$('#grid').fadeToggle(); 
	  		return false;
	  	});
	  	
		  $('span.us').parent('p').css('margin','0 0 0 0');
		  
		  
		  
		  $('h4.blog-entry:last, ul.subnav li:last, ul.blog li:last, ul.about-us li:last, ul.portfolio li:last').addClass('no-border');
		  $('ul.agency li:last, ul.project-thumbs li:last, .home .fp-block:last, , .home .entry:last').addClass('no-margin');
		  $('.portfolio-nav li:nth-child(3n)').addClass('yeahboy');
		  $('.testimonials li:nth-child(3n)').addClass('testimonial3n');
		  
		  
		  // Fancybox
			$('.lightbox').fancybox({
				'zoomSpeedIn':		500, 
				'zoomSpeedOut':		500, 
				'overlayShow':		true,
				'hideOnContentClick': true
			});
		  
	  });
	  
	  
		var previewHeight = "220px";
		 
		$(document).ready(function(){
		  $('.preview').each(function () {
		        var current = $(this);
		        current.attr("box_h", current.height());
		      }
		   );
		
		  $(".preview").css("height", previewHeight);
		  $(".preview-btn").html('<img src="/public/images/preview.png" />');
		  $(".preview-btn").click(function() { openpreview() })
		 
		});
		 
		function openpreview() {
		  var open_height = $(".preview").attr("box_h") + "px";
		  $(".preview").animate({"height": open_height}, {duration: "slow" });
		  $(".preview-btn").html('<img src="/public/images/preview-hide.png" />');
		  $(".preview-btn, .preview img").click(function() { closepreview() })
		}
		 
		function closepreview() {
		  $(".preview").animate({"height": previewHeight}, {duration: "slow" });
		  $(".preview-btn").html('<img src="/public/images/preview.png" />');
		  $(".preview-btn").click(function() { openpreview() })
		}
