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

$(document).ready(function() {
// Initialize Advanced Galleriffic Gallery
var galleryAdv = $('#gallery-adv').galleriffic('#thumbs-adv', {
delay:                  3500,
numThumbs:              15,
preloadAhead:           10,
enableTopPager:         false,
enableBottomPager:      true,
imageContainerSel:      '#slideshow-adv',
controlsContainerSel:   '#controls-adv',
captionContainerSel:    '#caption-adv',
loadingContainerSel:    '#loading-adv',
renderSSControls:       true,
renderNavControls:      true,
playLinkText:           '<img src="/common/img/btn_play02.gif" alt="btn_play" width="148" height="17" />',
pauseLinkText:          '<img src="/common/img/btn_pause02.gif" alt="btn_pause" width="148" height="17" />',
prevLinkText:           '<img src="/common/img/icon_previous03.gif" alt="Previous Photo" width="17" height="17" />',
nextLinkText:           '<img src="/common/img/icon_next03.gif" alt="Next Photo" width="17" height="17" />',
nextPageLinkText:       '<img src="/common/img/icon_next02.gif" alt="Next" width="11" height="11" />',
prevPageLinkText:       '<img src="/common/img/icon_previous02.gif" alt="Previous" width="11" height="11" />',
enableHistory:          true,
autoStart:              false,
onChange:               function(prevIndex, nextIndex) {
$('#thumbs-adv ul.thumbs').children()
.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
.eq(nextIndex).fadeTo('fast', 1.0);
},
onTransitionOut:        function(callback) {
$('#slideshow-adv, #caption-adv').fadeOut('fast', callback);
},
onTransitionIn:         function() {
$('#slideshow-adv, #caption-adv').fadeIn('fast');
},
onPageTransitionOut:    function(callback) {
$('#thumbs-adv ul.thumbs').fadeOut('fast', callback);
},
onPageTransitionIn:     function() {
$('#thumbs-adv ul.thumbs').fadeIn('fast');
}
});
			
});