1/************************************************************************** 2* Common js 3 4**************************************************************************/ 5jQuery(document).ready(function() { 6 "use strict"; 7 /* Navigation */ 8 jQuery("#nav > li").hover(function() { 9 var el = jQuery(this).find(".level0-wrapper"); 10 el.hide(); 11 el.css("left", "0"); 12 el.stop(true, true).delay(150).fadeIn(300, "easeOutCubic"); 13 }, function() { 14 jQuery(this).find(".level0-wrapper").stop(true, true).delay(300).fadeOut(300, "easeInCubic"); 15 }); 16 var scrolled = false; 17 jQuery("#nav li.level0.drop-menu").mouseover(function() { 18 if (jQuery(window).width() >= 740) { 19 jQuery(this).children('ul.level1').fadeIn(100); 20 } 21 return false; 22 }).mouseleave(function() { 23 if (jQuery(window).width() >= 740) { 24 jQuery(this).children('ul.level1').fadeOut(100); 25 } 26 return false; 27 }); 28 jQuery("#nav li.level0.drop-menu li").mouseover(function() { 29 if (jQuery(window).width() >= 740) { 30 jQuery(this).children('ul').css({ 31 top: 0, 32 left: "165px" 33 }); 34 var offset = jQuery(this).offset(); 35 if (offset && (jQuery(window).width() < offset.left + 325)) { 36 jQuery(this).children('ul').removeClass("right-sub"); 37 jQuery(this).children('ul').addClass("left-sub"); 38 jQuery(this).children('ul').css({ 39 top: 0, 40 left: "-167px" 41 }); 42 } else { 43 jQuery(this).children('ul').removeClass("left-sub"); 44 jQuery(this).children('ul').addClass("right-sub"); 45 } 46 jQuery(this).children('ul').fadeIn(100); 47 } 48 }).mouseleave(function() { 49 if (jQuery(window).width() >= 740) { 50 jQuery(this).children('ul').fadeOut(100); 51 } 52 }); 53 /* Bestsell slider */ 54 jQuery("#bestsell-slider .slider-items").owlCarousel({ 55 items: 4, //10 items above 1000px browser width 56 itemsDesktop: [1024, 3], //5 items between 1024px and 901px 57 itemsDesktopSmall: [900, 3], // 3 items betweem 900px and 601px 58 itemsTablet: [768, 2], //2 items between 600 and 0; 59 itemsMobile: [360, 1], 60 navigation: true, 61 navigationText: ["<a class=\"flex-prev\"></a>", "<a class=\"flex-next\"></a>"], 62 slideSpeed: 500, 63 pagination: false 64 }); 65 /* Featured slider */ 66 jQuery("#featured-slider .slider-items").owlCarousel({ 67 items: 4, //10 items above 1000px browser width 68 itemsDesktop: [1024, 3], //5 items between 1024px and 901px 69 itemsDesktopSmall: [900, 3], // 3 items betweem 900px and 601px 70 itemsTablet: [768, 2], //2 items between 600 and 0; 71 itemsMobile: [360, 1], 72 navigation: true, 73 navigationText: ["<a class=\"flex-prev\"></a>", "<a class=\"flex-next\"></a>"], 74 slideSpeed: 500, 75 pagination: false 76 }); 77 /* New arrivals slider */ 78 jQuery("#new-arrivals-slider .slider-items").owlCarousel({ 79 items: 4, //10 items above 1000px browser width 80 itemsDesktop: [1024, 3], //5 items between 1024px and 901px 81 itemsDesktopSmall: [900, 3], // 3 items betweem 900px and 601px 82 itemsTablet: [768, 2], //2 items between 600 and 0; 83 itemsMobile: [360, 1], 84 navigation: true, 85 navigationText: ["<a class=\"flex-prev\"></a>", "<a class=\"flex-next\"></a>"], 86 slideSpeed: 500, 87 pagination: false 88 }); 89 /* Brand logo slider */ 90 jQuery("#brand-logo-slider .slider-items").owlCarousel({ 91 autoPlay: true, 92 items: 6, //10 items above 1000px browser width 93 itemsDesktop: [1024, 4], //5 items between 1024px and 901px 94 itemsDesktopSmall: [900, 3], // 3 items betweem 900px and 601px 95 itemsTablet: [600, 2], //2 items between 600 and 0; 96 itemsMobile: [320, 1], 97 navigation: true, 98 navigationText: ["<a class=\"flex-prev\"></a>", "<a class=\"flex-next\"></a>"], 99 slideSpeed: 500, 100 pagination: false 101 }); 102 /* Category desc slider */ 103 jQuery("#category-desc-slider .slider-items").owlCarousel({ 104 autoPlay: true, 105 items: 1, //10 items above 1000px browser width 106 itemsDesktop: [1024, 1], //5 items between 1024px and 901px 107 itemsDesktopSmall: [900, 1], // 3 items betweem 900px and 601px 108 itemsTablet: [600, 1], //2 items between 600 and 0; 109 itemsMobile: [320, 1], 110 navigation: true, 111 navigationText: ["<a class=\"flex-prev\"></a>", "<a class=\"flex-next\"></a>"], 112 slideSpeed: 500, 113 pagination: false 114 }); 115 /* Related products slider */ 116 jQuery("#related-products-slider .slider-items").owlCarousel({ 117 items: 4, //10 items above 1000px browser width 118 itemsDesktop: [1024, 3], //5 items between 1024px and 901px 119 itemsDesktopSmall: [900, 3], // 3 items betweem 900px and 601px 120 itemsTablet: [768, 2], //2 items between 600 and 0; 121 itemsMobile: [360, 1], 122 navigation: true, 123 navigationText: ["<a class=\"flex-prev\"></a>", "<a class=\"flex-next\"></a>"], 124 slideSpeed: 500, 125 pagination: false 126 }); 127 /* Upsell products slider */ 128 jQuery("#upsell-products-slider .slider-items").owlCarousel({ 129 items: 4, //10 items above 1000px browser width 130 itemsDesktop: [1024, 3], //5 items between 1024px and 901px 131 itemsDesktopSmall: [900, 3], // 3 items betweem 900px and 601px 132 itemsTablet: [768, 2], //2 items between 600 and 0; 133 itemsMobile: [360, 1], 134 navigation: true, 135 navigationText: ["<a class=\"flex-prev\"></a>", "<a class=\"flex-next\"></a>"], 136 slideSpeed: 500, 137 pagination: false 138 }); 139 /* Mobile menu */ 140 jQuery("#mobile-menu").mobileMenu({
141 MenuWidth: 250, 142 SlideSpeed: 300, 143 WindowsMaxWidth: 767, 144 PagePush: true, 145 FromLeft: true, 146 Overlay: true, 147 CollapseMenu: true, 148 ClassName: "mobile-menu" 149 }); 150 /* side nav categories */ 151 if (jQuery('.subDropdown')[0]) { 152 jQuery('.subDropdown').on("click", function() { 153 jQuery(this).toggleClass('plus'); 154 jQuery(this).toggleClass('minus'); 155 jQuery(this).parent().find('ul').slideToggle(); 156 }); 157 } 158 jQuery.extend(jQuery.easing, { 159 easeInCubic: function(x, t, b, c, d) { 160 return c * (t /= d) * t * t + b; 161 }, 162 easeOutCubic: function(x, t, b, c, d) { 163 return c * ((t = t / d - 1) * t * t + 1) + b; 164 }, 165 }); 166 (function(jQuery) { 167 jQuery.fn.extend({ 168 accordion: function() { 169 return this.each(function() { 170 function activate(el, effect) { 171 jQuery(el).siblings(panelSelector)[(effect || activationEffect)](((effect == "show") ? activationEffectSpeed : false), function() { 172 jQuery(el).parents().show(); 173 }); 174 } 175 }); 176 } 177 }); 178 })(jQuery); 179 jQuery(function(jQuery) { 180 jQuery('.accordion').accordion(); 181 jQuery('.accordion').each(function(index) { 182 var activeItems = jQuery(this).find('li.active'); 183 activeItems.each(function(i) { 184 jQuery(this).children('ul').css('display', 'block'); 185 if (i == activeItems.length - 1) { 186 jQuery(this).addClass("current"); 187 } 188 }); 189 }); 190 }); 191 /* Top Cart js */ 192 function slideEffectAjax() { 193 jQuery('.top-cart-contain').mouseenter(function() { 194 jQuery(this).find(".top-cart-content").stop(true, true).slideDown(); 195 }); 196 jQuery('.top-cart-contain').mouseleave(function() { 197 jQuery(this).find(".top-cart-content").stop(true, true).slideUp(); 198 }); 199 } 200 jQuery(document).ready(function() { 201 slideEffectAjax(); 202 }); 203 /* sticky header */ 204 jQuery(window).scroll(function() { 205 jQuery(this).scrollTop() > 1 ? jQuery("nav").addClass("sticky-header") : jQuery("nav").removeClass("sticky-header") 206 jQuery(this).scrollTop() > 1 ? jQuery(".top-cart-contain").addClass("sticky-topcart") : jQuery(".top-cart-contain").removeClass("sticky-topcart") 207 }); 208}); 209/* UItoTop */ 210jQuery.fn.UItoTop = function(options) { 211 var defaults = { 212 text: '', 213 min: 200, 214 inDelay: 600, 215 outDelay: 400, 216 containerID: 'toTop', 217 containerHoverID: 'toTopHover', 218 scrollSpeed: 1200, 219 easingType: 'linear' 220 }; 221 var settings = jQuery.extend(defaults, options); 222 var containerIDhash = '#' + settings.containerID; 223 var containerHoverIDHash = '#' + settings.containerHoverID; 224 jQuery('body').append('<a href="#" id="' + settings.containerID + '">' + settings.text + '</a>'); 225 jQuery(containerIDhash).hide().on("click", function() { 226 jQuery('html, body').animate({ 227 scrollTop: 0 228 }, settings.scrollSpeed, settings.easingType); 229 jQuery('#' + settings.containerHoverID, this).stop().animate({ 230 'opacity': 0 231 }, settings.inDelay, settings.easingType); 232 return false; 233 }).prepend('<span id="' + settings.containerHoverID + '"></span>').hover(function() { 234 jQuery(containerHoverIDHash, this).stop().animate({ 235 'opacity': 1 236 }, 600, 'linear'); 237 }, function() { 238 jQuery(containerHoverIDHash, this).stop().animate({ 239 'opacity': 0 240 }, 700, 'linear'); 241 }); 242 jQuery(window).scroll(function() { 243 var sd = jQuery(window).scrollTop(); 244 if (typeof document.body.style.maxHeight === "undefined") { 245 jQuery(containerIDhash).css({ 246 'position': 'absolute', 247 'top': jQuery(window).scrollTop() + jQuery(window).height() - 50 248 }); 249 } 250 if (sd > settings.min) jQuery(containerIDhash).fadeIn(settings.inDelay); 251 else jQuery(containerIDhash).fadeOut(settings.Outdelay); 252 }); 253}; 254/* mobileMenu */ 255var isTouchDevice = ('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0); 256jQuery(window).on("load", function() { 257 if (isTouchDevice) { 258 jQuery('#nav a.level-top').on("click", function(e) { 259 jQueryt = jQuery(this); 260 jQueryparent = jQueryt.parent(); 261 if (jQueryparent.hasClass('parent')) { 262 if (!jQueryt.hasClass('menu-ready')) { 263 jQuery('#nav a.level-top').removeClass('menu-ready'); 264 jQueryt.addClass('menu-ready'); 265 return false; 266 } else { 267 jQueryt.removeClass('menu-ready'); 268 } 269 } 270 }); 271 } 272 jQuery().UItoTop(); 273});
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.