1jQuery.noConflict(); 2(function( $ ) { 3 $(function() { 4 5 var findBike = []; 6 7 if ($('#find_your_bike').length> 0) { 8 $('#find_your_bike select').on('change', function(){ 9 findBikeChange(); 10 }); 11 } 12 13 function findBikeChange(){ 14 var values = {}, 15 hash = ''; 16 $('#find_your_bike select').each( function(){ 17 var name = $(this).attr('id'), 18 selected = $(this).val(); 19 if (selected != undefined && selected != '') { 20 hash += name+'_'+selected; 21 } 22 values[name] = selected; 23 }); 24 findBike.values = values; 25 if (findBike.hash != hash) { 26 updateBikeOptions(values, hash); 27 } 28 } 29 30 function updateBikeOptions(values, hash) { 31 var shopUrl = $('#sc_shop_url').val(); 32 if (hash != '') { 33 shopUrl += '?swoof=1'; 34 $.each(findBike.values, function(k,v){ 35 if (v != '' && v != undefined) { 36 if (k == 'pa_model_year') { 37 k = 'pa_model-year'; 38 } 39 shopUrl += '&'+k+'='+v; 40 } 41 }); 42 } 43 findBike.url = shopUrl; 44 $('#find_your_bike .submit-wrap').html('<a class="button see-results" href="'+shopUrl+'">Go</a>'); 45 $('#find_your_bike select').prop('disabled', true); 46 refreshBikeOptions(values, hash).then(function(response){ 47 var data = jQuery.parseJSON(response); 48 if (data.results != undefined) { 49 $('.submit-wrap .see-results').text('Go ('+data.results+')'); 50 } 51 if (data.options != false) { 52 $.each(data.options, function(k,v){ 53 $('#find_your_bike select[id='+k+']').html(v); 54 }); 55 } 56 $('#find_your_bike select').prop('disabled', false); 57 }); 58 } 59 60 $('#find_your_bike .reset-form').on('click', function(){ 61 var values = {}, 62 hash = ''; 63 $('#find_your_bike select').each( function(){ 64 var name = $(this).attr('id'); 65 values[name] = ''; 66 }); 67 updateBikeOptions(values, hash); 68 }); 69 70 function refreshBikeOptions(values, hash) { 71 return new Promise( function(resolve, reject) { 72 $.ajax({
73 url: ajax_url, 74 type: 'POST', 75 data: { 76 'action': 'sc_refresh_bike_options', 77 'values': values, 78 'hash': hash, 79 }, 80 success: function (data) { 81 findBike.hash = hash; 82 resolve(data) 83 }, 84 error: function (error) { 85 reject(error); 86 }, 87 }); 88 }); 89 } 90 }); 91})(jQuery); 92jQuery.noConflict(); 93(function( $ ) { 94 $(function() { 95 if ($('.sc_cookie_notification').length>0) { 96 97 function setConsent(consent) { 98 var consentModeName = $('.sc_cookie_notification').attr('data-cname'), 99 expireName = 'expire_'+consentModeName, 100 expire = $('.sc_cookie_notification').attr('data-expire'); 101 const consentMode = { 102 'functionality_storage': consent.necessary ? 'granted' : 'denied', 103 'security_storage': consent.necessary ? 'granted' : 'denied', 104 'ad_storage': consent.marketing ? 'granted' : 'denied', 105 'analytics_storage': consent.analytics ? 'granted' : 'denied', 106 'personalization': consent.preferences ? 'granted' : 'denied', 107 'ad_user_data': consent.marketing ? 'granted' : 'denied', 108 'ad_personalization': consent.marketing ? 'granted' : 'denied', 109 }; 110 gtag('consent', 'update', consentMode); 111 localStorage.setItem(consentModeName, JSON.stringify(consentMode)); 112 localStorage.setItem(expireName, expire); 113 114 $('.sc_cookie_notification').slideToggle(); 115 setTimeout(function(){ 116 $('.sc_cookie_notification').remove(); 117 }, 500); 118 } 119 120 $('.consent-option .heading strong').on('click', function(e){ 121 e.preventDefault(); 122 $(this).toggleClass('active'); 123 $(this).parent().parent().find('small').slideToggle(); 124 }); 125 126 $('.sc_cookie_notification .cookie-consent-button').on('click', function(){ 127 var buttonID = $(this).attr('id'); 128 if (buttonID == 'btn-accept-all') { 129 setConsent({ 130 necessary: true, 131 analytics: true, 132 preferences: true, 133 marketing: true 134 }); 135 } 136 else if (buttonID == 'btn-accept-some') { 137 setConsent({ 138 necessary: true, 139 analytics: document.getElementById('consent-analytics').checked, 140 preferences: document.getElementById('consent-preferences').checked, 141 marketing: document.getElementById('consent-marketing').checked 142 }); 143 } 144 else { 145 setConsent({ 146 necessary: false, 147 analytics: false, 148 preferences: false, 149 marketing: false 150 }); 151 } 152 }); 153 154 $('#manage-cookies-pref').on('click', function(e){ 155 e.preventDefault(); 156 if ($('#cookie-consent-banner .cookie-consent-options').length> 0) { 157 $('#cookie-consent-banner .cookie-consent-options').slideToggle(); 158 $('.cookie-default-view').slideToggle(); 159 } 160 }); 161 $('.sc_accept_all').on('click', function(){ 162 $('#btn-accept-all').trigger('click'); 163 }); 164 165 var notificarionContainer = $('.sc_cookie_notification'), 166 consentModeName = notificarionContainer.attr('data-cname'), 167 consentMode = localStorage.getItem(consentModeName); 168 if (consentMode == null || consentMode == undefined) { 169 setTimeout(function(){ 170 notificarionContainer.slideToggle(); 171 }, 2000); 172 } 173 else { 174 var expireName = 'expire_'+consentModeName, 175 expire = localStorage.getItem(expireName), 176 now = notificarionContainer.attr('data-now'); 177 if (now > expire) { 178 setTimeout(function(){ 179 notificarionContainer.slideToggle(); 180 }, 2000); 181 } 182 } 183 } 184 185 });
186})(jQuery); 187!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.Countdown=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ 188var defaultOptions = { 189 date: "June 7, 2087 15:03:25", 190 refresh: 1000, 191 offset: 0, 192 onEnd: function() { 193 return; 194 }, 195 render: function (date) { 196 this.el.innerHTML = date.years + " years, " + 197 date.days + " days, " + 198 this.leadingZeros(date.hours) + " hours, " + 199 this.leadingZeros(date.min) + " min and " + 200 this.leadingZeros(date.sec) + " sec"; 201 } 202}; 203 204/** 205 * Countdown constructor 206 * @param {HTMLElement} el DOM node of the countdown 207 * @param {Object} options (optional) Options for the plugin 208 */ 209var Countdown = function(el, options) { 210 211 /** 212 * Reference to the DOM element 213 * @type {HTMLElement} 214 */ 215 this.el = el; 216 217 /** 218 * Options of the countdown plugin 219 * @type {Object} 220 */ 221 this.options = {}; 222 223 /** 224 * Interval reference or false if counter is stopped 225 * @type {Mixed} 226 */ 227 this.interval = false; 228 229 // merge default options and options into this.options 230 this.mergeOptions = function(options) { 231 for (var i in defaultOptions) { 232 if (defaultOptions.hasOwnProperty(i)) { 233 this.options[i] = typeof options[i] !== 'undefined' ? options[i] : defaultOptions[i]; 234 235 if (i === 'date' && typeof this.options.date !== 'object') { 236 this.options.date = new Date(this.options.date); 237 } 238 239 // bind context for functions 240 if (typeof this.options[i] === 'function') { 241 this.options[i] = this.options[i].bind(this); 242 } 243 } 244 } 245 if (typeof this.options.date !== 'object') { 246 this.options.date = new Date(this.options.date); 247 } 248 }.bind(this); 249 250 this.mergeOptions(options); 251 252 253 /** 254 * Get the difference between now and the end date 255 * @return {Object} Object with the diff information (years, days, hours, min, sec, millisec) 256 */ 257 this.getDiffDate = function() { 258 var diff = (this.options.date.getTime() - Date.now() + this.options.offset) / 1000; 259 260 var dateData = { 261 years: 0, 262 days: 0, 263 hours: 0, 264 min: 0, 265 sec: 0, 266 millisec: 0 267 }; 268 269 if (diff <= 0) { 270 if (this.interval) { 271 this.stop(); 272 this.options.onEnd(); 273 } 274 return dateData; 275 } 276 277 if (diff >= (365.25 * 86400)) { 278 dateData.years = Math.floor(diff / (365.25 * 86400)); 279 diff -= dateData.years * 365.25 * 86400; 280 } 281 282 if (diff >= 86400) { 283 dateData.days = Math.floor(diff / 86400); 284 diff -= dateData.days * 86400; 285 } 286 287 if (diff >= 3600) { 288 dateData.hours = Math.floor(diff / 3600); 289 diff -= dateData.hours * 3600; 290 } 291 292 if (diff >= 60) { 293 dateData.min = Math.floor(diff / 60); 294 diff -= dateData.min * 60; 295 } 296 297 dateData.sec = Math.round(diff); 298 299 dateData.millisec = diff % 1 * 1000; 300 301 return dateData; 302 }.bind(this); 303 304 /** 305 * Add leading zeros to a number 306 * @param {Number} num Input number 307 * @param {Number} length Length of the desired output 308 * @return {String} String of the desired length with leading zeros 309 */ 310 this.leadingZeros = function(num, length) { 311 length = length || 2; 312 num = String(num); 313 if (num.length > length) { 314 return num; 315 } 316 return (Array(length + 1).join('0') + num).substr(-length); 317 }; 318 319 /** 320 * Update the end date of the countdown 321 * @param {Mixed} newDate Date object or a String/Number that can be passed to the Date constructor 322 * @return {Countdown} Countdown instance 323 */ 324 this.update = function(newDate) { 325 if (typeof newDate !== 'object') { 326 newDate = new Date(newDate); 327 } 328 this.options.date = newDate; 329 this.render(); 330 return this; 331 }.bind(this); 332 333 /** 334 * Stop the countdown refresh / rerender 335 * @return {Countdown} Countdown instance 336 */ 337 this.stop = function() { 338 if (this.interval) { 339 clearInterval(this.interval); 340 this.interval = false;
341 } 342 return this; 343 }.bind(this); 344 345 /** 346 * Render the countdown 347 * @return {Countdown} Countdown instance 348 */ 349 this.render = function() { 350 this.options.render(this.getDiffDate()); 351 return this; 352 }.bind(this); 353 354 /** 355 * Start the countdown 356 * @return {Countdown} Countdown instance 357 */ 358 this.start = function() { 359 // don't start if the countdown is already started 360 if (this.interval) { return; } 361 362 this.render(); 363 364 if (this.options.refresh) { 365 this.interval = setInterval(this.render, this.options.refresh); 366 } 367 368 return this; 369 }.bind(this); 370 371 /** 372 * Update the offset 373 * @param {Number} offset New offset in ms 374 * @return {Countdown} Countdown instance 375 */ 376 this.updateOffset = function(offset) { 377 this.options.offset = offset; 378 return this; 379 }.bind(this); 380 381 382 /** 383 * Restart the countdown and update options 384 */ 385 this.restart = function (options) { 386 this.mergeOptions(options); 387 this.interval = false; 388 this.start(); 389 return this; 390 }.bind(this); 391 392 393 // initial start of the countdown or initial render 394 this.start(); 395}; 396 397module.exports = Countdown; 398 399},{}]},{},[1])(1) 400}); 401/*-----------------------------------------*/�/*-----------------------------------------*/�/*---------- BASE MAIN JS FILE -----------*/�/*-----------------------------------------*/�/*-----------------------------------------*/��jQuery.noConflict();�(function( $ ) {� $(function() {�� jQuery(document).foundation();� //$(document).foundation();�� var wdata = [];� wdata.mobileWidth = 640;� wdata.debug = false;� wdata.afterLoad = false;� wdata.country = false;� wdata.variation_id = false;�� $(window).on('load', function(){� afterLoad();� });�� function afterLoad() {� updateWData();� equalizePstsLoop();� initDealersMap();� sliderBgMobile();� runsSliders();� setTimeout(function(){� initVariationsTitles();� }, 800);� checkForCountDown();� addedToCartPop();� wdata.afterLoad = true;� }�� setTimeout(function(){� if (wdata.afterLoad == false) {� afterLoad();� }� }, 3000);�� $(window).on('resize', function(){� updateWData();� equalizePstsLoop();� });�� $('#topMenu .fa-bars').on('click', function(){� $('#topMenu > ul').slideToggle();� });�� $('.button.woof_reset_search_form').on('click', function(){� window.location.href = woof_current_page_link;� });�� function sliderBgMobile(){� if ($('.fcl_slider').length>0 && $(window).width() < 640) {� $.each($('.fcl_slider .slide-bg'), function(){� var mobileBg = $(this).attr('data-mobile');� if (mobileBg != undefined && mobileBg != '') {� $(this).attr('style', 'background-image: url('+mobileBg+')');� }� });� }� }�� /* Run sliders */� function runsSliders() {� $('.top-slider').flexslider({� animation: "slide",� directionNav: true,� controlNav: false,� pauseOnAction: true,� pauseOnHover: true,� touch: true,� smoothHeight: true,� animationLoop: true,� prevText: "",� nextText: "",� // start: function(){topSlideBefore();},� // before: function(){topSlideBefore();},� slideshow: true� });�� $('.imgs').flexslider({� animation: "slide",� directionNav: true,� controlNav: false,� pauseOnAction: true,� pauseOnHover: true,� touch: true,� smoothHeight: true,� animationLoop: true,� prevText: "",� nextText: "",� slideshow: true� });� $('.testimonials-slider').flexslider({� animation: "slide",� directionNav: true,� controlNav: false,� pauseOnAction: true,� pauseOnHover: true,� touch: true,� smoothHeight: true,� animationLoop: true,� prevText: "",� nextText: "",� slideshow: true� });�� setTimeout(function(){� $(window).trigger('resize');� }, 1200);� }�� $('.scroll-action').on('click', function(){� scrollToEl('.fc-2', -75);� });
401�� function topSlideBefore() {� $('.top-slider .scontent-wrap').removeClass('animated').addClass('animate');� $('.top-slider .scontent-wrap').each(function(i, el) {� var el = $(el);� var animation = $(this).data('animation');� if (animation != 'none') {� // el.addClass('hidden');� setTimeout(function() {� el.removeClass('hidden').addClass(animation).removeClass('animate').addClass('animated');� }, 500);�� }� });� }�� function equalizePstsLoop(){� if ($('#blog .loop-post').length>0) {� $('#blog .loop-post .entry').attr('style', '');� var maxHeight = 0;� $.each($('.loop-post .entry'), function(){� var height = $(this).outerHeight();� if (height > maxHeight) {� maxHeight = height;� }� });� if (maxHeight != null && maxHeight != 0) {� $('#blog .loop-post .entry').height(maxHeight);� }� }� }�� //Scroll to el if page has Hash� if(window.location.hash) {� var hash = window.location.hash;� if ($(hash).length>0) {� scrollToEl(hash, 220);� }� }�� if(window.location.search) {� var search_q = window.location.search;� if (search_q.includes('swoof') && !(search_q.includes('pa_model'))) {� $('.woof_container_pa_year_1').hide();� $('.woof_container_pa_year_2').hide();� $('.woof_container_pa_year_3').hide();� $('.woof_container_pa_year_4').hide();� $('.woof_container_pa_year_5').hide();� }� else {�� }� }� else {� var href = window.location.href;� if (href.includes('/shop/')) {� $('.woof_container_pa_year_1').hide();� $('.woof_container_pa_year_2').hide();� $('.woof_container_pa_year_3').hide();� $('.woof_container_pa_year_4').hide();� $('.woof_container_pa_year_5').hide();� }� }�� //function scroll to element� function scrollToEl(target, offset) {� var $target = $(target);� $("html, body").animate({ scrollTop: $target.offset().top - (offset + 70)}, 1000);� }�� function updateWData() {� wdata.ww = getWindowWidth();� wdata.wh = getWindowHeight();� wdata.scroll = $(window).scrollTop();�� if (wdata.debug == true) {� console.info('updateWData');� console.log(wdata);� }� }�� //window height� function getWindowHeight() {� return $( window ).height();� }�� //window width� function getWindowWidth() {� return $( window ).width();� }�� //validate Phone� function validatePhone(phone) {� var re = /^((\+[1-9]{1,4}[ \-]*)|(\([0-9]{2,3}\)[ \-]*)|([0-9]{2,4})[ \-]*)*?[0-9]{3,4}?[ \-]*[0-9]{3,4}?$/;� return re.test(phone);� }�� //validate Email� function validateEmail(email) {� var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;� return re.test(email);� }� $(".searchArea").click(function(){� $("#searchbox").slideDown();� });�� $(document).mouseup(function (e) {� var container = $("#searchbox");� if (!container.is(e.target)� && container.has(e.target).length === 0) {� container.fadeOut();� }� });�� //Check if DOM has MAP� if($('.markers-list').length>0) {� initMap();� }�� function get_markers_list() {� var markers = [];� $('.markers-list li').each(function() {� var lat = $(this).data('lat'),� lgn = $(this).data('lan'),� title = $(this).data('title'),� address = $(this).data('address');� var ln = [lat, lgn, title, address];� markers.push(ln);� //console.log(ln);� });� return markers;� }�� function initDealersMap(){� if ($('#dealer-map').length>0) {� var theZoom = parseInt($('#dealer-map').attr('data-zoom')),� theLat = $('#dealer-map').attr('data-lat'),� theLng = $('#dealer-map').attr('data-lng'),� ww = getWindowWidth(),� latLng = new google.maps.LatLng(theLat, theLng);�� var $mapDiv = $('#dealer-map');�� if (ww < 640) {� var mapHeight = getWindowHeight()/2;� var mapOptions = {� center: latLng,� zoom: theZoom,� mapTypeId: google.maps.MapTypeId.ROADMAP,� draggable: true,� scrollwheel: false,� panControl: true,� zoomControl: true,� mapTypeControl: true,� scaleControl: true,� streetViewControl: true,� overviewMapControl: true,� gestureHandling: "cooperative",� };� }� else {� var mapHeight = getWindowHeight() - 245;� var mapOptions = {� center: latLng,� zoom: theZoom,� mapTypeId: google.maps.MapTypeId.ROADMAP,� scrollwheel: true,� panControl: true,� zoomControl: true,� mapTypeControl: true,� scaleControl: true,� streetViewControl: true,� overviewMapControl: false,� gestureHandling: "greedy",� };� }�� var map = new google.maps.Map(document.getElementById("dealer-map"),� mapOptions);�� //set map height to half window height� if (mapHeight<400) {� mapHeight = 400;� }� $mapDiv.height(mapHeight);�� var image = $('#dealer-map').attr('data-icon'),� myIcon = new google.maps.MarkerImage(image, null, null, null, new google.maps.Size(50,60));�� var marker = new google.maps.Marker({� position: latLng,� map: map,� title: $('#dealer-map').attr('data-title'),� icon: myIcon� });� }�� if ($('#dealers-map').length>0) {� var markers = markers,� theZoom = parseInt($('#dealers-map').attr('data-zoom')),� theLat = $('#dealers-map').attr('data-lat'),� theLng = $('#dealers-map').attr('data-lng'),� ww = getWindowWidth(),� latLng = new google.maps.LatLng(theLat, theLng);� console.log(theLng);�� var $mapDiv = $('#dealers-map');�� if (ww < 640) {� var mapHeight = getWindowHeight()/2;� var mapOptions = {� center: latLng,� zoom: theZoom,� mapTypeId: google.maps.MapTypeId.ROADMAP,� draggable: true,� scrollwheel: false,� panControl: true,� zoomControl: true,� mapTypeControl: true,� scaleControl: true,� streetViewControl: true,� overviewMapControl: true,� gestureHandling: "cooperative",� };� }� else {� var mapHeight = getWindowHeight() - 245;� var mapOptions = {� center: latLng,� zoom: theZoom,� mapTypeId: google.maps.MapTypeId.ROADMAP,� scrollwheel: true,� panControl: true,� zoomControl: true,� mapTypeControl: true,� scaleControl: true,� streetViewControl: true,� overviewMapControl: false,� gestureHandling: "greedy",� };� }�� var map = new google.maps.Map(document.getElementById("dealers-map"),� mapOptions);�� //set map height to half window height� if (mapHeight<400) {� mapHeight = 400;� }� $mapDiv.height(mapHeight);�� var image = $('#dealers-map').attr('data-icon'),� myIcon = new google.maps.MarkerImage(image, null, null, null, new google.maps.Size(50,60));�� if (window.markers != undefined) {� $.each(window.markers, function(k,v) {� var infowindow = new google.maps.InfoWindow({� content: v.content,� });� var marker = new google.maps.Marker({� position: new google.maps.LatLng(v.lat, v.lng),� map: map,� title: v.title,� icon: myIcon� });� marker.addListener("click", function() {� infowindow.open({� anchor: marker,� map: map,� shouldFocus: false,� });� });� });
401� // marker.setMap(map);� }� }� }��� //init MAP with custom settings� function initMap() {� var markers = get_markers_list(),� theZoom = parseInt($('#map').attr('data-zoom')),� theLat = $('#map').data('center-lat'),� theLng = $('#map').data('center-lan'),� ww = getWindowWidth(),� latLng = new google.maps.LatLng(theLat, theLng);� console.log(theLng);��� var $mapDiv= $('#map');�� if (ww < 640) {� var mapHeight = getWindowHeight()/2;� var mapOptions = {� center: latLng,� zoom: theZoom,� mapTypeId: google.maps.MapTypeId.ROADMAP,� draggable: true,� scrollwheel: false,� panControl: true,� zoomControl: true,� mapTypeControl: true,� scaleControl: true,� streetViewControl: true,� overviewMapControl: true,� gestureHandling: "cooperative",� };� }� else {� var overlayH = $('#map-overlay').outerHeight();� var mapHeight = getWindowHeight()/2;�� if (overlayH > mapHeight) {� mapHeight = overlayH+80;� }� var mapOptions = {� center: latLng,� zoom: theZoom,� mapTypeId: google.maps.MapTypeId.ROADMAP,� scrollwheel: true,� panControl: true,� zoomControl: true,� mapTypeControl: true,� scaleControl: true,� streetViewControl: true,� overviewMapControl: false,� gestureHandling: "greedy",� };�� }�� var map = new google.maps.Map(document.getElementById("map"),� mapOptions);�� //set map height to half window height� if (mapHeight<400) {� mapHeight = 400;� }�� $mapDiv.height(mapHeight);�� //var image = $mapDiv.data('marker');�� //var myIcon = new google.maps.MarkerImage(image, null, null, null, new google.maps.Size(167,64));�� for (i = 0; i < markers.length; i++) {� var lat = markers[i][0];� var lan = markers[i][1];� //if (ifdebug()){console.log('working with: '+markers[i][0]);}� marker = new google.maps.Marker({� position: new google.maps.LatLng(lat, lan),� map: map,� title: markers[i][2]+' ('+markers[i][3]+')'� //icon: myIcon� });� }�� marker.setMap(map);� }��� /*� if($('#distriPage').length > 0){� var hasProp={}.hasOwnProperty;!function(t){return t.fn.extend({scrollprevent:function(e){var o,s,n,r,i,a,l,c,p,d,u,v,g,h,w,m,f,b,y;if(l={"class":{wrap:"mapscroll-wrap",overlay:"mapscroll-overlay",progress:"mapscroll-progress",button:"mapscroll-button",icon:"mapscroll-icon"},pressDuration:650,overlay:{iconLocked:'<svg class="mapscroll-icon-locked" xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 1792 1792" > <path transform="translate(1)" d="M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z" /> </svg>',iconUnloking:'<svg class="mapscroll-icon-unlocking" xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 1792 1792"> <path transform="translate(1)" d="M1376 768q40 0 68 28t28 68v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-320q0-185 131.5-316.5t316.5-131.5 316.5 131.5 131.5 316.5q0 26-19 45t-45 19h-64q-26 0-45-19t-19-45q0-106-75-181t-181-75-181 75-75 181v320h736z" /> </svg>',iconUnlocked:'<svg class="mapscroll-icon-unlocked" xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 1792 1792"> <path transform="translate(1)" d="M1728 576v256q0 26-19 45t-45 19h-64q-26 0-45-19t-19-45v-256q0-106-75-181t-181-75-181 75-75 181v192h96q40 0 68 28t28 68v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h672v-192q0-185 131.5-316.5t316.5-131.5 316.5 131.5 131.5 316.5z" /> </svg>'},onMapLock:function(){},onMapUnlock:function(){},printLog:!1},v=t.extend(!0,l,e),i=t(this),o=function(t){var e,o;return v.printLog&&window.console&&window.console.log?(e=new Date,o=e.getHours()+":"+e.getMinutes()+":"+e.getSeconds(),console.log("mapScrollPrevent ["+o+"] : "+t)):void 0},i.length){o(i.length+" iFrames detected."),u="/!* --- mapScrollPrevent.js CSS Classes --- *!/ ."+v["class"].overlay+" { position: absolute; overflow:hidden; cursor: pointer; text-align: center; background-color: rgba(0, 0, 0, 0); } ."+v["class"].button+" { text-rendering: optimizeLegibility; font-family: Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; padding-top: 15px; padding-bottom: 15px; width: 55px; position: absolute; right: 43px; bottom: 29px; border-color: rgba(0, 0, 0, 0.3); color: rgba(58, 132, 223, 0); background-color: rgba(255, 255, 255, 1); color: rgb(58, 132, 223); border-top-right-radius: 2px; border-top-left-radius: 2px; box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px; } ."+v["class"].icon+" { position: relative; z-index: 1; fill: rgba(58, 132, 223, 1); } ."+v["class"].progress+" { position: absolute; top: 0; bottom: 0; left: 0; width: 0%; display: block; background-color: rgba(58, 132, 223, 0.4); } ."+v["class"].wrap+" { position: relative; text-align: center; display: inline-block; } ."+v["class"].wrap+" iframe { position: relative; top: 0; left: 0; } ."+v["class"].overlay+", ."+v["class"].button+", ."+v["class"].icon+" { transition: all .3s ease-in-out; } ."+v["class"].progress+" { transition: width "+v.pressDuration/1e3+"s linear; }",w=v.overlay;for(c in w)hasProp.call(w,c)&&(f=w[c],t(""+f).find("svg")?(o("SVG Icons foun
401ded... Replacing classes."),v.overlay[""+c]=t(""+f).attr("class",v["class"].icon+" "+t(""+f).attr("class")).prop("outerHTML")):(v.overlay[""+c]=l.overlay[""+c],o("Invalid Icons founded... Replacing with defaults.")));return g=t('<div class="'+v["class"].overlay+'"></div>'),r=t('<div class="'+v["class"].button+'"> <div class="'+v["class"].progress+'"> </div> '+v.overlay.iconLocked+" </div>"),y=t('<div class="'+v["class"].wrap+'"></div>'),s=function(){return t("head").append('<style rel="stylesheet" type="text/css"> '+u+"</style>"),o("Plugin css applied.")},b=function(){return i.closest("."+v["class"].wrap).is("div")||(i.wrap(y),o("Iframe isn't wraped.")),y=i.closest("."+v["class"].wrap).append(r).append(g),g=y.children("."+v["class"].overlay),r=y.children("."+v["class"].button),a(),o("Iframe now wraped.")},a=function(){return g.height(i.height()).width(i.width()).css({top:i.position().top,left:i.position().left}),o("Overlay positioned.")},h=function(e){var s,n;switch(null==e&&(e="enable"),n=r.find("."+v["class"].progress),s=r.find("."+v["class"].icon),e){case"enable":return s.replaceWith(""+v.overlay.iconUnloking),n.css({width:"100%"}),o("Enabling Map.");case"disable":return i.css({"pointer-events":"none"}),s.replaceWith(t(""+v.overlay.iconLocked)),n.css({width:"0%"}),g.show(),v.onMapLock(),o("Disabling Map.");case"unlocked":return i.css({"pointer-events":"auto"}),s.replaceWith(""+v.overlay.iconUnlocked),n.css({width:"100%"}),g.hide(),v.onMapUnlock(),o("Map Enabled.")}},m=function(){var t;return h(t="unlocked"),clearTimeout(this.timeOut)},p=function(){return this.mouseDownTime=t.now(),this.timeOut=setTimeout(m,v.pressDuration),h(),o("LongPress Started.")},d=function(){var e;return this.mouseUpTime=t.now()-this.mouseDownTime,clearTimeout(this.timeOut),h(this.mouseUpTime<v.pressDuration?e="disable":e="unlocked"),o(this.mouseUpTime/1e3+"s Pressed. "),o("LongPress Stopped.")},n=function(){return t(window).bind("resize",a),i.bind("resize",a),y.bind("mousedown touchstart",p).bind("mouseup touchend",d),o("Events bounded.")},{start:function(){return o("Starting plugin..."),i.find(""+v["class"].wrap)?(s(),b(),n(),o("Plugin Started.")):(console.log(i.find(""+v["class"].wrap)),o("Already Started."))},stop:function(){return o("Stopping plugin..."),i.removeAttr("style"),i.parent().is("."+v["class"].wrap)&&i.unwrap(),t("."+v["class"].overlay).remove(),o("Plugin Stopped.")}}}return o('No Iframes detected. Try changing your "selector."')}})}(jQuery);� $(function() {� var googleMapSelector = "iframe[src*=\"google.com/maps\"]";� $(googleMapSelector).scrollprevent().start();� });� };*/��� $('.makes').on('change', function (e) {� var optionSelected = $("option:selected", this);� var valueSelected = this.value;� window.location.href = valueSelected;� });�� $('#model-selector').on('change', function (e) {� var optionSelected = $("option:selected", this);� var valueSelected = this.value;� window.location.href = valueSelected;� });�� $('.sc-filter-close').on('click', function(e){� $('.sc-filter-toggle').trigger('click');� });�� $('.sc-filter-toggle').on('click', function(e){� $('.wc-wrap .sidebar').toggleClass('active');� });��� if ( $(window).width() <= 1200) {� $( "nav .fa-bars" ).click(function() {� $( "nav ul" ).slideToggle( "slow" );� });� }��/* if($('body.single-product div.product form.cart .variations fieldset').length > 0){� if ($('.product_cat-eazi-grip .entry-summary').length>0) {�� $( "body.single-product div.product form.cart .variations fieldset label[data-style='evo']" ).append( "<small>Ultimate grip level combined with maximum feel</small>" );� $( "body.single-product div.product form.cart .variations fieldset label[data-style='pro']" ).append( "<small>Textured surface for unrivaled rider movement</small>" );� $( "body.single-product div.product form.cart .variations fieldset label[data-style='silicone']" ).append( "<small>Cushion feel for Grand Touring and Commuting</small>" );� $( "body.single-product div.product form.cart .variations fieldset label[data-style='ppf']" ).append( "<small>Clear anti-scratch paint protection film for the sides of the tank</small>" );�� /!*� $( "body.single-product div.product form.cart .variations fieldset label[for='0-style']" ).append( "<small>Ultimate grip level combined with maximum feel</small>" );� $( "body.single-product div.product form.cart .variations fieldset label[for='1-style']" ).append( "<small>Textured surface for unrivaled rider movement</small>" );� $( "body.single-product div.product form.cart .variations fieldset label[for='2-style']" ).append( "<small>Cushion feel for Grand Touring and Commuting</small>" );� *!/� }� }*/���/* if ($('.value.loop-2').length>0) {� $('.value.loop-2').hide();� $('.value.loop-1 input').on('change, click', function() {� $('.value.loop-2').show();� });��� $('.value input').on('change', function(e) {� e.preventDefault();� var loop2Val = $( ".loop-2 input:checked").val(),� loopVal = $( ".loop-1 input:checked").val(),� loop2Name = $( ".loop-2 input:checked").attr('name'),� loopName = $( ".loop-1 input:checked").attr('name');�� if (loop2Val != undefined && loopVal != undefined) {� var varData = $('form.variations_form').data('product_variations');� $(varData).each( function(index, value ) {� var loop = value.attributes[loopName],� loopl = loop.toLowerCase(),� loopend = loopl.replace(" ", "-");� loop2 = value.attributes[loop2Name],� loop2l = loop2.toLowerCase(),� loop2end = loop2l.replace(" ", "-");�� if (loopend == loopVal) {� var price = value.display_price,� priceString = price.toString(),� priceArr = priceString.split(".");� if (priceArr[1].length==1) {� price = price+'0';� }� else if (priceArr[1].length==0) {� price = price+'.00';� }� $('input[value='+loop2end+'] ~ label .amount').html('£'+price);� }�� if (loopend == loopVal && loop2end == loop2Val) {� var price = value.display_price,� priceString = price.toString(),� variation = value.variation_id;� var priceArr = priceString.split(".");� if (priceArr[1].length==1) {� price = price+'0';� }�� else if (priceArr[1].length==0) {� price = price+'.00';� }�� $('.price-amount').html(price);� //$('input[name=variation_id]').val(variation).html(variation);� setTimeout(function(){� $('input[name=variation_id]').val(variation);� }, 500);� }� }� );� }� });� }*/�� function checkForCountDown(){� if ($('#sc_countdown').length >0) {� var endTime = $('#sc_countdown').attr('date-end');� Countdown($('#sc_countdown'), {� date: endTime,� render: function(data) {� $(this.el).html("<div><div>" + this.leadingZeros(data.hours, 2) + " <span>hrs</span></div><div>" + this.leadingZeros(data.min, 2) + " <span>min</span></div><div>" + this.leadingZeros(data.sec, 2) + " <span>sec</span></div>");� },� onEnd: function() {� $(this.el).parent().remove();� }� });� }� }�� $('.open-pop').on('click', function(e){� e.preventDefault();� var link = $(this).attr('href');� var windowWidth = $(window).width(),� width = windowWidth * 0.8,� height = width * 0.5625,� html = '<div class="pop-vid" style="background: transparent;">';� html = html + '<iframe src="'+link+'" frameborder="0" allow="autoplay; fullscreen" allowfullscreen="" style="width: '+width+'px; height: '+height+'px;"></iframe>';� html = html + '</div>';� $.fancybox.open(html);� });�� // Dealer functionality�� /* Array to JSON */� function encodeJSON(fields) {� var jsonLine = JSON.stringify(fields);� return jsonLine;� }�� /* JSON to array */� function decodeJSON(string) {� var array = jQuery.parseJSON(string);� return array;� }� function addCountryClass(){� $.getJSON('//ipapi.co/json/', function(data) {� if ( typeof(data['country_code']) == 'undefined' ) {� return false;� }� else {� wdata.country = data;� var code = data['country_code'],� clodeLower = code.toLowerCase();�� $('body').addClass('country-'+clodeLower);� if ($('.country-selection').length>0) {� $('.country-selection').addClass(clodeLower);� }�� if ($('#cselect input[name=country]').val() == '') {� $('#cselect input[name=country]').val(data['country_name']);� }� }� });� }�� function popCountrySelect(){� var windowWidth = $(window).width(),� width = windowWidth * 0.8,� height = width * 0.5625,� url = $('.country-selection').attr('data-search'),� country = '',� html = '<div class="cselect text-center" id="cselect">';�� html = html + '<form action="'+url+'" method="get">';� html = html + '<h3>Enter your Country</h3>';� html = html + '';� html = html + '';� html = html + '<label>';� html = html + '<input type="text" name="country" class="autoc" placeholder="Country" value="">';� html = html + '<div class="detect-country" title="Detect Country"><span class="ic locate"></span></div>';� html = html + '</label>';� html = html + '<button class="button" type="submit">Find a Dealer</button>';�� html = html + '';� html = html + '';� html = html + '</form>';� html = html + '</div>';� $.fancybox.open(html);�� $('.detect-country').on('click', function(){� detectLocation();� });� setTimeout(setupAutoComplete, 800);� }�� $('.detect-country').on('click', function(){� detectLocation();� });�� function detectLocation(){� if (wdata.country == false) {� $.getJSON('//ipapi.co/json/', function(data) {� if ( typeof(data['country_code']) == 'undefined' ) {� return false;� }� else {� wdata.country = data;� var code = data['country_code'],� clodeLower = code.toLowerCase();�� $('body').addClass('country-'+clodeLower);�� if ($('#cselect').length>0) {� if ($('#cselect input[name=country]').val() == '') {� $('#cselect input[name=country]').val(data['country_name']);� }� }� if ($('#ds').length>0) {� $('#ds input[name=country]').val(data['country_name']);� if ($('#ds input[name=country]').val() == '') {�� }� }� }� });� }� else {� if ($('#cselect').length>0) {� $('#cselect input[name=country]').val(wdata.country.country_name);� }� if ($('#ds').length>0) {� $('#ds input[name=country]').val(wdata.country.country_name);� }� }� }�� $('.country-selection button').on('click', function(){� popCountrySelect();� });�� if ($('#ds').length>0) {� setupAutoComplete();� }�� function setupAutoComplete(){� if ($('input.autoc').length>0) {� $.each($('input.autoc'), function(){� var name = $(this).attr('name');� if (name != undefined && name != '') {� getComplete(name).then(function(data){� var val
401idOptions = decodeJSON(data);� $('input.autoc[name='+name+']').autocomplete({� autoFocus: true,� source: validOptions� }).keyup(function() {� var isValid = false;� for (i in validOptions) {� if (validOptions[i].toLowerCase().match(this.value.toLowerCase())) {� isValid = true;� }� }� if (!isValid) {� this.value = previousValue� } else {� previousValue = this.value;� }� });�� })� }� });� }� }�� function getComplete(name) {� return new Promise(function (resolve, reject) {� $.ajax({� url: ajax_url,� type: 'GET',� data: {� 'action': 'sc_countries',� 'tax': name,� },� success: function (data) {� resolve(data)� },� error: function (error) {� reject(error)� },� })� })� }�� $('.dl-back').on('click', function(){� window.history.back();� });�� if (window['shippingCountry'] != undefined) {� if (window['shippingCountry'] != 'GB') {� openShippingNotification();� }� }�� $( document.body ).on('updated_shipping_method', function(e){� if (window['shippingCountry'] != undefined) {� if (window['shippingCountry'] != 'GB') {� openShippingNotification();� }� }� });�� $( document.body ).on('updated_checkout', function(e){� if ($('#billing_country').val() != 'GB') {� openShippingNotification();� }� });�� $( document ).on('submit','form.woocommerce-shipping-calculator', function(){� var shippingCountry = $('#calc_shipping_country').val();� if (shippingCountry != '' && shippingCountry != 'GB') {� setTimeout(openShippingNotification, 800);� }� });�� function openShippingNotification(){� $('.wc-proceed-to-checkout a.button').addClass('disabled');� $('button#place_order').addClass('disabled');� $('#shipping-pop').foundation('open');� }�� $('#shipping-msg-ok').on('change', function(){� $('.button.close-pop').toggleClass('disabled');� });�� $('.shipping-pop-content .button.close-pop').on('click', function(){� if (!$(this).hasClass('disabled')) {� closeShippingNotification();� }� });�� function closeShippingNotification(){� $('.wc-proceed-to-checkout a.button').removeClass('disabled');� $('button#place_order').removeClass('disabled');� $('#shipping-pop').foundation('close');� }�� function initVariationsTitles() {� $('.qtyLabel').remove();� $('.variations_button').prepend('<div class="qtyLabel">Quantity:</div>');�� $('.variations_form input[name=variation_id]').on('change', function(e){� onVariationChanged();� });�� $('.imp-wrap input').on('change', function(){� var name = $(this).attr('name'),� val = $('input[name='+name+']').val();� //console.log(name + ' => '+ val);� var variationsData = decodeJSON($('form.variations_form').attr('data-product_variations'));� $.each(variationsData, function(k,v) {� var attributes = v.attributes;� $.each(attributes, function(att, attv) {� if (att == name && attv.toLowerCase() == val) {� $('.entry-summary input[name=variation_id]').val(v.variation_id);� wdata.variation_id = v.variation_id;� }� });� });� });�� function onVariationChanged(){� var variation_id = $('.entry-summary input[name=variation_id]').val();� if (variation_id == '' || variation_id == undefined) {� if (wdata.variation_id != false) {� variation_id = wdata.variation_id;� }� }� // console.log('change '+variation_id);� if (variation_id == '' || variation_id == undefined) {� $('#variation-desc').html(wdata.default.description);� $('#sc-product-price').html(wdata.default.price);� }� else {� var variationsData = decodeJSON($('form.variations_form').attr('data-product_variations'));� // console.log(variation_id);� $.each(variationsData, function(k, v) {� //console.log(v);� if (v.variation_id == variation_id) {� $('meta[itemprop="price"]').attr('content', v.display_price);� wdata.variation_id = v.variation_id;� //console.log(v);� // Description� if (v.variation_description != '' && v.variation_description != undefined) {� $('#variation-desc').html(v.variation_description);� }� else {� $('#variation-desc').html(wdata.default.description);� }� //Price� if (v.price_html != '' && v.price_html != undefined) {� $('#sc-product-price').html(v.price_html);� }� else {� $('#sc-product-price').html(wdata.default.price);� }� //Extra variation image� if (v.desc_img != '' && v.desc_img != undefined) {� $('#variation-desc').prepend('<img src="'+v.desc_img+'" class="desc-img">');� }� }�� });� }� }�� if ($('.variations_form').length>0) {� var defaults = [];� defaults.description = $('#variation-desc').html();� defaults.price = $('#sc-product-price').html();� wdata.default = defaults;� if ($('.entry-summary input[name=variation_id]').val() != '') {� $('.variations_form').trigger('change');� }� }� preselectVariation();� }�� function preselectVariation() {� var loadParams = searchParams(window.location.href);� if (!$.isEmptyObject(loadParams)) {� $.each(loadParams, function(k,v){� if (k == 'attribute_style') {� var label_key = 'style-'+v.toLowerCase();� $('label[for='+label_key+']').trigger('click');� }� });� $('input[name="attribute_style"]').trigger('change');� }� }�� function searchParams(url) {� var params = {};� var parser = document.createElement('a');� parser.href = url;� var query = parser.search.substring(1);� var vars = query.split('&');� for (var i = 0; i < vars.length; i++) {� var pair = vars[i].split('=');� if (pair[0] != '' && pair[0] != undefined) {� params[pair[0]] = decodeURIComponent(pair[1]);� }� }� return params;� };�� function addedToCartPop(){� if ($('#after-add-to-cart').length>0) {� setTimeout(function(){� if (wdata.ww > 920) {� $('.pr-slider').flexslider({� animation: "slide",� directionNav: true,� controlNav: false,� pauseOnAction: true,� pauseOnHover: true,� touch: true,� smoothHeight: true,� animationLoop: true,� prevText: "",� itemWidth: 424,� nextText: "",� slideshow: true� });� }� else {� $('.pr-slider').flexslider({� animation: "slide",� directionNav: true,� controlNav: false,� pauseOnAction: true,� pauseOnHover: true,� touch: true,� smoothHeight: true,� animationLoop: true,� prevText: "",� nextText: "",� slideshow: true� });� }��� jQuery('#after-add-to-cart').foundation('open');� }, 300);� }� }�� $( document.body ).on('wc_fragments_loaded', function(){� setTimeout(function(){� var newPrice = $('.widget_shopping_cart_content .woocommerce-mini-cart__total > .woocommerce-Price-amount').html();� $('.cart-container > a .amount > .woocommerce-Price-amount').html(newPrice);� }, 100);� } );�� $('form.variations_form').attr('action', window.location.pathname);�� });�})(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.