1 2$(document).ready(function () { 3 4 let galleryTop = new Swiper('#swiper-container-big', { 5 pagination: { 6 el: '.swiper-pagination', 7 clickable: true, 8 }, 9 navigation: { 10 nextEl: '.swiper-button-next', 11 prevEl: '.swiper-button-prev', 12 }, 13 }); 14 15 let galleryThumbs = new Swiper('#swiper-container-small', { 16 slidesPerView: 4, 17 spaceBetween: 15, 18 pagination: { 19 el: '.swiper-pagination', 20 type: 'progressbar', 21 }, 22 on: { 23 click:function () { 24 /* do something */ 25 galleryTop.slideTo(galleryThumbs.clickedIndex,1000, true); 26 27 }, 28 }, 29 30 breakpoints: { 31 // when window width is <= 320px 32 320: { 33 slidesPerView: 1, 34 spaceBetween: 10 35 }, 36 // when window width is <= 480px 37 480: { 38 slidesPerView: 3, 39 spaceBetween: 10 40 }, 41 } 42 }); 43 44 iniSimilarCar(); 45 46 $("#rememberVehicle").on("click", function(){ 47 48 let vehicle = $(this).attr('data-vehicle-id'); 49 let action = $(this).attr("data-action-notice"); 50 let url = "/_mobile/rememberVehicle.ajax"; 51 let that = $(this); 52 let data = { 53 "action":action, 54 "vehicleId":vehicle, 55 "cl": "rememberVehicle", 56 "type": "ajax" 57 }; 58 $.ajax({ 59 type: "POST", 60 url: url, 61 data: data, 62 success: function(data) 63 { 64 65 if(data != 'error'){ 66 if(action == 'removeVehicle'){ 67 68 that.attr("data-action-notice","addVehicle"); 69 that.html("<i class=\"fa fa-heart-o fa-fw\" aria-hidden=\"true\"></i>Fahrzeug merken"); 70 } 71 if(action == 'addVehicle'){ 72 that.attr("data-action-notice","removeVehicle"); 73 that.html("<i class=\"fa fa-heart fa-fw\" aria-hidden=\"true\"></i> von der Merkliste nehmen"); 74 } 75 76 updateNoticeListCount (); 77 } else { 78 alert(data); 79 } 80 } 81 }); 82 83 return false; 84 }); 85 86 $("#contact_form").submit(function() { 87 let url = "/_mobile/contact.php"; // the script where you handle the form input. 88 $.ajax({ 89 type: "POST", 90 url: url, 91 data: $("#contact_form").serialize(), // serializes the form's elements. 92 success: function(data) 93 { 94 95 if (data == "ok") { 96 $('#contact_form')[0].reset(); 97 alert("Ihre Nachricht wurde erfolgreich an uns versandt!"); 98 } else if (data == "error") { 99 alert("Ihre Nachricht konnte leider nicht zugestellt werden. Bitte kontaktieren sie uns telefonisch!"); 100 } else { 101 alert("Unbekannter Fehler: " + data); 102 } 103 } 104 }); 105 return false; // avoid to execute the actual submit of the form. 106 }); 107 108}); 109 110$("#request_vehicle").submit(function() { 111 112 let url = "/_mobile/sendMails.ajax"; 113 114 $.ajax({ 115 type: "POST", 116 url: url, 117 data: $("#request_vehicle").serialize(), // serializes the form's elements. 118 success: function(data) 119 { 120 if ($.trim(data) == "MessageOK") { 121 $('#request_vehicle')[0].reset(); 122 $("#kg-form-messages").empty(); 123 let message = '<div class="alert alert-success mt-3 message-was-send" role="alert">Ihre Nachricht wurde erfolgreich an uns versandt!</div>'; 124 $("#kg-form-messages").append(message); 125 126 } else if ($.trim(data) == "error") { 127 let message = '<div class="alert alert-danger mt-3" role="alert">Ihre Nachricht konnte leider nicht zugestellt werden. Bitte kontaktieren sie uns telefonisch!</div>'; 128 $("#kg-form-messages").append(message); 129 } else { 130 let message = '<div class="alert alert-danger mt-3" role="alert">Bitte Angaben vervollständigen: ' +data+ '</div>'; 131 $("#kg-form-messages").append(message); 132 } 133 } 134 }); 135 136 return false; // avoid to execute the actual submit of the form. 137}); 138 139// Recall request 140$("#call_req_vehicle").submit(function() { 141 142 let url = "/_mobile/sendMailsRecall.ajax"; 143 144 $.ajax({ 145 type: "POST", 146 url: url, 147 data: $("#call_req_vehicle").serialize(), // serializes the form's elements. 148 success: function(data) 149 { 150 if ($.trim(data) == "MessageOK") { 151 $('#call_req_vehicle')[0].reset(); 152 $("#kg-form-messages_call_req").empty(); 153 let message = '<div class="alert alert-success mt-3 message-was-send" role="alert">Ihre Nachricht wurde erfolgreich an uns versandt!</div>'; 154 $("#call_req_vehicle").append(message); 155 156 } else if ($.trim(data) == "error") { 157 let message = '<div class="alert alert-danger mt-3" role="alert">Ihre Nachricht konnte leider nicht zugestellt werden. Bitte kontaktieren sie uns telefonisch!</div>'; 158 $("#call_req_vehicle").append(message); 159 } else { 160 let message = '<div class="alert alert-danger mt-3" role="alert">Bitte Angaben vervollständigen: ' +data+ '</div>'; 161 $("#call_req_vehicle").append(message); 162 } 163 } 164 }); 165 166 return false; // avoid to execute the actual submit of the form. 167}); 168 169/** 170 * send vehicle infos via mail 171 */ 172 173if($("#mailShareVehicle").length){ 174 175 $("#sedVcIno").submit(function() { 176
177 let url = "/_mobile/sendMailVehicleInfo.ajax"; 178 let data = $("#ads_id").val(); 179 180 181 $.ajax({ 182 type: "POST", 183 url: url, 184 data: {ads_id: $("#iVehicleId").val(),mail: $("#inputMailVehicle").val(), sendFrom: $("#sendFrom").val(), sendServer: $("#sendServer").val(), locationId: $("#locationId").val()}, // serializes the form's elements. 185 success: function(data) 186 { 187 if (data == "MessageOK") { 188 $('#sedVcIno')[0].reset(); 189 alert("Ihre Nachricht wurde erfolgreich verschickt!"); 190 } else if (data == "error") { 191 alert("Ihre Nachricht konnte leider nicht zugestellt werden. Bitte kontaktieren sie uns telefonisch!"); 192 } else { 193 alert("Unbekannter Fehler: " + data); 194 } 195 } 196 }); 197 198 return false; 199 200 }); 201} 202 203if($("#kg-price-counter").length){ 204 205 let tst = $("#kg-price-counter").data("promotion-end"); 206 const countDownDate = new Date(""+tst).getTime(); 207 208 // Update the count down every 1 second 209 let x = setInterval(function() { 210 const now = new Date().getTime(); 211 const distance = countDownDate - now; 212 213 // Time calculations for days, hours, minutes and seconds 214 let days = Math.floor(distance / (1000 * 60 * 60 * 24)); 215 let hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 216 let minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 217 let seconds = Math.floor((distance % (1000 * 60)) / 1000); 218 219 // Output the result in an element with id="kg-price-counter" 220 document.getElementById("kg-price-counter").innerHTML = days + "<small>T.</small> " + hours + "<small>Std.</small> "+ minutes + "<small>Min.</small> " + seconds + "<small>Sek.</small> "; 221 222 // If the count down is over, write some text 223 if (distance < 0) { 224 clearInterval(x); 225 document.getElementById("kg-price-counter").innerHTML = "Abgelaufen"; 226 } 227 }, 1000); 228} 229 230/** 231 * print Actions for HTML Print 232 */ 233window.onbeforeprint = function() { 234 $('.messagecontrol').css("display", "none"); 235 $('.messagecontrol2').css("display", "none"); 236 $('#myBtn').css("display", "none"); 237 $('#au-chat-popup-container').css("display", "none"); 238 $('.grecaptcha-badge').css("display", "none"); 239}; 240 241 242window.onafterprint = function() { 243 $('.messagecontrol').css("display", "block"); 244 $('.messagecontrol2').css("display", "block"); 245 $('#myBtn').css("display", "block"); 246 $('#au-chat-popup-container').css("display", "block"); 247 $('.grecaptcha-badge').css("display", "block"); 248}; 249 250 251/** 252 * collapse 253 */ 254 255if($("#recalculate-rate").length){ 256 257 $( document ).on( "click", "#recalculate-rate", function(e) { 258 e.preventDefault(); 259 $("#financingCalculator").collapse('show'); 260 scrollToAnchor('financingCalculator',175); 261 }); 262} 263 264if($("#btn-financing-example").length){ 265 266 if($("#financingCalculator").length) { 267 $(document).on("click", "#btn-financing-example", function (e) { 268 e.preventDefault() 269 $("#financingCalculator").collapse('show'); 270 scrollToAnchor('financingCalculator',150); 271 }); 272 } 273 274 275 if($("#financingExample").length) { 276 $(document).on("click", "#btn-financing-example", function (e) { 277 e.preventDefault(); 278 $("#vehicleDescription").collapse('show'); 279 scrollToAnchor('financingExample',150); 280 }); 281 } 282} 283 284$(document).on("click", "#request-vehicle-btn", function (e) { 285 e.preventDefault(); 286 $("#vehicleInquiry").collapse('show'); 287 scrollToAnchor('vehicleInquiry',175); 288}); 289 290 291if($("#go-to-financing-example").length){ 292 293 $( document ).on( "click", "#go-to-financing-example", function(e) { 294 e.preventDefault(); 295 $("#financingExample").collapse('show'); 296 scrollToAnchor('financingExample',150); 297 298 }); 299} 300 301/** 302 * 303 * @param aId 304 * @param offSet 305 */ 306function scrollToAnchor(aId, offSet){ 307 setTimeout(function() { 308 $([document.documentElement, document.body]).animate({ 309 scrollTop: $("#"+aId).offset().top-offSet 310 }, 2000); 311 }, 300); 312} 313 314 315 316/** 317 * 318 * @returns {Swiper} 319 */ 320function iniSimilarCar() { 321 322 let swiperSimilarCar = new Swiper('#swiper-start-page', { 323 slidesPerView: 3.3, 324 spaceBetween: 3, 325 freeMode: true, 326 speed : 500, 327 // Disable preloading of all images 328 preloadImages: true, 329 // Enable lazy loading 330 331 autoplay: { 332 delay: 6000, 333 }, 334 335 navigation: { 336 nextEl: '.swiper-button-next', 337 prevEl: '.swiper-button-prev', 338 }, 339 340 breakpoints: { 341 // when window width is <= 320px 342 320: { 343 slidesPerView: 1, 344 spaceBetween: 3 345 }, 346 // when window width is <= 480px 347 480: { 348 slidesPerView: 1, 349 spaceBetween: 3, 350 navigation: { 351 nextEl: '.swiper-button-next', 352 prevEl: '.swiper-button-prev', 353 }, 354 }, 355 356 660: { 357 slidesPerView: 2, 358 spaceBetween: 3, 359 navigation: { 360 nextEl: '.swiper-button-next', 361 prevEl: '.swiper-button-prev', 362 }, 363 }, 364 365 1024: { 366 slidesPerView: 2.3, 367 spaceBetween: 3, 368 369 }, 370 371 1200: { 372 slidesPerView: 2.3, 373 spaceBetween: 3, 374 } 375 } 376 }); 377 return swiperSimilarCar; 378}
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.