PageSourceSearch

https://kerlingallery.com/scripts.3a74847558f57d375d27eaec191047e3.js

js kerlingallery.com collected 2026-09-24 22:07:05 UTC 16,305 bytes, 380 lines download raw bytes

1// var bxslider_config = {
2//   "banner-top" : {
3//       pause: 2500
4//   }
5// }
6
7//------------------------------------------------------------------------------
8// REMOVE CKEDITOR FROM FRONTEND
9$( document ).bind("ready ajaxComplete",function() {
10    $('[class*=ee-editor]').removeAttr("style");
11
12    //--------------------------------------------------------------------------
13    // SCREEN-WIDE
14    $(".ee-editor-screen-wide").each(function() {
15        $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-wide');
16        $(this).remove();
17    });    
18});
19
20//------------------------------------------------------------------------------
21// DOC READY ONLY
22$( document ).bind("ready",function() {
23
24    //--------------------------------------------------------------------------
25    // BANNER-TOP    
26    $('section[id*="banner-top"] .full-width-banner .slide').each(function() {
27        
28        // figcaption
29        if(!$(this).find('figcaption').length){
30            $(this).append('<figcaption></figcaption>');
31        }
32        $(this).find('figcaption').prepend($('.item-header').contents());
33        $(this).find("figcaption").wrapInner('<div class="container"></div>');
34        $('.page-header').css({'display':'none'});
35        
36        // text colors
37        if (($( this ).find('.image-title[style*="color"]').length) && (!$( this ).find('.image-subtitle[style*="color"]').length)) {
38            var tempColor = $( this ).find('.image-title').css( "color" );
39            $( this ).find('h2, h3, .image-description, a').css({'color':tempColor});
40        }
41        if ($( this ).find('.image-subtitle[style*="color"]').length) {
42            var tempColorSub = $( this ).find('.image-subtitle').css( "color" );
43            $( this ).find('h3, .image-description, a').css({'color':tempColorSub});
44        }        
45        
46        // background fader
47        $(this).append('<div class="ee-banner-fader"></div>');
48
49        // fade in
50        // if($(this).find('figcaption a[href*="vimeo"]').length){
51        //     var videoUrl = $(this).find('figcaption a').attr('href');
52        //     $(this).find('figure, figcaption a').remove();
53        //     $(this).prepend('<figure class="jarallax jarallax-video" data-video-src="'+videoUrl+'" style="background-color:#f0f0f0"><img class="jarallax-img" src="https://s3.amazonaws.com/files.collageplatform.com.prod/application/6026ca599b88566687556cb2/jarallax-video-background.png" alt=""></figure>');
54        //     $.getScript( "https://s3.amazonaws.com/files.collageplatform.com.prod/application/6026ca599b88566687556cb2/jarallax-video.js", function() {
55        //         $('.jarallax-video').jarallax({
56        //             videoPlayOnlyVisible: false,
57        //             videoLazyLoading: false
58        //         });
59        //         var iframe = document.querySelector('.jarallax-video iframe');
60        //         var playerj = new Vimeo.Player(iframe);
61        //         playerj.on('play', function() {
62        //             $('#banner-top figure > div').addClass('ee-fade-in');
63        //         });
64        //     });
65        // }else{
66        //     $('#banner-top figure > div').addClass('ee-fade-in');
67        // }
68
69        // video jarallax
70        if($(this).find('figcaption a[href*="vimeo"]').length){
71            var videoUrl = $(this).find('figcaption a').attr('href');
72            $(this).find('figure, figcaption a').remove();
73            $(this).prepend('<figure class="jarallax jarallax-video" data-video-src="'+videoUrl+'" style="background-color:#000000"><img class="jarallax-img" src="https://s3.amazonaws.com/files.collageplatform.com.prod/application/6026ca599b88566687556cb2/jarallax-video-background.png" alt=""></figure>');
74            $.getScript( "https://s3.amazonaws.com/files.collageplatform.com.prod/application/6026ca599b88566687556cb2/jarallax-video.js", function() {
75                $('.jarallax-video').jarallax({
76                    videoPlayOnlyVisible: false,
77                    videoLazyLoading: false
78                });
79            });
80        }
81        
82    });
83
84    //--------------------------------------------------------------------------
85    // EXHIBITION INDEX NON CLICKABLE ENTRY BUG FIX
86    $('.s-exhibitions #large .entry').each(function() {
87        if($(this).find('a').length){
88            $(this).removeClass('not-clickable');
89        }
90    });  
91    // FAIRS INDEX NON CLICKABLE ENTRY BUG FIX
92    $('.s-fairs #large .entry').each(function() {
93        if($(this).find('a').length){
94            $(this).removeClass('not-clickable');
95        }
96    });
97
98
99    //--------------------------------------------------------------------------   
100    // ARTIST DETAIL
101    $('.s-artists.detail-page .quicklinks').closest('.container').addClass("ee-quicklinks ee-container-100");
102    $('.s-artists.detail-page .page-header').closest('.container').addClass("ee-container-100");  
103
104    // EXHIBITION DETAIL
105    $('.s-exhibitions.detail-page .quicklinks').closest('.container').addClass("ee-quicklinks ee-container-100");
106    $('.s-exhibitions.detail-page .page-header').closest('.container').addClass("ee-container-100");  
107
108    // FAIRS DETAIL
109    $('.s-fairs.detail-page .quicklinks').closest('.container').addClass("ee-quicklinks ee-container-100");
110    $('.s-fairs.detail-page .page-header').closest('.container').addClass("ee-container-100"); 
111
112
113    //--------------------------------------------------------------------------
114    // EE-QUICKLINKS-STICKY
115    // if there is a banner make quicklinks sticky
116    if($('.s-artists.detail-page #banner-top').length){
117        $('.ee-quicklinks').addClass("ee-quicklinks-sticky");
118        $('.ee-quicklinks-sticky').insertAfter('section#banner-top');
119    }
120    if($('.s-exhibitions.detail-page #banner-top').length){
121        $('.ee-quicklinks').addClass("ee-quicklinks-sticky");
122        $('.ee-quicklinks-sticky').insertAfter('section#banner-top');
123    }
124    if($('.s-fairs.detail-page #banner-top').length){
125        $('.ee-quicklinks').addClass("ee-quicklinks-sticky");
126        $('.ee-quicklinks-sticky').insertAfter('section#banner-top');
127    }     
128    
129    // if only "modular" links then remove sticky
130    if(!$('.ee-quicklinks-sticky .qlinks a:not([href*="modular"])').length){
131        $('.ee-quicklinks-sticky').removeClass("ee-quicklinks-sticky");
132    } 
133
134    // set top position of sticky quicklink after main-header transition
135    $(".main-header").bind("transitionend", function(){ 
136        var extramenu = $('.main-header').outerHeight();
137        $('.ee-quicklinks-sticky').css({'position':'sticky','top':extramenu});        
138    });
139
140    // re-define the top offset
141    $(".ee-quicklinks-sticky .qlink").click(function() {
142        if ($(window).width() > 1024) {
143                // Set main header to sticky height
144                $('body').addClass("ee-custom-scroll-on");
145                // get URL
146                var href = $(this).attr('href');
147        
148                // Delay setting the location
149                setTimeout(function() {
150                    // get sticky menu height
151                    var extramenuTop = $('.main-header').outerHeight();
152                    var extramenuBottom = $('.ee-quicklinks-sticky').outerHeight();
153                    var extramenuCombined = extramenuTop + extramenuBottom + 20;
154                    // go to URL
155                    $('html, body').animate({
156                        scrollTop: $(href).offset().top-extramenuCombined
157                    }, 350);            
158                }, 150);
159                return false;
160        }
161    });
162    
163    
164    //--------------------------------------------------------------------------
165    // ISSUU   
166    $('#issuu iframe').wrap('<div class="ee-ratio"></div>');
167    
168    //--------------------------------------------------------------------------    
169    // NEWS DETAIL PAGE
170    $('.s-news.detail-page #images').insertAfter('.s-news.detail-page .page-header-container');
171
172    //--------------------------------------------------------------------------
173    // FOOTER SOCIAL - APPEND TO FOOTER-COLS
174    $('.footer-social').appendTo( '.footer-cols' );
175
176    //--------------------------------------------------------------------------
177    // FOOTER SITEINDEX + CREDIT (4TH COL)
178    $('.footer-col4').appendTo( 'footer .container' );
179    $('footer .credit').appendTo('.footer-col4');    
180
181    //--------------------------------------------------------------------------
182    // MOBILE MENU CLICK TOP-BANNER FIX
183    $( "nav.mobile a.menu" ).click(function() {
184        var extramenu = $('.main-header').outerHeight(true);
185        $('section[id*="banner-top"]').css("margin-top", -(extramenu) );
186    }); 
187
188    //--------------------------------------------------------------------------
189    // HOME-ITEMS
190    $("#home-items-grid .entry .inventory").each(function(){
191        $(this).prependTo($(this).parent());
192    });
193    
194    //--------------------------------------------------------------------------
195    // HOME SCREEN REORDER
196    $('.s-home #related-news').appendTo('.s-home .custom_page')
197    $('.s-home #related-press').appendTo('.s-home .custom_page')
198});
199
200//------------------------------------------------------------------------------
201// READY + AJAXCOMPLETE
202$( document ).bind("ready ajaxComplete",function() {
203
204    // EXHIBTIONS CURRENT LARGE EXTERNAL LINK
205    $('.s-exhibitions #large .entry').each(function() {
206        $(this).find('.links').appendTo( $(this).find('.headers') )
207    }); 
208    
209    // FAIRS CURRENT LARGE EXTERNAL LINK
210    $('.s-fairs #large .entry').each(function() {
211        $(this).find('.links').appendTo( $(this).find('.headers') )
212    });     
213
214});
215
216
217//------------------------------------------------------------------------------
218// LOAD RESIZE
219$(window).on('load resize', function () {
220
221    // --------------------------------------------------------------------------
222    // MOVE ELEMENTS IN RELATION OF HEIGHT OF MAIN-HEADER
223    var extramenu = $('.main-header').outerHeight(true);
224    $('section[id*="banner-top"]').css("margin-top", -(extramenu) );
225
226
227});
228
229
230//------------------------------------------------------------------------------
231// SCROLL 
232$(window).scroll(function() {
233
234    if ( $(this).scrollTop() >= 1 ) { 
235        $('body').addClass("ee-custom-scroll-on");
236    }else{
237        $('body').removeClass("ee-custom-scroll-on");
238        var extramenu = $('.main-header').outerHeight(true);
239        $(".contentWrapper").css("padding-top", (extramenu) );
240        $('section[id*="banner-top"]').css("margin-top", -(extramenu) );
241    }
242
243});
244
245
246
247//------------------------------------------------------------------------------
248// SCROLLREVEAL
249$( document ).bind("ready ajaxComplete",function() {
250    
251    // -------------------------------------------------------------------------
252    // ADDING CLASS EE-SCROLLREVEAL SO WE CAN EASILY DESTROY IF NEEDED
253    // banner-top
254    $('#banner-top .slide:first-of-type figcaption').addClass('ee-scrollreveal');
255    $('#wrapper-banner-top .slide:first-of-type figcaption').addClass('ee-scrollreveal');
256    
257    // index pages
258    $('.s-artists .home .entry').addClass('ee-scrollreveal');
259    $('.s-exhibitions .home .entry').addClass('ee-scrollreveal');
260    $('.s-fairs .home .entry').addClass('ee-scrollreveal');
261    $('.s-publications .home .entry').addClass('ee-scrollreveal');
262    $('.s-news .news-index .entry').addClass('ee-scrollreveal');
263    $('.s-contact #wrapper-contact .column').addClass('ee-scrollreveal');
264    $('.s-contact #wrapper-map').addClass('ee-scrollreveal');
265    $('.s-contact #wrapper-team .entry').addClass('ee-scrollreveal');
266    
267    // modular
268    $('section[id*="modular-a-1"] .text-one-column-with-image:not(.banner-image):not(.large-image)').addClass('ee-scrollreveal');
269    $('section[id*="modular-a-2"] .text-one-column-with-image:not(.banner-image):not(.large-image)').addClass('ee-scrollreveal');
270    $('section[id*="modular-a-3"] .text-one-column-with-image:not(.banner-image):not(.large-image)').addClass('ee-scrollreveal');
271
272    // associations
273    $('#associations [id*="related-"] .entry').addClass('ee-scrollreveal');
274
275    // swiper thumbnails
276    $('.squared .thumbnail-container').addClass('ee-scrollreveal');
277
278    // -------------------------------------------------------------------------
279    // SCROLL REVEAL
280    var slideUp = {
281        distance: '40px',
282        duration: 800,
283        interval: 80
284    };
285    ScrollReveal().reveal('.ee-scrollreveal', slideUp);
286
287    // -------------------------------------------------------------------------
288    // MANUALLY DESTROY SCROLLREVEL WHEN CLICKING SWIPER THUMBNAIL OR TOGGLE LINK  
289    $("#selected-works img, #installations img, #selected-works a, #installations a").click(function() {
290        $('.ee-scrollreveal').css({'opacity':'','transform':'','visibility':'visible'});
291        ScrollReveal().clean('.ee-scrollreveal');
292        ScrollReveal().destroy();
293    });   
294  
295});
296
297
298// ------------------------------------------------------------------------------
299// -----------------------------------------------------------------------------
300// -----------------------------------------------------------------------------
301// XL IMAGE SWAPS
302$( document ).bind('ready ajaxComplete', function() {
303    
304
305    // -------------------------------------------------------------------------
306    // FOOTER SOCIAL
307    if ($(".footer-social img").length) {
308        $(".footer-social img").each(function() {
309            var match = $(this).attr('src').match(/([a-f0-9]{24}\/[a-f0-9]{32}\.\w{3,4})$/);
310            if (!match) {
311                return;
312            }
313
314            var imgPath = match[1];
315            var src = getResolveUrl(imgPath, '70x70');
316
317            $(this).attr('src', src);
318            // $(this).attr('srcset').remove();
319
320        });
321        
322    } 
323
324
325});
326// ------------------------------------------------------------------------------
327// ------------------------------------------------------------------------------
328// ------------------------------------------------------------------------------
329// XL IMAGE SWAPS
330function getResolveUrl(file, filter) {
331    return '/custom/media/cache/resolve/' + filter + '/' + file;
332}
333
334
335
336//------------------------------------------------------------------------------
337//------------------------------------------------------------------------------
338//------------------------------------------------------------------------------
339// VIEWING ROOM WITH CUSTOMIZATION OPTIONS
340// $(function () {
341//   emailProtected.run({
342//     contentWrapperSelector: '.contentWrapper',
343
344//     template: null, // you can override default form template
345
346//     showNames: true, // include first and last name in form
347//     isFirstNameRequired: true,
348//     isLastNameRequired: true,
349
350//     // you can bind to any of the following events
351//     notEmailProtected: function () { 
352        
353//         // NOTE THAT THIS HAPPENS ON BOTH INDEX AND DETAIL PAGES
354//         $(this.options.contentWrapperSelector).css({display: 'block'});    
355        
356//     },
357    
358//     beforeShowContent: function () { /* ... */ },
359    
360//     afterShowContent: function () {
361        
362//         // NOTE THAT THIS HAPPENS ON BOTH INDEX AND DETAIL PAGES
363//         $(this.options.contentWrapperSelector).css({display: 'block'});
364        
365//     },
366    
367//     beforeProtectPage: function () { /* ... */ },
368//     afterProtectPage: function () { /* ... */ },
369//     beforeFormSubmit: function () { /* ... */ },
370//     afterFormSubmit: function () { /* ... */ },
371//     beforeAjaxSuccess: function () { /* ... */ },
372//     afterAjaxSuccess: function () { /* ... */ },
373//     onAjaxFail: function () { /* ... */ },
374//     beforePrepareCover: function () { /* ... */ },
375//     afterPrepareCover: function () { /* ... */ },
376//     beforeInitOptions: function () { /* ... */ },
377//     afterInitOptions: function () { /* ... */ }
378//   });
379// });
380   

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.