1// JavaScript Document 2jQuery(document).ready(function( $ ) { 3 4 // Back to top button 5 $(window).scroll(function() { 6 if ($(this).scrollTop() > 100) { 7 $('.back-to-top').fadeIn('slow'); 8 } else { 9 $('.back-to-top').fadeOut('slow'); 10 } 11 }); 12 $('.back-to-top').click(function(){ 13 $('html, body').animate({scrollTop : 0},1500, 'easeInOutExpo'); 14 return false; 15 }); 16 17 // Header fixed on scroll 18 $(window).scroll(function() { 19 if ($(this).scrollTop() > 100) { 20 $('#header').addClass('header-scrolled'); 21 } else { 22 $('#header').removeClass('header-scrolled'); 23 } 24 }); 25 26 if ($(window).scrollTop() > 100) { 27 $('#header').addClass('header-scrolled'); 28 } 29 30 // Real view height for mobile devices 31 if (window.matchMedia("(max-width: 767px)").matches) { 32 $('#intro').css({ height: $(window).height() }); 33 } 34 35 // Initiate the wowjs animation library 36 new WOW().init(); 37 38 39 // Initiate superfish on nav menu 40 $('.nav-menu').superfish({ 41 animation: { 42 opacity: 'show' 43 }, 44 speed: 400 45 }); 46 47 // Mobile Navigation 48 if ($('#nav-menu-container').length) { 49 var $mobile_nav = $('#nav-menu-container').clone().prop({ 50 id: 'mobile-nav' 51 }); 52 $mobile_nav.find('> ul').attr({ 53 'class': '', 54 'id': '' 55 }); 56 $('body').append($mobile_nav); 57 $('body').prepend('<button type="button" id="mobile-nav-toggle"><i class="fa fa-bars"></i></button>'); 58 $('body').append('<div id="mobile-body-overly"></div>'); 59 $('#mobile-nav').find('.menu-has-children').prepend('<i class="fa fa-chevron-down"></i>'); 60 61 $(document).on('click', '.menu-has-children i', function(e) { 62 $(this).next().toggleClass('menu-item-active'); 63 $(this).nextAll('ul').eq(0).slideToggle(); 64 $(this).toggleClass("fa-chevron-up fa-chevron-down"); 65 }); 66 67 $(document).on('click', '#mobile-nav-toggle', function(e) { 68 $('body').toggleClass('mobile-nav-active'); 69 $('#mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 70 $('#mobile-body-overly').toggle(); 71 }); 72 73 $(document).click(function(e) { 74 var container = $("#mobile-nav, #mobile-nav-toggle"); 75 if (!container.is(e.target) && container.has(e.target).length === 0) { 76 if ($('body').hasClass('mobile-nav-active')) { 77 $('body').removeClass('mobile-nav-active'); 78 $('#mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 79 $('#mobile-body-overly').fadeOut(); 80 } 81 } 82 }); 83 } else if ($("#mobile-nav, #mobile-nav-toggle").length) { 84 $("#mobile-nav, #mobile-nav-toggle").hide(); 85 } 86 87 // Smooth scroll for the menu and links with .scrollto classes 88 $('.nav-menu a, #mobile-nav a, .scrollto').on('click', function() { 89 if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 90 var target = $(this.hash); 91 if (target.length) { 92 var top_space = 0; 93 94 if ($('#header').length) { 95 top_space = $('#header').outerHeight(); 96 97 if( ! $('#header').hasClass('header-fixed') ) { 98 top_space = top_space - 20; 99 } 100 } 101 102 $('html, body').animate({ 103 scrollTop: target.offset().top - top_space 104 }, 1500, 'easeInOutExpo'); 105 106 if ($(this).parents('.nav-menu').length) { 107 $('.nav-menu .menu-active').removeClass('menu-active'); 108 $(this).closest('li').addClass('menu-active'); 109 } 110 111 if ($('body').hasClass('mobile-nav-active')) { 112 $('body').removeClass('mobile-nav-active'); 113 $('#mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 114 $('#mobile-body-overly').fadeOut(); 115 } 116 return false; 117 } 118 } 119 }); 120 121 122 // Buy tickets select the ticket type on click 123 $('#buy-ticket-modal').on('show.bs.modal', function (event) { 124 var button = $(event.relatedTarget); 125 var ticketType = button.data('ticket-type'); 126 var modal = $(this); 127 modal.find('#ticket-type').val(ticketType); 128 }) 129 130 131 132 133 134 135 136 // Gallery carousel (uses the Owl Carousel library) 137 $(".gallery-carousel").owlCarousel({ 138 loop: true, 139 autoplay: true, 140 dots: true, 141 center:true, 142 // dotsEach:1, 143 //startPosition:1, 144 responsive: { 0: { items: 1 }, 768: { items: 3 }, 992: { items: 4 }, 1200: {items: 5} 145 } 146 }); 147 148 149 150 151 // Initialize Venobox 152 $('.venobox').venobox({ 153 bgcolor: '', 154 overlayColor: 'rgba(6, 12, 34, 0.85)',
155 closeBackground: '', 156 closeColor: '#fff' 157 }); 158 159 160 161 162// custom code 163 164});
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.