

$(function() {
		   
    $('#slideshow').cycle({
        timeout: 3000,
        //pager:  '#nav',
      //  pagerAnchorBuilder: function(idx, slide) {
         //  return '#nav li:eq(' + (idx) + ') a';
		    //return '#nav li:eq(' + (idx) + ') a';
       // }
    });



	$("a[rel=stair-photo-thumbs]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'onStart' : function() {
			$('#slideshow').cycle("pause") 
		},
		'onClosed' : function() {
			$('#slideshow').cycle("resume") 
		},
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length +  '<br />' + '          ' + title + '</span>';
		}
	});
	
	
	$("a[rel=stair-photo]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'onStart' : function() {
			$('#slideshow').cycle("pause") 
		},
		'onClosed' : function() {
			$('#slideshow').cycle("resume") 
		},
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length +  '<br />' + '          ' + title + '</span>';
		}
	});
	
	});