PageSourceSearch

https://davidkordanskygallery.com/scripts.a35b6ec1987e0c143b82b873792f35b1.js

js davidkordanskygallery.com collected 2026-10-02 03:43:14 UTC 46,416 bytes, 934 lines download raw bytes

1var bxslider_config = {
2  "banner-top-home" : {
3      pager: true
4  }
5}
6//------------------------------------------------------------------------------
7// CKEDITOR
8$( document ).bind("ready ajaxComplete",function() {
9
10    //--------------------------------------------------------------------------
11    // REMOVE CKEDITOR FRONTEND INLINE STYLES
12    $('[class*=ee-editor]').removeAttr("style");
13    
14    //--------------------------------------------------------------------------
15    // SCREEN-INVERT
16    $(".ee-editor-screen-invert").each(function() {
17        // $(this).closest('.text-image-wrapper').addClass('ee-custom-screen-invert');
18        $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-invert');
19        $(this).remove();
20    });     
21    
22    //--------------------------------------------------------------------------
23    // SCREEN-SIDE-BANNER
24    $(".ee-editor-screen-side-banner").each(function() {
25        $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-side-banner');
26        $(this).remove();
27    });  
28    $('.ee-custom-screen-side-banner:not(.large-image):not(.banner-image):not(.no-image) .image > img').wrap('<div class="ee-side-banner-image-container"></div>');
29
30    //--------------------------------------------------------------------------
31    // SCREEN-SIDE-LARGE
32    $(".ee-editor-screen-side-large").each(function() {
33        $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-side-large');
34        $(this).remove();
35    });  
36    $('.ee-custom-screen-side-large:not(.large-image):not(.banner-image):not(.no-image) .image > img').wrap('<div class="ee-side-large-image-container"></div>');
37
38    //--------------------------------------------------------------------------
39    // SCREEN-VIDEO-BANNER
40    $(".ee-editor-screen-video-banner").each(function() {
41        $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-video-banner');
42        $(this).remove();
43    });
44    
45    //--------------------------------------------------------------------------
46    // SCREEN-WIDE
47    $(".ee-editor-screen-wide").each(function() {
48        $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-wide');
49        $(this).remove();
50    });
51    
52    //--------------------------------------------------------------------------
53    // SCREEN-ALIGN-TOP
54    $(".ee-editor-screen-align-top").each(function() {
55        $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-align-top');
56        $(this).remove();
57    }); 
58
59
60});
61
62
63
64
65//------------------------------------------------------------------------------
66// DOC READY ONLY
67$( document ).bind("ready",function() {
68
69
70
71
72    //--------------------------------------------------------------------------
73    // HOMEPAGE FULL-WIDTH-BANNER (VIDEO WORKAROUND)
74    $('#wrapper-banner-top-home .full-width-banner .slide').each(function() {
75        if($(this).find('figcaption .ee-editor-block').length){
76            var videoUrl = $(this).find('.ee-editor-block').text();
77            $(this).find('figure, .ee-editor-block').remove();
78            $(this).prepend('<figure class="jarallax" data-video-src="'+videoUrl+'" style="background-color:#f0f0f0"><img class="jarallax-img" src="https://s3.amazonaws.com/files.collageplatform.com.prod/application/675c7754605ea781900ec16e/jarallax-video-background.png" alt=""></figure>');
79            // if there is a link then prepend to link
80            $(this).find('figure').prependTo($(this).find('> a'));
81            $.getScript( "https://s3.amazonaws.com/files.collageplatform.com.prod/application/675c7754605ea781900ec16e/jarallax-video.js", function() {
82                $('.jarallax').jarallax({});
83            });
84        }
85    });
86
87
88
89    //--------------------------------------------------------------------------
90    // BULLET WORKAROUND
91    $('.ee-editor-bullet-style').parent().children('*:not(.ee-editor-bullet-style)').prev(".ee-editor-bullet-style").addClass('ee-editor-bullet-style-last');
92
93
94    //--------------------------------------------------------------------------
95    // LOGO TO FOOTER
96    $(".main-header a.logo").clone().prependTo('.footer-col1');
97    
98    //--------------------------------------------------------------------------
99    // ALERT-TOP
100    $(".main-header .social").prependTo('.main-header').wrapInner('<div class="container">');
101
102    //--------------------------------------------------------------------------
103    // MAIN MENU ARTIST LINK TEXT (SEO PURPOSES)
104    $( ".main-header .main a[href='/artist'], nav.mobile .navlinks a[href='/artist']" ).text("Artists");
105
106    //--------------------------------------------------------------------------
107    // HOME - ALERT BOX
108    $('<a class="ee-close">×</a>').appendTo('section#wrapper-alert-box');
109    $('.ee-close').on('click', function() {
110        $(this).closest('section').remove();
111    });
112    //--------------------------------------------------------------------------
113    // HOME ALERT BOX KEYDOWN CONFLICT FIX
114    // When there is a form in the alert box, using keyboad conflicts with
115    // bx-slider. This will disable all keydown once input focuses.
116    $(".s-home #wrapper-alert-box input").focus(function(){
117        $(document).off('keydown');
118    });    
119    //--------------------------------------------------------------------------
120    // HOME - BANNER-TOP    
121    $('section[id*="banner-top"] .full-width-banner .slide').each(function() {
122        // figcaption
123        $(this).find("figcaption").wrapInner('<div class="container"></div>');
124        $(this).find("figcaption").css({'display':'flex'});
125        // background fader
126        $(this).append('<div class="ee-banner-fader"></div>');
127    });
128    //--------------------------------------------------------------------------
129    // HOME - GRID-A, GRID-B - SMALL TITLE WORKAROUND
130    $('.s-home section[id^="wrapper-grid"] .entry').each(function() {
131        $(this).find('.ee-editor-small').insertBefore( $(this).find('.titles') ).removeClass('ee-editor-small').addClass('ee-custom-detail');
132        $(this).find('p:empty').remove();
133    });  
134    //--------------------------------------------------------------------------
135    // HOME GRID REMOVE PDF ATTACHMENT LINKS
136    $('.s-home section[id^="wrapper-grid"] .entry a[href*="DownloadableItem"]').contents().unwrap();
137    $('.s-home section[id^="wrapper-grid"] .entry .links').remove();
138    //--------------------------------------------------------------------------
139    // HOME GRID APPLY LINK TO THUMBNAIL IMAGE
140    $('.s-home section[id^="wrapper-grid"] .entry').each(function() {
141        if ($(this).find('.ee-editor-button a').length) {
142            $(this).find('.ee-editor-button a:not([target])').attr('target', '_self');
143            var imageURL = $(this).find('.ee-editor-button a').attr('href');
144            var imageTarget = $(this).find('.ee-editor-button a').attr('target');
145            $(this).find('.placeholder .image').wrap('<a href="'+imageURL+'" target="'+imageTarget+'"></a>');
146        }         
147    });
148
149    if ($('.s-home section#wrapper-header-a').length) {
150        $('.s-home section#wrapper-grid-a header h1').text($('.s-home section#wrapper-header-a p:first-of-type').text());
151        $('.s-home section#wrapper-grid-a header').css({'display':'block'});
152    }
153    if ($('.s-home section#wrapper-header-b').length) {
154        $('.s-home section#wrapper-grid-b header h1').text($('.s-home section#wrapper-header-b p:first-of-type').text());
155        $('.s-home section#wrapper-grid-b header').css({'display':'block'});
156    }
157
158    //--------------------------------------------------------------------------
159    // TWO-UP CENTER NO-IMAGE SCREEN
160    $(".text-image-wrapper.two-up").each(function(){
161        if( ($(this).find('.no-image').length) && (!$(this).find('[data-slideshow-view]').length) && (!$(this).find('.ee-custom-screen-align-top').length) ){
162            $(this).css({'align-self':'center'});
163        }    
164    });    
165    
166    // ------------------------------------------------------------------------
167    // HORIZONTAL RULE
168    $(".ee-editor-hr").each(function() {
169        $(this).replaceWith($('<hr class="ee-hr">'));
170    });
171
172    //--------------------------------------------------------------------------
173    // CONTENT-A BANNER VIDEO JARALLAX
174    $('section[id*="content-a"] .banner-image.ee-custom-screen-video-banner').each(function() {
175        if($(this).find('a').length){
176            var videoUrl = $(this).find('a').attr('href');
177            var imgUrl = $(this).find('img').attr('src');
178            
179            // [OPTION 1] NO IMAGE (THIS WILL USE ACTUAL VIDEO POSTER IMAGE - lo-res for vimeo)
180            $(this).prepend('<div class="jarallax-video" data-video-src="'+videoUrl+'" style=""></div>');
181            
182            // [OPTION 2] MISC IMAGE (THIS WILL USE MISC IMAGE AND ALLOW HIDDEN VIDEOS TO PLAY)
183            // $(this).prepend('<div class="jarallax-video" data-video-src="'+videoUrl+'" style=""><img class="jarallax-img" src="https://s3.amazonaws.com/files.collageplatform.com.prod/application/675c7754605ea781900ec16e/jarallax-video-background.png" alt=""></div>');
184            
185            // [OPTION 3] UPLOADED IMAGE (THIS WILL USE THE UPLOADED IMAGE AND ALLOW HIDDEN VIDEOS TO PLAY)
186            // $(this).prepend('<div class="jarallax-video" data-video-src="'+videoUrl+'" style=""><img class="jarallax-img" src="'+imgUrl+'" alt=""></div>');
187            
188            $.getScript( "https://s3.amazonaws.com/files.collageplatform.com.prod/application/675c7754605ea781900ec16e/jarallax-video.js", function() {
189                $('.jarallax-video').jarallax({});
190            });
191            $(this).find('.text, .image figure, .image img, a').remove();
192        }
193    });
194
195
196    //--------------------------------------------------------------------------
197    // FOOTER SITEINDEX + CREDIT 
198    $('<div id="ee-footer-footer"></div>').appendTo( 'footer .container' );
199    $('footer .ee-editor-block').appendTo('#ee-footer-footer');  
200    $('footer .credit').appendTo('#ee-footer-footer'); 
201
202    
203    //--------------------------------------------------------------------------    
204    // ARTIST - DETAIL INFO-LINKS OLD
205    // if($('.s-a1 #screen-info .ee-editor-block').length){
206    //     $('.s-a1 #screen-info .ee-editor-block').text('')
207    //     $('.s-a1 #cv1 .entry .paragraph-styling a').each(function() {
208    //         $(this).css({'display':'inline-block','padding-right':'25px'});
209    //         $(this).appendTo('#screen-info .ee-editor-block');
210    //     });  
211        
212    // }else{
213    //     $('.s-a1 #cv1 .entry .paragraph-styling a').each(function() {
214    //         $(this).css({'display':'inline-block','padding-right':'25px'});
215    //         $(this).appendTo('#screen-info > .text-one-column-with-image:last-of-type .text > .container');
216    //     });   
217    // }
218    //--------------------------------------------------------------------------    
219    // ARTIST - DETAIL INFO-LINKS NEW  
220    // move links to page header and move to info screen
221    if($('.s-a1 #cv1 .entry .paragraph-styling a').length){
222        $('.s-a1.detail-page .page-header .item-header').append('<div id="ee-header-links"></div>');        
223        $('.s-a1 #cv1 .entry .paragraph-styling a').each(function() {
224            $(this).css({'display':'inline-block','padding-right':'25px'});
225            $(this).appendTo('#ee-header-links');
226        }); 
227    }
228    $('.s-a1.detail-page .page-header').prependTo('#screen-info > .text-one-column-with-image:first-of-type .text > .container');
229    // check for read more then hide elements and add button
230    if($('.s-a1.detail-page #screen-info > .text-one-column-with-image:first-of-type .text > .container .ee-editor-read-more').length){
231        $('.ee-editor-read-more').first().closest('p').addClass('ee-read-more-first');
232        $('<div><a id="ee-read-more">Read More</a></div>').insertAfter('.ee-read-more-first');
233        $("#ee-read-more").click(function(){
234            $('.s-a1.detail-page #screen-info > .text-one-column-with-image:first-of-type .text > .container .ee-editor-read-more').show(); 
235            $('.s-a1.detail-page #screen-info > .text-one-column-with-image:not(:first-of-type)').show(); 
236            $('#ee-read-more').hide();
237        });    
238    }else{
239        $('.s-a1.detail-page #screen-info > .text-one-column-with-image:not(:first-of-type)').show(); 
240    }
241    // prevent flashing
242    if(!$('.s-a1 #info').length){
243        $('.s-a1.detail-page .contentWrapper > .container .page-header').show(); 
244    }
245    
246    
247    
248
249    //--------------------------------------------------------------------------    
250    // EXHIBITIONS DETAIL - LINKS WORKAROUND
251    $('.s-e1.detail-page .item-header').append('<div class="ee-header-links"></div>') 
252    //--------------------------------------------------------------------------    
253    // EXHIBITIONS DETAIL - [DOWNLOADS-OLD]
254    $('.s-e1 #downloads-bar a').each(function() {
255        $(this).css({'display':'inline-block','padding-right':'25px'});
256        $(this).clone().appendTo('.s-e1.detail-page .item-header .ee-header-links');
257        $(this).clone().appendTo('#screen-press-release-1 > .text-one-column-with-image:last-of-type .text > .container');;
258    }); 
259    //--------------------------------------------------------------------------    
260    // EXHIBITIONS DETAIL - [PRESS RELEASE-LINKS]
261    $('.s-e1 #downloads .entry .paragraph-styling a').each(function() {
262        $(this).css({'display':'inline-block','padding-right':'25px'});
263        $(this).clone().appendTo('.s-e1.detail-page .item-header .ee-header-links');
264        $(this).clone().appendTo('#screen-press-release-1 > .text-one-column-with-image:last-of-type .text > .container');
265    }); 
266
267
268    //--------------------------------------------------------------------------    
269    // QUICKLINKS WORKAROUND
270    $('.s-a1.detail-page .quicklinks').addClass('ee-sub-menu');
271    $('.s-e1.detail-page .quicklinks').addClass('ee-sub-menu');
272    
273    // add-remove-fix qlinks
274    $('.ee-sub-menu .back').remove();
275    
276    // add extra qlinks
277    if ($('.s-a1.detail-page #info').length) {
278        $('.s-a1.detail-page .ee-sub-menu .qlinks').prepend('<a class="qlink" href="#info">Bio</a>')
279    }
280  
281    // re-define the top offset
282    $(".ee-sub-menu .qlink").click(function() {
283        // if ($(window).width() > 1024) {
284                // get URL
285                var href = $(this).attr('href');
286                // Delay setting the location
287                setTimeout(function() {
288                    // get sticky menu height
289                    var extramenuTop = $('.ee-sub-menu').outerHeight();
290                    // var extramenuBottom = $('.ee-quicklinks-sticky').outerHeight();
291                    var extramenuBottom = 30;
292                    var extramenuCombined = extramenuTop + extramenuBottom + 0;
293                    // go to URL
294                    $('html, body').animate({
295                        scrollTop: $(href).offset().top-extramenuCombined
296                    }, 350);            
297                }, 150);
298                return false;
299        // }
300    }); 
301    
302
303    //--------------------------------------------------------------------------
304    // ARTFAIRS WORKAROUND
305    if ($('.s-artfairs .home .past .switch a.active[href*="all/all"]').length) {
306        
307        // separate and stack past
308        $('.past .switch a:not([href*="all/all"])').each(function(){
309            var tempClass = $(this).text();
310            var tempUrl = $(this).attr( 'href' );
311            // make divs
312            $('.exhibitions.home').append('<div class="custom-past"><div id="artfairs-grid" class="past"><div class="container"><header class="section-header divider"><h4></h4></header></div><div class="custom-load"></div></div></div>');
313            // add unique class and remove appended class
314            $('.custom-past').addClass(tempClass).removeClass('custom-past');
315            // set text and load external url
316            $('.' + tempClass + ' h4').text(tempClass);
317            $('.' + tempClass + ' .custom-load').load(tempUrl + ' .past .container.fixed-font.custom-grid');
318        });
319        
320        // remove original past
321        $('.home > .past').remove();    
322    }    
323
324    //--------------------------------------------------------------------------
325    // PRESS SUMMARY RE-ORDER TO TITLE SUMMARY
326    $('.custom-grid-press .entry').each(function(){
327            if ($(this).find('.summary p').text().length) {
328                $(this).find('.titles').append('<div class="ee-custom-summary">');
329                $(this).find('.ee-custom-summary').insertBefore($(this).find('.date') );
330                $(this).find('.ee-custom-summary').text( $(this).find('.summary p').text() );
331                $(this).find('.ee-custom-summary').addClass('date');
332            }
333    });
334
335    //--------------------------------------------------------------------------
336    // VIEWING ROOM TEXT-SECTION ONY WORK AROUND
337    // group text sections together
338    $('.s-viewing-room-new section > .text-image-wrapper ').each(function(){
339            if ($(this).find('.banner-image, .large-image, .slideshow-container').length) {
340                $(this).removeClass('ee-custom-text');
341            }else{
342                $(this).addClass('ee-custom-text');
343            }
344    });
345    //--------------------------------------------------------------------------
346    // VIEWING ROOM LARGE-IMAGE VIDEO FULL WIDTH
347    $('.s-viewing-room-new .large-image').each(function() {
348        if($(this).find('.text iframe').length){
349            $(this).addClass('ee-large-image-video');
350        }
351    });
352    //--------------------------------------------------------------------------
353    // VIEWING ROOM BANNER VIDEO JARALLAX
354    $('.s-viewing-room-new .banner-image').each(function() {
355        if($(this).find('.text a').length){
356            var videoUrl = $(this).find('.text a').attr('href');
357            $(this).prepend('<div class="jarallax-video" data-video-src="'+videoUrl+'" style="height:100vh"></div>');
358            $.getScript( "https://s3.amazonaws.com/files.collageplatform.com.prod/application/675c7754605ea781900ec16e/jarallax-video.js", function() {
359                $('.jarallax-video').jarallax();
360            });
361            $(this).find('.container, .text, .image').remove();
362        }
363    });
364    //--------------------------------------------------------------------------
365    // VIEWING ROOM WITH BACKGROUND IMAGE
366    if($('.s-viewing-room-new section#vr-background').length){
367        $('body').addClass('ee-vr-background');
368        var backgroundUrl = $('section#vr-background .large-image img').attr('src');
369        $('.objects-details').css({'background-image':'url(' + backgroundUrl + ')','background-size':'100% auto'});
370        $('section#vr-background').remove();
371        // $('.text-image-wrapper:last-of-type').addClass('ee-no-bottom-padding');
372    }
373
374    
375    //--------------------------------------------------------------------------    
376    // CONTACT SALES - SECTION FLEX 3 WORKAROUND
377    $('.s-cp1 section[id*="grid-c"]').wrapAll('<section id="ee-flex-3"><div class="container"></div></section>');
378    $('#ee-flex-3 header').each(function(){
379        $(this).append('<div class="ee-flex-3-subhead"><div>')
380        var text = $(this).find('h1').text();
381        $(this).find('.ee-flex-3-subhead').text(text.replace('Sales-',''));
382        // $(this).find('h1').text('Sales');
383    });
384    $('#ee-flex-3 h1').text('Sales');
385    $('[lang="ch"] #ee-flex-3 h1').text('销售');
386
387    //--------------------------------------------------------------------------    
388    // CONTACT SALES - SECTION FLEX 4 WORKAROUND
389    // $('.s-cp1 section[id*="grid-c"]').wrapAll('<section id="ee-flex-4"><div class="container"></div></section>');
390    // $('#ee-flex-4 header').each(function(){
391    //     $(this).append('<div class="ee-flex-4-subhead"><div>')
392    //     var text = $(this).find('h1').text();
393    //     $(this).find('.ee-flex-4-subhead').text(text.replace('Sales-',''));
394    //     // $(this).find('h1').text('Sales');
395    // });
396    // $('#ee-flex-4 h1').text('Sales');
397    // $('[lang="ch"] #ee-flex-4 h1').text('销售');
398
399
400
401    //--------------------------------------------------------------------------    
402    // ARTIST RELATIONS - SECTION FLEX 2 WORKAROUND
403    $('.s-cp1 section[id*="grid-e"]').wrapAll('<section id="ee-flex-2-artist-relations"><div class="container"></div></section>');
404    $('#ee-flex-2-artist-relations header').each(function(){
405        $(this).append('<div class="ee-flex-2-subhead"><div>')
406        var text = $(this).find('h1').text();
407        $(this).find('.ee-flex-2-subhead').text(text.replace('Artist-Relations-',''));
408    });
409    $('#ee-flex-2-artist-relations h1').text('Artist Relations');
410    $('[lang="ch"] #ee-flex-2-artist-relations h1').text('艺术家关系');
411
412
413    //--------------------------------------------------------------------------    
414    // MARKETING & COMMUNICATIONS - SECTION FLEX 2 WORKAROUND
415    $('.s-cp1 section[id*="grid-f"]').wrapAll('<section id="ee-flex-2-marketing-communications"><div class="container"></div></section>');
416    $('#ee-flex-2-marketing-communications header').each(function(){
417        $(this).append('<div class="ee-flex-2-subhead"><div>')
418        var text = $(this).find('h1').text();
419        $(this).find('.ee-flex-2-subhead').text(text.replace('Marketing-&-Communications-',''));
420    });
421    $('#ee-flex-2-marketing-communications h1').text('Marketing & Communications');
422    $('[lang="ch"] #ee-flex-2-marketing-communications h1').text('市场营销与媒体');
423
424    //--------------------------------------------------------------------------    
425    // MANAGEMENT & ADMINISTRATION - SECTION FLEX 2 WORKAROUND
426    $('.s-cp1 section[id*="grid-g"]').wrapAll('<section id="ee-flex-2-management-administration"><div class="container"></div></section>');
427    $('#ee-flex-2-management-administration header').each(function(){
428        $(this).append('<div class="ee-flex-2-subhead"><div>')
429        var text = $(this).find('h1').text();
430        $(this).find('.ee-flex-2-subhead').text(text.replace('Management-&-Administration-',''));
431    });
432    $('#ee-flex-2-management-administration h1').text('Management & Administration');
433    $('[lang="ch"] #ee-flex-2-management-administration h1').text('管理 & 行政');
434
435    //--------------------------------------------------------------------------    
436    // OPERATIONS - SECTION FLEX 2 WORKAROUND
437    $('.s-cp1 section[id*="grid-h"]').wrapAll('<section id="ee-flex-2-operations"><div class="container"></div></section>');
438    $('#ee-flex-2-operations header').each(function(){
439        $(this).append('<div class="ee-flex-2-subhead"><div>')
440        var text = $(this).find('h1').text();
441        $(this).find('.ee-flex-2-subhead').text(text.replace('Operations-',''));
442    });
443    $('#ee-flex-2-operations h1').text('Operations');
444    $('[lang="ch"] #ee-flex-2-operations h1').text('运营');
445    
446    //--------------------------------------------------------------------------    
447    // FINANCE - SECTION FLEX 2 WORKAROUND
448    $('.s-cp1 section[id*="grid-i"]').wrapAll('<section id="ee-flex-2-finance"><div class="container"></div></section>');
449    $('#ee-flex-2-finance header').each(function(){
450        $(this).append('<div class="ee-flex-2-subhead"><div>')
451        var text = $(this).find('h1').text();
452        $(this).find('.ee-flex-2-subhead').text(text.replace('Finance-',''));
453    });
454    $('#ee-flex-2-finance h1').text('Finance');
455    $('[lang="ch"] #ee-flex-2-finance h1').text('财务');    
456
457
458
459
460
461    
462    
463    //--------------------------------------------------------------------------    
464    // CONTACT LOCATIONS
465    $('.s-cp1 section[id*="grid-a"] .titles').each(function(){
466        $(this).prependTo($(this).parent());
467    });    
468    //--------------------------------------------------------------------------
469    // CONTACT EMAIL LINK ENTRY WORKAROUND
470    // wrapper-grid-d
471    $('.s-cp1 section[id*="grid-i"] .entry, .s-cp1 section[id*="grid-h"] .entry, .s-cp1 section[id*="grid-g"] .entry, .s-cp1 section[id*="grid-f"] .entry, .s-cp1 section[id*="grid-e"] .entry, .s-cp1 section[id*="grid-d"] .entry, .s-cp1 section[id*="grid-c"] .entry, .s-cp1 section[id*="grid-b-2"] .entry').each(function() {
472        $(this).find('.links').remove();
473        if($(this).find('.paragraph-styling a').length){
474            var tempUrl = $(this).find('a').attr('href');
475            $(this).wrapInner('<a href='+tempUrl+'></a>');
476            $(this).find('.paragraph-styling a').remove();
477        }
478        
479    });     
480    
481
482    //--------------------------------------------------------------------------    
483    // LOCATIONS LOCATIONS
484    // $('.s-locations section[id*="grid-a"] .titles').each(function(){
485    //     $(this).prependTo($(this).parent());
486    // });
487
488
489    
490    //--------------------------------------------------------------------------    
491    // ASSOCIATIONS VIEW MORE
492    //--------------------------------------------------------------------------
493    // EE-PREVIEW EXHIBITIONS 
494    if($(".associations #e1-grid .entry:nth-of-type(5)").length){
495        $('.associations #e1-grid').addClass('ee-preview');
496        $('.associations #e1-grid').append('<div class="ee-view-more-container container"><a class="ee-view-more">View More</a></div>')
497        $('.associations #e1-grid .ee-view-more').click(function() {
498            $(this).closest('.ee-preview').removeClass('ee-preview');
499            $(this).closest('.ee-view-more-container').remove();        
500        });    
501    } 
502    //--------------------------------------------------------------------------
503    // EE-PREVIEW PUBLIC-EXHIBITIONS 
504    if($(".associations #public-exhibitions-grid .entry:nth-of-type(5)").length){
505        $('.associations #public-exhibitions-grid').addClass('ee-preview');
506        $('.associations #public-exhibitions-grid').append('<div class="ee-view-more-container container"><a class="ee-view-more">View More</a></div>')
507        $('.associations #public-exhibitions-grid .ee-view-more').click(function() {
508            $(this).closest('.ee-preview').removeClass('ee-preview');
509            $(this).closest('.ee-view-more-container').remove();        
510        });    
511    }     
512    //--------------------------------------------------------------------------
513    // EE-PREVIEW VIEIWNG ROOM
514    if($(".associations #viewing-room-new-grid .entry:nth-of-type(5)").length){
515        $('.associations #viewing-room-new-grid').addClass('ee-preview');
516        $('.associations #viewing-room-new-grid').append('<div class="ee-view-more-container container"><a class="ee-view-more">View More</a></div>')
517        $('.associations #viewing-room-new-grid .ee-view-more').click(function() {
518            $(this).closest('.ee-preview').removeClass('ee-preview');
519            $(this).closest('.ee-view-more-container').remove();        
520        });    
521    }     
522    //--------------------------------------------------------------------------
523    // EE-PREVIEW ARTFAIRS
524    if($(".associations #artfairs-grid .entry:nth-of-type(5)").length){
525        $('.associations #artfairs-grid').addClass('ee-preview');
526        $('.associations #artfairs-grid').append('<div class="ee-view-more-container container"><a class="ee-view-more">View More</a></div>')
527        $('.associations #artfairs-grid .ee-view-more').click(function() {
528            $(this).closest('.ee-preview').removeClass('ee-preview');
529            $(this).closest('.ee-view-more-container').remove();        
530        });    
531    } 
532    //--------------------------------------------------------------------------
533    // EE-PREVIEW PUBLICATIONS
534    if($(".associations #p1-grid .entry:nth-of-type(5)").length){
535        $('.associations #p1-grid').addClass('ee-preview');
536        $('.associations #p1-grid').append('<div class="ee-view-more-container container"><a class="ee-view-more">View More</a></div>')
537        $('.associations #p1-grid .ee-view-more').click(function() {
538            $(this).closest('.ee-preview').removeClass('ee-preview');
539            $(this).closest('.ee-view-more-container').remove();        
540        });    
541    }    
542    //--------------------------------------------------------------------------
543    // EE-PREVIEW PUBLICATIONS
544    if($(".associations #press-grid .entry:nth-of-type(5)").length){
545        $('.associations #press-grid').addClass('ee-preview');
546        $('.associations #press-grid').append('<div class="ee-view-more-container container"><a class="ee-view-more">View More</a></div>')
547        $('.associations #press-grid .ee-view-more').click(function() {
548            $(this).closest('.ee-preview').removeClass('ee-preview');
549            $(this).closest('.ee-view-more-container').remove();        
550        });    
551    }    
552
553
554
555    //--------------------------------------------------------------------------
556    // CONSIGNMENTS    
557    $('.s-consignments #wrapper-banner-image .full-width-banner .slide').each(function() {
558        // figcaption
559        $(this).find("figcaption").wrapInner('<div class="container"></div>');
560        $(this).find("figcaption").css({'display':'flex'});
561        // background fader
562        $(this).append('<div class="ee-banner-fader"></div>');
563    });
564    
565    // CONSIGNMENTS VIDEO WORKAROUND
566    //--------------------------------------------------------------------------
567    // CONTENT-A BANNER VIDEO JARALLAX
568
569    if($('.s-consignments #wrapper-banner-video').length){
570        
571        // move text-wrapper
572        $('.s-consignments #wrapper-banner-video .full-width-video .text-wrapper').prependTo('.s-consignments #wrapper-banner-video');
573        
574        var videoUrl = $('.s-consignments #wrapper-banner-video .full-width-video .container').text();
575        // var imgUrl = $(this).find('img').attr('src');
576        
577        // [OPTION 1] NO IMAGE (THIS WILL USE ACTUAL VIDEO POSTER IMAGE - lo-res for vimeo)
578        // $(this).prepend('<div class="jarallax-video" data-video-src="'+videoUrl+'" style=""></div>');
579        
580        // [OPTION 2] MISC IMAGE (THIS WILL USE MISC IMAGE AND ALLOW HIDDEN VIDEOS TO PLAY)
581        $('.s-consignments #wrapper-banner-video').prepend('<div class="jarallax-video" data-video-src="'+videoUrl+'" style=""><img class="jarallax-img" src="https://s3.amazonaws.com/files.collageplatform.com.prod/application/675c7754605ea781900ec16e/jarallax-video-background.png" alt=""></div>');
582        
583        // [OPTION 3] UPLOADED IMAGE (THIS WILL USE THE UPLOADED IMAGE AND ALLOW HIDDEN VIDEOS TO PLAY)
584        // $(this).prepend('<div class="jarallax-video" data-video-src="'+videoUrl+'" style=""><img class="jarallax-img" src="'+imgUrl+'" alt=""></div>');
585        
586        $.getScript( "https://s3.amazonaws.com/files.collageplatform.com.prod/application/675c7754605ea781900ec16e/jarallax-video.js", function() {
587            $('.jarallax-video').jarallax({});
588        });
589
590    }
591  
592    //--------------------------------------------------------------------------  
593    // GALLERY-INFO WORKAROUND  
594    // create side bar layout by wrapping with DIVs
595    $('.s-subscribe .custom_page, .s-locations .custom_page, .s-about .custom_page, .s-cp1 .custom_page, .s-careers:not(.detail-page) .contentWrapper').prepend("<div id='ee-sidebar-left'><div id='ee-submenu-container'><div class='container'></div></div></div>");
596    $('.s-subscribe .custom_page > section, .s-locations .custom_page > section, .s-about .custom_page > section, .s-cp1 .custom_page > section, .s-careers:not(.detail-page) .contentWrapper > section, .s-careers:not(.detail-page) .contentWrapper > .container').wrapAll("<div id='ee-sidebar-right'></div>");
597    $('#ee-sidebar-right, #ee-sidebar-left').wrapAll("<div id='ee-sidebar-layout'><div class='container'></div></div>");
598    
599    // clone hidden drop down menu to sidebar-left
600    $('.main-header .main .menu-group-items > a').clone().appendTo('#ee-submenu-container .container');
601    
602    if($('.main-header .main .menu-group-items > a.active').length){
603        $('.main-header a[href="/gallery-info/about"]').addClass('active')
604    }
605    
606    
607});
608
609
610//------------------------------------------------------------------------------
611// READ + AJAXCOMPLETE
612$( document ).bind("ready ajaxComplete",function() {
613
614    //--------------------------------------------------------------------------    
615    // EXHIBITIONS HOME - SUBSCRIBE WORKAROUND (USES FOOTER FORM)
616    if($('.s-e1 .home').length){
617        // remove any previous forms
618        $("#ee-mailing").remove();
619        
620        // make pop-up form
621        $('body').append("<div id='ee-mailing'><div id='ee-mailing-container'><div class='container'></div></div></div>")
622        $('footer form').clone().appendTo('#ee-mailing .container')
623        $('<a class="close">×</a>', { id: 'close' }).appendTo('#ee-mailing #ee-mailing-container .container');
624        $('[lang="en"] #ee-mailing .container').prepend('<p>Sign up to be the first to know about upcoming exhibitions</p>')
625        $('[lang="ch"] #ee-mailing .container').prepend('<p>注册登录获取一手展览资讯</p>')
626        
627        // sidebar
628        $('[lang="en"] .s-e1 .home .sidebar-left').append('<div class="container"><div class="ee-index-page-signup"><p>Sign up to be the first to know about upcoming exhibitions</p><a>Subscribe</a></div></div>');
629        $('[lang="ch"] .s-e1 .home .sidebar-left').append('<div class="container"><div class="ee-index-page-signup"><p>注册登录获取一手展览资讯</p><a>订阅</a></div></div>');
630        
631        // button action
632        $('.s-e1 .home .sidebar-left .ee-index-page-signup a, #ee-mailing .close').click(function() { 
633            $("#ee-mailing").toggle();
634        }); 
635    }    
636    
637 
638
639
640
641
642});
643
644
645//------------------------------------------------------------------------------
646//------------------------------------------------------------------------------
647//------------------------------------------------------------------------------
648// LOAD RESIZE
649$(window).on('load resize', function () {
650
651    // -------------------------------------------------------------------------
652    // MOVE ELEMENTS IN RELATION OF HEIGHT OF MAIN-HEADER
653    var extramenu = $('.main-header').outerHeight(true);
654    $('section[id*="banner-top"]').css("margin-top", -(extramenu) );
655    $('section[id*="wrapper-banner-video"]').css("margin-top", -(extramenu) );
656    $('section[id*="wrapper-banner-image"]').css("margin-top", -(extramenu) );
657    
658
659    // HOMEPAGE ALERT TOP ADJUSTER
660    // var extraalert = $('.main-header .social').outerHeight(true);
661    // $('section[id*="banner-top"] .slide figcaption > .container').css("padding-top", extraalert ); 
662    // $('section[id*="wrapper-banner-video"] .slide figcaption > .container').css("padding-top", extraalert );
663    // $('section[id*="wrapper-banner-image"] .slide figcaption > .container').css("padding-top", extraalert );
664
665    
666});
667
668
669//------------------------------------------------------------------------------
670// SCROLL 
671$(window).scroll(function() {
672
673    if ( $(this).scrollTop() >= 1 ) { 
674        $('body').addClass("ee-custom-scroll-on");
675    }else{
676        $('body').removeClass("ee-custom-scroll-on");
677        // var extramenu = $('.main-header').outerHeight(true);
678        // $(".contentWrapper").css("padding-top", (extramenu) );
679        // $('section[id*="banner-top"]').css("margin-top", -(extramenu) );
680    }
681
682});
683
684
685
686//--------------------------------------------------------------------------
687//--------------------------------------------------------------------------
688//--------------------------------------------------------------------------
689// DROP DOWN MENU WORKAROUND
690//--------------------------------------------------------------------------
691//--------------------------------------------------------------------------
692//--------------------------------------------------------------------------
693$( window ).bind('load ajaxComplete resize', function() {
694    //--------------------------------------------------------------------------
695    // DROP DOWN MENUS
696    /* Example configurations for exhibitions section:
697     * all menus: span.links
698     * category only: header.section-header:not(.first-row):not(.second-row) span.links
699     * location and year only: header.section-header.first-row span.links, header.section-header.second-row span.links
700     */
701    var dropdownMenus = new DropdownMenus({
702        's-e1:not(.detail-page)': 'span.links'
703    });
704    dropdownMenus.replaceMenus();
705})
706
707function DropdownMenus(allowed = {}) {
708  this.allowed = allowed;
709  
710  this.replaceMenus = function () {
711      
712      if ($(window).width() > 600) {
713          return;
714      }
715      
716      var section = this.getSelector();
717      if (!section) {
718          return;
719      }
720      
721      if ($('div.categories-left.screen-nav nav.switch').length) {
722          return navToDropdown.buildNavToDropdown();
723      }
724      
725      var that = this;
726      $(this.allowed[section]).each(function (index, item) {
727          var $item = $(item);
728          that.replaceMenu($item)
729      });
730      
731      return navToDropdown.buildNavToDropdown();
732  };
733  
734  this.replaceMenu = function ($item) {
735      $item.parents('.screen-nav').addClass('converted');
736      $item.wrap($('<div class="categories-left screen-nav converted">'));
737      $item.replaceWith('<nav class="switch" >' + $item.html() +'</nav>')
738  };
739  
740  this.getSelector = function () {
741      return Object.keys(this.allowed).reduce(function (match, section) {
742          if (match) {
743              return match;
744          }
745          if ($('body.' + section).length) {
746              return section;
747          }
748          return null;
749      }, null);
750  };
751}
752
753
754
755
756
757
758//------------------------------------------------------------------------------
759//------------------------------------------------------------------------------
760//------------------------------------------------------------------------------
761// VIEWING ROOM - EMAILPROTECTED PAGE SIZING
762$(window).on('load resize', function () {
763
764    // -------------------------------------------------------------------------
765    // SET MARGINS/PADDING/SIZING FOR EMAILPROTECTED LOGIN DIV
766
767    // IF MAIN MENU IS NOT FIXED AND LOGO FLOAT LEFT
768    var totalmenutrue = $('.main-header').outerHeight(true);  
769    $(".emailProtectedPage").css({'min-height':'calc(100% - '+totalmenutrue+'px'});
770    
771    // IF MAIN MENU IS FIXED
772    // var totalmenu = $('.main-header').outerHeight();  
773    // $(".emailProtectedPage").css({'padding-top':totalmenu}); 
774    // var totalmenutrue = $('.main-header').outerHeight(true);  
775    // $(".emailProtectedPage").css({'margin-bottom':-totalmenutrue});     
776    
777    
778});
779//------------------------------------------------------------------------------
780//------------------------------------------------------------------------------
781//------------------------------------------------------------------------------
782// VIEWING ROOM - WITH CUSTOMIZATION OPTIONS
783$(function () {
784  emailProtected.run({
785    contentWrapperSelector: '.contentWrapper',
786
787    template: null, // you can override default form template
788
789    showNames: true, // include first and last name in form
790    isFirstNameRequired: true,
791    isLastNameRequired: true,
792
793    // you can bind to any of the following events
794    notEmailProtected: function () { 
795        
796        // NOTE THAT THIS HAPPENS ON BOTH INDEX AND DETAIL PAGES
797        $(this.options.contentWrapperSelector).css({display: 'block'});    
798        // $(this.options.contentWrapperSelector).css({'visibility': 'visible', 'height':'auto','min-height':'100%','overflow':'auto'});
799
800        
801    },
802    
803    beforeShowContent: function () { /* ... */ },
804    
805    afterShowContent: function () {
806        
807        // NOTE THAT THIS HAPPENS ON BOTH INDEX AND DETAIL PAGES
808        $(this.options.contentWrapperSelector).css({display: 'block'});
809        // $(this.options.contentWrapperSelector).css({'visibility': 'visible', 'height':'auto','min-height':'100%','overflow':'auto'});
810        
811    },
812    
813    beforeProtectPage: function () { /* ... */ },
814    afterProtectPage: function () { /* ... */ },
815    beforeFormSubmit: function () { /* ... */ },
816    afterFormSubmit: function () { /* ... */ },
817    beforeAjaxSuccess: function () { /* ... */ },
818    afterAjaxSuccess: function () { /* ... */ },
819    onAjaxFail: function () { /* ... */ },
820    beforePrepareCover: function () { /* ... */ },
821    afterPrepareCover: function () { /* ... */ },
822    beforeInitOptions: function () { /* ... */ },
823    afterInitOptions: function () { /* ... */ }
824  });
825});
826
827
828//------------------------------------------------------------------------------
829//------------------------------------------------------------------------------
830// -----------------------------------------------------------------------------
831// SCROLLREVEAL
832// If there are issue with ScrollReveal, remove this section
833// as well as removing the ScrollReveal in Additional CSS
834// and in the Additional Head section
835$( document ).bind("ready",function() {
836    
837    function ee_add_scrollreveal_class() {
838        $('.grid-container .entry').addClass('ee-scrollreveal');
839        $('.list .entry .thumbnail').addClass('ee-scrollreveal');
840        $('.list .entry .info').addClass('ee-scrollreveal');
841        $('.squared .thumbnail-container').addClass('ee-scrollreveal');
842        $('.footer-cols > div').addClass('ee-scrollreveal');
843        $('.text-one-column-with-image .text').addClass('ee-scrollreveal');
844        $('.text-one-column-with-image:not(.banner-image):not(.image-uncropped_banner) .image').addClass('ee-scrollreveal');
845        $('.text-one-column').addClass('ee-scrollreveal'); 
846        $('.text-two-columns .left').addClass('ee-scrollreveal');
847        $('.text-two-columns .right').addClass('ee-scrollreveal');
848        $('.text-three-columns .column').addClass('ee-scrollreveal');
849        $('.news-details .details').addClass('ee-scrollreveal');
850        $('.news-details .image').addClass('ee-scrollreveal');
851        $('.artists.home .entries').addClass('ee-scrollreveal');       
852        
853        $('.home #p1-grid .entry:not(:nth-child(-n+18))').removeClass('ee-scrollreveal');;
854        
855    }    
856
857    function ee_remove_reset_scrollreveal() {
858        $('.ee-scrollreveal').css({'opacity':'','transition':'','transform':'','visibility':'visible'});
859        ScrollReveal().clean('.ee-scrollreveal');
860        ScrollReveal().sync();
861    } 
862
863    // add class to items
864    ee_add_scrollreveal_class();
865
866    // apply ScrollReveal to class
867    var slideUp = {
868        distance: '40px',
869        duration: 500,
870        interval: 50
871    };          
872    ScrollReveal().reveal('.ee-scrollreveal', slideUp);    
873
874    // reset ScrollReveal when there is a toggle click (swiper, artist list)
875    $('.squared .thumbnail-container img, .abs-thumbs a, .view a').click(function() { 
876        ee_remove_reset_scrollreveal(); 
877    });      
878
879    // reset ScrollReveal when there is a ajax load click (years, child, categories)
880    $('.switch a, a.ajax, .child a, .filter-items a').click(function() {
881        $( document ).bind("ajaxComplete",function() {
882            ee_add_scrollreveal_class();
883            ee_remove_reset_scrollreveal();
884            // re-apply reset click when there is a toggle (newly added swipers)
885            $('.squared .thumbnail-container img, .abs-thumbs a').click(function() { 
886                ee_remove_reset_scrollreveal(); 
887            });             
888        }); 
889    });
890
891    // ARTIST DETAIL READ-MORE WORKAROUND FIX
892    $('#ee-read-more').click(function() {
893            ee_remove_reset_scrollreveal(); 
894    });  
895    
896    // fix for exhibition drop down workaround
897    $(window).on('resize', function () {
898        $('.s-e1 .home .switch a').click(function() {
899            $( document ).bind("ajaxComplete",function() {
900                ee_add_scrollreveal_class();
901                ee_remove_reset_scrollreveal();
902            }); 
903        });
904    });    
905});
906// SCROLLREVEAL - PAST EXHIBITIONS SUBMENU CLICK SCROLL TO TOP
907// $( document ).bind('ready ajaxComplete', function() {
908//     //--------------------------------------------------------------------------
909//     // EXHIBITIONS INDEX - this must be here to calculate offset scroll correctly
910//     $('<div class="container "><header class="section-header divider"><h4>Current</h4></header></div>').prependTo('.s-exhibitions #large');
911        
912//     $('.past .switch a').click(function() {
913//         if ($(window).width() > 1023) {
914//             // calculate offset from top - main header height OR hard number
915//             // var extramenu = $('.main-header').outerHeight(true);
916//             var extramenu = 40;
917//             // make past container 100% height so submenu stays at top
918//             $( document ).bind("ajaxComplete",function() {
919//                 $('.past').css({'min-height':'calc(100vh - '+extramenu+'px)'});          
920//             }); 
921//             // scroll to top offset
922//             $('html, body').animate({
923//                 scrollTop: $(".past").offset().top-extramenu
924//             }, 350);
925//         }    
926//     });
927// });
928
929// SCROLLREVEAL - LONG content pages are problematic (height calculations render incorrect)
930// applying an arbitrary scrollReveal (after full load) will reset calculations
931$(window).load(function() {
932    ScrollReveal().reveal('footer .divider', { duration: 0 });
933})
934   

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.