1(function($){ 2"use strict"; 3 4 /******************************* 5 FitVids 6 *******************************/ 7 function fitVidsFn(){ 8 $(".site-wrapper").fitVids(); 9 } 10 11 /******************************* 12 Mobile Navigation 13 *******************************/ 14 function mobileNavigationFn(){ 15 $( ".primary-navigation .menu-item-has-children > a" ).after( '<span class="menu-item-arrow"></span>' ); 16 17 $( ".primary-navigation" ).clone().appendTo( ".site-mobile-navigation" ); 18 $( ".secondary-navigation" ).clone().appendTo( ".site-mobile-navigation" ); 19 20 $(".mobile-navigation-toggle").click(function(e){ 21 $("body").toggleClass("opened-site-navigation"); 22 e.preventDefault(); 23 }); 24 25 $(".site-navigation-overlay").click(function(e){ 26 $("body").toggleClass("opened-site-navigation"); 27 e.preventDefault(); 28 }); 29 30 $(".site-mobile-navigation .menu-item-arrow").click(function(e){ 31 if($(this).next()) 32 $(this).next().slideToggle(); 33 e.preventDefault(); 34 }); 35 } 36 37 38 /******************************* 39 Global Carousel Function 40 *******************************/ 41 function commonCarouselFn(){ 42 $(".carousel").each(function(){ 43 var ITEMS = $(this).attr("data-items"); 44 $(this).slick({ 45 slidesToShow: ITEMS, 46 slidesToScroll: 1, 47 prevArrow : '<span class="slick-prev"></span>', 48 nextArrow : '<span class="slick-next"></span>', 49 rtl: RTL, 50 responsive: [ 51 { 52 breakpoint: 1200, 53 settings: { 54 slidesToShow: 1 55 } 56 } 57 // You can unslick at a given breakpoint now by adding: 58 // settings: "unslick" 59 // instead of a settings object 60 ] 61 }); 62 }); 63 } 64 65 /******************************* 66 Search-animation 67 *******************************/ 68 function searchFn(){ 69 $("#search-trigger,#close-search").click(function(){ 70 $(".site-header-search").slideToggle(); 71 }); 72 } 73 74 function scrollTop(){ 75 76 $.scrollUp({ 77 scrollName: 'scrollUp', // Element ID 78 //scrollDistance: 600, // Distance from top/bottom before showing element (px) 79 scrollFrom: 'top', // 'top' or 'bottom' 80 //scrollSpeed: 300, // Speed back to top (ms) 81 //easingType: 'linear', // Scroll to top easing (see http://easings.net/) 82 animation: 'fade', // Fade, slide, none 83 //animationSpeed: 200, // Animation speed (ms) 84 //scrollTrigger: false, // Set a custom triggering element. Can be an HTML string or jQuery object 85 //scrollTarget: false, // Set a custom target element for scrolling to. Can be element or number 86 scrollText: '', // Text for element, can contain HTML 87 scrollTitle: false, // Set a custom <a> title if required. 88 //scrollImg: false, // Set true to use image 89 activeOverlay: '#00FFFF', // Set CSS color to display scrollUp active point, e.g '#00FFFF' 90 zIndex: 9999 // Z-Index for the overlay 91 }); 92 } 93 94 $(document).ready(function(){ 95 fitVidsFn(); 96 mobileNavigationFn(); 97 commonCarouselFn(); 98 searchFn(); 99 scrollTop(); 100 }); 101 102})(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.