1(function ($) { 2 "use strict"; 3 4 var fn = { 5 6 // Launch Functions 7 Launch: function () { 8 fn.OwlCarousel(); 9 fn.ImageView(); 10 fn.Swiper(); 11 fn.Apps(); 12 }, 13 14 // owlcarousel 15 OwlCarousel: function() { 16 17 $('.owl-carousel').each(function() { 18 var a = $(this), 19 navid = a.data('id'), 20 items = a.data('items') || [1,1,1,1], 21 margin = a.data('margin'), 22 loop = a.data('loop'), 23 nav = a.data('nav'), 24 dots = a.data('dots'), 25 center = a.data('center'), 26 speed = a.data('speed'), 27 autoplay = a.data('autoplay'), 28 autoplayTimeout = a.data('autoplaytimeout'), 29 autoplaySpeed = a.data('autoplayspeed'), 30 rtl = a.data('rtl'), 31 autoheight = a.data('autoheight'), 32 mouse = a.data('mouse'), 33 thumbs = a.data('thumbs'); 34 35 var options = { 36 nav: nav || false, 37 loop: loop || false, 38 dots: dots || false, 39 center: center || false, 40 autoplay: autoplay || false, 41 autoHeight: autoheight || false, 42 rtl: rtl || false, 43 margin: margin || 0, 44 navSpeed: speed || 400, 45 dotsSpeed: speed || 400, 46 autoplayTimeout: autoplayTimeout || 3000, 47 autoplaySpeed: autoplaySpeed || 400, 48 autoplayHoverPause: false, 49 thumbs: thumbs || false, 50 thumbsPrerendered: thumbs || false, 51 navContainer: navid || false, 52 mouseDrag: mouse || true, 53 responsive: { 54 0: { items: items[3] || 1 }, 55 768: { items: items[2] || 1 }, 56 1200: { items: items[1] || 1 }, 57 1600: { items: items[0] || 1} 58 } 59 }; 60 61 a.owlCarousel(options); 62 }); 63 }, 64 65 66 // image view 67 ImageView: function() { 68 $('.lightbox').magnificPopup({ 69 type: 'image', 70 closeOnContentClick: true, 71 closeBtnInside: false, 72 fixedContentPos: true, 73 mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side 74 image: { 75 verticalFit: true 76 } 77 }); 78 79 $('.gallery').each(function() { // the containers for all your galleries 80 $(this).magnificPopup({ 81 delegate: 'figure > a', // the selector for gallery item 82 type: 'image', 83 mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side 84 gallery: { 85 enabled:true 86 } 87 }); 88 }); 89 }, 90 91 92 // swiper 93 Swiper: function() { 94 95 $('.swiper-container').each(function(index, element){ 96 var $this = $(this) 97 98 $this.find(".swiper-pagination").addClass("swiper-pagination-" + index); 99 $this.find(".swiper-button-next").addClass("swiper-button-next-" + index); 100 $this.find(".swiper-button-prev").addClass("swiper-button-prev-" + index); 101 102 var options = { 103 parallax: true, 104 speed: 1000, 105 autoplay: true, 106 simulateTouch: false, 107 effect: 'fade', 108 autoHeight: true, 109 110 //pagination 111 pagination: { 112 el: '.swiper-pagination-' + index, 113 clickable: true, 114 type: 'fraction' 115 }, 116 117 // navigation 118 navigation: { 119 nextEl: '.swiper-button-next-' + index, 120 prevEl: '.swiper-button-prev-' + index, 121 } 122 123 }; 124 125 var slider = $(this); 126 127 if ($(this).hasClass('swiper-container-carousel')) { 128 options.spaceBetween = 10; 129 options.effect = 'slide'; 130 options.simulateTouch = true; 131 options.slideToClickedSlide = true; 132 options.autoHeight = true; 133 } 134 135 new Swiper ( slider, options ); 136 }); 137 138 139 140 if ( $( ".gallery-container" ).length ) { 141 var galleryTop = new Swiper('.gallery-container', { 142 effect: 'fade', 143 speed: 1500, 144 simulateTouch: false 145 }); 146 var galleryThumbs = new Swiper('.gallery-thumbs', { 147 centeredSlides: true, 148 slidesPerView: 6, 149 speed: 1500, 150 breakpoints: { 151 1600: { slidesPerView: 5 }, 152 1200: { slidesPerView: 3 }, 153 768: { slidesPerView: 2 }, 154 576: { slidesPerView: 2 } 155 }, 156 slideToClickedSlide: true 157 }); 158 galleryTop.controller.control = galleryThumbs; 159 galleryThumbs.controller.control = galleryTop; 160 } 161 162 }, 163 164 165 // apps 166 Apps: function () { 167 168 // lavalamp 169 $('.lavalamp').lavalamp({ 170 setOnClick: true, 171 enableHover: false, 172 margins: false, 173 autoUpdate: true, 174 duration: 200 175 }); 176 177 178 // select2 - custom select inputs - Causing issues with select boxes - confirm with Kaveh? 179 /*$(document).ready(function() { 180 $('body').find('select').each(function() { 181 var dropdownParent = $(this).parent(); 182 183 $(this).select2({ 184 minimumResultsForSearch: -1, 185 dropdownParent: dropdownParent 186 }); 187 }); 188 });*/ 189 190 191 // range slider 192 $('.rangeslider').each(function() { 193 var a = $(this), 194 min = a.data('min'), 195 max = a.data('max'), 196 from = a.data('from'), 197 to = a.data('to') 198 199 var options = { 200 type: "double", 201 min: min || 0, 202 max: max || 1000, 203 from: from || 200, 204 to: to || 800, 205 prefix: "$" 206 }; 207 208 a.ionRangeSlider(options); 209 }); 210 211 212 // accordion with radio buttons 213 $(".accordion-radio").on('click', function(){ 214 $(this).next('input').prop("checked", true); 215 }); 216 217 // accordion active class 218 $('.collapse').on('show.bs.collapse', function () { 219 $(this).parent().addClass('active'); 220 }); 221 222 $('.collapse').on('hide.bs.collapse', function () { 223 $(this).parent().removeClass('active'); 224 }); 225 226 227 // skrollr 228 skrollr.init({ 229 forceHeight: false, 230 mobileCheck: function() { 231 //hack - forces mobile version to be off 232 return false;
233 } 234 }); 235 236 237 // filter blog 238 $(function () { 239 if ( $('.filtr-blog').length ) { 240 var filterizd = $('.filtr-blog').filterizr({ 241 filter: 'all', 242 layout: 'packed' 243 }); 244 } 245 246 $('a[data-filter]').click(function() { 247 $('a[data-filter]').removeClass('active'); 248 $(this).addClass('active'); 249 }); 250 }); 251 252 // filter blog 253 $(function () { 254 if ( $('.filtr-container').length ) { 255 var filterizd = $('.filtr-container').filterizr({ 256 filter: '1', 257 layout: 'packed' 258 }); 259 } 260 261 $('a[data-filter]').click(function() { 262 $('a[data-filter]').removeClass('active'); 263 $(this).addClass('active'); 264 }); 265 }); 266 267 268 // tooltips 269 $('[data-toggle="tooltip"]').tooltip(); 270 271 272 // smooth scroll 273 $(function () { 274 var scroll = new SmoothScroll('[data-scroll]'); 275 }); 276 277 } 278 }; 279 280 $(document).ready(function () { 281 fn.Launch(); 282 }); 283 284})(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.