// Cufon Replacemnet
$(document).ready(function() {
		Cufon.replace('h2, h3', {separate: 'none', fontFamily: 'Aller','font-weight':400, textShadow: '#F3F1EE 0px 1px 0px'});
});


// Credit Fade
$(document).ready(function() {
		$('p.giantpea span').hide();
		$('p.giantpea a').hover(function(){
		$('p.giantpea span').fadeIn('normal')
		}, function(){
		$('p.giantpea span').fadeOut('normal');
		return false;
		});
});


// Contact Form Fade
$(document).ready(function() {

	$('#sidebar div.wrap').hide(); // Hide all divs
		$('#sidebar div.wrap:first').show(); // Show the first div
		
		//Init section on pageload
		var url = window.location.hash;
		var section = url.split('#');
		if(section.length > 1){
			var currentTab = $('#'+section[1]+"-section");
			$('#sidebar div.wrap').hide(); 
			$(currentTab).fadeIn('normal');
			$('#tabs ul li a').removeClass('active');
			$("a[href='#"+section[1]+"']").addClass('active');
		}

});




// Gallery Thumbs
$(document).ready(function() {
			$("a[rel=gallery]").fancybox({
				//'transitionIn'		: 'elastic',
				//'transitionOut'		: 'elastic',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
});


// Recent Work Fade
	$(document).ready(function() {
				$('ul#fade').innerfade({
					speed: 1000,
					timeout: 5000,
					type: 'sequence',
					containerheight: '270px'
				});
	});
			
