1ACC.carousel = { 2 3 _autoload: [ 4 ["bindCarousel", $(".js-owl-carousel").length >0], 5 "bindJCarousel", 6 "bindCarouselComponent", 7 "bindProductCarouselComponent" 8 ], 9 10 carouselConfig:{ 11 "default":{ 12 navigation:true, 13 navigationText : ["<span class='glyphicon glyphicon-chevron-left'></span>", "<span class='glyphicon glyphicon-chevron-right'></span>"], 14 pagination:false, 15 itemsCustom : [[0, 2], [640, 4], [1024, 5], [1400, 7]] 16 }, 17 "rotating-image":{ 18 navigation:false, 19 pagination:true, 20 singleItem : true 21 }, 22 "lazy-reference":{ 23 navigation:true, 24 navigationText : ["<span class='glyphicon glyphicon-chevron-left'></span>", "<span class='glyphicon glyphicon-chevron-right'></span>"], 25 pagination:false, 26 itemsDesktop : [5000,7], 27 itemsDesktopSmall : [1200,5], 28 itemsTablet: [768,4], 29 itemsMobile : [480,3], 30 lazyLoad:true 31 } 32 }, 33 34 bindCarousel: function(){ 35 36 $(".js-owl-carousel").each(function(){ 37 var $c = $(this); 38 $.each(ACC.carousel.carouselConfig,function(key,config){ 39 if($c.hasClass("js-owl-"+key)){ 40 var $e = $(document).find(".js-owl-"+key); 41 $e.owlCarousel(config); 42 } 43 }); 44 }); 45 46 }, 47 48 bindJCarousel: function () 49 { 50 $(".modal").colorbox({ 51 onComplete: function () 52 { 53 ACC.common.refreshScreenReaderBuffer(); 54 }, 55 onClosed: function () 56 { 57 ACC.common.refreshScreenReaderBuffer(); 58 } 59 }); 60 $('.svw').each( function(){ 61 $( this).waitForImages( function(){ 62 $(this).slideView({toolTip: true, ttOpacity: 0.6, autoPlay: true, autoPlayTime: 8000}); 63 }); 64 }); 65 }, 66 67 bindCarouselComponent: function () 68 { 69 var component = $(".carouselComponent"), 70 autoplay = component.attr("data-autoplay"), 71 speed = component.attr("data-speed"), 72 options = { 73 dots: true, 74 infinite: true, 75 slidesToShow: 1, 76 slidesToScroll: 1, 77 adaptiveHeight: true 78 }; 79 80 if(autoplay && autoplay == "true") { 81 options.autoplay = autoplay; 82 options.autoplaySpeed = speed; 83 } 84 85 component.slick(options); 86 }, 87 88 bindProductCarouselComponent: function () 89 { 90 this.productCarouselComponents = $(".js-product-carousel"); 91 92 enquire.register("screen and (max-width:" + screenSmMax + ")", { 93 match: function () { 94 ACC.carousel.displayProductCarouselMobile(); 95 }, 96 unmatch: function () { 97 ACC.carousel.displayProductCarouselDesktop(); 98 } 99 }); 100 enquire.register("screen and (min-width:" + screenMd + ")", { 101 match: function () { 102 ACC.carousel.displayProductCarouselDesktop(); 103 } 104 }); 105 enquire.register("screen and (max-width:" + screenXsMax + ")", { 106 match: function () { 107 ACC.carousel.productCarouselComponents.slick("slickSetOption", "arrows", false, true); 108 }, 109 unmatch: function () { 110 ACC.carousel.productCarouselComponents.slick("slickSetOption", "arrows", true, true); 111 } 112 }); 113 }, 114 115 displayProductCarouselDesktop: function () 116 {
117 var component = ACC.carousel.productCarouselComponents; 118 119 if(component.hasClass("slick-initialized")) { 120 component.slick("slickSetOption", "slidesToShow", 4); 121 component.slick("slickSetOption", "slidesToScroll", 4); 122 component.slick("slickSetOption", "dots", false, true); 123 } else { 124 component.slick({ 125 infinite: true, 126 slidesToShow: 4, 127 slidesToScroll: 4 128 }); 129 } 130 }, 131 132 displayProductCarouselMobile: function () 133 { 134 var component = ACC.carousel.productCarouselComponents; 135 136 if(component.hasClass("slick-initialized")) { 137 component.slick("slickSetOption", "slidesToShow", 2); 138 component.slick("slickSetOption", "slidesToScroll", 2); 139 component.slick("slickSetOption", "dots", true, true); 140 } else { 141 component.slick({ 142 dots: true, 143 infinite: true, 144 slidesToShow: 2, 145 slidesToScroll: 2 146 }); 147 } 148 } 149};
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.