// APPLICATION 
// -----------------------------------------


// CUFON
Cufon.replace('h1');
Cufon.replace('h3');
Cufon.replace('#main-nav li a');
Cufon.replace('.banner-excerpt');
Cufon.replace('.link-view');

// jQuery
$(document).ready(function() {

  // Homepage Banner:
  $('#banner ul').cycle({ speed: 2000, timeout: 5000, type: 'sequence', containerheight: '450px' });
  /*
	  $('#banner ul').mouseenter(
	  	function() {
	  		$('#banner ul').cycle('pause');
	  });
	  $('#banner ul').mouseleave(
	  	function() {
	  		$('#banner ul').cycle('resume');
	  });
  */

	// Subpage Banner
	$('#small-banner').cycle({ speed: 2000, timeout: 6000, type: 'sequence', containerheight: '150px' });
	/*
  $('#small-banner').mouseenter(
  	function() {
  		$('#small-banner').cycle('pause');
  });
  $('#small-banner').mouseleave(
  	function() {
  		$('#small-banner').cycle('resume');
  });
	*/

  
  // Innerfade:
  //$('#banner ul').cycle({ speed: 2000, timeout: 6000, type: 'sequence', containerheight: '450px' });
  //$('#small-banner').innerfade({ speed: 2000, timeout: 6000, type: 'sequence', containerheight: '150px' });

	// Fancybox (lightbox):

	$(".lightbox").fancybox();
	
	/* Using custom settings */
	
	$("a#inline").fancybox({
		'hideOnContentClick': true
	});

	/* Apply fancybox to multiple items */
	
	$(".lightbox").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	});


	$("#main-image").attr('rel', 'portfolio').fancybox();
	
  // Portfolio even spacing 
  $("div#portfolio a:nth-child(even)").css("margin-left","20px");
	
	//List spacing
	$(".list-thumb:nth-child(4n)").css("margin-right","0px");
  
	
	
	

});

