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

	//-------------------------------------------------
	//	Cycle Plugin
	//-------------------------------------------------
	$('.gallery').cycle({ 
	    fx:     'fade', 
	    speed:  '950',
		// pager: '.controls ul',
		prev: '#prev',
		next: '#next',
		timeout: 0,
		
		// callback fn that creates a thumbnail to use as pager anchor 
		pagerAnchorBuilder: function(idx, slide) { 
			return '<li><a href="#"><img src="' + slide.src + '" width="60" /></a></li>'; 
		}
	});
	//-------------------------------------------------
	
	$('a[href*=#]').click(function() {
	    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
	    && location.hostname == this.hostname) {
	      var $target = $(this.hash);
	      $target = $target.length && $target
	      || $('[name=' + this.hash.slice(1) +']');
	      if ($target.length) {
	        var targetOffset = $target.offset().top;
	        $('html,body')
	        .animate({scrollTop: targetOffset}, 600);
	       return false;
	      }
	    }
	  });

//-------------------------------------------------
//	Cufon Font Replacement
//-------------------------------------------------
Cufon.replace('h2');
Cufon.replace('#masthead #nav ul li a', {hover:true});
//-------------------------------------------------



});

