1var Site = function () { 2 3 var initSliders = function () { 4 if ($.fn.slick) { 5 $('[data-slick]').slick({ 6 dots: true, 7 infinite: true, 8 speed: 500, 9 fade: true, 10 cssEase: 'linear' 11 }); 12 $('.fade').slick({//slick carousel 13 arrows: false, 14 dots: true, 15 autoplay: true, 16 infinite: true, 17 pauseOnHover: true, 18 autoplaySpeed: 6000, 19 speed: 500, 20 fade: true, 21 cssEase: 'linear' 22 }); 23 } 24 }; 25 26 var initTabs = function () { 27 $('.tabs .tab-links a').on('click', function (e) { 28 var currentAttrValue = $(this).attr('href'); 29 if ($(window).width() <= 1024) { 30 $('.tabs ' + currentAttrValue).show().siblings().hide(); 31 $(this).parent('li').addClass('active').siblings().removeClass('active'); 32 e.preventDefault(); 33 } 34 }); 35 }; 36 37 var initWaypoint = function () { 38 if ($.fn.waypoint) { 39 var sticky = new Waypoint.Sticky({ 40 element: $('.sticky')[0], 41 offset: 90 42 }); 43 $('.footer').waypoint(function (direction) { 44 $('.sticky').toggleClass('stuck', direction === 'up'); 45 }, { 46 offset: function () { 47 return $('.sticky').outerHeight(); 48 } 49 }); 50 } 51 }; 52 53 var initAccordion = function () { 54 if ($.fn.accordion) { 55 $('[data-accordion]').accordion({ 56 collapsible: true, 57 active: false 58 }); 59 } 60 }; 61 62 var handleHeader = function () { 63 var scroll = $(window).scrollTop(); 64 if (scroll >= 80) { 65 $("header").addClass("scroll"); 66 } 67 else { 68 $("header").removeClass("scroll"); 69 } 70 }; 71 72 var initHeader = function () { 73 handleHeader(); 74 $(window).scroll(handleHeader); 75 }; 76 77 var init = function () { 78 initHeader(); 79 initSliders(); 80 initTabs(); 81 initAccordion(); 82 initWaypoint(); 83// $('a[href*=#]:not([href=#])').click(function () { 84// if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 85// var target = $(this.hash); 86// target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 87// if (target.length) { 88// $('html,body').animate({ 89// scrollTop: target.offset().top 90// }, 1000); 91// return false; 92// } 93// } 94// }); 95 $(".mockup").hover(function () { 96 $(".fd").fadeToggle(600); 97 }); 98 $("#on-off").click(function () { 99 $(".fade.first").fadeToggle(); 100 }); 101 $("#on-off-2").click(function () { 102 $(".fade.second").fadeToggle(); 103 }); 104 if ($("#loginpopup").length) { 105 $("header a[data-panel-trigger-target='#login']").click(); 106 } 107 }; 108 109 return { 110 init: init 111 }; 112}(); 113$(document).ready(function () { 114 Site.init(); 115});
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.