1$(function() { 2 3 4var scrolltotop = { 5 setting: { 6 7 startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100] 8 9 }, 10 controlHTML: 11 '<img style="width:50px; height:50px" src="/template/des/up.png" />' 12 , 13 controlattrs: { 14 15 offsetx:25, offsety:25 16 17 }, 18 anchorkeyword: '#top', 19 state: {isvisible:false, shouldvisible:false}, 20 scrollup:function(){ 21 if (!this.cssfixedsupport) 22 this.$control.css({opacity:0}) 23 var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto) 24 if (typeof dest=="string" && jQuery('#'+dest).length==1) 25 dest=jQuery('#'+dest).offset().top 26 else 27 dest=0 28 this.$body.animate({scrollTop: dest}, this.setting.scrollduration); 29 }, 30 31 keepfixed:function(){ 32 var $window=jQuery(window) 33 var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx 34 var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety 35 this.$control.css({left:controlx+'px', top:controly+'px'}) 36 }, 37 38 togglecontrol:function(){ 39 var scrolltop=jQuery(window).scrollTop() 40 if (!this.cssfixedsupport) 41 this.keepfixed() 42 this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false 43 if (this.state.shouldvisible && !this.state.isvisible){ 44 this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0]) 45 this.state.isvisible=true 46 } 47 else if (this.state.shouldvisible==false && this.state.isvisible){ 48 this.$control.stop().animate({opacity:0}
48, this.setting.fadeduration[1]) 49 this.state.isvisible=false 50 } 51 }, 52 53 init:function(){ 54 jQuery(document).ready(function($){ 55 var mainobj=scrolltotop 56 var iebrws=document.all 57 mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest 58 mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body') 59 mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>') 60 .css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer', zIndex:9999}) 61 .attr({title:'Scroll Back to Top'}) 62 .click(function(){mainobj.scrollup(); return false}) 63 .appendTo('body') 64 if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') 65 mainobj.$control.css({width:mainobj.$control.width()}) 66 mainobj.togglecontrol() 67 $('a[href="' + mainobj.anchorkeyword +'"]').click(function(){ 68 mainobj.scrollup() 69 return false 70 }) 71 $(window).bind('scroll resize', function(e){ 72 mainobj.togglecontrol() 73 }) 74 }) 75 } 76} 77 scrolltotop.init(); 78 79 $(".top-nav-product a").click(function(e){ 80 e.preventDefault(); 81 const id = $(this).attr("data-id"); 82 $(".top-nav-product a").removeClass("active"); 83 $(".item-q").css("display", "none"); 84 $("#"+id).css("display", "block"); 85 $(this).addClass("active"); 86 }) 87 88 $('.reference-carousel').owlCarousel({ 89 loop:true, 90 dots: false, 91 margin:30, 92 nav:false, 93 responsive:{ 94 0:{ 95 items:1 96 }, 97 600:{ 98 items:3 99 } 100 } 101 }); 102 var uwu = $('.reference-carousel'); 103 uwu.owlCarousel(); 104 // Go to the next item 105 $('.cat .next').click(function() { 106 uwu.trigger('next.owl.carousel'); 107 }) 108 // Go to the previous item 109 $('.cat .previous').click(function() { 110 uwu.trigger('prev.owl.carousel'); 111 }) 112 113 $('.favorite').owlCarousel({ 114 loop:true, 115 dots: false, 116 margin:30, 117 nav:false, 118 responsive:{ 119 0:{ 120 items:1 121 }, 122 600:{ 123 items:3 124 } 125 } 126 }); 127 128 $('.sales').owlCarousel({ 129 loop:true, 130 dots: false, 131 margin:30, 132 nav:false, 133 responsive:{ 134 0:{ 135 items:1 136 }, 137 600:{ 138 items:2 139 }, 140 1000:{ 141 items:3 142 } 143 } 144 }); 145 wop = $('.sales'); 146 wop.owlCarousel(); 147 // Go to the next item 148 $('.next-sales').click(function() { 149 wop.trigger('next.owl.carousel'); 150 }) 151 // Go to the previous item 152 $('.prev-sales').click(function() { 153 wop.trigger('prev.owl.carousel'); 154 }) 155 156 157 $(".content-options-item input").on("click", function(){ 158 $(this).parent("label").parent(".content-options-item").parent(".content-options").children(".content-options-item").css("border", "none"); 159 if ($(this).is(":checked")) { 160 $(this).parent("label").parent(".content-options-item").css("border", "2px solid red"); 161 } else { 162 $(this).parent("label").parent(".content-options-item").css("border", "none"); 163 } 164 165 }); 166 167 var owl = $('.favorite'); 168 owl.owlCarousel(); 169 // Go to the next item 170 $('.fav .next').click(function() { 171 owl.trigger('next.owl.carousel'); 172 }) 173 // Go to the previous item 174 $('.fav .previous').click(function() { 175 owl.trigger('prev.owl.carousel'); 176 }) 177 178 $(".hamburger").click(function(){ $(".categories__hamburger--menu").toggle() }); 179 // Homepage slider - left 180 $(".homepage__slider--left").owlCarousel({ 181 items: 1, 182 dots: true, 183 nav: false, 184 margin: 0, 185 loop: true, 186 rewind: false, 187 autoplay: false, 188 mouseDrag: false, 189 pullDrag: false, 190 autoplayTimeout: 8000, 191 autoplayHoverPause: false 192 }); 193 194 195 owll = $('.homepage__slider--left'); 196 owll.owlCarousel(); 197 // Go to the next item 198 $('.banner-next').click(function() { 199 owll.trigger('next.owl.carousel'); 200 }) 201 // Go to the previous item 202 $('.banner-prev').click(function() { 203 owll.trigger('prev.owl.carousel'); 204 }) 205 206 // Homepage slider - right 207 $(".homepage__slider--right").owlCarousel({ 208 items: 1, 209 dots: true, 210 nav: false, 211 margin: 0, 212 loop: true, 213 rewind: false, 214 autoplay: true, 215 autoplayTimeout: 5000, 216 autoplayHoverPause: false 217 }); 218 219 220 // ------------- 221 222 // Brands slider 223 var brandsSlider = $(".homepage__brands--inner"); 224 225 brandsSlider.owlCarousel({ 226 items: 6, 227 loop: false, 228 margin: 0, 229 centerMode: true, 230 autoplay: false, 231 autoplayTimeout: 3000, 232 autoplayHoverPause: false, 233 //navText: [$('.homepage__brands--prev'),$('.homepage__brands--next')], 234 responsive : { 235 0: { 236 items: 1, 237 }, 238 768: { 239 items: 2, 240 }, 241 992: { 242 items: 3, 243 }, 244 1200: { 245 items: 4, 246 }, 247 1400: { 248 items: 6, 249 } 250 } 251 }); 252 253 // Brands slider - controls 254 $(".cer-prev").click(function() { 255 256 257 brandsSlider.trigger("prev.owl.carousel"); 258 });
259 $(".cer-next").click(function() { 260 261 brandsSlider.trigger("next.owl.carousel"); 262 }); 263 264 // ------------- 265 266 // Category tree 267 $(".category__tree li.active").closest('ul').show(); 268 269 // ------------- 270 271 // Quotes slider 272 var quotesSlider = $(".quotes__slider"); 273 274 quotesSlider.owlCarousel({ 275 items: 1, 276 loop: true, 277 nav: false, 278 dots: false, 279 autoplay: true, 280 autoplayTimeout: 3000, 281 autoplayHoverPause: false 282 }); 283 284 // Quotes slider - controls 285 $(".quotes__controls--prev").click(function(e) { 286 287 e.preventDefault(); 288 289 quotesSlider.trigger("prev.owl.carousel"); 290 }); 291 $(".quotes__controls--next").click(function(e) { 292 293 e.preventDefault(); 294 295 quotesSlider.trigger("next.owl.carousel"); 296 }); 297 298 // Mobile navigation toggle 299 $(".hamburger-box").click(function() { 300 301 $(this).parent('.hamburger').toggleClass("hamburger--collapse"); 302 $(".header__navigation ul").toggle(); 303 }); 304}); 305 306// Product images (carousel) 307$(".product__carouselgallery").slick({ 308 slidesToShow: 3, 309 slidesToScroll: 3, 310 centerMode: !1, 311 arrows: !0, 312 infinite: !0, 313 nextArrow: '<div class="product__arrow slick-next product__arrow--next"><div class="product__button"><svg role="img" class="ico-12"><use xlink:href="#ico-12"></use></svg></div></div>', 314 prevArrow: '<div class="product__arrow slick-prev product__arrow--prev"><div class="product__button"><svg role="img" class="ico-12"><use xlink:href="#ico-12"></use></svg></div></div>' 315}); 316 317// Product switches 318$(document).on("click", ".product__tabs li a", function() { 319 return $(".product__tabs li").removeClass("active"), $(".product__switch").removeClass("product__switch--active"), $(".product__switch:nth-child(" + ($(this).parent().index() + 1) + ")").addClass("product__switch--active"), $(this).parent().addClass("active"), !1 320}); 321 322// Gallery 323(function ($, window, document) { 324 325 $(function () { 326 galleryInit(); 327 }); 328 329 var galleryInit = function () { 330 var $grid = $('.grid').isotope({ 331 itemSelector: '.element-item', 332 layoutMode: 'fitRows' 333 }); 334 var filterFns = { 335 // show if number is greater than 50 336 numberGreaterThan50: function() { 337 var number = $(this).find('.number').text(); 338 return parseInt( number, 10 ) > 50; 339 }, 340 // show if name ends with -ium 341 ium: function() { 342 var name = $(this).find('.name').text(); 343 return name.match( /ium$/ ); 344 } 345 }; 346 $('.filters-button-group').on( 'click', 'button', function() { 347 var filterValue = $( this ).attr('data-filter'); 348 // use filterFn if matches value 349 filterValue = filterFns[ filterValue ] || filterValue; 350 $grid.isotope({ filter: filterValue }); 351 }); 352 $('.button-group').each( function( i, buttonGroup ) { 353 var $buttonGroup = $( buttonGroup ); 354 $buttonGroup.on( 'click', 'button', function() { 355 $buttonGroup.find('.is-checked').removeClass('is-checked'); 356 $( this ).addClass('is-checked'); 357 }); 358 }); 359 }; 360 361}(window.jQuery, window, document)); 362$(document).ready(function () { 363 $('.li-sub-head').each(function(i, obj) { 364 var html = $(this).html(); 365 if (html.indexOf("active") !== -1) { 366 $(this).find('ul').css("display","block"); 367 } 368 }); 369});
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.