Photos
jQuery(document).ready(function($) {
// We only want these styles applied when javascript is enabled $('.gal_content').css('display', 'block');
// Initially set opacity on thumbs and add // additional styling for hover effect on thumbs var onMouseOutOpacity = 0.67; $('#thumbs_14 ul.thumbs li, .thumnail_col a.pageLink').opacityrollover({ mouseOutOpacity: onMouseOutOpacity, mouseOverOpacity: 1.0, fadeSpeed: 'fast', exemptionSelector: '.selected' });
// Initialize Advanced Galleriffic Gallery var gallery = $('#thumbs_14').galleriffic({ delay: 1500, numThumbs: 13, preloadAhead: 13, enableTopPager: false, enableBottomPager: false, imageContainerSel: '#slideshow_14', controlsContainerSel: '#controls_14', captionContainerSel: '#caption_14', loadingContainerSel: '#loading_14', renderSSControls: true, renderNavControls: true, playLinkText: 'Play Slideshow', pauseLinkText: 'Pause Slideshow', prevLinkText: '‹ Previous Photo', nextLinkText: 'Next Photo ›', nextPageLinkText: 'Next ›', prevPageLinkText: '‹ Prev', enableHistory: false, autoStart: '1', enableKeyboardNavigation: true, syncTransitions: true, defaultTransitionDuration: 300,
onSlideChange: function(prevIndex, nextIndex) { // 'this' refers to the gallery, which is an extension of $('#thumbs') this.find('ul.thumbs').children() .eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end() .eq(nextIndex).fadeTo('fast', 1.0); }, onTransitionOut: function(slide, caption, isSync, callback) { slide.fadeTo(this.getDefaultTransitionDuration(isSync), 0.0, callback); caption.fadeTo(this.getDefaultTransitionDuration(isSync), 0.0); }, onTransitionIn: function(slide, caption, isSync) { var duration = this.getDefaultTransitionDuration(isSync); slide.fadeTo(duration, 1.0);
// Position the caption at the bottom of the image and set its opacity var slideImage = slide.find('img'); caption.width(slideImage.width()) .css({ //'bottom' : Math.floor((slide.height() - slideImage.outerHeight()) / 2 - 40), 'top' : slideImage.outerHeight(), 'left' : Math.floor((slide.width() - slideImage.width()) / 2) + slideImage.outerWidth() - slideImage.width() }) .fadeTo(1000, 1.0);
}, onPageTransitionOut: function(callback) { this.hide(); setTimeout(callback, 100); // wait a bit }, onPageTransitionIn: function() { var prevPageLink = this.find('a.prev').css('display', 'none'); var nextPageLink = this.find('a.next').css('display', 'none');
// Show appropriate next / prev page links if (this.displayedPage > 0) prevPageLink.css('display', 'block');
var lastPage = this.getNumPages() - 1; if (this.displayedPage < lastPage) nextPageLink.css('display', 'block');
this.fadeTo('fast', 1.0); }, onImageAdded: function(imageData, li) { _li.opacityrollover({ mouseOutOpacity: onMouseOutOpacity, mouseOverOpacity: 1.0, fadeSpeed: 'fast', exemptionSelector: '.selected' }); }
});
/**************** Event handlers for custom next / prev page links **********************/
gallery.find('a.prev').click(function(e) { gallery.previousPage(); e.preventDefault(); });
gallery.find('a.next').click(function(e) { gallery.nextPage(); e.preventDefault(); });
});















