1// REPLACE FOR READY + AJAX COMPLETE 2// $( document ).bind("ready ajaxComplete",function() { 3//------------------------------------------------------------------------------ 4// LOAD RESIZE 5$(window).on('load resize', function () { 6 7 // ------------------------------------------------------------------------- 8 // STICKY FOOTER ABOVER FOLD 9 if (!$('.s-homepage, .s-home').length) { 10 var extrafooter = $('footer').outerHeight(true); 11 $(".contentWrapper").css("margin-bottom", -(extrafooter) ); 12 $(".contentWrapper").css("padding-bottom", (extrafooter) ); 13 } 14 15// ------------------------------------------------------------------------- 16// MOVE HOMEPAGE BANNER TO TOP 17 if ($('.s-home section[id*="banner-rotate"]').length) { 18 var extramenu = $('.main-header').outerHeight(true); 19 $(".s-home section[id*='banner-rotate']").css("margin-top", -(extramenu) ); 20 } 21 22 // $('.s-home .main-header').removeClass("fixed"); 23// ------------------------------------------------------------------------- 24// CUSTOM SCROLL 25// $(window).scroll(function(){ 26// if ($(window).width() > 1024) { 27// if ( ($(this).scrollTop() >= 1) && (!$('custom-scroll-position').length) ) { 28// $('.main-header').addClass("custom-scroll-position"); 29// $('.s-home .main-header').removeClass("custom-scroll-position"); 30// }else{ 31// $('.main-header').removeClass("custom-scroll-position"); 32// var extramenu = $('.main-header').outerHeight(true); 33// $(".contentWrapper").css("padding-top", (extramenu) ); 34// $(".s-home section[id*='banner-rotate']").css("margin-top", -(extramenu) ); 35// } 36// }else{ 37// $('.main-header').removeClass("custom-scroll-position"); 38 39// } 40// $('.s-home .main-header').removeClass("custom-scroll-position"); 41 42 43// }); 44 45 46}); 47// HOMEPAGE Gradients 48$( document ).bind("ready ajaxComplete",function() { 49 //-------------------------------------------------------------------------- 50 // CUSTOM CLASS HEADER PARAGRAPH SEE CSS 51 $('.paragraph-styling p').each(function(){ 52 if ($(this).find('strong > em > u, strong > u > em, em > strong > u, em > u > strong, u > em > strong, u > strong > em').length) { 53 $(this).addClass('custom-header-paragraph'); 54 $(this).find('strong, em, u').contents().unwrap() 55 } 56 }); 57 58// create gradient for fullscreen if supersized homepage 59if($(".s-home").length > 0){ 60 $('<div />', { id: 'homefader' }).appendTo('section#wrapper-banner-rotate figure'); 61 $("#homefader").css({ 62 top: 0, 63 left: 0, 64 height: '100%', 65 width: '100%', 66 zIndex:0, 67 position:'absolute' 68 }); 69 } 70 // create gradient for fullscreen if supersized homepage 71if($(".s-o1").length > 0){ 72 $('<div />', { id: 'homefader' }).appendTo('section#banner figure'); 73 $("#homefader").css({ 74 top: 0, 75 left: 0, 76 height: '100%', 77 width: '100%', 78 zIndex:0, 79 position:'absolute' 80 }); 81 } 82 if($(".s-stories").length > 0){ 83 $('<div />', { id: 'homefader' }).appendTo('section#wrapper-banner figure'); 84 $("#homefader").css({ 85 top: 0, 86 left: 0, 87 height: '100%', 88 width: '100%', 89 zIndex:0, 90 position:'absolute' 91 }); 92 } 93 //TEXT IMAGE SWIPER TOGGLE CLASSES 94 $('.slideshow-headline a.cursor-pointer:first-of-type').addClass('slideshow-view'); 95 $('.slideshow-headline a.cursor-pointer:last-of-type').addClass('thumb-view'); 96 97 //-------------------------------------------------------------------------- 98 // REMOVE CKEDITOR FRONTEND INLINE STYLES 99 $('[class*=ee-editor]').removeAttr("style"); 100 101 // MARKETPLACE LOAD EXTERNAL PAGE ELEMENTS ONTO CURRENT PAGE 102 if($('.s-p1').length){ 103 // check if it already exists, or it will infinite loop 104 if($('section#wrapper-content').length === 0){ 105 $("<section>").load("/marketplace-text #wrapper-content", function() { 106 $(".s-p1:not(.detail-page) .contentWrapper").prepend($(this).html()); 107 }); 108 } 109 } 110 111 112 113}); 114$( document ).bind("ready",function() { 115 116 117 //-------------------------------------------------------------------------- 118 // MOBILE MENU CLICK TOP-BANNER FIX 119 $( "nav.mobile a.menu" ).click(function() { 120 var extramenu = $('.main-header').outerHeight(true); 121 $(".s-home section[id*='banner-rotate']").css("margin-top", -(extramenu) ); 122 }); 123 124 125 126 //-------------------------------------------------------------------------- 127 // RETROSPECTIVE EXHIBITION 128 $('#retrospective-exhibition-grid .entry').each(function(){ 129 if ($(this).find('.links a').length) { 130 var tempUrl = $(this).find('.links a').attr('href'); 131 $(this).contents().wrapAll('<a href="'+tempUrl+'"></a>'); 132 $(this).find('.links').remove(); 133 } 134 });
135 136 137 138 139 //NEWS PAGE 140 $('section#slideshow').insertAfter('.news-details .container.page-header-container'); 141 142 //HOMEPAGE NEWS 143 $('.s-home div#news-grid header h1').text('Stories'); 144 145 //LOGO 146 $('a.logo span').text('Tom Gilleon'); 147 148 $('.slideshow-headline.frs h2 + h2').addClass('subtitle2'); 149 //-------------------------------------------------------------------------- 150 // FOOTER 151 $('footer .container').append('<div class="col-custom"><span>© Tom Gilleon</span></div>'); 152 $('footer .footer-siteindex').parent('span').appendTo('.col-custom'); 153 $('footer .credit').appendTo('.col-custom'); 154 $('.footer-social').appendTo('.footer-cols'); 155 $('#site-index-urls').closest(".container").addClass('custom-site-index-container'); 156 157 // ------------------------------------------------------------------------- 158 // HOME (BANNER-ROTATE) 159 if (window.location.pathname === '/') { 160 collageHistory.disableSlideshowNavigation(); 161 } 162 $('section[id*="banner-rotate"] .bx-controls').remove(); 163 $('section[id*="banner="] .bx-controls').remove(); 164 $('section#wrapper-banner .bx-controls').remove(); 165 166 //-------------------------------------------------------------------------- 167 // BANNER TEXT CONTAINER WORK AROUND 168 $('section[id*="banner-rotate"] figcaption').wrapInner('<div class="container"></div>'); 169 $('section[id*="banner-stack"] figcaption').wrapInner('<div class="container"></div>'); 170 $('section[id*="banner]"] figcaption').wrapInner('<div class="container"></div>'); 171 $('section#wrapper-banner figcaption').wrapInner('<div class="container"></div>'); 172 173 //-------------------------------------------------------------------------- 174 // HI-RES IMAGE SWAP BASIC 175 // $('.text-one-column-with-image .image img').each(function() { 176 // var imgUrl = $(this).attr('src').replace( '500x500_fit', 'original' ).replace( '1000x1000_fit', 'original' ); 177 // $(this).attr('src', imgUrl); 178 // $(this).attr('srcset', imgUrl); 179 // }); 180 181 //-------------------------------------------------------------------------- 182 // REMOVE PASTED STYLES 183 $( ".paragraph-styling *:not(figure), figcaption *, .caption *, .text *" ).removeAttr("style"); 184 185 //-------------------------------------------------------------------------- 186 // REMOVE PASTED IMAGES 187 $( ".paragraph-styling p img, figcaption p img, .caption p img, .text p img" ).remove(); 188 //-------------------------------------------------------------------------- 189 // REMOVE - UNWRAP PASTED HTML TAGS 190 $(".paragraph-styling span, .paragraph-styling font").contents().unwrap(); 191 $("figcaption span, figcaption font").contents().unwrap(); 192 // $(".caption span, .caption font").contents().unwrap(); 193 $(".text span, .text font").contents().unwrap(); 194 // MIGHT HAVE TO USE LOAD INSTEAD OF READY 195 196 197 //-------------------------------------------------------------------------- 198 // REMOVE EMPTY PARAGRAPHS 199 $('.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) { 200 if($.trim($(item).text()) === "") {$(item).remove();} 201 }); 202 203 //-------------------------------------------------------------------------- 204 // REMOVE BACK BUTTONS 205 $( ".back" ).remove(); 206 207 //-------------------------------------------------------------------------- 208 // REMOVE EMPTY DATE HTML TAGS 209 $("span.date").filter( function() {return $.trim($(this).html()) == '';}).remove(); 210 211 212 //-------------------------------------------------------------------------- 213 // CUSTOM CLASS BULLET SEE CSS 214 $('.paragraph-styling p').each(function(){ 215 var str = $(this).html(); 216 if (str.startsWith("â¢") || str.startsWith("*")) { 217 $(this).addClass('custom-bullet'); 218 $(this).html(str.substring(1, str.length)); 219 } 220 }); 221 $('.custom-bullet').parent().children('*:not(.custom-bullet)').prev(".custom-bullet").addClass('custom-bullet-last') 222 223 //-------------------------------------------------------------------------- 224 // CUSTOM CLASS HORIZONTAL-LINE SEE CSS 225 $('.paragraph-styling p').each(function(){ 226 var str = $(this).text(); 227 if (str.startsWith("--")) { 228 $(this).addClass('custom-horizontal-line'); 229 $(this).html('\u00A0'); 230 } 231 });
232 233 //-------------------------------------------------------------------------- 234 // SOCIAL MEDIA PLACE ON 4TH FOOTER COL 235 $('.footer-social').prependTo('.footer-col4'); 236 237 //-------------------------------------------------------------------------- 238 // SOCIAL HOVER - SET IMAGE AS BACKGROUND WITH HOVER POSITION 239 $('.footer-social a img').each(function() { 240 var imgUrl = $(this).attr('src'); 241 $(this).css({'opacity':'0','width':'20px','height':'20px'}); 242 $(this).parents('a').css({'background': 'transparent url(' + imgUrl + ') top left no-repeat','background-size':'cover','width':'20px','height':'20px'}); 243 }); 244 $('.footer-social').css({'text-align':'left','float':'none','margin-bottom':'5px'}); 245 $('.footer-social a').hover( 246 function() { 247 $(this).css( "background-position", "top right" ); 248 }, function() { 249 $(this).css( "background-position", "top left" ); 250 } 251 ); 252 253 254 //-------------------------------------------------------------------------- 255 // CREATE GRADIENT FOR SUPERSIZED HOMEPAGE 256 if($(".s-homepage #supersized").length){ 257 $('<div />', { id: 'homefader' }).appendTo('body'); 258 $("#homefader").css({ 259 top: 0, 260 left: 0, 261 height: '100%', 262 width: '100%', 263 zIndex:0, 264 position:'absolute', 265 'pointer-events': 'none' 266 }); 267 } 268 // VIDEO JARALLAX BANNER 269 270 if ($('.s-home section#wrapper-associations').length) { 271 $('.s-home script + .full-width-banner').append('<a href="#wrapper-associations"><div id="seeHomepageItems" style="display: block;">View More</div></a>'); 272 } 273 274 // VIDEO JARALLAX BANNER 275 $('section[id*="wrapper-video-background"]').each(function() { 276 var videoUrl = $(this).find('.embed > div').text(); 277 $(this).prepend('<div class="jarallax" data-video-src="'+videoUrl+'" style="height:100vh;"></div>'); 278 $.getScript( "https://s3.amazonaws.com/files.collageplatform.com.prod/application/5fd917fc13a8373d488b4567/jarallax-video.js", function() { $('.jarallax').jarallax();}); 279 $(this).css({'padding-bottom':'80px'}) 280 $(this).find('.embed').remove(); 281 }); 282 283 /// ------------------------------------------------------------------------- 284 // HOME VIMEO 285 if ($('section#wrapper-video-background').length) { 286 287 // remove image immediatly to show video background 288 $(".s-home section#wrapper-banner-rotate figure").css({'background-image':'none'}) 289 $(".s-home section#wrapper-banner-rotate").css({'background-color':'transparent'}) 290 291 // MOVE HOMEPAGE Video BANNER TO TOP 292 $('section#wrapper-video-background').css({ 293 "position": "absolute", 294 "top": "0", 295 "left": "0", 296 "right": "0", 297 "bottom": "0", 298 299 300 }); 301 302 303 } 304 305 306 //-------------------------------------------------------------------------- 307 // HOME ALERT BOX 308 $('<a class="ee-close">Ã</a>').appendTo('section#wrapper-alert-box'); 309 $('.ee-close').on('click', function() { 310 $(this).closest('section').remove(); 311 }); 312 313 314 315 316 317}); 318 319 320 321// XL FOR MODULES that do not have FIT IMAGE 322$( document ).bind('ready ajaxComplete', function() { 323 324 if ($(".text-one-column-with-image .image img").length) { 325 $(".text-one-column-with-image .image img").each(function() { 326 var match = $(this).attr('src').match(/([a-f0-9]{24}\/[a-f0-9]{32}\.\w{3,4})$/); 327 if (!match) { 328 return; 329 } 330 331 var imgPath = match[1]; 332 var src = getResolveUrl(imgPath, 'enlarge'); 333 334 $(this).attr('src', src); 335 336 if (typeof $(this).attr('srcset') !== 'undefined') { 337 var srcset = getResolveUrl(imgPath, 'enlarge') + ' 1x, ' + getResolveUrl(imgPath, 'enlarge') + ' 2x'; 338 $(this).attr('srcset', srcset); 339 } 340 }); 341 } 342 343}); 344// ------------------------------------------------------------------------------ 345// XL FOR MODULES THAT HAVE FIT IMAGE OPTIONS 346$( document ).bind('ready ajaxComplete', function() { 347 348 if ($(".news-index .entry .thumbnail img").length) { 349 $(".news-index .entry .thumbnail img[src*='_fit']").each(function() { 350 var match = $(this).attr('src').match(/([a-f0-9]{24}\/[a-f0-9]{32}\.\w{3,4})$/); 351 if (!match) { 352 return; 353 } 354 355 var imgPath = match[1]; 356 var src = getResolveUrl(imgPath, '420x315_fit'); 357 358 $(this).attr('src', src); 359 360 if (typeof $(this).attr('srcset') !== 'undefined') { 361 var srcset = getResolveUrl(imgPath, '420x315_fit') + ' 1x, ' + getResolveUrl(imgPath, '840x630_fit') + ' 2x'; 362 $(this).attr('srcset', srcset); 363 } 364 }); 365 366 $(".news-index .entry .thumbnail img:not([src*='_fit'])").each(function() { 367 var match = $(this).attr('src').match(/([a-f0-9]{24}\/[a-f0-9]{32}\.\w{3,4})$/); 368 if (!match) { 369 return; 370 } 371 372 var imgPath = match[1]; 373 var src = getResolveUrl(imgPath, '420x315'); 374 375 $(this).attr('src', src); 376 377 if (typeof $(this).attr('srcset') !== 'undefined') { 378 var srcset = getResolveUrl(imgPath, '420x315') + ' 1x, ' + getResolveUrl(imgPath, '840x630') + ' 2x'; 379 $(this).attr('srcset', srcset); 380 } 381 }); 382 383 384 } 385}); 386 387// XL Slideshow 388 389function getResolveUrl(file, filter) { 390 return '/custom/media/cache/resolve/' + filter + '/' + file; 391} 392
393collageDispatcher.on('bxslider.beforePreload', function(config) { 394 if ($(".slider figure img").length) { 395 $('.slider figure img').each(function() { 396 var match = $(this).data('src').match(/([a-f0-9]{24}\/[a-f0-9]{32}\.\w{3,4})$/); 397 if (!match) { 398 return; 399 } 400 401 var imgPath = match[1]; 402 var src = getResolveUrl(imgPath, 'enlarge'); 403 404 $(this).data('src', src).attr('data-src', src).attr('src', src); 405 406 if (typeof $(this).data('srcset') !== 'undefined') { 407 var srcset = getResolveUrl(imgPath, 'enlarge') + ' 1x, ' + getResolveUrl(imgPath, 'enlarge_2x') + ' 2x'; 408 $(this).data('srcset', srcset).attr('data-srcset', srcset).attr('srcset', srcset); 409 } 410 }); 411 } 412}); 413
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.