

  // Initially set opacity on thumbs and add
			// additional styling for hover effect on thumbs
			var onMouseOutOpacity = 0.67;
			$('#thumbs-adv ul.thumbs li').css('opacity', onMouseOutOpacity)
				.hover(
					function () {
						$(this).not('.selected').fadeTo('fast', 1);
					}, 
					function () {
						$(this).not('.selected').fadeTo('fast', onMouseOutOpacity);
					}
				);

			
$(document).ready(function() {
				// Initialize Advanced Galleriffic Gallery
				var galleryAdv = $('#gallery-adv').galleriffic('#thumbs-adv', {
					delay:                  3000,
					numThumbs:              15,
					preloadAhead:           15,
					enableTopPager:         true,
					enableBottomPager:      false,
					imageContainerSel:      '#slideshow-adv',
					controlsContainerSel:   '#controls-adv',
					captionContainerSel:    '#caption-adv',
					loadingContainerSel:    '#loading-adv',
					renderSSControls:       false,
					renderNavControls:      false,
					playLinkText:           '',
					pauseLinkText:          '',
					prevLinkText:           '',
					nextLinkText:           '',
					nextPageLinkText:       '',
					prevPageLinkText:       '',
					enableHistory:          false,
					autoStart:              false,
					onChange:               function(prevIndex, nextIndex) {
						$('#thumbs-adv ul.thumbs').children()
							.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
							.eq(nextIndex).fadeTo('fast', 1);
					},
					onTransitionOut:        function(callback) {
						$('#slideshow-adv, #caption-adv').fadeOut('fast', callback);
					},
					onTransitionIn:         function() {
						$('#slideshow-adv, #caption-adv').fadeIn('slow');
					},
					onPageTransitionOut:    function(callback) {
						$('#thumbs-adv ul.thumbs').fadeOut('fast', callback);
					},
					onPageTransitionIn:     function() {
						$('#thumbs-adv ul.thumbs').fadeIn('fast');
					}
					
					
					
				});
	
});

$(document).ready(function(){
$("#thumbs-adv img").fadeTo("slow", 0.6); // This sets the opacity of the thumbs to fade down to 60% when the page loads

$("#thumbs-adv img").hover(function(){
$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
},function(){
$(this).fadeTo("slow", 0.6); // This should set the opacity back to 60% on mouseout
});
});