1jQuery( document ).ready( function( $ ) { 2 3 4 var $subnav = $('nav.sub-nav'), 5 subnavSpaceFn = function(){ 6 var $subnav_height = $('nav.sub-nav').height(); 7 $subnav.next().css("padding-top", $subnav_height); 8 }; 9 10 subnavSpaceFn(); 11 12 13 if( $('.home_hero .down') ){ 14 $('.home_hero .down').click(function(){ 15 var positon = $('.card-section').offset().top - 59; 16 $('html, body').animate({scrollTop:positon}, 'slow'); 17 }); 18 } 19 20 var $hero = $('.home_hero, section.banner'), 21 $hero_bg = $('.home_hero .bg, section.banner .bg'), 22 $caption = $('.home_hero .caption'), 23 range = 200; 24 25 $(window).scroll(function(){ 26 27 if( $hero.length > 0 && $hero.width() > 1023 ){ 28 29 var scrollTop = $(this).scrollTop(); 30 var opacCalc = (1 - (scrollTop - range) / range); 31 32 $caption.css({ 'opacity': opacCalc }); 33 34 if ( opacCalc > '1' ) { 35 $caption.css( 'opacity', 1 ); 36 } else if ( opacCalc < '0' ) { 37 $caption.css( 'opacity', 0 ); 38 } 39 40 var bgCalc = Math.floor(scrollTop/4) * -1; 41 42 $hero_bg.css({ 43 "transform": "translate3d(0, " + bgCalc + "px, 0)" 44 }); 45 46 } 47 48 if( !$('.menu-btn').is(":visible") ){ 49 //make subnav sticky 50 if( $subnav.length > 0 ){ 51 52 if( $(this).scrollTop() > $('nav.sub-nav').next().offset().top - 60 ){ 53 $subnav.addClass('fix'); 54 } 55 else{ 56 $subnav.removeClass('fix'); 57 } 58 59 } 60 61 } 62 63 64 if( $(this).scrollTop() > 350 ){ 65 $('nav.main-nav, .header-buttons').addClass('hairline'); 66 } 67 else{ 68 $('nav.main-nav, .header-buttons').removeClass('hairline'); 69 } 70 71 }); 72 73 74 $(window).resize(function(){ 75 76 if( $hero.width() > 1023 ){ 77 $hero_bg.css({ "transform" : "translate3d(0,0,0)"}); 78 $caption.removeAttr('style'); 79 } 80 81 subnavSpaceFn(); 82 83 if( $subnav.length > 0 ){ 84 85 //if subnav is currently sticky remove stickiness 86 if( $('.menu-btn').is(":visible") ){ 87 $subnav.removeClass('fix'); 88 } 89 } 90 91 }); 92 93 //OVER 21 POPUP 94 if( document.cookie.indexOf('sevenseas_onload_age_check') < 0 ){ 95 //console.log( 'show popup: ' + document.cookie.indexOf('sevenseas_onload_age_check') ); 96 $.magnificPopup.open({ 97 items: { src: '#over21-popup' }, 98 type: 'inline', 99 modal: true, 100 mainClass: 'mfp-fade mfp-message', 101 showCloseBtn: false 102 }); 103 } 104 105 $(document).on('click', '.js-message-dismiss', function (e) { 106 e.preventDefault(); 107 $.magnificPopup.close(); 108 109 document.cookie = 'sevenseas_onload_age_check=1;path=/;'; 110 111 }); 112 113});
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.