1/*Featured Events Widget*/ 2 3 4(function($) { 5 //Data service for the widget 6 function widgetDataService() { 7 8 this.getWidgetData = function(servicePath, widgetModuleItemID, successCallback, errorCallback) { 9 $.ajax({ 10 type: "POST", 11 url: servicePath, 12 data: "{'widgetModuleItemID':" + widgetModuleItemID + "}", 13 contentType: "application/json; charset=utf-8", 14 dataType: "json", 15 success: successCallback, 16 error: errorCallback 17 }); 18 }; 19 }; 20 21 //Global variable for the widget function 22 var limitImageHeight = false; 23 var flexDescription = false; 24 var widgetModuleItemID = 0; 25 var widgetData = null; 26 var widgetContainer = null; 27 var slideshowDescription = ''; 28 var centerSlides = true; 29 var fullWindow = false; 30 var imageQuality = 80; 31 var oneSlide = false; 32 var preloadImages = false; 33 var updateOnImagesReady = true; 34 var lazyLoading = true; 35 var lazyLoadingInPrevNext = true; 36 var lazyLoadingOnTransitionStart = false; 37 var loop = true; 38 var speed = 600; 39 var spaceBetween = 0; 40 var wrapperClass = 'swiper-wrapper'; 41 var centeredSlides = true; 42 var slidesPerView = 1; // set this to 'auto' for ks expo 43 var grabCursor = false; 44 var autoplay = 7500; 45 var autoplayDisableOnInteraction = false; 46 var parallax = false; 47 var initialSlide = 0; 48 var effect = 'slide'; 49 var slideShadows = true; 50 var shadow = true; 51 var shadowOffset = 20; 52 var shadowScale = 0.94; 53 var rotate = 50; 54 var stretch = 0; 55 var depth = 100; 56 var modifier = 1; 57 var slideShadows = true; 58 var crossFade = true; 59 var allowSwipeToPrev = true; 60 var allowSwipeToNext = true; 61 var noSwiping = true; 62 var paginationClickable = true; 63 var paginationBulletRender = null; 64 var scrollBar = null; 65 var scrollbarHide = true; 66 var keyboardControl = false; 67 var onInit = function(swiper) {}; 68 var onSlideChangeStart = function(swiper) {}; 69 var onSlideChangeEnd = function(swiper) {}; 70 var onTransitionStart = function(swiper) {}; 71 var onTransitionEnd = function(swiper) {}; 72 var onTouchStart = function(swiper, event) {}; 73 var onTouchMove = function(swiper, event) {}; 74 var onTouchMoveOpposite = function(swiper, event) {}; 75 var onSliderMove = function(swiper, event) {}; 76 var onTouchEnd = function(swiper, event) {}; 77 var onClick = function(swiper, event) {}; 78 var onTap = function(swiper, event) {}; 79 var onDoubleTap = function(swiper, event) {}; 80 var onImagesReady = function(swiper) {}; 81 var onProgress = function(swiper, progress) {}; 82 var onReachBeginning = function(swiper) {}; 83 var onReachEnd = function(swiper) {}; 84 var onDestroy = function(swiper) {}; 85 var onSetTranslate = function(swiper, translate) {}; 86 var onSetTransition = function(swiper, transition) {}; 87 var onAutoplayStart = function(swiper) {}; 88 var onAutoplayEnd = function(swiper) {}; 89 var onLazyImageLoad = function(swiper, slide, image) {}; 90 var onLazyLoadImageReady = function(swiper, slide, image) {}; 91 var appendDescriptionTo = '.swiper-container'; 92 var appendButtonsTo = '.slideshowDescription'; 93 var moreButtonText = 'MORE >'; 94 var bw = false; 95 var parallaxTitleValue = -100; 96 var parallaxDescriptionValue = -100; 97 var parallaxButtonsValue = -300; 98 var parallaxImageValue = -200; 99 var showPlayPause = true; 100 var controlsContainer = false; 101 var paginationFirst = true; 102 var appendControlsContainerTo = '.swiper-container'; 103 var controlsContainerAfter = ''; 104 var randomize = false; 105 var playPauseAppendTo = '.swiper-container'; 106 var imagesAsBackgrounds = false; 107 var restrictMobileImageSize = true; 108 109 //Constructor for the widget 110 $.fn.SlideshowSwiperWidget = function(options) { 111 112 var opts = $.extend({}, $.fn.SlideshowSwiperWidget.defaultOptions, options); 113 114 widgetContainer = this; 115 widgetModuleItemID = opts.currentWidgetModuleItemID; 116 117 var widgetDataAdapter = new widgetDataService(); 118 119 widgetDataAdapter.getWidgetData(opts.scriptPath, opts.currentWidgetModuleItemID, getWidgetDataSuccess, getWidgetDataError); 120 121 preloadImages = opts.preloadImages; 122 updateOnImagesReady = opts.updateOnImagesReady; 123 lazyLoading = opts.lazyLoading; 124 lazyLoadingInPrevNext = opts.lazyLoadingInPrevNext; 125 lazyLoadingOnTransitionStart = opts.lazyLoadingOnTransitionStart; 126 loop = opts.loop; 127 speed = opts.speed; 128 spaceBetween = opts.spaceBetween; 129 centeredSlides = opts.centeredSlides; 130 slidesPerView = opts.slidesPerView; 131 grabCursor = opts.grabCursor; 132 autoplay = opts.autoplay; 133 autoplayDisableOnInteraction = opts.autoplayDisableOnInteraction; 134 parallax = opts.parallax; 135 initialSlide = opts.initialSlide; 136 effect = opts.effect; 137 slideShadows = opts.slideShadows; 138 shadow = opts.shadow; 139 shadowOffset = opts.shadowOffset; 140 shadowScale = opts.shadowScale; 141 rotate = opts.rotate; 142 stretch = opts.stretch; 143 depth = opts.depth; 144 modifier = opts.modifier; 145 slideShadows = opts.slideShadows; 146 crossFade = opts.crossFade; 147 allowSwipeToPrev = opts.allowSwipeToPrev; 148 allowSwipeToNext = opts.allowSwipeToNext; 149 noSwiping = opts.noSwiping; 150 paginationClickable = opts.paginationClickable; 151 paginationBulletRender = opts.paginationBulletRender; 152 scrollBar = opts.scrollBar; 153 scrollbarHide = opts.scrollbarHide; 154 keyboardControl = opts.keyboardControl; 155 onInit = opts.onInit; 156 onSlideChangeStart = opts.onSlideChangeStart; 157 onSlideChangeEnd = opts.onSlideChangeEnd; 158 onTransitionStart = opts.onTransitionStart; 159 onTransitionEnd = opts.onTransitionEnd; 160 onTouchStart = opts.onTouchStart; 161 onTouchMove = opts.onTouchMove; 162 onTouchMoveOpposite = opts.onTouchMoveOpposite; 163 onSliderMove = opts.onSliderMove; 164 onTouchEnd = opts.onTouchEnd; 165 onClick = opts.onClick; 166 onTap = opts.onTap; 167 onDoubleTap = opts.onDoubleTap; 168 onImagesReady = opts.onImagesReady; 169 onProgress = opts.onProgress; 170 onReachBeginning = opts.onReachBeginning; 171 onReachEnd = opts.onReachEnd; 172 onDestroy = opts.onDestroy; 173 onSetTranslate = opts.onSetTranslate; 174 onSetTransition = opts.onSetTransition; 175 onAutoplayStart = opts.onAutoplayStart; 176 onAutoplayEnd = opts.onAutoplayEnd;
177 onLazyImageLoad = opts.onLazyImageLoad; 178 onLazyLoadImageReady = opts.onLazyLoadImageReady; 179 centerSlides = opts.centerSlides; 180 fullWindow = opts.fullWindow; 181 imageQuality = opts.imageQuality; 182 appendDescriptionTo = opts.appendDescriptionTo; 183 appendButtonsTo = opts.appendButtonsTo; 184 moreButtonText = opts.moreButtonText; 185 bw = opts.bw; 186 parallaxTitleValue = opts.parallaxTitleValue; 187 parallaxDescriptionValue = opts.parallaxDescriptionValue; 188 parallaxButtonsValue = opts.parallaxButtonsValue; 189 parallaxImageValue = opts.parallaxImageValue; 190 showPlayPause = opts.showPlayPause; 191 controlsContainer = opts.controlsContainer; 192 paginationFirst = opts.paginationFirst; 193 appendControlsContainerTo = opts.appendControlsContainerTo; 194 controlsContainerAfter = opts.controlsContainerAfter; 195 randomize = opts.randomize; 196 playPauseAppendTo = opts.playPauseAppendTo; 197 imagesAsBackgrounds = opts.imagesAsBackgrounds; 198 restrictMobileImageSize = opts.restrictMobileImageSize; 199 flexDescription = opts.flexDescription; 200 limitImageHeight = opts.limitImageHeight; 201 202 if (fullWindow) { 203 onInitialized = function(e, slider) { 204 opts.fullWindowOnInitialized(); 205 preventClickOnNonActive(); 206 $('#slideshowWidget .slideshowItem.activePage > a').unbind('click'); 207 } 208 209 onSlideComplete = function(e, slider) { 210 opts.fullWindowOnSlideComplete(); 211 preventClickOnNonActive(); 212 $('#slideshowWidget .slideshowItem.activePage > a').unbind('click'); 213 } 214 } 215 }; 216 217 218 219 //Default options for the constructor to be merged with send constructor data 220 $.fn.SlideshowSwiperWidget.defaultOptions = { 221 scriptPath: "services/eventsservice.asmx", 222 currentWidgetModuleItemID: 0, 223 224 pagination: '.slideshowSwiperPagination', 225 nextButton: '.slideshowSwiperButtonNext', 226 prevButton: '.slideshowSwiperButtonPrev', 227 preloadImages: true, 228 updateOnImagesReady: true, 229 lazyLoading: true, 230 lazyLoadingInPrevNext: true, 231 lazyLoadingOnTransitionStart: false, 232 loop: true, 233 speed: 600, 234 spaceBetween: 0, 235 wrapperClass: 'swiper-wrapper', 236 centeredSlides: true, 237 slidesPerView: 1, // set this to 'auto' for ks expo 238 grabCursor: false, 239 autoplay: 7500, 240 autoplayDisableOnInteraction: false, 241 parallax: false, 242 initialSlide: 0, 243 effect: 'slide', 244 cube: { 245 slideShadows: true, 246 shadow: true, 247 shadowOffset: 20, 248 shadowScale: 0.94 249 }, 250 coverflow: { 251 rotate: 50, 252 stretch: 0, 253 depth: 100, 254 modifier: 1, 255 slideShadows: true 256 }, 257 fade: { 258 crossFade: true 259 }, 260 allowSwipeToPrev: true, 261 allowSwipeToNext: true, 262 noSwiping: true, 263 paginationClickable: true, 264 paginationBulletRender: null, 265 scrollBar: null, 266 scrollbarHide: true, 267 keyboardControl: false, 268 onInit: function(swiper) { 269 270 }, 271 onSlideChangeStart: function(swiper) { 272 273 }, 274 onSlideChangeEnd: function(swiper) { 275 276 }, 277 onTransitionStart: function(swiper) { 278 279 }, 280 onTransitionEnd: function(swiper) { 281 282 }, 283 onTouchStart: function(swiper, event) { 284 285 }, 286 onTouchMove: function(swiper, event) { 287 288 }, 289 onTouchMoveOpposite: function(swiper, event) { 290 291 }, 292 onSliderMove: function(swiper, event) { 293 294 }, 295 onTouchEnd: function(swiper, event) { 296 297 }, 298 onClick: function(swiper, event) { 299 300 }, 301 onTap: function(swiper, event) { 302 303 }, 304 onDoubleTap: function(swiper, event) { 305 306 }, 307 onImagesReady: function(swiper) { 308 309 }, 310 onProgress: function(swiper, progress) { 311 312 }, 313 onReachBeginning: function(swiper) { 314 315 }, 316 onReachEnd: function(swiper) { 317 318 }, 319 onDestroy: function(swiper) { 320 321 }, 322 onSetTranslate: function(swiper, translate) { 323 324 }, 325 onSetTransition: function(swiper, transition) { 326 327 }, 328 onAutoplayStart: function(swiper) { 329 330 }, 331 onAutoplayEnd: function(swiper) { 332 333 }, 334 onLazyImageLoad: function(swiper, slide, image) { 335 336 }, 337 onLazyLoadImageReady: function(swiper, slide, image) { 338 339 }, 340 centerSlides: true, 341 fullWindow: false, 342 imageQuality: 100, 343 bw: false, 344 appendDescriptionTo: '.swiper-container', 345 flexDescription: false, 346 limitImageHeight: false, 347 appendButtonsTo: '.slideshowDescription', 348 moreButtonText: 'MORE >', 349 parallaxTitleValue: -100, 350 parallaxDescriptionValue: -100, 351 parallaxButtonsValue: -300, 352 parallaxImageValue: -200, 353 showPlayPause: true, 354 controlsContainer: false, 355 paginationFirst: true,
356 appendControlsContainerTo: '.swiper-container', 357 controlsContainerAfter: '', 358 randomize: false, 359 playPauseAppendTo: '.swiper-container', 360 imagesAsBackgrounds: false, 361 restrictMobileImageSize: true 362 }; 363 364 //service call worked 365 var getWidgetDataSuccess = function(data) { 366 367 widgetData = data.d; 368 369 if (fullWindow) { 370 mode = 'horizontal'; 371 $('#slideshowWidget').addClass('fullWindowSlideshow'); 372 } 373 374 initialize(); 375 376 if (fullWindow) { 377 var windowWidth = $(window).width(); 378 var slideWidth = $('#slideshowWidget .slideshowItem.panel').width(); 379 var activePosition = $('.homepageContent').offset(); 380 activePosition = activePosition.left; 381 382 $('#slideshowWidget').css({ 383 width: windowWidth + 'px', 384 maxWidth: windowWidth + 'px', 385 left: '-' + activePosition + 'px' 386 }); 387 388 $(window).resize(function() { 389 var windowWidth = $(window).width(); 390 var slideWidth = $('#slideshowWidget .slideshowItem.panel').width(); 391 var activePosition = $('.homepageContent').offset(); 392 activePosition = activePosition.left; 393 394 $('#slideshowWidget').css({ 395 width: windowWidth + 'px', 396 maxWidth: windowWidth + 'px', 397 left: '-' + activePosition + 'px' 398 }); 399 }); 400 } 401 402 }; 403 404 //service call has failed 405 var getWidgetDataError = function(data) { 406 407 console.log('Slideshow failed to load', '\n' + 'Status: ' + data.status + ' ' + data.statusText, '\n' + data.responseText); 408 409 }; 410 411 412 function preventClickOnNonActive() { 413 $('#slideshowWidget .slideshowItem > a').click(function(event) { 414 var checkIt = $(this).parent('slideshowItem').hasClass('activePage'); 415 if (!checkIt) { 416 event.preventDefault(); 417 } 418 }); 419 } 420 421 422 function changeIndex() { 423 /*var num = $('.activePage img').length; 424 var id = $('.activePage img').attr('id'); 425 id = id.replace('image','') 426 var ind = parseFloat(id); 427 ind = ind+1; 428 if(ind>num){ 429 ind=0; 430 } 431 */ 432 } 433 434 $('.arrow').click(changeIndex()); 435 436 function initialize() { 437 oneSlide = false; 438 imageQuality = imageQuality.toString(); 439 i = 0; 440 var countSlides = widgetData.Slides.length; 441 442 if (countSlides == 1) { 443 oneSlide = true; 444 } 445 var sw = 1920; 446 if (restrictMobileImageSize && !limitImageHeight) { 447 sw = $(window).width(); 448 } else if ( restrictMobileImageSize && limitImageHeight ) { 449 var currentWinWidth = $(window).width(); 450 if (currentWinWidth > 1000) { 451 sw = 1920 452 } else if (currentWinWidth > 600) { 453 sw = 1500; 454 } else if (currentWinWidth > 450) { 455 sw = 1000; 456 } else { 457 sw = 800; 458 } 459 } 460 461 if (appendDescriptionTo != '.swiper-container') { 462 $(appendDescriptionTo).append('<div id="newSliderDescriptionContainer"></div>'); 463 } 464 465 if (bw == true) { 466 bw = '&bw=true'; 467 } else { 468 bw = ''; 469 } 470 471 if (randomize) { 472 function shuffle(o) { 473 for (var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); 474 return o; 475 }; 476 shuffle(widgetData.Slides); 477 } 478 479 $(widgetData.Slides).each(function() { 480 481 // define description and title 482 if (widgetData.Slides[i].Description != null) { 483 slideshowDescription = widgetData.Slides[i].Description; 484 } else { 485 slideshowDescription = ''; 486 } 487 488 var t = widgetData.Slides[i].Title; 489 if (t == null || t == '') { 490 t = ''; 491 } 492 493 // now we deal with the anchors (more and buy now) 494 // first our standard more link 495 var itemLink = widgetData.Slides[i].URL; 496 var itemLinkTarget = ''; 497 if (widgetData.Slides[i].URLOpenInANewWindow == true) { 498 itemLinkTarget = ' target="_blank"' 499 } 500 var itemLinkEnd = '</a>'; 501 var itemButton = ''; 502 if (itemLink == null) { 503 itemLink = ''; 504 itemLinkEnd = ''; 505 } else { 506 itemLink = '<a href="' + widgetData.Slides[i].URL + '"' + itemLinkTarget + '>'; 507 itemButton = '<a href="' + widgetData.Slides[i].URL + '"' + itemLinkTarget + ' class="button sliderMoreButton">' + moreButtonText + '</a>'; 508 } 509 510 // then the buynow button 511 var purchaseURL = widgetData.Slides[i].PurchaseURL; 512 var purchaseTarget = ''; 513 var purchaseOnClick = ''; 514 515 if (purchaseURL != null && purchaseURL != '') { 516 517 if (widgetData.Slides[i].PurchaseLinkOpenInANewWindow) { 518 purchaseTarget = ' target="_blank"'; 519 } 520 521 if (widgetData.Slides[i].PurchaseLinkOnClick != null && widgetData.Slides[i].PurchaseLinkOnClick != '') { 522 purchaseOnClick = ' onclick="' + widgetData.Slides[i].PurchaseLinkOnClick + '"'; 523 } 524 525 var purchaseLink = '<a class="sliderWidgetPurchaseLink button buyNowButton" href="' + widgetData.Slides[i].PurchaseURL + '"' + purchaseOnClick + purchaseTarget + '>
525' + widgetData.Slides[i].PurchaseLinkText + '</a>'; 526 } else { 527 var purchaseLink = ''; 528 } 529 530 531 // Determine if #newSliderDescriptionContainer uses flexbox 532 if( flexDescription ) { 533 var slideDescription = '<div class="slideshowSwiperDescription slideDescription'+i+'">'+'<div class="sliderTextContainer">'+'<span class="sliderTitle">' + t + '</span>'+'<span class="sliderTextDescription">' + slideshowDescription + '</span>'+'</div>'+'</div>'; 534 } else { 535 var slideDescription = '<div class="slideshowSwiperDescription slideDescription'+i+'">'+itemLink+'<span class="sliderTitle">' + t + '</span>'+itemLinkEnd+itemLink+'<span class="sliderTextDescription">' + slideshowDescription + '</span>'+itemLinkEnd+'</div>'; 536 } 537 538 // Alt Text 539 var imageAlternateText = ""; 540 if (widgetData.Slides[i].ImageAlternateText != null) { 541 imageAlternateText = (widgetData.Slides[i].ImageAlternateText); 542 } 543 544 // here we create the slide with the image 545 // Lazy Loading Enabled (using library's built-in lazyloading) 546 if (lazyLoading) { 547 548 var imgPath = widgetData.Slides[i].ImageWithPath; 549 var cleanBGImgPath = imgPath.replace(/[(]/g, '%28'); 550 cleanBGImgPath = cleanBGImgPath.replace(/[)]/g, '%29'); 551 552 if (imagesAsBackgrounds) { 553 $('.swiper-wrapper').append('<div class="swiper-lazy swiper-slide swiperSlide' + i + '" data-background="' + cleanBGImgPath + '&w=' + sw + '&c=1&q=' + imageQuality + bw + '" style="background-size: cover;">' + itemLink + '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src="' + cleanBGImgPath + '&w=' + sw + '&c=1&q=' + imageQuality + bw + '" alt="' + imageAlternateText + '" class="swiper-lazy sliderWidgetImage sliderWidgetImage' + i + '" style="visibility: hidden;" />' + itemLinkEnd + '</div>'); 554 } else { 555 $('.swiper-wrapper').append('<div class="swiper-lazy swiper-slide swiperSlide' + i + '">' + itemLink + '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-src="' + cleanBGImgPath + '&w=' + sw + '&c=1&q=' + imageQuality + bw + '" alt="' + imageAlternateText + '" class="swiper-lazy sliderWidgetImage sliderWidgetImage' + i + '" />' + itemLinkEnd + '</div>'); 556 } 557 } else { 558 if (imagesAsBackgrounds) { 559 $('.swiper-wrapper').append('<div class="swiper-slide swiperSlide' + i + '" style="background-image:url(\'' + widgetData.Slides[i].ImageWithPath + '&w=' + sw + '&c=1&q=' + imageQuality + bw + '\'); background-size: cover;">' + itemLink + '<img src="' + widgetData.Slides[i].ImageWithPath + '&w=' + sw + '&c=1&q=' + imageQuality + bw + '" alt="' + imageAlternateText + '" class="sliderWidgetImage sliderWidgetImage' + i + '" style="visibility: hidden;" />' + itemLinkEnd + '</div>'); 560 } else { 561 $('.swiper-wrapper').append('<div class="swiper-slide swiperSlide' + i + '">' + itemLink + '<img src="' + widgetData.Slides[i].ImageWithPath + '&w=' + sw + '&c=1&q=' + imageQuality + bw + '" alt="' + imageAlternateText + '" class="sliderWidgetImage sliderWidgetImage' + i + '" />' + itemLinkEnd + '</div>'); 562 } 563 } 564 // putting the description where we need it 565 if (appendDescriptionTo == '.swiper-container') { 566 $('.swiperSlide' + i).append(slideDescription); 567 } else { 568 $(slideDescription).appendTo('#newSliderDescriptionContainer'); 569 } 570 571 if( flexDescription ) { 572 if (appendButtonsTo == '.slideshowDescription') { 573 $('.slideDescription' + i).append('<span class="sliderButtonContainer sliderButtonContainer' + i + '">' + purchaseLink + itemButton + '</span>') 574 } else { 575 $(appendButtonsTo).append('<span class="sliderButtonContainer sliderButtonContainer' + i + '">' + purchaseLink + itemButton + '</span>') 576 } 577 } else { 578 if (appendButtonsTo == '.slideshowDescription') { 579 $('.slideDescription' + i).append('<span class="sliderButtonContainer sliderButtonContainer' + i + '">' + itemButton + purchaseLink + '</span>') 580 } else { 581 $(appendButtonsTo).append('<span class="sliderButtonContainer sliderButtonContainer' + i + '">' + itemButton + purchaseLink + '</span>') 582 } 583 } 584 585 586 i++; 587 });
588 589 if (parallax) { 590 $('.sliderTitle').attr('data-swiper-parallax', parallaxTitleValue); 591 $('.sliderTextDescription').attr('data-swiper-parallax', parallaxDescriptionValue); 592 $('.sliderWidgetImage').attr('data-swiper-parallax', parallaxImageValue); 593 $('.sliderButtonContainer').attr('data-swiper-parallax', parallaxButtonsValue); 594 } 595 596 597 var mySwiper = new Swiper('.swiper-container', { 598 pagination: '.slideshowSwiperPagination', 599 nextButton: '.slideshowSwiperButtonNext', 600 prevButton: '.slideshowSwiperButtonPrev', 601 preloadImages: false, 602 updateOnImagesReady: updateOnImagesReady, 603 lazyLoading: lazyLoading, 604 lazyLoadingInPrevNext: lazyLoadingInPrevNext, 605 lazyLoadingOnTransitionStart: lazyLoadingOnTransitionStart, 606 loop: loop, 607 speed: speed, 608 spaceBetween: spaceBetween, 609 wrapperClass: 'swiper-wrapper', 610 centeredSlides: centeredSlides, 611 slidesPerView: slidesPerView, // set this to 'auto' for ks expo 612 grabCursor: grabCursor, 613 autoplay: autoplay, 614 autoplayDisableOnInteraction: autoplayDisableOnInteraction, 615 parallax: parallax, 616 initialSlide: initialSlide, 617 effect: effect, 618 cube: { 619 slideShadows: slideShadows, 620 shadow: shadow, 621 shadowOffset: shadowOffset, 622 shadowScale: shadowScale 623 }, 624 coverflow: { 625 rotate: rotate, 626 stretch: stretch, 627 depth: depth, 628 modifier: modifier, 629 slideShadows: slideShadows 630 }, 631 fade: { 632 crossFade: crossFade 633 }, 634 allowSwipeToPrev: allowSwipeToPrev, 635 allowSwipeToNext: allowSwipeToNext, 636 noSwiping: noSwiping, 637 paginationClickable: paginationClickable, 638 paginationBulletRender: paginationBulletRender, 639 scrollBar: scrollBar, 640 scrollbarHide: scrollbarHide, 641 keyboardControl: keyboardControl, 642 onInit: onInit, 643 onSlideChangeStart: onSlideChangeStart, 644 onSlideChangeEnd: onSlideChangeEnd, 645 onTransitionStart: onTransitionStart, 646 onTransitionEnd: onTransitionEnd, 647 onTouchStart: onTouchStart, 648 onTouchMove: onTouchMove, 649 onTouchMoveOpposite: onTouchMoveOpposite, 650 onSliderMove: onSliderMove, 651 onTouchEnd: onTouchEnd, 652 onClick: onClick, 653 onTap: onTap, 654 onDoubleTap: onDoubleTap, 655 onImagesReady: onImagesReady, 656 onProgress: onProgress, 657 onReachBeginning: onReachBeginning, 658 onReachEnd: onReachEnd, 659 onDestroy: onDestroy, 660 onSetTranslate: onSetTranslate, 661 onSetTransition: onSetTransition, 662 onAutoplayStart: onAutoplayStart, 663 onAutoplayEnd: onAutoplayEnd, 664 onLazyImageLoad: onLazyImageLoad, 665 onLazyLoadImageReady: onLazyLoadImageReady 666 }); 667 668 // If flexDescription, no autoplay on mobile 669 if (flexDescription) { 670 if( $("body").hasClass("saffireMobileSize") ) { 671 mySwiper.stopAutoplay(); 672 } 673 } 674 675 if (showPlayPause && oneSlide == false) { 676 var playClass = ''; 677 if (autoplay) { 678 playClass = ' playing'; 679 } 680 $(playPauseAppendTo).append('<div class="sliderPlayPauseButtons"><span class="sliderPlayPause' + playClass + '" tabindex="0" aria-label="Pause slideshow toggle"></span></div>'); 681 682 $('.sliderPlayPause').on('keypress click', function(e) { 683 if (e.which === 13 || e.which === 32 || e.type === 'click') { 684 e.preventDefault(); 685 var checkPlaying = $(this).hasClass('playing'); 686 if (checkPlaying) { 687 $(this).removeClass('playing'); 688 mySwiper.stopAutoplay(); 689 } else { 690 $(this).addClass('playing'); 691 mySwiper.startAutoplay(); 692 } 693 } 694 }); 695 } 696 697 if (controlsContainer && oneSlide == false) { 698 if (controlsContainerAfter != '') { 699 $(controlsContainerAfter).after('<div class="sliderControlsContainer"></div>'); 700 } else { 701 $(appendControlsContainerTo).append('<div class="sliderControlsContainer"></div>'); 702 } 703 if (paginationFirst) { 704 $('.slideshowSwiperPagination').appendTo('.sliderControlsContainer'); 705 $('.sliderPlayPauseButtons').appendTo('.sliderControlsContainer'); 706 } else { 707 $('.sliderPlayPauseButtons').appendTo('.sliderControlsContainer'); 708 $('.slideshowSwiperPagination').appendTo('.sliderControlsContainer'); 709 } 710 } 711 712 713 if (appendDescriptionTo != '.swiper-container') { 714 var findCur = $('.swiper-slide-active').attr('class'); 715 var r = /\d+/; 716 findCur = findCur.match(r); 717 findCur = parseInt(findCur); 718 $('.slideDescription' + findCur).addClass('currentSlideDescription'); 719 720 mySwiper.on('transitionEnd', function() { 721 722 723 findCur = $('.swiper-slide-active').attr('class'); 724 var r = /\d+/; 725 findCur = findCur.match(r); 726 findCur = parseInt(findCur); 727 $('.slideshowSwiperDescription').removeClass('currentSlideDescription'); 728 $('.slideDescription' + findCur).addClass('currentSlideDescription'); 729 }); 730 } 731 732 733 if (appendButtonsTo != '.slideshowDescription') { 734 var findCur = $('.swiper-slide-active').attr('class'); 735 var r = /\d+/; 736 findCur = findCur.match(r); 737 findCur = parseInt(findCur); 738 $('.sliderButtonContainer' + findCur).addClass('currentSlideButtons'); 739 740 mySwiper.on('transitionEnd', function() { 741 742 743 findCur = $('.swiper-slide-active').attr('class'); 744 var r = /\d+/; 745 findCur = findCur.match(r); 746 findCur = parseInt(findCur); 747 $('.sliderButtonContainer').removeClass('currentSlideButtons'); 748 $('.sliderButtonContainer' + findCur).addClass('currentSlideButtons'); 749 }); 750 } 751 752 if (oneSlide) { 753 mySwiper.stopAutoplay(); 754 $('.slideshowSwiperButtonNext').css('display', 'none'); 755 $('.slideshowSwiperButtonPrev').css('display', 'none'); 756 } 757 758 } 759 760})(jQuery);
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.