1$(document).ready(function () { 2 var device_width = $(window).width(); 3 if (device_width < 320) { 4 $('#viewport').attr('content', 'width=320, initial-scale=1'); 5 } 6 /* 7 $('.bootstrapSelect').selectpicker({ 8 style: 'btn-info', 9 size: 4 10 }); 11 */ 12 $.each($('.dropdown-menu.products .list-container ul'), function (index, elem) { 13 if ($(elem).find('li').length > 11) { 14 var coulmCount = Math.ceil($(elem).find('li').length / 11); 15 $(elem).css({ 16 '-moz-column-count': coulmCount, 17 '-webkit-column-count': coulmCount, 18 'column-count': coulmCount 19 }); 20 } 21 }); 22 $('.header-search').click(function () { 23 $('#header-search').val('');//clear the input when show/hide 24 setTimeout(function () { 25 if ($('#header-search:visible').length > 0) { 26 $('#header-search').focus();//focus the input when is visible 27 } 28 }, 50); 29 }); 30 $('#header-search, #header-search-mobile').keydown(function (e) { 31 switch (e.keyCode) { 32 case 13: 33 e.preventDefault(); 34 doSearch($(this).val()); 35 break; 36 } 37 }); 38 $('#txtSearchBox').keydown(function (e) { 39 switch (e.keyCode) { 40 case 13: 41 e.preventDefault(); 42 doSearch($(this).val()); 43 break; 44 } 45 }); 46 47 $('#btnSearch').click(function (e) { 48 doSearch(''); 49 }); 50 51 $('.open-search-mobile').click(function (e) { 52 e.stopPropagation(); 53 if ($('button.navbar-toggle').attr('aria-expanded') == 'true') { 54 $('button.navbar-toggle').trigger('click'); 55 } 56 $('.dropdown-search-mobile').slideToggle(); 57 $('#header-search-mobile').val(''); 58 $('#header-search-mobile').focus(); 59 }); 60 $('#header-search-mobile').click(function (e) { 61 e.stopPropagation(); 62 }); 63 $('html, body').click(function (e) {//close mobile search on click 64 $('.dropdown-search-mobile').slideUp(); 65 }); 66 67 /* Assets filter trigger mobile */ 68 $(".xv-mainfilter-wrapper .xv-filter-phone").on("click", function () { 69 if (this.parentElement.classList.contains("expand")) { 70 this.parentElement.classList.remove("expand"); 71 } else { 72 this.parentElement.classList.add("expand"); 73 } 74 }); 75 76 /* Menu on hover for desktop only */ 77 $('ul.nav li.dd-menu').hover(function () { 78 var ismobile = $('#mobile-indicator').is(':visible'); 79 if (ismobile) { return; } 80 $('header').addClass("default-state"); 81 $(this).addClass('open'); 82 $(this).find('.dropdown-menu').stop(true, true).fadeIn(10); 83 }, function () { 84 var ismobile = $('#mobile-indicator').is(':visible'); 85 if (ismobile) { return; } 86 $('header').removeClass("default-state"); 87 $(this).removeClass('open'); 88 $(this).find('.dropdown-menu').stop(true, true).fadeOut(10); 89 }); 90 91 /* Menu on click for mobile only */ 92 $('ul.nav li.dropdown a i').click(function (e) { 93 var ismobile = $('#mobile-indicator').is(':visible'); 94 if (ismobile) { 95 e.preventDefault(); 96 $(this).closest('li').siblings().removeClass('open'); 97 $(this).closest('li').toggleClass('open'); 98 } 99 }); 100 101}); 102 103var carouseCurrentSlide = 0; 104 105//$(window).load(function () { 106 107$(window).on("load", function (e) { 108 // The slider being synced must be initialized first 109 try { 110 $('#carousel').flexslider({ 111 animation: "slide", 112 controlNav: false, 113 directionNav: true, 114 animationLoop: false, 115 slideshow: false, 116 touch: false, 117 reverse: false, 118 itemWidth: 100, 119 minItems: 7, 120 itemMargin: 10, 121 asNavFor: '#slider', 122 //before: function (slider) { 123 // slider.stop(); 124 //}, 125 //start: function (slider) { 126 // $(slider).find('li').unbind('click'); 127 // $(slider).find('li').click(function (event) { 128 // event.preventDefault(); 129 // event.stopPropagation(); 130 // console.log("01"); 131 // slider.stop(); 132 133 // var isNavLink = $(this).closest(".flex-direction-nav"); 134 // var ind; 135 // var $currentLi = $(this); 136 // if (isNavLink.length > 0) { 137 // console.log("iftre"); 138 // if ($currentLi.hasClass("flex-nav-next")) { 139 // $currentLi = $(slider).find('.slides li.flex-active-slide').next("li"); 140 // } else { 141 // $currentLi = $(slider).find('.slides li.flex-active-slide').prev("li"); 142 // } 143 144 // ind = $(slider).find('li').index($($currentLi)); 145 // $(slider).find('.slides li').removeClass('flex-active-slide'); 146 // $($currentLi).addClass('flex-active-slide'); 147 // } else { 148 // $(slider).find('.slides li').removeClass('flex-active-slide'); 149 // $(this).addClass('flex-active-slide'); 150 // } 151 152 // ind = $(slider).find('li').index($currentLi); 153 154 // $('#slider').flexslider(ind); 155 // if (ind - slider.currentSlide >= 6 && ind + 1 !== slider.count) { 156 // carouseCurrentSlide += 1; 157 // $(slider).flexslider('next'); 158 // } else if (ind - slider.currentSlide == 0 && ind != 0) { 159 // carouseCurrentSlide -= 1; 160 // $(slider).flexslider('prev'); 161 // } 162 // });
163 //} 164 }); 165 166 $('#slider').flexslider({ 167 animation: "slide", 168 controlNav: false, 169 animationLoop: false, 170 slideshow: false, 171 directionNav: false, 172 sync: "#carousel", 173 //touch: false, 174 //maxItems: 1, 175 //move: 1, 176 //after: function (slider) { 177 // var ind = $('#carousel').find('.slides li.flex-active-slide').index(); 178 179 // $('#carousel').find('.slides li').removeClass('flex-active-slide'); 180 // var slideToActivate = $('#carousel').find('.slides li').get(slider.currentSlide); 181 // $(slideToActivate).addClass('flex-active-slide'); 182 // if (slider.currentSlide - carouseCurrentSlide >= 6 && slider.currentSlide + 1 !== slider.count) { 183 // carouseCurrentSlide += 1; 184 // $('#carousel').flexslider('next'); 185 // } else if (slider.currentSlide - carouseCurrentSlide == 0 && slider.currentSlide != 0) { 186 // carouseCurrentSlide -= 1; 187 // $('#carousel').flexslider('prev'); 188 // } 189 //}, 190 //start: function (slider) { 191 // $(slider).find('a.flex-next').unbind('click').click(function (event) { 192 // event.preventDefault(); 193 // event.stopPropagation(); 194 // console.log("hii"); 195 // $(slider).find('.slides li').removeClass('flex-active-slide'); 196 // var t = $('#carousel').find('li').eq(slider.currentSlide + 1); 197 // if (t) t.addClass('flex-active-slide').click(); 198 // }); 199 // $(slider).find('a.flex-prev').unbind('click').click(function (event) { 200 // event.preventDefault(); 201 // event.stopPropagation(); 202 // $(slider).find('.slides li').removeClass('flex-active-slide'); 203 // var t = $('#carousel').find('li').eq(slider.currentSlide - 1); 204 // if (t) t.addClass('flex-active-slide').click(); 205 // }); 206 //} 207 }); 208 } catch (e) { } 209}); 210 211function doSearch(toSearch) { 212 //ToDo Search 213 window.location.href = "/search-results?searchQuery=" + toSearch; 214}
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.