1jQuery(function ($) { 2 "use strict"; 3 4 // Back to top button 5 if ($('#back-to-top').length) { 6 var scrollTrigger = 500, // px 7 backToTop = function () { 8 var scrollTop = $(window).scrollTop(); 9 if (scrollTop > scrollTrigger) { 10 $('#back-to-top').addClass('show'); 11 } else { 12 $('#back-to-top').removeClass('show'); 13 } 14 }; 15 backToTop(); 16 $(window).on('scroll', function () { 17 backToTop(); 18 }); 19 $('#back-to-top').on('click', function (e) { 20 e.preventDefault(); 21 $('html,body').animate({ 22 scrollTop: 0 23 }, 700); 24 }); 25 } 26 27 // Wrap body content 28 $( "body" ).wrapInner( "<div class='wrapper'></div>"); 29 30 // Headhesive 31 var options = { 32 offset: 100, 33 classes: { 34 clone: 'banner--clone', 35 stick: 'banner--stick', 36 unstick: 'banner--unstick' 37 } 38 }; 39 40 // Initialise with options 41 var banner = new Headhesive('.navbar', options); 42 43 $('.nav li a').doubleTapToGo(); 44 45 $('.nav').each(function() { 46 var $this = $(this); 47 if ($this.children('li').length > 5) { 48 $this.addClass('large-menu'); 49 } 50 }); 51 52 // Search form 53 $('.search i').toggle(function() { 54 $('.movie-search').css('height', '46px'); 55 $('.navbar').css('padding-top', '46px'); 56 $(this).find('.fa').removeClass('fa-search').addClass('fa-close'); 57 }, function() { 58 $('.movie-search').css('height', '0'); 59 $('.navbar').css('padding-top', '0'); 60 $(this).find('.fa').removeClass('fa-close').addClass('fa-search'); 61 }); 62 63 // Tabs 64 if ($(".tabs").length > 0){ 65 $('.tabs').tabs(); 66 } 67 68 // Accordion 69 if ($(".accordion").length > 0){ 70 $('.accordion').accordion(); 71 } 72 73 // Match height for columns 74 $('.matchHeight').matchHeight(); 75 76 // Venobox modal 77 $('.venobox').venobox({ 78 autoplay: true 79 }); 80 81 // Social sharing links 82 $('.social-share').click(function(event) { 83 $(this).find('a').hide(); 84 $('.social-share .share').fadeIn('slow'); 85 $('.social-share .share a').fadeIn('slow'); 86 return false; 87 }); 88 89 $(window).on('load resize scroll', function(){ 90 91 // Hero slide dynamic sizing 92 var $heading = $('.wrapper .heading').outerHeight(); 93 var $navbar = $('.wrapper .navbar-header').outerHeight(); 94 $('#hero .item, #hero.single-page .blurb, #hero.error-page .container').css('padding-top', $heading + $navbar ); 95 96 var $window = $(window).height(); 97 $('#hero').css('height', window.innerHeight - 50); 98 $('#hero.error-page').css('height', window.innerHeight); 99 100 }); 101 102 103});
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.