1//------------------------------------------------------------------------------ 2// CKEDITOR ONLY - DO NOT ADD OTHER JS HERE 3$( document ).bind("ready ajaxComplete",function() { 4 //-------------------------------------------------------------------------- 5 // REMOVE CKEDITOR FRONTEND INLINE STYLES 6 $('[class*=ee-editor]').removeAttr("style"); 7 //-------------------------------------------------------------------------- 8 // SCREEN-INVERT 9 $(".ee-editor-screen-invert").each(function() { 10 // $(this).closest('.text-image-wrapper').addClass('ee-custom-screen-invert'); 11 $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-invert'); 12 $(this).remove(); 13 }); 14 //-------------------------------------------------------------------------- 15 // SCREEN-SIDE-BANNER 16 $(".ee-editor-screen-side-banner").each(function() { 17 $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-side-banner'); 18 $(this).remove(); 19 }); 20 $('.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>'); 21 //-------------------------------------------------------------------------- 22 // SCREEN-SIDE-LARGE 23 $(".ee-editor-screen-side-large").each(function() { 24 $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-side-large'); 25 $(this).remove(); 26 }); 27 $('.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>'); 28 //-------------------------------------------------------------------------- 29 // SCREEN-VIDEO-BANNER 30 $(".ee-editor-screen-video-banner").each(function() { 31 $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-video-banner'); 32 $(this).remove(); 33 }); 34 //-------------------------------------------------------------------------- 35 // SCREEN-WIDE 36 $(".ee-editor-screen-wide").each(function() { 37 $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-wide'); 38 $(this).remove(); 39 }); 40 //-------------------------------------------------------------------------- 41 // SCREEN-ALIGN-TOP 42 $(".ee-editor-screen-align-top").each(function() { 43 $(this).closest('.text-one-column-with-image').addClass('ee-custom-screen-align-top'); 44 $(this).remove(); 45 }); 46}); 47 48 49 50 51 52 53$(function () { 54 55// FIND AND REPLACE CREDIT IN VIEWING ROOM 56 $("footer div.container").append("<div class='new'><p> <a href='http://www.exhibit-e.com/' target='_blank'>Online Viewing Room by exhibit-E<sup>®</sup></a> </p></div"); 57 58}); 59 60$( document ).bind("ready",function() { 61 62 //-------------------------------------------------------------------------- 63 // CONTENT-A BANNER VIDEO JARALLAX 64 $('[id*="screen-content-a"] .banner-image.ee-custom-screen-video-banner').each(function() { 65 if($(this).find('a').length){ 66 var videoUrl = $(this).find('a').attr('href'); 67 var imgUrl = $(this).find('img').attr('src'); 68 69 // [OPTION 1] NO IMAGE (THIS WILL USE ACTUAL VIDEO POSTER IMAGE - lo-res for vimeo) 70 // $(this).prepend('<div class="jarallax-video" data-video-src="'+videoUrl+'" style=""></div>'); 71 72 // [OPTION 2] MISC IMAGE (THIS WILL USE MISC IMAGE AND ALLOW HIDDEN VIDEOS TO PLAY) 73 $(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/5cba1172a5aa2c2c113bee51/jarallax-video-background.png" alt=""></div>'); 74 75 // [OPTION 3] UPLOADED IMAGE (THIS WILL USE THE UPLOADED IMAGE AND ALLOW HIDDEN VIDEOS TO PLAY) 76 // $(this).prepend('<div class="jarallax-video" data-video-src="'+videoUrl+'" style=""><img class="jarallax-img" src="'+imgUrl+'" alt=""></div>'); 77 78 $.getScript( "https://s3.amazonaws.com/files.collageplatform.com.prod/application/5cba1172a5aa2c2c113bee51/jarallax-video.js", function() { 79 $('.jarallax-video').jarallax({}); 80 }); 81 $(this).find('.text, .image figure, .image img, a').remove(); 82 } 83 });
84 85 86 // ------------------------------------------------------------------------- 87 // editorial 88 if ($('#editorial-grid .links a').length) { 89 $('#editorial-grid header').append('<form class="filter-items"><div class="association-filter dropdown-root"><div class="divider dropdown"><div class="divider"></div></div></div></form>'); 90 91 $('.divider.dropdown').css({'width': "197px", "height": "33px"}); 92 93 var searchElement = $('#editorial-grid .links a.active'); 94 95 var $links = $('#editorial-grid .links a'); 96 $($links).appendTo(".divider > .divider"); 97 98 $($links).each(function(){ 99 if($(this).text() == 'View All'){ 100 $("#editorial-grid header > form").append('<a class="filter-clear" href="' + $(this).attr('href') + '">' + $(this).text() + '</a>'); 101 $(this).remove(); 102 } 103 }); 104 105 if($(searchElement).text() != 'View All'){ 106 $(searchElement).appendTo('.divider.dropdown'); 107 }else{ 108 $('<a href="#">Sort by Category</a>').appendTo('.divider.dropdown'); 109 } 110 111 $(".divider.dropdown > a").attr('href', '#'); 112 113 $("#editorial-grid .association-filter").on('click', function(){ 114 if($(".association-filter .divider > .divider").css('display') == 'none'){ 115 $(".association-filter .divider > .divider").show(); 116 }else{ 117 $(".association-filter .divider > .divider").hide(); 118 } 119 return false; 120 }); 121 $(".divider.dropdown > a").on('click', function(){ 122 if($(".association-filter .divider > .divider").css('display') == 'none'){ 123 $(".association-filter .divider > .divider").show(); 124 }else{ 125 $(".association-filter .divider > .divider").hide(); 126 } 127 return false; 128 }); 129 $(".divider.dropdown > div a").on('click', function(){ 130 window.location.href = $(this).attr('href'); 131 }); 132 $("#editorial-grid header > form a").on('click', function(){ 133 window.location.href = $(this).attr('href'); 134 return false; 135 }); 136 } 137 138 // ------------------------------------------------------------------------- 139 // Video 140 if ($('#video-grid .links a').length) { 141 $('#video-grid header').append('<form class="filter-items"><div class="association-filter dropdown-root"><div class="divider dropdown"><div class="divider"></div></div></div></form>'); 142 143 $('.divider.dropdown').css({'width': "197px", "height": "33px"}); 144 145 var searchElement = $('#video-grid .links a.active'); 146 147 var $links = $('#video-grid .links a'); 148 $($links).appendTo(".divider > .divider"); 149 150 $($links).each(function(){ 151 if($(this).text() == 'View All'){ 152 $("#video-grid header > form").append('<a class="filter-clear" href="' + $(this).attr('href') + '">' + $(this).text() + '</a>'); 153 $(this).remove(); 154 } 155 }); 156 157 if($(searchElement).text() != 'View All'){ 158 $(searchElement).appendTo('.divider.dropdown'); 159 }else{ 160 $('<a href="#">Sort by Category</a>').appendTo('.divider.dropdown'); 161 } 162 163 $(".divider.dropdown > a").attr('href', '#'); 164 165 $("#video-grid .association-filter").on('click', function(){ 166 if($(".association-filter .divider > .divider").css('display') == 'none'){ 167 $(".association-filter .divider > .divider").show(); 168 }else{ 169 $(".association-filter .divider > .divider").hide(); 170 } 171 return false; 172 }); 173 $(".divider.dropdown > a").on('click', function(){ 174 if($(".association-filter .divider > .divider").css('display') == 'none'){ 175 $(".association-filter .divider > .divider").show(); 176 }else{ 177 $(".association-filter .divider >
177 .divider").hide(); 178 } 179 return false; 180 }); 181 $(".divider.dropdown > div a").on('click', function(){ 182 window.location.href = $(this).attr('href'); 183 }); 184 $("#video-grid header > form a").on('click', function(){ 185 window.location.href = $(this).attr('href'); 186 return false; 187 }); 188 } 189 190 // ------------------------------------------------------------------------- 191 // HOME IMAGES 192 if (window.location.pathname === '/') { 193 collageHistory.disableSlideshowNavigation(); 194 } 195 196 197 198 // ------------------------------------------------------------------------- 199 // ADAPTIVE BACKGROUNDS 200 // if($(".s-home.detail-page figure").length){ 201 202 // $('figure').attr('data-adaptive-background', '1'); 203 // $('figure').attr('data-ab-css-background', '1'); 204 // $('figure').attr('cross-origin', 'anonymous'); 205 206 // $.getScript( "about:blank", function() { 207 // $.adaptiveBackground.run({ 208 // normalizeTextColor: true, 209 // parent: '.slide' 210 // }) 211 // }); 212 // } 213 214 215 216 217}); 218 219 220 221 222 223$( window ).resize(function() { 224 225 226 227 // $('figure').each(function(){ 228 // $(this).data( "tetetetetetetet" ); 229 // }); 230 231 232 //------------------------------------------------------------------------------ 233 // MOVE HOMEPAGE IMAGES TO THE TOP 234 var extramenu = $('.main-header').outerHeight(true); 235 $(".s-home .custom_page").css("margin-top", -(extramenu) ); 236 237 238 239 240}); 241 242 243 244 245 246 247$( document ).bind("ready ajaxComplete",function() { 248 249 // create gradient for fullscreen if supersized homepage 250 if($(".s-home.detail-page #wrapper-full").length > 0){ 251 $('<div />', { id: 'homefader' }).appendTo('body'); 252 $("#homefader").css({ 253 top: 0, 254 left: 0, 255 height: '100%', 256 width: '100%', 257 zIndex:50, 258 position:'absolute' 259 }); 260 } 261 262 263 264 //-------------------------------------------------------------------------- 265 // HOMEPAGE DOWN ARROW 266 if($(".s-home.detail-page").length){ 267 $('nav.main').attr('id', 'nextscreen'); 268 $('#wrapper-full > .full-width-banner').append('<a class="b-arrowdown" href="#wrapper-associations"> </a>'); 269 } 270 271 272 //-------------------------------------------------------------------------- 273 // MOBILE HOMEPAGE DOWN ARROW 274 // if($(".s-home.detail-page").length){ 275 // $('header.main-header').attr('id', 'nextscreen'); 276 // $('#wrapper-full > .full-width-banner').append('<a class="b-arrowdown" href="#wrapper-associations"> </a>'); 277 // } 278 279 280 //-------------------------------------------------------------------------- 281 // HOMPAGE TARGET BLANK TO SELF 282 // $('#wrapper-associations a[target="_blank"]').each(function(){ 283 // $(this).attr("target", "_self"); 284 // }); 285 286 287 288 289 290}); 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316// REPLACE FOR READY + AJAX COMPLETE 317// $( document ).bind("ready ajaxComplete",function() { 318 319$( document ).bind("ready",function() { 320 321 322 // Move title to Bio 323 $('.item-header-background div h1').prependTo('#screen-biography .text-one-column.paragraph-styling'); 324 325 $('.s-p1.detail-page .container.page-header-container').prependTo('.publication-details .text.paragraph-styling'); 326 327 //Move Associated content in Artist Pages 328 $('.s-a1 #related-nl1').insertBefore('.s-a1 #related-art-fairs'); 329 $('#related-pr1').insertBefore('#related-art-fairs') 330 331 $('.item-header-background div h3').prependTo('#screen-press-release .text-one-column.paragraph-styling'); 332 $('.item-header-background div h2').prependTo('#screen-press-release .text-one-column.paragraph-styling'); 333 $('.item-header-background div h1').prependTo('#screen-press-release .text-one-column.paragraph-styling'); 334 335 336 337 338 //-------------------------------------------------------------------------- 339 // JARALLAX 340 // if($(".full-width-banner figure").length){ 341 342 // $('.full-width-banner figure').addClass('jarallax'); 343 // $('.jarallax').css({'padding-top':'100vh'}); 344 345 // $('.s-cp1 .full-width-banner figure').removeClass('jarallax'); 346 // $.getScript( "https://s3.amazonaws.com/files.collageplatform.com.prod/application/5cba1172a5aa2c2c113bee51/jarallax.js", function() { 347 // $('.jarallax').jarallax({ 348 // }); 349 // }); 350 // } 351 352 353 354 355 356 if($(".s-a1 .item-header.item-header-background").length){ 357 358 $('.s-a1 .item-header.item-header-background').addClass('jarallax'); 359 // $('.jarallax').css({'padding-top':'100vh'}); 360 361 // $.getScript( "https://s3.amazonaws.com/files.collageplatform.com.prod/application/5cba1172a5aa2c2c113bee51/jarallax.js", function() { 362 // $('.jarallax').jarallax({ 363 // // speed: 0.5 364 // }); 365 // }); 366 $('.jarallax').jarallax({ 367 // speed: 0.5 368 }); 369 370 371 } 372 373 374// span.item-header.item-header-background 375 376 //-------------------------------------------------------------------------- 377 // REMOVE PASTED STYLES 378 $( ".paragraph-styling *, figcaption *, .caption *, .text *" ).removeAttr("style"); 379 //-------------------------------------------------------------------------- 380 // REMOVE PASTED IMAGES 381 // $( ".paragraph-styling p img, figcaption p img, .caption p img, .text p img" ).remove(); 382 //-------------------------------------------------------------------------- 383 // REMOVE - UNWRAP PASTED HTML TAGS 384 // $(".paragraph-styling span, .paragraph-styling font").contents().unwrap(); 385 $("figcaption span, figcaption font").contents().unwrap(); 386 $(".caption span, .caption font").contents().unwrap(); 387 // $(".text span, .text font").contents().unwrap(); 388 // MIGHT HAVE TO USE LOAD INSTEAD OF READY 389 390 391 // //-------------------------------------------------------------------------- 392 // // REMOVE EMPTY PARAGRAPHS 393 // $('.paragraph-styling p:not(:first-of-type), figcaption p:not(:first-of-type), .caption p:not(:first-of-type), .text p:not(:first-of-type)').each(function(index, item) { 394 // if($.trim($(item).text()) === "") {$(item).remove();} 395 // }); 396 397 //-------------------------------------------------------------------------- 398 // REMOVE BACK BUTTONS 399 $( ".back" ).remove(); 400 401 //-------------------------------------------------------------------------- 402 // REMOVE EMPTY DATE HTML TAGS 403 $("span.date").filter( function() {return $.trim($(this).html()) == '';}).remove(); 404 405 //-------------------------------------------------------------------------- 406 // CUSTOM CLASS HEADER PARAGRAPH SEE CSS 407 $('.paragraph-styling p').each(function(){ 408 if ($(this).find('strong > em > u, strong > u > em, em > strong > u, em > u >
408 strong, u > em > strong, u > strong > em').length) { 409 $(this).addClass('custom-header-paragraph'); 410 $(this).find('strong, em, u').contents().unwrap() 411 } 412 }); 413 414 //-------------------------------------------------------------------------- 415 // CUSTOM CLASS BULLET SEE CSS 416 $('.paragraph-styling p').each(function(){ 417 var str = $(this).html(); 418 if (str.startsWith("â¢") || str.startsWith("*")) { 419 $(this).addClass('custom-bullet'); 420 $(this).html(str.substring(1, str.length)); 421 } 422 }); 423 $('.custom-bullet').parent().children('*:not(.custom-bullet)').prev(".custom-bullet").addClass('custom-bullet-last') 424 425 //-------------------------------------------------------------------------- 426 // CUSTOM CLASS HORIZONTAL-LINE SEE CSS 427 $('.paragraph-styling p').each(function(){ 428 var str = $(this).text(); 429 if (str.startsWith("--")) { 430 $(this).addClass('custom-horizontal-line'); 431 $(this).html('\u00A0'); 432 } 433 }); 434 435 //-------------------------------------------------------------------------- 436 // FOOTER 437 $('.footer-social').prependTo('.footer-cols'); 438 439 $('footer > .container').append('<div class="col-custom"><span>©Roberts Projects</span></div>'); 440 $('footer .footer-siteindex').parent('span').appendTo('.col-custom'); 441 $('footer .credit').appendTo('.col-custom'); 442 443 $('.col-custom').appendTo('.footer-cols'); 444 445 446 447 //-------------------------------------------------------------------------- 448 // CREATE GRADIENT FOR SUPERSIZED HOMEPAGE 449 if($(".s-homepage #supersized").length){ 450 $('<div />', { id: 'homefader' }).appendTo('body'); 451 $("#homefader").css({ 452 top: 0, 453 left: 0, 454 height: '100%', 455 width: '100%', 456 zIndex:0, 457 position:'absolute', 458 'pointer-events': 'none' 459 }); 460 } 461 462 463 //-------------------------------------------------------------------------- 464 // REDUCE SIZE OF FITTED IMG 465 // DO NOT USE ".FITTED" (inconsistant) - USE ANOTHER DIRECT PATH 466 // $('.custom-grid-p1 img').each( 467 // function(){ 468 // $(this).load( 469 // function(){ 470 // var theWidth = $(this).width(); 471 // var theHeight = $(this).height(); 472 // if (theWidth < theHeight ) { 473 // var theRatio = theWidth/theHeight; 474 // }else{ 475 // var theRatio = theHeight/theWidth; 476 // } 477 // if(theRatio >= .88){ 478 // // max-size for square images 479 // $(this).css({'max-width': '85%','max-height': '85%'}); 480 // }else{ 481 // // max-size for horizontal images 482 // $(this).css({'max-width': '90%'}); 483 // } 484 // }); 485 // }); 486 487}); 488 489 490 491 492 493// XL THUMBNAILS 494// $( document ).bind('ready ajaxComplete', function() { 495 496 497 498 499// // THUMBNAIL FULL SIZE - NEW 500// if(($(".thumbnails .entry.ajax img").length)){ 501// $('.thumbnails .entry.ajax img').each(function() { 502// // var imgUrl = $(this).attr('src').replace( '236x236_fit', '1010x580_fit' ); 503// var imgUrl = $(this).attr('src').replace( '236x236_fit', 'enlarge' ); 504// $(this).attr("src", imgUrl); 505// }); 506// } 507 508 509// OLD 510 // if ($(".thumbnails img").length) { 511 // $('.thumbnails img').each(function() { 512 // var match = $(this).attr('src').match(/([a-f0-9]{24}\/[a-f0-9]{32}\.\w{3,4})$/); 513 // if (!match) { 514 // return;5cba1172a5aa2c2c113bee51.collagefrontend.com.qa/viewing-room/the-armory-show 515 // } 516 517 // var imgPath = match[1]; 518 // var src = getResolveUrl(imgPath, '1010x580_fit'); 519 520 // $(this).attr('src', src); 521 522 // if (typeof $(this).attr('srcset') !== 'undefined') { 523 // var srcset = getResolveUrl(imgPath, '1010x580_fit') + ' 1x, ' + getResolveUrl(imgPath, '1010x580_fit') + ' 2x'; 524 // $(this).attr('srcset', srcset); 525 // } 526 // }); 527 // } 528 529 530 531 532 533 534 535 536 537// }); 538 539 540// // // XL THUMBNAILS 541// collageDispatcher.on('imageLazyLoaded', function() { 542// xlThumbnails(); 543// }) 544 545// $( document ).bind('ready ajaxComplete', function() { 546// xlThumbnails(); 547// }); 548 549// function xlThumbnails() { 550// // EDIT 09-2018 551// // SWAP LARGER THUMBNAILS 552// $('.thumbnails img').each(function() { 553// var match = $(this).attr('src').match(/([a-f0-9]{24}\/[a-f0-9]{32}\.\w{3,4})$/);
554// if (!match) { 555// return; 556// } 557// var imgPath = match[1]; 558// var src = getResolveUrl(imgPath, '1010x580_fit'); 559// if (typeof $(this).attr('srcset') !== 'undefined') { 560// $(this).attr('srcset', (src + ' 1x, ' + src + ' 2x')); 561// } else { 562// $(this).attr('src', src); 563// } 564// }); 565// } 566 567 568 569 570 571 572 573// XL Slideshow 574 575// function getResolveUrl(file, filter) { 576// return '/custom/media/cache/resolve/' + filter + '/' + file; 577// } 578 579// collageDispatcher.on('bxslider.beforePreload', function(config) { 580// if ($(".slider figure img").length) { 581// $('.slider figure img').each(function() { 582// var match = $(this).data('src').match(/([a-f0-9]{24}\/[a-f0-9]{32}\.\w{3,4})$/); 583// if (!match) { 584// return; 585// } 586 587// var imgPath = match[1]; 588// var src = getResolveUrl(imgPath, 'enlarge'); 589 590// $(this).data('src', src).attr('data-src', src).attr('src', src); 591 592// if (typeof $(this).data('srcset') !== 'undefined') { 593// var srcset = getResolveUrl(imgPath, 'enlarge') + ' 1x, ' + getResolveUrl(imgPath, 'enlarge_2x') + ' 2x'; 594// $(this).data('srcset', srcset).attr('data-srcset', srcset).attr('srcset', srcset); 595// } 596// }); 597// } 598// }); 599 600 601 602 603 604 605 606 607 608const collapseLongDescription = function() { 609 let selector = '[data-section-key=a1] #biography .container .content'; 610 selector += ', [data-section-key=e1] #press-release .container .content'; 611 612 let wrapper = document.querySelector(selector); 613 614 if (!wrapper) 615 return; 616 617 let paragraphs = wrapper.querySelectorAll('p'); 618 619 if (!paragraphs || !paragraphs.length) 620 return; 621 622 let computedStyles = window.getComputedStyle(wrapper, null), 623 paragraphComputedStyles = window.getComputedStyle(paragraphs[0], null), 624 height = parseFloat(wrapper.style.height || computedStyles.height), 625 lineHeight = parseFloat(paragraphs[0].style.lineHeight || paragraphComputedStyles.lineHeight), 626 paragraphsCount = paragraphs.length, 627 paragraphMarginBottom = parseFloat(wrapper.style.marginBottom || computedStyles.marginBottom), 628 wrapperLines = Math.round((height - (paragraphMarginBottom * paragraphsCount)) / lineHeight), 629 allowedLines = 3; 630 631 if ((allowedLines+1) >= wrapperLines) return true; 632 633 let additionalSpace = 0; 634 let desiredHeight = allowedLines * lineHeight; 635 let currentHeight = 0; 636 637 paragraphs.forEach(function(paragraph) { 638 let computedStyles = window.getComputedStyle(paragraph, null); 639 let marginBottom = parseFloat(paragraph.style.marginBottom || computedStyles.marginBottom); 640 currentHeight += parseFloat(paragraph.style.height || computedStyles.height) + marginBottom; 641 642 if(currentHeight < desiredHeight) { 643 additionalSpace += parseFloat(paragraph.style.marginBottom || computedStyles.marginBottom); 644 } 645 }); 646 647 wrapper.style.height = `${desiredHeight + additionalSpace}px`; 648 wrapper.style.overflow = 'hidden'; 649 wrapper.style.paddingBottom = 0; 650 wrapper.style.marginBottom = '10px'; 651 652 let expander = document.createElement('div'); 653 expander.classList.add('bio-expander'); 654 expander.dataset.action = 'view'; 655 expander.innerText = 'View more'; 656 657 expander.addEventListener('click', function () { 658 if (expander.dataset.action === 'view') { 659 wrapper.style.height = null; 660 661 expander.dataset.action = 'hide'; 662 expander.innerText = 'Hide'; 663 } else { 664 wrapper.style.height = `${desiredHeight + additionalSpace}px`; 665 666 expander.dataset.action = 'view'; 667 expander.innerText = 'View more'; 668 } 669 }); 670 671 wrapper.parentNode.insertBefore(expander, wrapper.nextSibling); 672}; 673 674$(document).ready(function () { setTimeout(collapseLongDescription); }); 675 676 677 678 679$( document ).bind("ready ajaxComplete",function() { 680 681//VIEWING ROOM AUTO GO TO URL IF THEN 682 // if($(".s-viewing-room .home .entry:only-of-type").length){ 683 // $('.entry:only-of-type').css({'display':'none'}); 684 // window.location.replace($('.entry:only-of-type a').attr('href')); 685 // } 686 687}); 688 689 690 691 692 693 694 695// VIEWING ROOM WITH CUSTOMIZATION OPTIONS 696$(function () { 697 emailProtected.run({ 698 contentWrapperSelector: '.contentWrapper', 699 700 template: null, // you can override default form template 701 702 showNames: true, // include first and last name in form 703 isFirstNameRequired: true, 704 isLastNameRequired: true, 705 706 // you can bind to any of the following events 707 notEmailProtected: function () { /* ... */ }, 708 beforeShowContent: function () { /* ... */ }, 709 afterShowContent: function () { 710 if($(".s-viewing-room .home .entry:only-of-type").length){ 711 $('.entry:only-of-type').css({'display':'none'}); 712 window.location.replace($('.entry:only-of-type a').attr('href')); 713 } 714 //$(this.options.contentWrapperSelector).css({display: 'block'});
715 }, 716 beforeProtectPage: function () { /* ... */ }, 717 afterProtectPage: function () { /* ... */ }, 718 beforeFormSubmit: function () { /* ... */ }, 719 afterFormSubmit: function () { /* ... */ }, 720 beforeAjaxSuccess: function () { /* ... */ }, 721 afterAjaxSuccess: function () { /* ... */ 722 //$(window).trigger('resize'); 723 }, 724 onAjaxFail: function () { /* ... */ }, 725 beforePrepareCover: function () { /* ... */ }, 726 afterPrepareCover: function () { /* ... */ }, 727 beforeInitOptions: function () { /* ... */ }, 728 afterInitOptions: function () { /* ... */ } 729 }); 730}); 731 732 733 734 735 736 737 738 739 740 741//------------------------------------------------------------------------------ 742//------------------------------------------------------------------------------ 743// ----------------------------------------------------------------------------- 744// SCROLLREVEAL 745// If there are issue with ScrollReveal, remove this section 746// as well as removing the ScrollReveal in Additional CSS 747// and in the Additional Head section 748$( document ).bind("ready",function() { 749 750 function ee_add_scrollreveal_class() { 751 752 $('.container.grid.fitted.thumbnails .entry').addClass('ee-scrollreveal'); 753 754 $('.grid-container .entry').addClass('ee-scrollreveal'); 755 $('.list .entry .thumbnail').addClass('ee-scrollreveal'); 756 $('.list .entry .info').addClass('ee-scrollreveal'); 757 $('.squared .thumbnail-container').addClass('ee-scrollreveal'); 758 $('.footer-cols > div').addClass('ee-scrollreveal'); 759 $('.text-one-column-with-image .text').addClass('ee-scrollreveal'); 760 $('.text-one-column-with-image:not(.banner-image):not(.image-uncropped_banner) .image').addClass('ee-scrollreveal'); 761 $('.text-one-column').addClass('ee-scrollreveal'); 762 $('.text-two-columns .left').addClass('ee-scrollreveal'); 763 $('.text-two-columns .right').addClass('ee-scrollreveal'); 764 $('.text-three-columns .column').addClass('ee-scrollreveal'); 765 $('.news-details .details').addClass('ee-scrollreveal'); 766 $('.news-details .image').addClass('ee-scrollreveal'); 767 $('.artists.home .column').addClass('ee-scrollreveal'); 768 } 769 770 function ee_remove_reset_scrollreveal() { 771 $('.ee-scrollreveal').css({'opacity':'','transition':'','transform':'','visibility':'visible'}); 772 ScrollReveal().clean('.ee-scrollreveal'); 773 ScrollReveal().sync(); 774 } 775 776 // add class to items 777 ee_add_scrollreveal_class(); 778 779 // apply ScrollReveal to class 780 var slideUp = { 781 distance: '40px', 782 duration: 800, 783 interval: 40 784 }; 785 ScrollReveal().reveal('.ee-scrollreveal', slideUp); 786 787 // reset ScrollReveal when there is a toggle click (swiper, artist list) 788 $('.squared .thumbnail-container img, .abs-thumbs a, .view a').click(function() { 789 ee_remove_reset_scrollreveal(); 790 }); 791 792 // reset ScrollReveal when there is a ajax load click (years, child, categories) 793 $('.switch a, a.ajax, .child a, .filter-items a').click(function() { 794 $( document ).bind("ajaxComplete",function() { 795 ee_add_scrollreveal_class(); 796 ee_remove_reset_scrollreveal(); 797 // re-apply reset click when there is a toggle (newly added swipers) 798 $('.squared .thumbnail-container img, .abs-thumbs a').click(function() { 799 ee_remove_reset_scrollreveal(); 800 }); 801 }); 802 }); 803 804 // EDIT 7-2022 - Placed here and updated to prevent long pages not loading animations 805 // replaced generic call with ee_remove_reset 806 // SCROLLREVEAL - LONG content pages are problematic (height calculations render incorrect) 807 // applying an arbitrary scrollReveal (after full load) will reset calculations 808 $(window).load(function() { 809 // ScrollReveal().reveal('footer .divider', { duration: 0 }); 810 // ee_remove_reset_scrollreveal(); 811 }) 812 813 814}); 815// SCROLLREVEAL - PAST EXHIBITIONS SUBMENU CLICK SCROLL TO TOP 816$( document ).bind('ready ajaxComplete', function() { 817 //-------------------------------------------------------------------------- 818 // EXHIBITIONS INDEX - this must be here to calculate offset scroll correctly 819 $('<div class="container "><header class="section-header divider"><h4>Current</h4></header></div>').prependTo('.exhibitions.home #large'); 820 821 $('.past .switch a').click(function() { 822 if ($(window).width() > 1023) { 823 // calculate offset from top - main header height OR hard number 824 // var extramenu = $('.main-header').outerHeight(true); 825 var extramenu = 40; 826 // make past container 100% height so submenu stays at top 827 $( document ).bind("ajaxComplete",function() { 828 $('.past').css({'min-height':'calc(100vh - '+extramenu+'px)'}); 829 }); 830 // scroll to top offset 831 $('html, body').animate({ 832 scrollTop: $(".past").offset().top-extramenu 833 }, 350); 834 } 835 });
836}); 837 838// REMOVED HERE 7-2022 SEE ABOVE 839// SCROLLREVEAL - LONG content pages are problematic (height calculations render incorrect) 840// applying an arbitrary scrollReveal (after full load) will reset calculations 841// $(window).load(function() { 842// ScrollReveal().reveal('footer .divider', { duration: 0 }); 843// }) 844 845 846 847//------------------------------------------------------------------------------ 848// SCROLLMAGIC CONTENT-A TEXT-IMAGE 849$(window).on('load resize', function () { 850 const easeBoxes = [] 851 document.querySelectorAll('[id*="screen-content-a"] .text-one-column-with-image:not(.large-image):not(.banner-image):not(.image-on-right) .image img').forEach((elem, i) => { 852 easeBoxes.push(basicScroll.create({ 853 elem: elem, 854 from: 'top-bottom', 855 to: 'top-middle', 856 direct: true, 857 props: { 858 '--ty': { 859 from: '-100px', 860 to: '0', 861 timing: 'sineInOut' 862 }, 863 '--o': { 864 from: 0, 865 to: 1, 866 timing: 'sineInOut' 867 } 868 } 869 })) 870 }) 871 document.querySelectorAll('[id*="screen-content-a"] .text-one-column-with-image.image-on-right .image img').forEach((elem, i) => { 872 easeBoxes.push(basicScroll.create({ 873 elem: elem, 874 from: 'top-bottom', 875 to: 'top-middle', 876 direct: true, 877 props: { 878 '--ty': { 879 from: '100px', 880 to: '0', 881 timing: 'sineInOut' 882 }, 883 '--o': { 884 from: 0, 885 to: 1, 886 timing: 'sineInOut' 887 } 888 } 889 })) 890 }) 891 easeBoxes.forEach((easeBox) => easeBox.start()) 892}); 893
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.