1/* Table of Contents 201. MENU ACTIVATION 302. FITVIDES RESPONSIVE VIDEOS 403. MOBILE MENU 504. SCROLL TO TOP MENU JS 605. PRELOADER JS 706. STICKY HEADER JS 807. SHOW/HIDE SEARCH & CART 9*/ 10 11jQuery(document).ready(function($) { 12 'use strict'; 13 14/* 15=============================================== 01. MENU ACTIVATION =============================================== 16*/ 17 jQuery('.progression-studios-one-page-nav-off nav#site-navigation ul.sf-menu, #progression-header-top-left-container ul.sf-menu, #progression-header-top-right-container ul.sf-menu').superfish({ 18 popUpSelector: 'ul.sub-menu,.sf-mega', // within menu context 19 delay: 200, // one second delay on mouseout 20 speed: 0, // faster \ speed 21 speedOut: 200, // speed of the closing animation 22 animation: {opacity: 'show'}, // animation out 23 animationOut: {opacity: 'hide'}, // adnimation in 24 cssArrows: true, // set to false 25 autoArrows: true, // disable generation of arrow mark-up 26 disableHI: true, 27 }); 28 29/* 30=============================================== 02. FITVIDES RESPONSIVE VIDEOS =============================================== 31*/ 32 $("#content-pro").fitVids(); 33 34 35/* 36=============================================== 03. MOBILE MENU =============================================== 37*/ 38 39 $('ul.mobile-menu-pro').slimmenu({ 40 resizeWidth: '960', 41 collapserTitle: 'Menu', 42 easingEffect:'easeInOutQuint', 43 animSpeed:350, 44 indentChildren: false, 45 childrenIndenter: '- ' 46 }); 47 48 49 $('.mobile-menu-icon-pro').on('click', function(e){ 50 e.preventDefault(); 51 $('#main-nav-mobile').slideToggle(350); 52 $("#masthead-pro").toggleClass("active-mobile-icon-pro"); 53 }); 54 55 56 57/* 58=============================================== 04. SCROLL TO TOP MENU JS =============================================== 59*/ 60 // browser window scroll (in pixels) after which the "back to top" link is shown 61 $('#pro-scroll-top').hide(); 62 63 $(window).scroll(function(){ 64 if ($(this).scrollTop() > 200) { 65 $('#pro-scroll-top').fadeIn(); 66 } else { 67 $('#pro-scroll-top').fadeOut(); 68 } 69 }); 70 71 // Click event to scroll to top 72 $('#pro-scroll-top').on('click', function(){ 73 $('html, body').animate({scrollTop : 0},800); 74 return false; 75 }); 76 77 var offset_scroll = 150; 78 79 80 /* Scroll to link inside page */ 81 $('a.scroll-to-link').on('click', function(){ 82 $('html, body').animate({ 83 scrollTop: $( $.attr(this, 'href') ).offset_scroll().top - pro_top_offset 84 }, 400); 85 return false; 86 }); 87 88 89 90/* 91=============================================== 05. PRELOADER JS =============================================== 92*/ 93 (function($) { 94 var didDone = false; 95 function done() { 96 if(!didDone) { 97 didDone = true; 98 $("#page-loader-pro").addClass('finished-loading'); 99 $("#boxed-layout-pro").addClass('progression-preloader-completed'); 100 } 101 } 102 var loaded = false; 103 var minDone = false; 104 //The minimum timeout. 105 setTimeout(function(){ 106 minDone = true; 107 //If loaded, fire the done callback. 108 if(loaded) { done(); } }, 400); 109 //The maximum timeout. 110 setTimeout(function(){ done(); }, 2000); 111 //Bind the load listener. 112 $(window).load(function(){ loaded = true; 113 if(minDone) { done(); } 114 }); 115 })(jQuery); 116 117 118/* 119=============================================== 06. STICKY HEADER JS =============================================== 120*/ 121 122 /* HEADER HEIGHT FOR SPACING OF ONE PAGE NAV AND STICKY HEADER */ 123 var pro_top_offset = $('header#masthead-pro').height(); // get height of fixed navbar 124 125 var pro_very_top_bar_offset = $('#growler-progression-header-top').height(); // get height of fixed navbar 126 127 $('#progression-sticky-header').scrollToFixed({ spacerClass: 'hide-fixed-spacer-mobile' }); 128 129 130 $(window).resize(function() { 131 var width_progression = $(document).width(); 132 if (width_progression > 959) { 133 134 /* STICKY HEADER CLASS */ 135 $(window).on('load scroll resize orientationchange', function () { 136 137 var scroll = $(window).scrollTop(); 138 if (scroll >= pro_very_top_bar_offset + 1 ) { 139 $("#progression-sticky-header").addClass("progression-sticky-scrolled"); 140 } else { 141 $("#progression-sticky-header").removeClass("progression-sticky-scrolled"); 142 } 143 }); 144 } else { 145 146 $(window).on('load scroll resize orientationchange', function () { 147 $("#progression-sticky-header").removeClass("progression-sticky-scrolled"); 148 }); 149 150 } 151 152 }).resize(); 153 154 155 156/* 157=============================================== 07. SHOW/HIDE SEARCH & CART =============================================== 158*/ 159 var hidesearch = false;
160 var hidecart = false; 161 var clickOrTouch = (('ontouchend' in window)) ? 'touchend' : 'click'; 162 163 $("#progression-studios-header-search-icon .progression-icon-search").on(clickOrTouch, function(e) { 164 var clicks = $(this).data('clicks'); 165 if (clicks) { 166 $("#progression-studios-header-search-icon").removeClass("active-search-icon-pro"); 167 $("#progression-studios-header-search-icon").addClass("hide-search-icon-pro"); 168 169 } else { 170 $("#progression-studios-header-search-icon").addClass("active-search-icon-pro"); 171 $("#progression-studios-header-search-icon").removeClass("hide-search-icon-pro"); 172 } 173 $(this).data("clicks", !clicks); 174 }); 175 176 177 $("#progression-shopping-cart-toggle").hover(function(){ 178 if (hidecart) clearTimeout(hidecart); 179 $("#progression-shopping-cart-toggle").addClass("activated-class").removeClass("hover-out-class"); 180 }, function() { 181 hidecart = setTimeout(function() { 182 $("#progression-shopping-cart-toggle").removeClass("activated-class").addClass("hover-out-class"); 183 }, 100); 184 }); 185 186 187 188});
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.