.ready(function(){
bindImageFadeIn('.justified .galleryImagesContainer .imageContainer img,.stacked .galleryImagesContainer .imageContainer img');
});
</script>
</div> <script>
$(document).ready(function(){
// do horizontal smart scrolling
// fixes nav horizontally
if(useSmartScroll == 1)
{
smartScrollHorizontal('#topNavContainer');
smartScrollHorizontal('#imageGalleryStatementLinkContainer');
smartScrollHorizontal('#breadCrumbContainer');
smartScrollHorizontal('#navOnTopPager');
}
});
</script>
<script>
// selector should always be '.thumb' (no current cases otherwise)
function triggerLightbox(selector)
{
if(useIcLightBox == '1')
{
//console.log('triggering lightbox ' + autoLaunchLightbox);
$(selector).icLightbox({
showPageXofY: '',
fixedButtons: '1',
dontOverLapArrows: 1,
preloadImagesOnPageLoad: 0,
pagerStyle: 'buttons',
icLightBoxBackgroundColor:'#FFFFFF',
icLightBoxBackgroundImage: '',
icLightBoxPrevImage: '<span class=)
',
icLightBoxCloseIcon: '',
icLightBoxToggleCloseIcon: '',
icLightBoxToggleOpenIcon: '',
icLightBoxScrollDownIcon: '',
icLightBoxUseGoogleAnalytics : useGoogleAnalytics,
displayImageInfoBelow: true,
dropInfoOffBottom: false,
allMarginsWidth: 15,
icLightboxAutoLaunch: autoLaunchLightbox,
icLightBoxUsePushState: usePushState
});
}
else
{
$(selector).lightBox({alwaysDisplayCloseButton:1,closeButtonIsIcon:0});
}
}
// for layouts with paging
function attachPagedLightboxImages(selectorClass)
{
//console.log('running ' + selectorClass);
var beforeImages = $('.lightboxbefore');
var afterImages = $('.lightboxafter');
// put additional elements outside container that may run separate plugin functionality later on
$('.' + selectorClass).filter(':first').parent().parent().prepend(beforeImages);
$('.' + selectorClass).filter(':last').parent().parent().append(afterImages);
beforeImages.addClass(selectorClass);
afterImages.addClass(selectorClass);
// console.log('adding ' + selectorClass);
}
function bindImageFadeIn(imageCollection)
{
console.log('fading in images');
console.log(imageCollection);
// Don't add a pre-loader for main page images. If removed from not selector should be ok.
$(imageCollection).not('.protectorGif,.detailDiv img,#verticalStandardContainer img,#horizontalStandardLayoutItemContainer img,#smallGridContainer img,.soldDot,#longTextContainer img').each(function(){
$(this).parent().append('
');
console.log($(this));
});
var imageInfo = $(imageCollection).parents('.imageItemContainer').first().find('.imageInfo');
imageInfo.addClass('noOpacity');
$(imageCollection).not('.protectorGif,.detailDiv img,img.loading').one("load",function(){
$(this).animate({
opacity: 1
}, parseInt(500));
imageInfo.removeClass('noOpacity');
$(this).parents('a,.carouselBigImageDiv').first().children('.loading').remove();
//console.log('loaded...');
}).each(function(){
if(this.complete){ $(this).trigger("load"); }
});
}