	hs.graphicsDir = '/static/js/highslide/graphics/';
	hs.showCredits = false;
	hs.easing = 'easeInCirc';
	hs.expandDuration = 100;
	hs.restoreDuration = 100;
	hs.anchor = 'top-left';
	hs.wrapperClassName = 'borderless';

$(document).ready(function() {

        $('a img').each(function() {
            $(this).hover(function() {
                $(this).stop().animate({ opacity: 0.8 }, 0);
				$(".overlay-text").animate({ opacity: 1}, 0);
            },
           function() {
               $(this).stop().animate({ opacity: 1 }, 0);
			
           });
        });
		// List Cycle
		$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) { 
		    $("#year-select").find('li').removeClass('active') 
		        .filter('li:eq('+currSlideIndex+')').addClass('active'); 
		};
		
		$("#list-by-year").cycle({
				fx: "none", 
				speed:  200,
				pager:  '#year-select',
				next:   '.next', 
				prev:   '.prev',
				timeout: 0,
				pagerAnchorBuilder: function(idx, slide) {
				return '#year-select li:eq(' + (idx) + ') a';
				}
			});




var galleryContainer = '.blowup'; // Set gallery container
var thumbContainer = '.thumb-list'; // Set gallery container

$(thumbContainer).after('<div class="gallery-controls"><span><a href="#" class="next">Next</a> / <a href="#" class="prev">Prev</a></span> <span class="slide-count"></span> </div>');

 $(galleryContainer).cycle({
		fx: 'none', 
		speed:  200,
		pager:  '.thumb-list',
		after:  slideCounter,
		next:   '.next', 
		prev:   '.prev',
		timeout: 0,
		pagerAnchorBuilder: function(idx, slide) {
		return '.thumb-list li:eq(' + (idx) + ') a';
		}
		
	});

	function slideCounter(curr, next, opts, fwd){ // Total and Current slide tracker
		
		var slidenum = '(' + (opts.currSlide + 1) + ' of ' + opts.slideCount + ')';
		$('.slide-count').html(slidenum);
		
	};
});
