1// source --> https://www.visitartierrasanta.com/wp-content/plugins/responsive-lightbox/js/front.js?ver=2.2.1 2( function ( $ ) { 3 4 // parse query string 5 var parse_str = function( name, str ) { 6 var regex = new RegExp( '[?&]' + name.replace( /[\[\]]/g, '\\$&' ) + '(=([^&#]*)|&|#|$)' ), 7 results = regex.exec( '&' + str ); 8 9 return ( ! results || ! results[2] ? '' : decodeURIComponent( results[2].replace( /\+/g, ' ' ) ) ); 10 } 11 12 // observe DOM changes 13 var observe_script_dom = ( function () { 14 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver, 15 eventListenerSupported = window.addEventListener; 16 17 return function ( obj, only_added, callback ) { 18 if ( MutationObserver ) { 19 // define a new observer 20 var obs = new MutationObserver( function ( mutations, observer ) { 21 if ( only_added ) { 22 if ( mutations[0].addedNodes.length ) 23 callback(); 24 } else { 25 if ( mutations[0].addedNodes.length || mutations[0].removedNodes.length ) 26 callback(); 27 } 28 } ); 29 30 // have the observer observe for changes in children 31 obs.observe( obj, { childList: true, subtree: true } ); 32 } else if ( eventListenerSupported ) { 33 obj.addEventListener( 'DOMNodeInserted', callback, false ); 34 35 if ( !only_added ) { 36 obj.addEventListener( 'DOMNodeRemoved', callback, false ); 37 } 38 } 39 } 40 } )(); 41 42 // ready event handler 43 $( document ).on( 'ready' + rlArgs.customEvents, function () { 44 var containers = []; 45 46 // check for infinite galleries 47 $( '.rl-gallery-container' ).each( function() { 48 var container = $( this ); 49 50 // is it ifinite scroll gallery? 51 if ( container.hasClass( 'rl-pagination-infinite' ) ) { 52 containers.push( container ); 53 } else { 54 // remove loading class 55 container.removeClass( 'rl-loading' ); 56 } 57 } ); 58 59 // any infinite galleries? 60 if ( containers.length > 0 ) { 61 for ( var i = 0; i < containers.length; i++ ) { 62 var container = containers[i], 63 gallery = container.find( '.rl-gallery' ), 64 gallery_id = parseInt( container.data( 'gallery_id' ) ), 65 gallery_scroll_type = container.find( '.rl-pagination-bottom' ).data( 'button' ), 66 gallery_button = typeof gallery_scroll_type !== 'undefined' && gallery_scroll_type === 'manually'; 67 68 // initialize infinite scroll 69 gallery.infiniteScroll( { 70 path: '.rl-gallery-container[data-gallery_id="' + gallery_id + '"] .rl-pagination-bottom .next', 71 append: '.rl-gallery-container[data-gallery_id="' + gallery_id + '"] .rl-gallery-item' + ( gallery.hasClass( 'rl-masonry-gallery' ) || gallery.hasClass( 'rl-basicmasonry-gallery' ) ? '-no-append' : '' ), 72 status: false, 73 hideNav: '.rl-gallery-container[data-gallery_id="' + gallery_id + '"] .rl-pagination-bottom', 74 prefill: ! gallery_button, 75 loadOnScroll: true, 76 scrollThreshold: gallery_button ? false : 0, 77 button: gallery_button ? '.rl-gallery-container[data-gallery_id="' + gallery_id + '"] .rl-load-more' : false, 78 debug: false, 79 history: false, 80 onInit: function() { 81 // infinite with button? 82 if ( container.hasClass( 'rl-pagination-infinite' ) && gallery_button ) { 83 // remove loading class 84 container.removeClass( 'rl-loading' ); 85 } 86 87 // store gallery ID for append event 88 var _gallery_id = gallery_id; 89 90 // request event 91 this.on( 'request', function( path ) { 92 // add loading class 93 container.addClass( 'rl-loading' ); 94 } ); 95 96 // append event 97 this.on( 'append', function ( response, path, items ) { 98 // remove loading class 99 container.removeClass( 'rl-loading' ); 100 101 $.event.trigger( { 102 type: 'doResponsiveLightbox', 103 script: rlArgs.script, 104 selector: rlArgs.selector, 105 args: rlArgs, 106 pagination_type: 'infinite', 107 gallery_id: _gallery_id, 108 masonry: gallery.hasClass( 'rl-masonry-gallery' ) || gallery.hasClass( 'rl-basicmasonry-gallery' ), 109 infinite: { 110 gallery: gallery, 111 response: response, 112 items: items 113 } 114 } ); 115 } ); 116 } 117 } ); 118 } 119 } 120 121 // initialize event 122 $.event.trigger( { 123 type: 'doResponsiveLightbox', 124 script: rlArgs.script, 125 selector: rlArgs.selector, 126 args: rlArgs 127 } ); 128 } ); 129 130 // pagination 131 $( document ).on( 'click', '.rl-pagination a.page-numbers', function ( e ) { 132 var link = $( this ), 133 container = link.closest( '.rl-gallery-container' ); 134 135 // ajax type pagination? 136 if ( container.hasClass( 'rl-pagination-ajax' ) ) { 137 e.preventDefault(); 138 e.stopPropagation(); 139 140 var gallery_id = container.data( 'gallery_id' ); 141 142 // add loading class 143 container.addClass( 'rl-loading' ); 144 145 $.post( rlArgs.ajaxurl, { 146 action: 'rl-get-gallery-page-content', 147 gallery_id: gallery_id, 148 page: parse_str( 'rl_page', link.prop( 'href' ) ), 149 nonce: rlArgs.nonce 150 } ).done( function ( response ) { 151 // replace container with new content 152 container.replaceWith( $( response ).removeClass( 'rl-loading' ) ); 153 154 // trigger main event 155 $.event.trigger( { 156 type: 'doResponsiveLightbox', 157 script: rlArgs.script, 158 selector: rlArgs.selector, 159 args: rlArgs, 160 pagination_type: 'ajax', 161 gallery_id: gallery_id 162 } ); 163 } ).fail( function () { 164 container.removeClass( 'rl-loading' ); 165 } ); 166 167 return false; 168 } 169 } ); 170 171 // this is similar to the WP function add_action(); 172 $( document ).on( 'doResponsiveLightbox', function ( event ) { 173 if ( typeof event.masonry !== 'undefined' && event.masonry === true ) { 174 return false; 175 } 176 177 var script = event.script, 178 selector = event.selector, 179 args = event.args; 180 181 if ( typeof script === 'undefined' || typeof selector === 'undefined' ) { 182 return false; 183 } 184 185 rl_view_image = function ( script, url ) { 186 $.event.trigger( { 187 type: 'doLightboxViewImage', 188 script: script, 189 url: url 190 } ); 191 } 192 193 rl_hide_image = function ( script, url ) { 194 $.event.trigger( { 195 type: 'doLightboxHideImage', 196 script: script, 197 url: url 198 } ); 199 } 200 201 // WooCommerce 3.0+ compatibility 202 setTimeout( function () { 203 var flex = $( '.flex-viewport' ); 204 205 // if ( flex.length ) 206 // flex.css( 'cursor', 'pointer' ); 207 208 if ( args.woocommerce_gallery === '1' ) { 209 var gallery = $( '.woocommerce-product-gallery' ); 210 211 if ( gallery.find( '.woocommerce-product-gallery__trigger' ).length === 0 ) { 212 gallery.prepend( '<a href="#" class="woocommerce-product-gallery__trigger">ð</a>' ); 213 214 gallery.on( 'click', '.woocommerce-product-gallery__trigger', function( e ) { 215 e.preventDefault(); 216 e.stopPropagation(); 217 218 if ( flex.length ) 219 flex.find( '.flex-active-slide a[data-rel]' ).trigger( 'click' ); 220 else 221 gallery.find( 'a[data-rel]' ).first().trigger( 'click' ); 222 } ); 223 } 224 } 225 }, 10 ); 226 227 // init lightbox 228 switch ( script ) { 229 case 'swipebox': 230 var slide = $( '#swipebox-overlay' ).find( '.slide.current' ), 231 image_source = '', 232 allow_hide = false, 233 close_executed = false; 234 235 $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).swipebox( { 236 useCSS: ( args.animation === '1' ? true : false ), 237 useSVG: ( args.useSVG === '1' ? true : false ), 238 hideCloseButtonOnMobile: ( args.hideCloseButtonOnMobile === '1' ? true : false ), 239 removeBarsOnMobile: ( args.removeBarsOnMobile === '1' ? true : false ), 240 hideBarsDelay: ( args.hideBars === '1' ? parseInt( args.hideBarsDelay ) : 0 ), 241 videoMaxWidth: parseInt( args.videoMaxWidth ), 242 loopAtEnd: ( args.loopAtEnd === '1' ? true : false ), 243 afterOpen: function () { 244 close_executed = false; 245 246 // update current slide container 247 slide = $( '#swipebox-overlay' ).find( '.slide.current' ); 248 249 // get image source
250 var image = slide.find( 'img' ).attr( 'src' ); 251 252 // valid image source? 253 if ( typeof image !== 'undefined' ) { 254 image_source = image; 255 256 // trigger image view 257 rl_view_image( script, image_source ); 258 } else { 259 image_source = ''; 260 } 261 262 // add current slide observer 263 observe_script_dom( document.getElementById( 'swipebox-slider' ), false, function () { 264 if ( image_source === '' ) { 265 // get image source 266 var image = slide.find( 'img' ).attr( 'src' ); 267 268 // valid image source? 269 if ( typeof image !== 'undefined' ) { 270 image_source = image; 271 272 // trigger image view 273 rl_view_image( script, image_source ); 274 } else { 275 image_source = ''; 276 } 277 } 278 } ); 279 }, 280 nextSlide: function () { 281 // update current slide container 282 slide = $( '#swipebox-overlay' ).find( '.slide.current' ); 283 284 // get image source 285 var image = slide.find( 'img' ).attr( 'src' ); 286 287 // valid image source? 288 if ( typeof image !== 'undefined' ) { 289 image_source = image; 290 291 // trigger image view 292 rl_view_image( script, image_source ); 293 } else { 294 image_source = ''; 295 } 296 }, 297 prevSlide: function () { 298 // update current slide container 299 slide = $( '#swipebox-overlay' ).find( '.slide.current' ); 300 301 // get image source 302 var image = slide.find( 'img' ).attr( 'src' ); 303 304 // valid image source? 305 if ( typeof image !== 'undefined' ) { 306 image_source = image; 307 308 // trigger image view 309 rl_view_image( script, image_source ); 310 } else { 311 image_source = ''; 312 } 313 }, 314 afterClose: function () { 315 // afterClose event executed 316 close_executed = true; 317 318 // allow to hide image? 319 if ( allow_hide ) { 320 // trigger image hide 321 rl_hide_image( script, image_source ); 322 323 allow_hide = false; 324 } 325 } 326 } ); 327 328 // additional event to prevent rl_hide_image to execure while opening modal 329 $( window ).on( 'resize', function () { 330 if ( !close_executed ) { 331 allow_hide = true; 332 } 333 } ); 334 break; 335 336 case 'prettyphoto': 337 var view_disabled = false, 338 last_image = ''; 339 340 $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).each( function () { 341 var el = $( this ); 342 343 // set description 344 el.attr( 'title', el.data( 'rl_caption' ) ); 345 346 // set title
347 el.find( 'img' ).attr( 'alt', el.data( 'rl_title' ) ); 348 } ); 349 350 $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).prettyPhoto( { 351 hook: 'data-rel', 352 animation_speed: args.animationSpeed, 353 slideshow: ( args.slideshow === '1' ? parseInt( args.slideshowDelay ) : false ), 354 autoplay_slideshow: ( args.slideshowAutoplay === '1' ? true : false ), 355 opacity: args.opacity, 356 show_title: ( args.showTitle === '1' ? true : false ), 357 allow_resize: ( args.allowResize === '1' ? true : false ), 358 allow_expand: ( args.allowExpand === '1' ? true : false ), 359 default_width: parseInt( args.width ), 360 default_height: parseInt( args.height ), 361 counter_separator_label: args.separator, 362 theme: args.theme, 363 horizontal_padding: parseInt( args.horizontalPadding ), 364 hideflash: ( args.hideFlash === '1' ? true : false ), 365 wmode: args.wmode, 366 autoplay: ( args.videoAutoplay === '1' ? true : false ), 367 modal: ( args.modal === '1' ? true : false ), 368 deeplinking: ( args.deeplinking === '1' ? true : false ), 369 overlay_gallery: ( args.overlayGallery === '1' ? true : false ), 370 keyboard_shortcuts: ( args.keyboardShortcuts === '1' ? true : false ), 371 social_tools: ( args.social === '1' ? '<div class="pp_social"><div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href=' + location.href + '&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div></div>' : '' ), 372 ie6_fallback: true, 373 changepicturecallback: function () { 374 // is view disabled? 375 if ( view_disabled ) { 376 // enable view 377 view_disabled = false; 378 379 return; 380 } 381 382 last_image = $( '#pp_full_res' ).find( 'img' ).attr( 'src' ); 383 384 // trigger image view 385 rl_view_image( script, last_image ); 386 387 // is expanding allowed? 388 if ( args.allowExpand === '1' ) { 389 // disable changepicturecallback event after expanding 390 $( 'a.pp_expand' ).on( 'click', function () { 391 view_disabled = true; 392 } ); 393 } 394 }, 395 callback: function () { 396 // trigger image hide 397 rl_hide_image( script, last_image ); 398 } 399 } ); 400 break; 401 402 case 'fancybox': 403 var last_image = ''; 404 405 $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).fancybox( { 406 modal: ( args.modal === '1' ? true : false ), 407 overlayShow: ( args.showOverlay === '1' ? true : false ), 408 showCloseButton: ( args.showCloseButton === '1' ? true : false ), 409 enableEscapeButton: ( args.enableEscapeButton === '1' ? true : false ), 410 hideOnOverlayClick: ( args.hideOnOverlayClick === '1' ? true : false ), 411 hideOnContentClick: ( args.hideOnContentClick === '1' ? true : false ), 412 cyclic: ( args.cyclic === '1' ? true : false ), 413 showNavArrows: ( args.showNavArrows === '1' ? true : false ), 414 autoScale: ( args.autoScale === '1' ? true : false ), 415 scrolling: args.scrolling, 416 centerOnScroll: ( args.centerOnScroll === '1' ? true : false ), 417 opacity: ( args.opacity === '1' ? true : false ), 418 overlayOpacity: parseFloat( args.overlayOpacity / 100 ), 419 overlayColor: args.overlayColor, 420 titleShow: ( args.titleShow === '1' ? true : false ), 421 titlePosition: args.titlePosition, 422 transitionIn: args.transitions, 423 transitionOut: args.transitions, 424 easingIn: args.easings, 425 easingOut: args.easings, 426 speedIn: parseInt( args.speeds ), 427 speedOut: parseInt( args.speeds ), 428 changeSpeed: parseInt( args.changeSpeed ), 429 changeFade: parseInt( args.changeFade ), 430 padding: parseInt( args.padding ), 431 margin: parseInt( args.margin ), 432 width: parseInt( args.videoWidth ), 433 height: parseInt( args.videoHeight ), 434 onComplete: function () { 435 last_image = $( '#fancybox-content' ).find( 'img' ).attr( 'src' ); 436 437 // trigger image view 438 rl_view_image( script, last_image ); 439 }, 440 onClosed: function () { 441 // trigger image hide 442 rl_hide_image( script, last_image ); 443 } 444 } ); 445 446 break; 447 448 case 'nivo': 449 $.each( $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ), function () { 450 var attr = $( this ).attr( 'data-rel' ); 451 452 // check data-rel attribute first 453 if ( typeof attr === 'undefined' || attr == false ) { 454 // if not found then try to check rel attribute for backward compatibility 455 attr = $( this ).attr( 'rel' ); 456 } 457 458 // for some browsers, `attr` is undefined; for others, `attr` is false. Check for both. 459 if ( typeof attr !== 'undefined' && attr !== false ) { 460 var match = attr.match( new RegExp( selector + '\\-(gallery\\-(?:[\\da-z]{1,4}))', 'ig' ) ); 461 462 if ( match !== null ) { 463 $( this ).attr( 'data-lightbox-gallery', match[0] ); 464 } 465 } 466 467 } ); 468 469 var observer_initialized = false, 470 change_allowed = true, 471 last_image = ''; 472 473 $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).nivoLightbox( { 474 effect: args.effect, 475 clickOverlayToClose: ( args.clickOverlayToClose === '1' ? true : false ), 476 keyboardNav: ( args.keyboardNav === '1' ? true : false ), 477 errorMessage: args.errorMessage, 478 afterShowLightbox: function ( lightbox ) { 479 var content = $( lightbox )[0].find( '.nivo-lightbox-content' ); 480 481 // is observer initialized? 482 if ( !observer_initialized ) { 483 // turn it off 484 observer_initialized = true; 485 486 // add content observer 487 observe_script_dom( document.getElementsByClassName( 'nivo-lightbox-content' )[0], true, function () { 488 if ( change_allowed ) { 489 last_image = content.find( '.nivo-lightbox-image img' ).attr( 'src' ); 490 491 // trigger image view 492 rl_view_image( script, last_image ); 493 494 // disallow observer changes 495 change_allowed = false; 496 } 497 } ); 498 } 499 }, 500 afterHideLightbox: function () { 501 // allow observer changes 502 change_allowed = true; 503 504 // trigger image hide 505 rl_hide_image( script, last_image ); 506 }, 507 onPrev: function ( element ) { 508 // disallow observer changes 509 change_allowed = false; 510 511 last_image = element[0].attr( 'href' ); 512 513 // trigger image view 514 rl_view_image( script, last_image ); 515 }, 516 onNext: function ( element ) { 517 // disallow observer changes 518 change_allowed = false; 519 520 last_image = element[0].attr( 'href' ); 521 522 // trigger image view 523 rl_view_image( script, last_image ); 524 } 525 } ); 526 break; 527 528 case 'imagelightbox': 529 var selectors = [ ], 530 last_image = ''; 531 532 $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).each( function ( i, item ) { 533 var attr = $( item ).attr( 'data-rel' ); 534 535 // check data-rel attribute first 536 if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) 537 selectors.push( attr ); 538 // if not found then try to check rel attribute for backward compatibility 539 else { 540 attr = $( item ).attr( 'rel' ); 541 542 if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) 543 selectors.push( attr ); 544 } 545 } ); 546 547 if ( selectors.length > 0 ) { 548 // make unique 549 selectors = $.unique( selectors ); 550 551 $( selectors ).each( function ( i, item ) { 552 if ( typeof event.pagination_type !== 'undefined' ) { 553 $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).each( function() { 554 $( this ).off( 'click.imageLightbox' ); 555 } ); 556 } 557 558 $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).imageLightbox( { 559 animationSpeed: parseInt( args.animationSpeed ), 560 preloadNext: ( args.preloadNext === '1' ? true : false ), 561 enableKeyboard: ( args.enableKeyboard === '1' ? true : false ), 562 quitOnEnd: ( args.quitOnEnd === '1' ? true : false ), 563 quitOnImgClick: ( args.quitOnImageClick === '1' ? true : false ), 564 quitOnDocClick: ( args.quitOnDocumentClick === '1' ? true : false ), 565 onLoadEnd: function () { 566 last_image = $( '#imagelightbox' ).attr( 'src' ); 567 568 // trigger image view 569 rl_view_image( script, last_image ); 570 }, 571 onEnd: function () { 572 // trigger image hide 573 rl_hide_image( script, last_image ); 574 } 575 } ); 576 } ); 577 } 578 break; 579 580 case 'tosrus': 581 var selectors = [ ], 582 last_image = ''; 583 584 $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).each( function ( i, item ) { 585 var attr = $( item ).attr( 'data-rel' ); 586 587 // check data-rel attribute first 588 if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) 589 selectors.push( attr ); 590 // if not found then try to check rel attribute for backward compatibility 591 else { 592 attr = $( item ).attr( 'rel' ); 593 594 if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) 595 selectors.push( attr ); 596 } 597 } ); 598 599 if ( selectors.length > 0 ) { 600 // make unique 601 selectors = $.unique( selectors ); 602 603 $( selectors ).each( function ( i, item ) { 604 if ( typeof event.pagination_type !== 'undefined' ) { 605 $( 'body' ).find( '.tosrus-' + item ).remove(); 606 607 $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).each( function() { 608 $( this ).off( 'click.tos' ); 609 } ); 610 } 611 612 var tos = $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).tosrus( { 613 infinite: ( args.infinite === '1' ? true : false ), 614 autoplay: { 615 play: ( args.autoplay === '1' ? true : false ), 616 pauseOnHover: ( args.pauseOnHover === '1' ? true : false ), 617 timeout: args.timeout 618 }, 619 effect: args.effect, 620 keys: { 621 prev: ( args.keys === '1' ? true : false ), 622 next: ( args.keys === '1' ? true : false ), 623 close: ( args.keys === '1' ? true : false ) 624 }, 625 pagination: { 626 add: ( args.pagination === '1' ? true : false ), 627 type: args.paginationType 628 }, 629 // forced 630 show: false, 631 buttons: true, 632 caption: { 633 add: true, 634 attributes: [ "title" ] 635 }, 636 wrapper: { 637 classes: 'tosrus-' + item, 638 onClick: args.closeOnClick === '1' ? 'close' : 'toggleUI' 639 } 640 } ); 641 642 tos.bind( 'sliding.tos', function ( event, number ) { 643 last_image = $( $( event.target ).find( '.tos-slider .tos-slide' )[number] ).find( 'img' ).attr( 'src' ); 644 645 // trigger image view 646 rl_view_image( script, last_image ); 647 } ); 648 649 tos.bind( 'closing.tos', function () { 650 // trigger image hide 651 rl_hide_image( script, last_image ); 652 } ); 653 } ); 654 } 655 break; 656 657 case 'featherlight': 658 var selectors = [ ], 659 last_image = ''; 660 661 $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).each( function ( i, item ) { 662 var attr = $( item ).attr( 'data-rel' ); 663 664 // check data-rel attribute first 665 if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) 666 selectors.push( attr ); 667 // if not found then try to check rel attribute for backward compatibility 668 else { 669 attr = $( item ).attr( 'rel' ); 670 671 if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) 672 selectors.push( attr ); 673 } 674 } ); 675 676 if ( selectors.length > 0 ) { 677 // make unique 678 selectors = $.unique( selectors ); 679 680 // set defaults 681 $.extend( $.featherlight.defaults, { 682 openSpeed: parseInt( args.openSpeed ), 683 closeSpeed: parseInt( args.closeSpeed ), 684 closeOnClick: args.closeOnClick, 685 closeOnEsc: ( args.closeOnEsc === '1' ? true : false ), 686 afterOpen: function ( event ) { 687 last_image = event.currentTarget.href; 688 689 // trigger image view 690 rl_view_image( script, last_image ); 691 }, 692 afterClose: function () { 693 // trigger image hide 694 rl_hide_image( script, last_image ); 695 } 696 } ); 697 698 $( selectors ).each( function ( i, item ) { 699 if ( typeof event.pagination_type !== 'undefined' ) { 700 $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).each( function() { 701 $( this ).off( 'click.featherlight' ); 702 } ); 703 } 704 705 // gallery? 706 if ( /-gallery-/.test( item ) ) { 707 $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).featherlightGallery( { 708 galleryFadeIn: parseInt( args.galleryFadeIn ), 709 galleryFadeOut: parseInt( args.galleryFadeOut ), 710 previousIcon: '❮', 711 nextIcon: '❯' 712 } ); 713 // video? 714 } else if ( /-video-/.test( item ) ) { 715 $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).featherlight(); 716 // single image? 717 } else { 718 $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).featherlight(); 719 } 720 } ); 721 722 } 723 break; 724 725 case 'magnific': 726 var selectors = [ ], 727 last_image = ''; 728 729 $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).each( function ( i, item ) { 730 var attr = $( item ).attr( 'data-rel' ); 731 732 // check data-rel attribute first 733 if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) 734 selectors.push( attr ); 735 // if not found then try to check rel attribute for backward compatibility 736 else { 737 attr = $( item ).attr( 'rel' ); 738 739 if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) 740 selectors.push( attr ); 741 } 742 } ); 743 744 if ( selectors.length > 0 ) { 745 // make unique 746 selectors = $.unique( selectors ); 747 748 $( selectors ).each( function ( i, item ) { 749 var subselector = $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ), 750 element = $( subselector[0] ), 751 media_type = element.data( 'magnific_type' ), 752 content_type = element.data( 'rl_content' ); 753 754 // check content type first 755 if ( typeof content_type !== 'undefined' ) { 756 media_type = content_type; 757 } 758 759 // then media type if needed 760 if ( typeof media_type === 'undefined' ) { 761 media_type = 'image'; 762 } 763 764 subselector.magnificPopup( { 765 type: media_type === 'gallery' ? 'image' : ( media_type === 'video' ? 'iframe' : media_type ), 766 disableOn: args.disableOn, 767 midClick: args.midClick === '1', 768 preloader: args.preloader === '1', 769 closeOnContentClick: args.closeOnContentClick === '1', 770 closeOnBgClick: args.closeOnBgClick === '1', 771 closeBtnInside: args.closeBtnInside === '1', 772 showCloseBtn: args.showCloseBtn === '1', 773 enableEscapeKey: args.enableEscapeKey === '1', 774 alignTop: args.alignTop === '1', 775 autoFocusLast: args.autoFocusLast === '1', 776 fixedContentPos: args.fixedContentPos === 'auto' ? 'auto' : ( args.fixedContentPos === '1' ), 777 fixedBgPos: args.fixedBgPos === 'auto' ? 'auto' : ( args.fixedBgPos === '1' ), 778 image: { 779 titleSrc: function ( item ) { 780 return item.el.attr( 'data-rl_title' ) + '<small>' + item.el.attr( 'data-rl_caption' ) + '</small>'; 781 } 782 }, 783 gallery: { 784 enabled: subselector.length > 1 && media_type === 'gallery', 785 navigateByImgClick: true, 786 preload: [0,1] 787 }, 788 callbacks: { 789 close: function() { 790 rl_hide_image( script, this.currItem.src ); 791 }, 792 imageLoadComplete: function() { 793 // trigger image view 794 rl_view_image( script, this.currItem.src ); 795 } 796 } 797 } ); 798 } ); 799 } 800 break; 801 } 802 } ); 803 804} )( jQuery ); 805// s
805ource --> https://www.visitartierrasanta.com/wp-content/uploads/js-cache-saxon.js?ver=1575414730.1374 806/* Cache file created at 2019-12-03 23:12:10 */ (function($){ 807 $(document).ready(function() { 808 809 810 811 }); 812 })(jQuery); 813 /*2019-12-03 23:12*//* JS Generator Execution Time: 6.6041946411133E-5 seconds */;
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.