0 ? tryParseJSON($sectionThis.find('.layout-customize').val()) : {};$sectionThis.data('layout-customize',layout_customize);if ( parseInt(layout_customize.mobile_number_images_in_row) > 1 ) {$sectionThis.addClass('m-m-i-in-row');}
$sectionThis.magnificPopup({mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible', // Isotope Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading, // Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc, // Alt text on close button
tPrev: translations.previousLeftArrowKey, // Alt text on left arrow
tNext: translations.NextRightArrowKey, // Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%' // Markup for "1 of 7" counter
},image: {markup: '',titleSrc: function(item) {return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),true);},tError: translations.imageCouldNotLoaded // Error message when image could not be loaded
},iframe: {markup: '',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var matches = url.match(/[\\?\\&]v=([^\\?\\&]+)/);if ( !matches || !matches[1] ) return null;return matches[1];},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-files'],id: function( url ) {if ( isMobile.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobile.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),true);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');$bar.show();$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},close: function( item ) {if ( !skipHistoryEntry ) {window.history.replaceState('','Title',this.mp_currentPageUrl);}
setTimeout(function(){$(window).trigger('resize.gallery_handler');},100);}}});gallery_SetImageSize($sectionThis);$(document).off('gallery.isotope.handler').on('gallery.isotope.handler', function( event, $category ) {var $isotopeContainer = $category.find('.isotope-gallery-container');if ( $isotopeContainer.data('isotope') ) {$isotopeContainer.isotope('layout');} else {var transitionDuration = $.isNumeric($isotopeContainer.data('isotope-transition')) ? $isotopeContainer.data('isotope-transition') : '0.4s';$isotopeContainer.isotope({itemSelector: '.s123-module-gallery .gallery-item-wrapper',transitionDuration: transitionDuration});$isotopeContainer.on('layoutComplete', function( event ) {$(document).trigger('s123.page.ready.refreshAOS');});}});if ( $isotopeFilter.length !== 0 ) {var $firstCategory = $isotopeFilter.find('[data-filter]').first();var hash = window.location.hash.substring(1);if ( $isotopeFilter.find('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $isotopeFilter.find('[data-unique-id="'+window.location.hash.replace('#','')+'"]');}
$categories.hide();$categories.filter('[data-filter="'+$firstCategory.attr('data-filter')+'"]').show();$(document).trigger('gallery.isotope.handler',[$categories.filter('[data-filter="'+$firstCategory.attr('data-filter')+'"]')]);$isotopeFilter.find('li').removeClass('active');$firstCategory.addClass('active');$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+$firstCategory.data('filter')+'"]').show();}
$isotopeFilter.find('[data-filter]').off('click').on('click', function () {var filter = $(this).attr('data-filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {disableEnableInfinityScroll($sectionThis);$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);$(document).trigger('gallery.isotope.handler',[$(this)]);});});$isotopeFilter.find('[data-filter]').removeClass('active');$(this).addClass('active');return false;});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$sectionThis.find('.s123-infinity-scroll').off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.find('.isotope-gallery-container').append($items);gallery_SetImageSize($this.find('.isotope-gallery-container').closest('section'));$this.find('.isotope-gallery-container').isotope('appended',$items);window.myLazyLoad.update();if ( IsIE11() ) {$.each($items, function( index, image ) {$(document).trigger('lazyload_enter.image',[$(image)]);});}});gallery_BrowserBackButtonHandler($isotopeFilter);}
if ( IsIE11() ) {$.each($isotopeContainer.find('img'), function( index, image ) {$(image).attr('src',$(image).attr('data-src'));});}});$(window).off('resize.gallery_handler').on('resize.gallery_handler', function (event) {$section.each(function( index ) {gallery_SetImageSize($(this));$(document).trigger('gallery.isotope.handler',[$(this).find('.gallery-category:visible')]);});});$(document).off('lazyload_enter.image').on('lazyload_enter.image',function( event, $img ) {if ( $img.closest('.s123-module-gallery.isotope-gallery').length === 0 ) return;var $sectionThis = $img.closest('section');var $galleryItemWrapper = $img.closest('.gallery-item-wrapper');if ( $sectionThis.hasClass('o-c-s') ) {$galleryItemWrapper.imagesLoaded().progress( function( instance, image ) {$(document).trigger('gallery.isotope.handler',[$galleryItemWrapper.closest('.gallery-category')]);});} else {$img.one('load', function() {var dbRatio = parseInt($galleryItemWrapper.data('original-width')) / parseInt($galleryItemWrapper.data('original-height'));$img.addClass('size-tester');var imageWidth = $img.width();var imageHeight = $img.height();var imageRatio = imageWidth / imageHeight;$img.removeClass('size-tester');if ( !((Math.abs(dbRatio.toFixed(3) - imageRatio.toFixed(3)).toFixed(3)) <= 0.01) ) {$galleryItemWrapper.data('original-width',imageWidth);$galleryItemWrapper.data('original-height',imageHeight);fixImagesOnFly($galleryItemWrapper,imageRatio);if ( !fixImagesWithJob ) {fixImagesWithJob = true;$.ajax({type: "POST",url: '/versions/'+$('#versionNUM').val()+'/wizard/modules/gallery/recalculateGalleryImages.php',data: {websiteID: $('#websiteID').val(),w: $('#w').val()},success: function( data ) {}});}}});}});function fixImagesOnFly( $galleryItemWrapper, imageRatio ) {$galleryItemWrapper.height(( $galleryItemWrapper.width() / imageRatio ));$(document).trigger('gallery.isotope.handler',[$galleryItemWrapper.closest('.gallery-category')]);}});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();}}
function gallery_BrowserBackButtonHandler( $categoriesFilter ) {var $categories = $categoriesFilter.find('[data-unique-id]');$categories.off('click.back_button_handler').on('click.back_button_handler', function( event, flag ) {event.preventDefault();var hash = window.location.hash.substring(1);if ( hash === $(this).data('unique-id') ) return;if ( flag == 'skipHistory' ) return;window.history.pushState('forward', null, '#'+$(this).data('unique-id'));});if ( window.history && window.history.pushState ) {$(window).off('popstate.back_button_handler').on('popstate.back_button_handler', function() {var hash = window.location.hash.substring(1);if ( hash.length === 0 ) {$categories.first().trigger('click',['skipHistory']);} else {$categories.filter('[data-unique-id="'+hash+'"]').trigger('click',['skipHistory']);}});}}
function galleryAddInfinityScroll( $sectionThis ) {$.each($sectionThis.find('.s123-infinity-scroll'), function( index, container ) {var $this = $(this);var infiniteScroll = new s123InfiniteScroll({isMobile: false,$container: $this,id: $this.data('unique-id'),offset: $('footer.global_footer').outerHeight(),ajax: {type: 'GET',url: '/versions/2/wizard/modules/gallery/front/infiniteScroll.php',data: {w: $('#w').val(),websiteID: $('#websiteID').val(),uniquePageID: $this.data('module-id'),toolTitle: $this.data('tool-title'),pageUrl: $this.data('page-url'),limit: isMobile.any() ? 25 : $this.data('limit'),filter: $this.data('filter'),toolStyle: $this.data('tool-style'),tranW: $this.data('language')},success: function( data ) {$this.trigger('infiniteScroll.loaded',[data]);}}});});disableEnableInfinityScroll($sectionThis);}
function disableEnableInfinityScroll( $sectionThis ) {$.each($sectionThis.find('.s123-infinity-scroll'), function( index, category ) {var $this = $(this);if ( !$this.data('s123InfiniteScroll') ) return;if ( $this.is(':visible') ) {$this.data('s123InfiniteScroll').enable();} else {$this.data('s123InfiniteScroll').disable();}});}
function gallery_DecideNumberOfImageByScreenWidth( $sectionThis ) {var screen = $sectionThis.find('.isotope-gallery-container:visible').width();if ( screen <= 400 ) {if ( $sectionThis.data('layout-customize') && $sectionThis.data('layout-customize').mobile_number_images_in_row ) {return $sectionThis.data('layout-customize').mobile_number_images_in_row;} else {return 1;}}
if ( screen <= 768 ) {return 2;}
if ( screen <= 992 ) {if ( $sectionThis.data('layout-customize') && $sectionThis.data('layout-customize').number_images_in_row ) {return $sectionThis.data('layout-customize').number_images_in_row;} else {return 3;}}
if ( screen <= 1600 ) {if ( $sectionThis.data('layout-customize') && $sectionThis.data('layout-customize').number_images_in_row ) {return $sectionThis.data('layout-customize').number_images_in_row;} else {return 3;}}
if ( screen > 1600 ) {if ( $sectionThis.data('layout-customize') && $sectionThis.data('layout-customize').number_images_in_row ) {return $sectionThis.data('layout-customize').number_images_in_row;} else {return 4;}}}
function gallery_SetImageSize( $sectionThis ) {var imageWidth = Math.floor($sectionThis.find('.isotope-gallery-container:visible').width()/gallery_DecideNumberOfImageByScreenWidth($sectionThis));var isOldCustomer = false;if ( $sectionThis.hasClass('layout-1') ) {imageWidth = imageWidth - 10;}
$sectionThis.find('.gallery-item-wrapper').each(function( index, itemWrapper ) {var $this = $(this);$this.width(imageWidth);if ( $.isNumeric($this.data('original-width')) && $.isNumeric($this.data('original-height')) ) {var aspectRatio = ( parseInt($this.data('original-width')) / parseInt($this.data('original-height')) );var newHeight = ( imageWidth / aspectRatio );$this.height(newHeight);} else {isOldCustomer = true;}});if ( isOldCustomer ) {$sectionThis.addClass('o-c-s');}}
function Gallery_getSocialLinks( url, title ) {var url = encodeURIComponent(window.location.origin + url);var title = encodeURIComponent(title);var html = '';return html;}
function Gallery_getImageMagnificPopupCaption( toolTitle, imageDescription, externalLink ,externalLinkText , imagePageURL, title , addSocial ) {var caption = '';if ( !title == '' && !imageDescription == '' ) {caption += title + ' - ' + imageDescription;} else if ( !title == '' ) {caption += title;} else {caption += imageDescription;}
caption += '
';if ( !externalLink == '' ) {caption += '';caption += !externalLinkText == '' ?externalLinkText : externalLink;caption += '';}
if ( addSocial ) {if ( title === '' ) {socialShareTitle = toolTitle;} else {socialShareTitle = title+' - '+toolTitle;}
caption += Gallery_getSocialLinks(imagePageURL,socialShareTitle);}
return caption;}jQuery(function($) {GalleryModuleInitialize_Layout4();});function GalleryModuleInitialize_Layout4() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-4:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $images = $sectionThis.find('.gallery-image');var $firstCategory = $categoriesFilter.first();var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible', // Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading, // Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc, // Alt text on close button
tPrev: translations.previousLeftArrowKey, // Alt text on left arrow
tNext: translations.NextRightArrowKey, // Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%' // Markup for "1 of 7" counter
},image: {markup: '',titleSrc: function(item) {return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),true);},tError: translations.imageCouldNotLoaded // Error message when image could not be loaded
},iframe: {markup: '',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var matches = url.match(/[\\?\\&]v=([^\\?\\&]+)/);if ( !matches || !matches[1] ) return null;return matches[1];},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-files'],id: function( url ) {if ( isMobile.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobile.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),true);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');$bar.show();$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},close: function(item) {window.history.replaceState('','Title',this.mp_currentPageUrl);}}});$categoriesFilter.off('click').on('click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.append($items);window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click',[true]);});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}jQuery(function($) {GalleryModuleInitialize_Layout5();});function GalleryModuleInitialize_Layout5() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-5:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $images = $sectionThis.find('.gallery-image');var $firstCategory = $categoriesFilter.first();var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible', // Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading, // Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc, // Alt text on close button
tPrev: translations.previousLeftArrowKey, // Alt text on left arrow
tNext: translations.NextRightArrowKey, // Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%' // Markup for "1 of 7" counter
},image: {markup: '',titleSrc: function(item) {return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),true);},tError: translations.imageCouldNotLoaded // Error message when image could not be loaded
},iframe: {markup: '',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var matches = url.match(/[\\?\\&]v=([^\\?\\&]+)/);if ( !matches || !matches[1] ) return null;return matches[1];},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-files'],id: function( url ) {if ( isMobile.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobile.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),true);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');$bar.show();$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},close: function(item) {window.history.replaceState('','Title',this.mp_currentPageUrl);}}});$categoriesFilter.off('click').on('click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.find('.gallery-images-container').append($items);window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click',[true]);});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}jQuery(function($) {GalleryModuleInitialize_Layout6();});function GalleryModuleInitialize_Layout6() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-6:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $isotopeContainer = $sectionThis.find('.isotope-gallery-container');var $categories = $sectionThis.find('.filter li');var $flickityContainer = $sectionThis.find('.gallery-images-container');var layout_customize = $sectionThis.find('.layout-customize').length > 0 ? tryParseJSON($sectionThis.find('.layout-customize').val()) : {};var flickitySettings = {imagesLoaded: true,initialIndex: 1,lazyLoad: 2};if ( layout_customize && layout_customize.display_type === 'carousel' ) {flickitySettings.friction = 0.28;var animationOffset = flickitySettings.friction;flickitySettings.wrapAround = true;flickitySettings.pauseAutoPlayOnHover = true;flickitySettings.autoPlay = layout_customize.autoPlay ? parseFloat(layout_customize.carouselInterval) : false;if ( $.isNumeric(flickitySettings.autoPlay) ) {if ( flickitySettings.autoPlay === 0 ) flickitySettings.autoPlay = animationOffset;flickitySettings.autoPlay = (flickitySettings.autoPlay + animationOffset) * 1000;}}
$flickityContainer.flickity(flickitySettings);$isotopeContainer.isotope({itemSelector: '.gallery-images-container, .gallery-image-caption'});$flickityContainer.on('settle.flickity', function() {var $this = $(this);var flkty = Flickity.data( this );var caption = Gallery_getImageMagnificPopupCaption($(flkty.selectedElement).data('tool-title'),$(flkty.selectedElement).data('image-description'),$(flkty.selectedElement).data('image-link'),$(flkty.selectedElement).data('image-link-text'),$(flkty.selectedElement).data('image-page-url'),$(flkty.selectedElement).attr('title'),false);$this.next('.gallery-image-caption').html(caption);$sectionThis.find('.gallery-image:not(.is-selected) iframe').each(function () { // YouTube/Vimeo
switch ( $(this).data('player') ) {case 'youtube':if ( this.src.indexOf("youtube.com") > -1 ) {this.contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*');}
break;case 'vimeo':if ( this.src.indexOf("vimeo.com") > -1 ) {var player = new Vimeo.Player(this);player.pause();}
break;case 'site123':if (this.contentWindow.player) this.contentWindow.player.pause();break;}});$isotopeContainer.isotope('layout');});$isotopeContainer.on( 'arrangeComplete', function( event, filteredItems ) {$flickityContainer.flickity('resize');});$categories.off('click').on('click',function () {var $this = $(this);$isotopeContainer.isotope({filter: function() {return gallery_Filter_Layout6($(this),$this.data('filter'));}});$categories.removeClass('active');$this.addClass('active');$flickityContainer.flickity('resize');return false;});$categories.first().trigger('click');});});}
function gallery_Filter_Layout6( $item, filter ) {return $item.attr('data-filter') == filter;}jQuery(function($) {GalleryModuleInitialize_Layout7();});function GalleryModuleInitialize_Layout7() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-7:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $isotopeContainer = $sectionThis.find('.isotope-gallery-container');var $categories = $sectionThis.find('.filter li');var $flickityContainer = $sectionThis.find('.gallery-images-container');var layout_customize = $sectionThis.find('.layout-customize').length > 0 ? tryParseJSON($sectionThis.find('.layout-customize').val()) : {};var flickitySettings = {imagesLoaded: true,initialIndex: 1,lazyLoad: 2};if ( layout_customize && layout_customize.display_type === 'carousel' ) {flickitySettings.friction = 0.28;var animationOffset = flickitySettings.friction;flickitySettings.wrapAround = true;flickitySettings.pauseAutoPlayOnHover = true;flickitySettings.autoPlay = layout_customize.autoPlay ? parseFloat(layout_customize.carouselInterval) : false;if ( $.isNumeric(flickitySettings.autoPlay) ) {if ( flickitySettings.autoPlay === 0 ) flickitySettings.autoPlay = animationOffset;flickitySettings.autoPlay = (flickitySettings.autoPlay + animationOffset) * 1000;}}
$flickityContainer.flickity(flickitySettings);$isotopeContainer.isotope({itemSelector: '.gallery-images-container, .gallery-image-caption'});$flickityContainer.on('settle.flickity', function() {var $this = $(this);var flkty = Flickity.data( this );var caption = Gallery_getImageMagnificPopupCaption($(flkty.selectedElement).data('tool-title'),$(flkty.selectedElement).data('image-description'),$(flkty.selectedElement).data('image-link'),$(flkty.selectedElement).data('image-link-text'),$(flkty.selectedElement).data('image-page-url'),$(flkty.selectedElement).attr('title'),false);$this.next('.gallery-image-caption').html(caption);$sectionThis.find('.gallery-video-container:not(.is-selected) iframe').each(function () { // YouTube/Vimeo
switch ( $(this).data('player') ) {case 'youtube':if ( this.src.indexOf("youtube.com") > -1 ) {this.contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*');}
break;case 'vimeo':if ( this.src.indexOf("vimeo.com") > -1 ) {var player = new Vimeo.Player(this);player.pause();}
break;case 'site123':if (this.contentWindow.player) this.contentWindow.player.pause();break;}});$isotopeContainer.isotope('layout');});$isotopeContainer.on( 'arrangeComplete', function( event, filteredItems ) {$flickityContainer.flickity('resize');});$categories.off('click').on('click',function () {var $this = $(this);$isotopeContainer.isotope({filter: function() {return gallery_Filter_Layout7($(this),$this.data('filter'));}});$categories.removeClass('active');$this.addClass('active');$flickityContainer.flickity('resize');return false;});$categories.first().trigger('click');});});}
function gallery_Filter_Layout7( $item, filter ) {return $item.attr('data-filter') == filter;}jQuery(function($) {GalleryModuleInitialize_Layout8();});function GalleryModuleInitialize_Layout8() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-8:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $images = $sectionThis.find('.gallery-image');var $firstCategory = $categoriesFilter.first();var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible', // Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading, // Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc, // Alt text on close button
tPrev: translations.previousLeftArrowKey, // Alt text on left arrow
tNext: translations.NextRightArrowKey, // Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%' // Markup for "1 of 7" counter
},image: {markup: '',titleSrc: function(item) {return Gallery_getImageMagnificPopupCaption( $categories.data('tool-title'),item.el.data('image-description'), item.el.data('image-link'), item.el.data('image-link-text') , item.el.data('image-page-url'),item.el.attr('title'),true);},tError: translations.imageCouldNotLoaded // Error message when image could not be loaded
},iframe: {markup: '',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var matches = url.match(/[\\?\\&]v=([^\\?\\&]+)/);if ( !matches || !matches[1] ) return null;return matches[1];},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-files'],id: function( url ) {if ( isMobile.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobile.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {values.title = Gallery_getImageMagnificPopupCaption( $categories.data('tool-title'),item.el.data('image-description'), item.el.data('image-link'), item.el.data('image-link-text') , item.el.data('image-page-url'),item.el.attr('title'),true);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');$bar.show();$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},close: function(item) {window.history.replaceState('','Title',this.mp_currentPageUrl);}}});$categoriesFilter.off('click').on('click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.find('.gallery-images-container').append($items);window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click',[true]);});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}jQuery(function($) {GalleryModuleInitialize_Layout9();});function GalleryModuleInitialize_Layout9() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-9:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $firstCategory = $categoriesFilter.first();var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible', // Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading, // Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc, // Alt text on close button
tPrev: translations.previousLeftArrowKey, // Alt text on left arrow
tNext: translations.NextRightArrowKey, // Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%' // Markup for "1 of 7" counter
},image: {markup: '',titleSrc: function(item) {return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.data('title'),true);},tError: translations.imageCouldNotLoaded // Error message when image could not be loaded
},iframe: {markup: '',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var matches = url.match(/[\\?\\&]v=([^\\?\\&]+)/);if ( !matches || !matches[1] ) return null;return matches[1];},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-files'],id: function( url ) {if ( isMobile.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobile.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),true);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');$bar.show();$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},close: function(item) {window.history.replaceState('','Title',this.mp_currentPageUrl);}}});$categoriesFilter.off('click').on('click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.append($items);window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click',[true]);});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}jQuery(function($) {ServicesModuleInitialize();});function ServicesModuleInitialize() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-services');$section.each(function( index ) {var $sectionThis = $(this);var categories = new ModuleLayoutCategories({$items : $sectionThis.find('.services-category'),$categoriesContainer : $sectionThis.find('.categories-panel'),$filterButton : $sectionThis.find('.items-responsive-filter'),$categories : $sectionThis.find('.items-categories-container li')});});});}