1function isMobileDevice() { 2 var userAgent = navigator.userAgent || navigator.vendor || window.opera; 3 4 // Windows Phone must come first because its UA also contains "Android" 5 if (/windows phone/i.test(userAgent)) { 6 return true; 7 } 8 9 if (/android/i.test(userAgent)) { 10 return true; 11 } 12 13 // iOS detection from: http://stackoverflow.com/a/9039885/177710 14 if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { 15 return true; 16 } 17 18 return false; 19} 20 21(function ($) { 22 $(document).ready(function () { 23 $('.toggle-search-btn').click(function () { 24 $('#search-container').toggleClass('expanded') 25 }) 26 27 $('#toggle-menu-btn').click(function () { 28 var icon = $(this).find('i') 29 $('.site-header_nav').slideToggle(300) 30 if (icon.hasClass('fa-bars')) { 31 icon.removeClass('fa-bars') 32 icon.addClass('fa-times') 33 } else { 34 icon.removeClass('fa-times') 35 icon.addClass('fa-bars') 36 } 37 }) 38 39 $('.site-header_nav nav > ul > li > a').click(function (e) { 40 if ($('body').hasClass('home') && $(this).attr('href').indexOf('#') >= 0) { 41 e.preventDefault(); 42 // document.getElementById($(this).attr('href').replace('/#', '')).scrollIntoView({ 43 // behavior: 'smooth', 44 // block: 'start' 45 // }) 46 $('html, body').animate({ 47 scrollTop: $(($(this).attr('href').replace('/', ''))).offset().top 48 }, 800) 49 } 50 }) 51 52 if ($.fn.slick) { 53 $('.ntv-slick').slick({ 54 autoplay: true, 55 autoplaySpeed: 7000, 56 rtl: true, 57 dots: true, 58 infinite: false, 59 speed: 300, 60 slidesToShow: 1, 61 slidesToScroll: 1, 62 prevArrow: '<i class="far fa-chevron-right slick-prev">', 63 nextArrow: '<i class="far fa-chevron-left slick-next">' 64 }) 65 66 $('#ntv-concerts-slick').on('beforeChange', function (event, slick, currentSlide, nextSlide) { 67 $('#ntv-concerts-slick-nav li.active').removeClass('active') 68 $('#ntv-concerts-slick-nav li:nth-child(' + (nextSlide + 1) + ')').addClass('active') 69 }); 70 71 $('#ntv-concerts-slick-nav li').click(function (e) { 72 $('#ntv-concerts-slick-nav li.active').removeClass('active') 73 $(this).addClass('active') 74 $('#ntv-concerts-slick').slick('slickGoTo', $(this).attr('data-target')) 75 }); 76 77 78 $('#ntv-gallery-slick').on('init', function (slick) { 79 $('#ntv-gallery-slick .slick-track').css('padding', ($('.ntv-gallery-slick-item .ntv-card__image').height() / 4) + 'px ' + ($('.container').offset().left + 15 + ($('.ntv-gallery-slick-item .ntv-card__image').width() / 4)) + 'px ' + ($('.ntv-gallery-slick-item .ntv-card__image').height() / 4) + 'px ' + ($('.container').offset().left + 15) + 'px'); 80 $('#ntv-gallery-slick-static').css('right', ($('.container').offset().left + 15) + 'px').css('width', $('.ntv-gallery-slick-item .ntv-card__image').width() * 1.5).css('height', $('.ntv-gallery-slick-item .ntv-card__image').height() * 1.5) 81 }); 82 83 $('#ntv-gallery-slick').slick({ 84 autoplay: false, 85 rtl: true, 86 dots: false, 87 infinite: true, 88 slidesToShow: 5, 89 slidesToScroll: 1, 90 appendArrows: $('#ntv-gallery-slick-static'), 91 prevArrow: '<i class="fal fa-long-arrow-right slick-prev">', 92 nextArrow: '<i class="fal fa-long-arrow-left slick-next">', 93 responsive: [ 94 { 95 breakpoint: 991, 96 settings: { 97 slidesToShow: 3, 98 slidesToScroll: 1 99 } 100 }, 101 { 102 breakpoint: 767, 103 settings: { 104 slidesToShow: 2, 105 slidesToScroll: 1 106 } 107 } 108 ] 109 }) 110 111 $('#ntv-gallery-slick').on('beforeChange', function (event, slick, currentSlide, nextSlide) { 112 $('#ntv-gallery-slick-static .ntv-card__image').fadeOut(50, function () { 113 $(this).remove() 114 $('#ntv-gallery-slick-static').append($('.ntv-gallery-slick-item[data-slick-index=' + nextSlide + '] .ntv-card__image').clone().fadeIn()) 115 }); 116 }) 117 118 $('.ntv-gallery-slick-item a').click(function (e) { 119 e.preventDefault(); 120 var slideno = $(this).parents('.ntv-gallery-slick-item').attr('data-slick-index'); 121 $('#ntv-gallery-slick').slick('slickGoTo', slideno); 122 }) 123 } 124 if ($.fn.flickity) { 125 $('.ntv-flickity').flickity({ 126 freeScroll: true, 127 contain: true, 128 pageDots: false,
129 prevNextButtons: false, 130 wrapAround: true, 131 rightToLeft: true 132 }); 133 $('.ntv-flickity-next').on('click', function (e) { 134 e.preventDefault() 135 $($(this).attr('href')).flickity('next'); 136 }); 137 $('.ntv-flickity-prev').on('click', function (e) { 138 e.preventDefault() 139 $($(this).attr('href')).flickity('previous'); 140 }); 141 } 142 // document.getElementsByClassName("ntv-mplayer-volume").oninput = function () { 143 // this.style.background = 'linear-gradient(to right, #d71634 0%, #d71634 ' + this.value + '%, #dedede ' + this.value + '%, #dedede 100%)' 144 // }; 145 146 $('.ntv-hex-btn--expandable').click(function (e) { 147 e.preventDefault() 148 $(this).toggleClass('expanded') 149 }) 150 151 $('.music-content-block__content___toggle').click(function (e) { 152 e.preventDefault() 153 $(this).parents('.music-content-block__content--expandable').toggleClass('expanded') 154 }) 155 }) 156})(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.