1/******/ (function(modules) { // webpackBootstrap 2/******/ // install a JSONP callback for chunk loading 3/******/ function webpackJsonpCallback(data) { 4/******/ var chunkIds = data[0]; 5/******/ var moreModules = data[1]; 6/******/ var executeModules = data[2]; 7/******/ 8/******/ // add "moreModules" to the modules object, 9/******/ // then flag all "chunkIds" as loaded and fire callback 10/******/ var moduleId, chunkId, i = 0, resolves = []; 11/******/ for(;i < chunkIds.length; i++) { 12/******/ chunkId = chunkIds[i]; 13/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { 14/******/ resolves.push(installedChunks[chunkId][0]); 15/******/ } 16/******/ installedChunks[chunkId] = 0; 17/******/ } 18/******/ for(moduleId in moreModules) { 19/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { 20/******/ modules[moduleId] = moreModules[moduleId]; 21/******/ } 22/******/ } 23/******/ if(parentJsonpFunction) parentJsonpFunction(data); 24/******/ 25/******/ while(resolves.length) { 26/******/ resolves.shift()(); 27/******/ } 28/******/ 29/******/ // add entry modules from loaded chunk to deferred list 30/******/ deferredModules.push.apply(deferredModules, executeModules || []); 31/******/ 32/******/ // run deferred modules when all chunks ready 33/******/ return checkDeferredModules(); 34/******/ }; 35/******/ function checkDeferredModules() { 36/******/ var result; 37/******/ for(var i = 0; i < deferredModules.length; i++) { 38/******/ var deferredModule = deferredModules[i]; 39/******/ var fulfilled = true; 40/******/ for(var j = 1; j < deferredModule.length; j++) { 41/******/ var depId = deferredModule[j]; 42/******/ if(installedChunks[depId] !== 0) fulfilled = false; 43/******/ } 44/******/ if(fulfilled) { 45/******/ deferredModules.splice(i--, 1); 46/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); 47/******/ } 48/******/ } 49/******/ 50/******/ return result; 51/******/ } 52/******/ 53/******/ // The module cache 54/******/ var installedModules = {}; 55/******/ 56/******/ // object to store loaded and loading chunks 57/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched 58/******/ // Promise = chunk loading, 0 = chunk loaded 59/******/ var installedChunks = { 60/******/ "main": 0 61/******/ }; 62/******/ 63/******/ var deferredModules = []; 64/******/ 65/******/ // The require function 66/******/ function __webpack_require__(moduleId) { 67/******/ 68/******/ // Check if module is in cache 69/******/ if(installedModules[moduleId]) { 70/******/ return installedModules[moduleId].exports; 71/******/ } 72/******/ // Create a new module (and put it into the cache) 73/******/ var module = installedModules[moduleId] = { 74/******/ i: moduleId, 75/******/ l: false, 76/******/ exports: {} 77/******/ }; 78/******/ 79/******/ // Execute the module function 80/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 81/******/ 82/******/ // Flag the module as loaded 83/******/ module.l = true; 84/******/ 85/******/ // Return the exports of the module 86/******/ return module.exports; 87/******/ } 88/******/ 89/******/ 90/******/ // expose the modules object (__webpack_modules__) 91/******/ __webpack_require__.m = modules; 92/******/ 93/******/ // expose the module cache 94/******/ __webpack_require__.c = installedModules; 95/******/ 96/******/ // define getter function for harmony exports 97/******/ __webpack_require__.d = function(exports, name, getter) { 98/******/ if(!__webpack_require__.o(exports, name)) { 99/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 100/******/ } 101/******/ }; 102/******/ 103/******/ // define __esModule on exports 104/******/ __webpack_require__.r = function(exports) { 105/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 106/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 107/******/ } 108/******/ Object.defineProperty(exports, '__esModule', { value: true }); 109/******/ }; 110/******/ 111/******/ // create a fake namespace object 112/******/ // mode & 1: value is a module id, require it 113/******/ // mode & 2: merge all properties of value into the ns 114/******/ // mode & 4: return value when already ns object 115/******/ // mode & 8|1: behave like require 116/******/ __webpack_require__.t = function(value, mode) { 117/******/ if(mode & 1) value = __webpack_require__(value); 118/******/ if(mode & 8) return value; 119/******/ if((mode & 4) && typeof value === 'object' && value && value.__esMo
119dule) return value; 120/******/ var ns = Object.create(null); 121/******/ __webpack_require__.r(ns); 122/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 123/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 124/******/ return ns; 125/******/ }; 126/******/ 127/******/ // getDefaultExport function for compatibility with non-harmony modules 128/******/ __webpack_require__.n = function(module) { 129/******/ var getter = module && module.__esModule ? 130/******/ function getDefault() { return module['default']; } : 131/******/ function getModuleExports() { return module; }; 132/******/ __webpack_require__.d(getter, 'a', getter); 133/******/ return getter; 134/******/ }; 135/******/ 136/******/ // Object.prototype.hasOwnProperty.call 137/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 138/******/ 139/******/ // __webpack_public_path__ 140/******/ __webpack_require__.p = ""; 141/******/ 142/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; 143/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); 144/******/ jsonpArray.push = webpackJsonpCallback; 145/******/ jsonpArray = jsonpArray.slice(); 146/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); 147/******/ var parentJsonpFunction = oldJsonpFunction; 148/******/ 149/******/ 150/******/ // add entry module to deferred list 151/******/ deferredModules.push([0,"vendor"]); 152/******/ // run deferred modules when ready 153/******/ return checkDeferredModules(); 154/******/ }) 155/************************************************************************/ 156/******/ ({ 157
158/***/ "./script.js": 159/*!*******************!*\ 160 !*** ./script.js ***! 161 \*******************/ 162/*! no exports provided */ 163/***/ (function(module, __webpack_exports__, __webpack_require__) { 164 165"use strict"; 166__webpack_require__.r(__webpack_exports__); 167/* WEBPACK VAR INJECTION */(function(jQuery) {/* harmony import */ var _scripts_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scripts/helper */ "./scripts/helper.js"); 168/* harmony import */ var _scripts_cookie__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scripts/cookie */ "./scripts/cookie.js"); 169/* harmony import */ var _scripts_cookie__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_scripts_cookie__WEBPACK_IMPORTED_MODULE_1__); 170/* harmony import */ var _scripts_defaults__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scripts/defaults */ "./scripts/defaults.js"); 171/* harmony import */ var _scripts_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_scripts_defaults__WEBPACK_IMPORTED_MODULE_2__); 172/* harmony import */ var _scripts_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scripts/forms */ "./scripts/forms.js"); 173/* harmony import */ var _scripts_forms__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_scripts_forms__WEBPACK_IMPORTED_MODULE_3__); 174/* harmony import */ var _scripts_header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scripts/header */ "./scripts/header.js"); 175/* harmony import */ var _scripts_header__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_scripts_header__WEBPACK_IMPORTED_MODULE_4__); 176/* harmony import */ var _scripts_footer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scripts/footer */ "./scripts/footer.js"); 177/* harmony import */ var _scripts_footer__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_scripts_footer__WEBPACK_IMPORTED_MODULE_5__); 178/* harmony import */ var _scripts_slick__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./scripts/slick */ "./scripts/slick.js"); 179/* harmony import */ var _scripts_column_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./scripts/column-service */ "./scripts/column-service.js"); 180/* harmony import */ var _scripts_map__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./scripts/map */ "./scripts/map.js"); 181/* harmony import */ var _scripts_map__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_scripts_map__WEBPACK_IMPORTED_MODULE_8__); 182/* harmony import */ var _scripts_post__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./scripts/post */ "./scripts/post.js"); 183/* harmony import */ var _scripts_social__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./scripts/social */ "./scripts/social.js"); 184/* harmony import */ var _scripts_social__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_scripts_social__WEBPACK_IMPORTED_MODULE_10__); 185/* harmony import */ var _scripts_modal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./scripts/modal */ "./scripts/modal.js"); 186/* harmony import */ var _scripts_modal__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_scripts_modal__WEBPACK_IMPORTED_MODULE_11__); 187/* harmony import */ var _scripts_videojs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./scripts/videojs */ "./scripts/videojs.js"); 188/* harmony import */ var _scripts_videojs__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_scripts_videojs__WEBPACK_IMPORTED_MODULE_12__); 189/* harmony import */ var _scripts_main__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./scripts/main */ "./scripts/main.js"); 190/* harmony import */ var _scripts_main__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_scripts_main__WEBPACK_IMPORTED_MODULE_13__); 191/* harmony import */ var _scripts_search__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./scripts/search */ "./scripts/search.js"); 192/* harmony import */ var _scripts_search__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_scripts_search__WEBPACK_IMPORTED_MODULE_14__); 193/* harmony import */ var _scripts_instagram__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./scripts/instagram */ "./scripts/instagram.js"); 194/* harmony import */ var _scripts_instagram__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_scripts_instagram__WEBPACK_IMPORTED_MODULE_15__); 195/* harmony import */ var _scripts_pages_template_home_v2__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./scripts/pages/template-home-v2 */ "./scripts/pages/template-home-v2.js"); 196/* harmony import */ var _scripts_pages_template_home_v2__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_scripts_pages_template_home_v2__WEBPACK_IMPORTED_MODULE_16__); 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215(function ($) { 216 $.extend(Cm, { 217 o: function o(propName) { 218 return Object(_scripts_helper__WEBPACK_IMPORTED_MODULE_0__["indexValue"])(Cm.defaults, propName); 219 },
220 init: function init() { 221 this.main.init(); 222 this.forms.init(); 223 this.header.init(); 224 this.footer.init(); 225 this.slick.init(); 226 this.columnService.init(); 227 this.map.init(); 228 this.post.init(); 229 this.social.init(); 230 this.modal.init(); 231 this.modal.announcement(); 232 this.modal.subscribe(); 233 this.videoplayer.init(); 234 this.search.init(); 235 this.instagram.init(); 236 this.modal.signup(); 237 this.modal.signupform(); 238 this.modal.appsignup(); 239 }, 240 toInt: function toInt(value) { 241 return parseInt(value); 242 }, 243 isTrue: function isTrue(value) { 244 return value === 'true' || value === '1' || value > 0 || value === 'yes' || value === true; 245 } 246 }); 247 Cm.init(); 248 /** IG */ 249 250 igresize(); 251 $(window).resize(function () { 252 igresize(); 253 }); 254 255 function igresize() { 256 var igfeedimage = $('.custom-igfeed-image'); 257 igfeedimage.each(function (key) { 258 var igwidth = $(this).innerWidth(); 259 $(this).css("height", igwidth + "px"); 260 $(this).parent().css("height", igwidth + "px"); 261 }); 262 } 263 /** IG End */ 264 265 266 if ($('.btn-share-single').length > -1) { 267 $('.bio-links').on('click', 'a.btn-share-single', function () { 268 if (navigator.canShare && $(window).outerWidth() <= 600) { 269 var link = $(this); 270 var singleurl = link.data('singleurl'); 271 var singletext = link.data('singletext'); 272 navigator.share({ 273 title: singletext, 274 text: singleurl 275 }).then(function () { 276 return console.log('Share was successful.'); 277 }).catch(function (error) { 278 return console.log('Sharing failed', error); 279 }); 280 } else { 281 $('.btn-share-single').attr('data-toggle', 'modal'); 282 var linkdetails = $(this).data('linkdetails'); 283 284 var _singleurl = $(this).data('singleurl'); 285 286 $('#share-single-modal .modal-title').html('').html(linkdetails.socmed_heading); 287 var appendLinks = ""; 288 $.each(linkdetails.urls, function (k, v) { 289 var hasDisplay = 'd-block'; 290 291 if (v.link_image === false) { 292 hasDisplay = 'd-none'; 293 } 294 295 appendLinks += '<a target="_blank" href=" ' + v.link_url + ' " class="btn btn-outline-secondary btn-lg btn-block text-left btn-socmed">' + '<img src=" ' + v.link_image + '" class="link-image ' + hasDisplay + '; ?>" /> ' + v.link_text + '<span class="dashicons dashicons-arrow-right-alt2 float-right"></span></a>'; 296 }); 297 298 if (appendLinks === "") { 299 appendLinks += '<p class="text-center">No shareable links available!</p>'; 300 } 301 302 $('#share-single-modal .modal-body').html('').html(appendLinks); 303 $('#share-single-modal .btn-modal-footer p').html('').html(_singleurl); 304 $('#share-single-modal .btn-modal-footer').on('click', function () { 305 navigator.clipboard.writeText(_singleurl); 306 }); 307 } 308 }); 309 } 310 /** Share Single */ 311 312 313 $('.btn-upload').on('click', function () { 314 if (navigator.canShare && $(window).outerWidth() <= 600) { 315 var link = $(this); 316 var shareable_title = link.data('linktext'); 317 var shareable_url = link.data('linkurl'); 318 navigator.share({ 319 title: shareable_title, 320 text: shareable_url 321 }).then(function () { 322 return console.log('Share was successful.'); 323 }).catch(function (error) { 324 return console.log('Sharing failed', error); 325 }); 326 } else { 327 $(this).attr('data-toggle', 'modal'); 328 } 329 }); 330 /** Share Single End */ 331})(jQuery); 332/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 333 334/***/ }), 335
336/***/ "./scripts/column-service.js": 337/*!***********************************!*\ 338 !*** ./scripts/column-service.js ***! 339 \***********************************/ 340/*! no exports provided */ 341/***/ (function(module, __webpack_exports__, __webpack_require__) { 342 343"use strict"; 344__webpack_require__.r(__webpack_exports__); 345/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _scripts_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scripts/helper */ "./scripts/helper.js"); 346 347Cm.columnService = { 348 init: function init() { 349 var adjustScreen = function adjustScreen() { 350 $('.element-services-item').each(function () { 351 var w = $(this).innerWidth() - 39; 352 if (_scripts_helper__WEBPACK_IMPORTED_MODULE_0__["Screen"].width() >= 900) $(this).css('height', w + 'px');else $(this).css('height', '210px'); 353 }); 354 }; 355 356 $(window).bind('resize', adjustScreen); 357 setTimeout(adjustScreen, 100); 358 } 359}; 360/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 361 362/***/ }), 363
364/***/ "./scripts/cookie.js": 365/*!***************************!*\ 366 !*** ./scripts/cookie.js ***! 367 \***************************/ 368/*! no static exports found */ 369/***/ (function(module, exports, __webpack_require__) { 370 371/* WEBPACK VAR INJECTION */(function($) {function eraseCookie(name) { 372 document.cookie = name + '=; path=/; domain=' + '.' + window.location.host + '; expires=' + new Date(0).toUTCString(); 373 document.cookie = name + '=; path=/; domain=' + '.' + window.location.host.replace('www.', '') + '; expires=' + new Date(0).toUTCString(); 374} 375 376function removeCookiePro() { 377 eraseCookie('OptanonAlertBoxClosed'); 378 eraseCookie('OptanonConsent'); 379 eraseCookie('intercom-id-r6ltm8ar'); 380 eraseCookie('__cfduid'); 381 eraseCookie('sty-cookie-clicked'); 382} 383 384Cm.cookie = { 385 init: function init() { 386 $('body').on('click', '[data-trigger="reset-cookie"]', function (e) { 387 var $alertBox = $(this).closest('body').find('.optanon-alert-box-wrapper'); 388 e.preventDefault(); 389 if (Cm.cookie.getCookie('OptanonConsent') == null) return false; 390 removeCookiePro(); 391 $(this).closest('body').find('.optanon-alert-box-wrapper, #optanon #optanon-popup-bg').css('display', 'block'); 392 $alertBox.css({ 393 'z-index': '21474836459', 394 'bottom': '-300px' 395 }); 396 setTimeout(function () { 397 $alertBox.animate({ 398 bottom: 0 399 }, 'slow'); 400 }, 100); 401 }); 402 $('body').on('click', '.banner-policy-link', function (e) { 403 e.preventDefault(); 404 removeCookiePro(); 405 window.location = $(this).attr('href'); 406 }); 407 $('body').on('click', '.accept-cookies-button, .optanon-save-settings-button button', function (e) { 408 e.preventDefault(); 409 Cm.cookie.setCookie('sty-cookie-clicked', 'true', 30); 410 }); // This fix the issue of cookie pro unusual behavior of not showing. 411 // We checked if cookie was not yet accepted, let's clear cookie. 412 413 if (Cm.cookie.getCookie('sty-cookie-clicked') == null) { 414 removeCookiePro(); 415 } 416 }, 417 removeCookiePro: function removeCookiePro() { 418 eraseCookie('OptanonAlertBoxClosed'); 419 eraseCookie('OptanonConsent'); 420 eraseCookie('intercom-id-r6ltm8ar'); 421 eraseCookie('__cfduid'); 422 eraseCookie('sty-cookie-clicked'); 423 }, 424 openCookiePro: function openCookiePro($) { 425 $('body').find('.optanon-alert-box-wrapper, #optanon #optanon-popup-bg').css('display', 'block'); 426 $('body').find('.optanon-alert-box-wrapper').css({ 427 'z-index': '21474836459' 428 }); 429 }, 430 getCookie: function getCookie(name) { 431 var nameEQ = name + "="; 432 var ca = document.cookie.split(';'); 433 434 for (var i = 0; i < ca.length; i++) { 435 var c = ca[i]; 436 437 while (c.charAt(0) == ' ') { 438 c = c.substring(1, c.length); 439 } 440 441 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); 442 } 443 444 return null; 445 }, 446 setCookie: function setCookie(name, value, days) { 447 var day = days || 1; 448 var expires = ""; 449 450 if (day) { 451 var date = new Date(); 452 date.setTime(date.getTime() + day * 24 * 60 * 60 * 1000); 453 expires = "; expires=" + date.toUTCString(); 454 } 455 456 document.cookie = name + "=" + (value || "") + expires + "; path=/"; 457 } 458}; 459/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 460 461/***/ }), 462
463/***/ "./scripts/defaults.js": 464/*!*****************************!*\ 465 !*** ./scripts/defaults.js ***! 466 \*****************************/ 467/*! no static exports found */ 468/***/ (function(module, exports) { 469 470var _settings; 471 472function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 473 474Cm.defaults = { 475 menu: { 476 toggleEl: '.header__menu___uadcm', 477 targetEl: '.header__navigation___3RjrQ', 478 activeClass: 'header__navigationOpen___Eps9R', 479 overlayClass: '.overlay__overlay___2AEOP', 480 width: { 481 expandMin: 1020 482 } 483 }, 484 forms: { 485 subscribe: { 486 el: '#frm-site-subscribe', 487 loaderEl: '.newsletterLoading__loading' 488 }, 489 errorClass: '.newsletter__errorMessage', 490 patterns: { 491 email: /^(([^<>()[\]\\.,;:\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,}))$/, 492 phone: /^[0-9\-\(\)\s]+/ 493 } 494 }, 495 slick: { 496 settings: (_settings = { 497 centerMode: true, 498 infinite: true, 499 slidesToShow: 1, 500 slidesToScroll: 1, 501 dots: true 502 }, _defineProperty(_settings, "infinite", true), _defineProperty(_settings, "speed", 500), _defineProperty(_settings, "autoplaySpeed", 3000), _defineProperty(_settings, "rows", 0), _defineProperty(_settings, "variableWidth", true), _defineProperty(_settings, "arrows", true), _defineProperty(_settings, "prevArrow", ''), _defineProperty(_settings, "autoplay", false), _defineProperty(_settings, "nextArrow", '<div class="slider__arrow___3hLa9 slider__arrow__left"></div><div class="slider__arrow___3hLa9 slider__arrow__right"></div>'), _defineProperty(_settings, "responsive", [{ 503 breakpoint: 768, 504 settings: { 505 arrows: true, 506 centerMode: true, 507 slidesToShow: 1 508 } 509 }, { 510 breakpoint: 480, 511 settings: { 512 arrows: true, 513 centerMode: true, 514 slidesToShow: 1 515 } 516 }]), _settings) 517 }, 518 map: { 519 icon: wp.asset_path + '/plugins/leaflet/images/camdenmarket-map-pin.png' 520 } 521}; 522 523/***/ }), 524
525/***/ "./scripts/footer.js": 526/*!***************************!*\ 527 !*** ./scripts/footer.js ***! 528 \***************************/ 529/*! no static exports found */ 530/***/ (function(module, exports) { 531 532Cm.footer = { 533 init: function init() {} 534}; 535 536/***/ }), 537
538/***/ "./scripts/forms.js": 539/*!**************************!*\ 540 !*** ./scripts/forms.js ***! 541 \**************************/ 542/*! no static exports found */ 543/***/ (function(module, exports, __webpack_require__) { 544 545/* WEBPACK VAR INJECTION */(function($) {Cm.forms = { 546 processForm: null, 547 init: function init() { 548 $(document).on('submit', Cm.o('forms.subscribe.el'), function (e) { 549 if (Cm.forms.isValid(this)) { 550 Cm.forms.subscribe.submit($(this)); 551 } 552 553 e.preventDefault(); 554 return false; 555 }); 556 }, 557 subscribe: { 558 submit: function submit($form) { 559 var mailChimpUrl = 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2981&f_id=00b659e3f0'; 560 $(Cm.o('forms.subscribe.loaderEl')).removeClass('d-none'); 561 console.log($form.serialize()); 562 console.log(mailChimpUrl + '&c=?'); 563 $.ajax({ 564 url: mailChimpUrl + '&c=?', 565 data: $form.serialize(), 566 dataType: 'jsonp', 567 success: function success(res, status) { 568 console.log(res); 569 570 if (res.result === 'error') { 571 $form.find(Cm.o('forms.errorClass')).addClass('d-block').removeClass('success').html(res.msg); 572 } else { 573 $form.find('.newsletter__textInput___iRN9M').val(''); 574 575 if ($('.page-template-template-home-v2').length > -1) { 576 $form.find(Cm.o('forms.errorClass')).addClass('d-block success').css('color', '#000').text(res.msg); 577 dataLayer.push({ 578 'event': 'newsletterSubmitted', 579 'formName': 'Newsletter Form' 580 }); 581 setTimeout(function () { 582 $form.find(Cm.o('forms.errorClass')).removeClass('d-block success').css('color', '#000').text(''); 583 }, 3000); 584 } 585 586 setTimeout(function () { 587 if ($('#subscribenow-modal').length > -1) { 588 $('#subscribenow-modal h5.center').html('').html("You're signed up!"); 589 $('#subscribenow-modal input[name="EMAIL"]').prop('disabled', true); 590 $('#subscribenow-modal #checkFormBio').prop('disabled', true); 591 $('#subscribenow-modal button.newsletter__submitButton___1ph4C').addClass('disabled'); 592 setTimeout(function () { 593 $('#subscribenow-modal input[name="EMAIL"]').removeAttr('disabled'); 594 $('#subscribenow-modal #checkFormBio').removeAttr('disabled'); 595 $('#subscribenow-modal button.newsletter__submitButton___1ph4C').removeClass('disabled'); 596 $('#subscribenow-modal .close').trigger('click'); 597 $('.btn-subcribe').trigger('click'); 598 $('#subscribenow-modal h5.center').html('').html('Subscribe to @camdenmarketldn'); 599 $('#frm-site-subscribe')[0].reset(); 600 }, 3000); 601 } else { 602 if (res.msg) { 603 $form.find(Cm.o('forms.errorClass')).addClass('d-block success').text(res.msg); 604 } else { 605 $form.find(Cm.o('forms.errorClass')).addClass('d-block success').text('Thank y
605ou for subscribing to our newsletter.'); 606 } 607 } 608 }, 1000); 609 } 610 }, 611 error: function error(err, errmsg, errtext) { 612 $form.find(Cm.o('forms.errorClass')).addClass('d-block').text('Oops! Something went wrong. Please Try again.'); 613 }, 614 complete: function complete(response) { 615 $(Cm.o('forms.subscribe.loaderEl')).addClass('d-none'); 616 } 617 }); 618 } 619 }, 620 post: function post(args) { 621 return $.ajax($.extend({ 622 url: wp.ajax_url, 623 type: 'post', 624 data: {}, 625 dataType: 'json', 626 success: function success(response) {}, 627 fail: function fail(response) {} 628 }, args)).always(function (response) { 629 if (typeof args.always == 'function') { 630 args.always(response); 631 } 632 633 if (Cm.forms.processForm) { 634 Cm.forms.reset(Cm.forms.processForm); 635 Cm.forms.processForm = null; 636 } 637 }); 638 }, 639 reset: function reset(form) { 640 form.trigger('reset'); 641 form.trigger('form.submit'); 642 }, 643 isValid: function isValid(form) { 644 var valid = true, 645 errC = 0; 646 $(form).find('[data-validate]').each(function (i, el) { 647 var validate_list = this.dataset.validate.split(' '); 648 var inp = this, 649 errState = false, 650 hasValue = this.value !== ''; 651 652 if (validate_list.indexOf('required') > -1 && !hasValue) { 653 errState = true; 654 $(inp).parent().find('.required-message').text('This is required'); 655 } // validate phone number. 656 657 658 if (validate_list.indexOf('phone') > -1) { 659 if (!errState && !Cm.o('forms.patterns.phone').test(this.value)) { 660 errState = true; 661 } 662 } // validate email address. 663 664 665 if (validate_list.indexOf('email') > -1) { 666 if (!errState && !Cm.o('forms.patterns.email').test(this.value)) { 667 errState = true; 668 } 669 } 670 671 if (errState) { 672 setTimeout(function () { 673 $(inp).addClass('newsletter__textInputError'); 674 $(inp).closest('form').find(Cm.o('forms.errorClass')).addClass('d-block').removeClass('success').text('Please enter a valid e-mail address.'); 675 }, 20); 676 valid = false; 677 errC++; 678 679 if (errC == 1) { 680 $(this).trigger('focus'); 681 } 682 } else { 683 setTimeout(function () { 684 $(inp).removeClass('newsletter__textInputError'); 685 $(inp).closest('form').find(Cm.o('forms.errorClass')).removeClass('d-block'); 686 }, 20); 687 } 688 }); 689 return valid; 690 } 691}; 692/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 693 694/***/ }), 695
696/***/ "./scripts/header.js": 697/*!***************************!*\ 698 !*** ./scripts/header.js ***! 699 \***************************/ 700/*! no static exports found */ 701/***/ (function(module, exports, __webpack_require__) { 702 703/* WEBPACK VAR INJECTION */(function($) {Cm.header = { 704 init: function init() { 705 $(document).on('click', Cm.o('menu.toggleEl'), function () { 706 Cm.header.show(); 707 }); 708 $(document).on('click', Cm.o('menu.overlayClass'), function () { 709 Cm.header.hide(); 710 }); 711 $(window).on('resize', this.screen); 712 Cm.header.headerDropDownToggle(); 713 }, 714 show: function show() { 715 $(Cm.o('menu.targetEl')).addClass(Cm.o('menu.activeClass')); 716 $(Cm.o('menu.overlayClass')).removeClass('d-none'); 717 }, 718 hide: function hide(timer) { 719 $(Cm.o('menu.targetEl')).removeClass(Cm.o('menu.activeClass')); 720 setTimeout(function () { 721 $(Cm.o('menu.overlayClass')).addClass('d-none'); 722 }, timer || 200); 723 }, 724 screen: function screen() { 725 var w = document.documentElement.clientWidth; 726 if (w > Cm.o('menu.width.expandMin')) Cm.header.hide(-1); 727 }, 728 headerDropDownToggle: function headerDropDownToggle() { 729 if (!$('.header__dropdown-name').length) { 730 return; 731 } 732 733 $(document).on('click', '.header__dropdown-name', function () { 734 $('.header__dropdown-list').slideToggle(); 735 }); 736 } 737}; 738/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 739 740/***/ }), 741
742/***/ "./scripts/helper.js": 743/*!***************************!*\ 744 !*** ./scripts/helper.js ***! 745 \***************************/ 746/*! exports provided: indexValue, urlParam, Screen */ 747/***/ (function(module, __webpack_exports__, __webpack_require__) { 748 749"use strict"; 750__webpack_require__.r(__webpack_exports__); 751/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexValue", function() { return indexValue; }); 752/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlParam", function() { return urlParam; }); 753/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Screen", function() { return Screen; }); 754function indexValue(obj, is, value) { 755 if (typeof is == 'string') return indexValue(obj, is.split('.'), value);else if (is.length == 1 && value !== undefined) return obj[is[0]] = value;else if (is.length == 0) return obj;else return indexValue(obj[is[0]], is.slice(1), value); 756} 757 758; 759 760function urlParam(name) { 761 var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); 762 return results && results[1] ? results[1] : null; 763} 764 765var Screen = { 766 width: function width(unit) { 767 return window.innerWidth + (unit || ''); 768 }, 769 height: function height(unit) { 770 return window.innerHeight + (unit || ''); 771 } 772}; 773 774 775/***/ }), 776
777/***/ "./scripts/instagram.js": 778/*!******************************!*\ 779 !*** ./scripts/instagram.js ***! 780 \******************************/ 781/*! no static exports found */ 782/***/ (function(module, exports, __webpack_require__) { 783 784/* WEBPACK VAR INJECTION */(function($) {Cm.instagram = { 785 init: function init() { 786 if ($('.instagram-post-wrapper').length) { 787 $('.instagram-post-wrapper').each(function () { 788 var _this = $(this); 789 790 _this.html(_this.data('loading')); 791 792 var xhttp = new XMLHttpRequest(); 793 794 xhttp.onreadystatechange = function () { 795 var temp = '<ul class="list-posts list-unstyled">'; 796 797 if (this.readyState == 4 && this.status == 200) { 798 var record = JSON.parse(this.responseText); 799 800 if (record && record.graphql && record.graphql.user && record.graphql.user.edge_owner_to_timeline_media) { 801 for (var i = 0; i < record.graphql.user.edge_owner_to_timeline_media.edges.length; i++) { 802 var post = record.graphql.user.edge_owner_to_timeline_media.edges[i].node; 803 temp += "<li>\n <a style=\"background-image: url('__BG__');\" class=\"d-block\" href=\"__LINK__\" target=\"_blank\" alt=\"\">\n <p class=\"addon-display position-absolute justify-content-center align-items-center __ADDON_CLASS__\">\n <small class=\"d-block\">\n <span class=\"likes\"><i></i>__LIKES__</span> \n <span class=\"comments\"><i></i>__COMMENTS__</span>\n </small>\n </p>\n </a>\n </li>".replace('__LINK__', 'https://www.instagram.com/p/' + post.shortcode).replace('__ADDON_CLASS__', _this.data('buttonBadge') ? '' : 'd-none').replace('__LIKES__', post.edge_liked_by.count).replace('__COMMENTS__', post.edge_media_to_comment.count).replace('__BG__', post.thumbnail_src); 804 } 805 } 806 807 temp += "</ul><div class=\"cat-section d-block\">\n <a href=\"__LINK__\" target=\"_blank\" class=\"btn-default-black d-inline-block\">\n __LABEL__\n </a>\n </div>".replace('__LINK__', _this.data('buttonLink')).replace('__LABEL__', _this.data('buttonLabel')); 808 809 _this.html(temp); 810 } 811 }; 812 813 xhttp.open("GET", "https://instagram.com/camdenmarketldn/?__a=1", true); 814 xhttp.send(); 815 }); 816 } 817 } 818}; 819/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 820 821/***/ }), 822
823/***/ "./scripts/main.js": 824/*!*************************!*\ 825 !*** ./scripts/main.js ***! 826 \*************************/ 827/*! no static exports found */ 828/***/ (function(module, exports, __webpack_require__) { 829 830/* WEBPACK VAR INJECTION */(function($) {Cm.main = { 831 popCDNXPlayer: function popCDNXPlayer() { 832 id = new Date().getTime(); 833 var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : window.screenX; 834 var dualScreenTop = window.screenTop != undefined ? window.screenTop : window.screenY; 835 var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; 836 var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; 837 var systemZoom = width / window.screen.availWidth; 838 var left = (width - 380) / 2 / systemZoom + dualScreenLeft; 839 var top = (height - 660) / 2 / systemZoom + dualScreenTop; 840 var position = 'width=' + 380 / systemZoom + ', height=' + 660 / systemZoom + ', top=' + top + ', left=' + left; 841 eval("page" + id + " = window.open('https://player.cdnx.co.uk', '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0," + position + "');"); 842 }, 843 init: function init() { 844 $('a.btn-open-cdnx').on('click', function () { 845 Cm.main.popCDNXPlayer(); 846 }); 847 } 848}; 849/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 850 851/***/ }), 852
853/***/ "./scripts/map.js": 854/*!************************!*\ 855 !*** ./scripts/map.js ***! 856 \************************/ 857/*! no static exports found */ 858/***/ (function(module, exports, __webpack_require__) { 859 860/* WEBPACK VAR INJECTION */(function($) {Cm.map = { 861 loading: function loading($el) { 862 $el.html('<div class="map-inside-loader d-flex justify-content-center align-items-center align-self-center">' + '<img style="" src="' + (wp.location_map_loader || 'https://s3-eu-west-2.amazonaws.com/staycom-wordpress/wp-content/uploads/2019/05/03125753/img-loader.gif') + '" />' + '</div>'); 863 }, 864 init: function init() { 865 var $maps = $('[data-plugin="map"]'); 866 var scripts = { 867 'leaflet': wp.asset_path + "/plugins/leaflet/leaflet.js", 868 'esri': wp.asset_path + "/plugins/leaflet/esri-leaflet.js", 869 'mapbox': wp.asset_path + "/plugins/leaflet/mapbox-gl.js", 870 'vector': wp.asset_path + "/plugins/leaflet/esri-leaflet-vector.js" 871 }; 872 var defaults = { 873 icon: Cm.o('map.icon') 874 }; 875 876 if ($maps && $maps.length) { 877 $maps.each(function () { 878 Cm.map.loading($(this)); 879 }); 880 $.getScript(scripts.leaflet).done(function (script, textStatus) { 881 $.getScript(scripts.esri).done(function (script, textStatus) { 882 $.getScript(scripts.mapbox).done(function (script, textStatus) { 883 $.getScript(scripts.vector).done(function (script, textStatus) { 884 $maps.each(function () { 885 var data = this.dataset; 886 var lat = data.lat; 887 var lng = data.lng; 888 var featureGroup; 889 var map = L.map(this.id, { 890 zoomControl: false 891 }).setView([lat, lng], 15); 892 893 if (data.hasOwnProperty('noScroll')) { 894 map.scrollWheelZoom.disable(); 895 } 896 897 L.control.zoom({ 898 position: 'bottomright' 899 }).addTo(map); 900 var layer = L.esri.Vector.basemap('Newspaper').addTo(map); 901 var iconMain = L.icon({ 902 iconUrl: defaults.icon, 903 iconSize: [38, 64], 904 className: 'map-icon-pin--main', 905 popupAnchor: [0, -30] 906 }); 907 L.marker([lat, lng], { 908 icon: iconMain 909 }).addTo(map); //.bindPopup('<h5>'+data.text+'</h5>').openPopup(); 910 }); 911 }); 912 }); 913 }); 914 }); 915 } 916 } 917}; 918/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 919 920/***/ }), 921
922/***/ "./scripts/modal.js": 923/*!**************************!*\ 924 !*** ./scripts/modal.js ***! 925 \**************************/ 926/*! no static exports found */ 927/***/ (function(module, exports, __webpack_require__) { 928 929/* WEBPACK VAR INJECTION */(function($) {var _this2 = this; 930 931Cm.modal = { 932 init: function init() { 933 $('[data-dismiss="modal"]').on('click', function (e) { 934 var $modal = $(this).closest('.modal'); 935 $modal.removeClass('show'); 936 Cm.modal.hideBackdrop(); 937 938 if ($modal.attr('id') === 'announcement-modal' || $modal.attr('id') === 'subscribe-modal') { 939 Cm.cookie.setCookie('CM_ANNOUNCEMENT', true, parseInt($modal.data('daysExpire'))); 940 } 941 942 setTimeout(function () { 943 $modal.hide(); 944 $modal.trigger('cm.modal.close'); 945 }, 300); 946 e.preventDefault(); 947 return false; 948 }); 949 }, 950 announcement: function announcement() { 951 var _this = this; 952 953 var $announcementModal = $('#announcement-modal'); 954 var announcementCookie = Cm.cookie.getCookie('CM_ANNOUNCEMENT'); 955 956 if ($announcementModal.data('enable') && announcementCookie == null) { 957 $('#announcement-modal').show(); 958 setTimeout(function () { 959 _this.showBackdrop(); 960 961 $('#announcement-modal').addClass('show'); 962 }, 50); 963 } 964 }, 965 subscribe: function subscribe() { 966 var $modal = $('#subscribe-modal'); 967 var announcementCookie = Cm.cookie.getCookie('CM_ANNOUNCEMENT'); 968 $modal.find('form').on('form.submit', function () { 969 $modal.find('[data-dismiss="modal"]').trigger('click'); 970 }); 971 972 if ($modal.data('enable') && announcementCookie == null) { 973 $modal.show(); 974 setTimeout(function () { 975 Cm.modal.showBackdrop(); 976 $modal.addClass('show'); 977 }, 50); 978 } 979 }, 980 signup: function signup() { 981 var isClicked = localStorage.getItem("ispopupclicked"); 982 var $modal = $('#signup-modal'); 983 $modal.find('form').on('form.submit', function () { 984 $modal.find('[data-dismiss="modal"]').trigger('click'); 985 localStorage.setItem("ispopupclicked", true); 986 }); 987 $('#signup-modal .signup-button').on('click', function () { 988 localStorage.setItem("ispopupclicked", true); 989 window.location.href = "https://camdenmarket.com/newsletter-signup-page"; 990 }); 991 992 if ($modal.data('enable') && (isClicked === null || isClicked === undefined || isClicked === "")) { 993 $modal.show(); 994 setTimeout(function () { 995 Cm.modal.showBackdrop(); 996 $modal.addClass('show'); 997 }, 10000); 998 } 999 1000 if ($('#signup-form-modal').length) { 1001 var setHeightEqualToWidth = function setHeightEqualToWidth() { 1002 var signupImage = $('.signup-image'); 1003 1004 if (signupImage.length > 0) { 1005 var width = signupImage.outerWidth(); // Use outerWidth() instead of width() 1006 1007 $('.signup-image').css('height', width + 'px'); 1008 $('.signup-image').css('max-height', width + 'px'); 1009 } 1010 1011 var signupImageMob = $('.si-mobile'); 1012 1013 if (signupImageMob.length > 0) { 1014 var _width = signupImageMob.outerWidth(); // Use outerWidth() instead of width() 1015 1016 1017 $('.si-mobile').css('height', _width + 'px'); 1018 $('.si-mobile').css('max-height', _width + 'px'); 1019 } 1020 }; 1021 1022 // Call on window resize 1023 var isValidEmail = function isValidEmail(email) { 1024 // Regular expression for validating an email address 1025 var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; // Test the email against the regex 1026 1027 return emailRegex.test(email); 1028 }; 1029 1030 var hasSpecialCharacter = function hasSpecialCharacter(str) { 1031 // Regular expression for detecting special characters 1032 var specialCharRegex = /[!@#$%^&*(),.?":{}|<>]/; // Test the string against the regex 1033 1034 return specialCharRegex.test(str); 1035 }; 1036 1037 $('.close-modal').on('click', function () { 1038 localStorage.setItem("ispopupclicked", true); 1039 }); // Menu header 1040 1041 window.scrollTo({ 1042 top: 50, 1043 behavior: "smooth" // This makes the scrolling smooth 1044 1045 }); 1046 $(_this2).scrollTop(50); 1047 1048 if ($(window).width() < 769) { 1049 $('.mobile-form-container').removeClass('d-none'); 1050 $('.mobile-thank-you-container').removeClass('d-none'); 1051 $('.thank-you-container').addClass('d-none'); 1052 $('.form-container').addClass('d-none'); // Menu header 1053 1054 window.scrollTo({ 1055 top: 100,
1056 behavior: "smooth" // This makes the scrolling smooth 1057 1058 }); 1059 $(_this2).scrollTop(100); 1060 } 1061 1062 $("#signup-form-modal #mc-embedded-subscribe-tablet").on("click", function () { 1063 $(".has-error-tablet:eq(0)").css("display", "none"); 1064 $(".has-error-tablet:eq(1)").css("display", "none"); 1065 $(".has-error-tablet:eq(2)").css("display", "none"); 1066 $(".check-ic-fname").css("display", "none"); 1067 $(".check-ic-lname").css("display", "none"); 1068 $(".check-ic-email").css("display", "none"); 1069 $(".warning-ic-fname").css("display", "none"); 1070 $(".warning-ic-lname").css("display", "none"); 1071 $(".warning-ic-email").css("display", "none"); 1072 var isValid = true; 1073 1074 if ($("#mce-FNAME-tablet").val() === "") { 1075 $(".warning-ic-fname").css("display", "block"); 1076 $("#mce-FNAME-tablet").val(''); 1077 $("#mce-FNAME-tablet").attr("placeholder", "Please enter your first name"); 1078 $("#mce-FNAME-tablet").css("border", "1.5px solid #FFFFFF"); 1079 $("#mce-FNAME-tablet").css("font-weight", "400"); 1080 isValid = false; 1081 } else if (hasSpecialCharacter($("#mce-FNAME-tablet").val())) { 1082 $(".warning-ic-fname").css("display", "block"); 1083 $("#mce-FNAME-tablet").val(''); 1084 $("#mce-FNAME-tablet").attr("placeholder", "Please enter a valid first name"); 1085 $("#mce-FNAME-tablet").css("border", "1.5px solid #FFFFFF"); 1086 $("#mce-FNAME-tablet").css("font-weight", "400"); 1087 isValid = false; 1088 } else { 1089 $("#mce-FNAME-tablet").css("border", "2.5px solid #FFFFFF"); 1090 $("#mce-FNAME-tablet").css("font-weight", "bold"); 1091 $(".check-ic-fname").css("display", "block"); 1092 } 1093 1094 if ($("#mce-LNAME-tablet").val() === "") { 1095 $(".warning-ic-lname").css("display", "block"); 1096 $("#mce-LNAME-tablet").val(''); 1097 $("#mce-LNAME-tablet").attr("placeholder", "Please enter your last name"); 1098 $("#mce-LNAME-tablet").css("border", "1.5px solid #FFFFFF"); 1099 $("#mce-LNAME-tablet").css("font-weight", "400"); 1100 isValid = false; 1101 } else if (hasSpecialCharacter($("#mce-LNAME-tablet").val())) { 1102 $(".warning-ic-lname").css("display", "block"); 1103 $("#mce-LNAME-tablet").val(''); 1104 $("#mce-LNAME-tablet").attr("placeholder", "Please enter a valid last name"); 1105 $("#mce-LNAME-tablet").css("border", "1.5px solid #FFFFFF"); 1106 $("#mce-LNAME-tablet").css("font-weight", "400"); 1107 isValid = false; 1108 } else { 1109 $("#mce-LNAME-tablet").css("border", "2.5px solid #FFFFFF"); 1110 $("#mce-LNAME-tablet").css("font-weight", "bold"); 1111 $(".check-ic-lname").css("display", "block"); 1112 } 1113 1114 if ($("#mce-EMAIL-tablet").val() === "") { 1115 $(".warning-ic-email").css("display", "block"); 1116 $("#mce-EMAIL-tablet").val(''); 1117 $("#mce-EMAIL-tablet").attr("placeholder", "Please enter your email address"); 1118 $("#mce-EMAIL-tablet").css("border", "1.5px solid #FFFFFF"); 1119 $("#mce-EMAIL-tablet").css("font-weight", "400"); 1120 isValid = false; 1121 } else if (!isValidEmail($("#mce-EMAIL-tablet").val())) { 1122 $(".warning-ic-email").css("display", "block"); 1123 $("#mce-EMAIL-tablet").val(''); 1124 $("#mce-EMAIL-tablet").attr("placeholder", "Please enter a valid email address"); 1125 $("#mce-EMAIL-tablet").css("border", "1.5px solid #FFFFFF"); 1126 $("#mce-EMAIL-tablet").css("font-weight", "400"); 1127 isValid = false; 1128 } else { 1129 $("#mce-EMAIL-tablet").css("border", "2.5px solid #FFFFFF"); 1130 $("#mce-EMAIL-tablet").css("font-weight", "bold"); 1131 $(".check-ic-email").css("display", "block"); 1132 } 1133 1134 if (!$("#gdpr_50400")[0].checked) { 1135 $("#gdpr_50400").addClass("has-error"); 1136 isValid = false; 1137 } 1138 1139 var bannerHeight = $(".happydays-banner").height(); 1140 1141 if (isValid) { 1142 var dataSerialized = $('#mc-embedded-subscribe-form-tablet').serialize(); 1143 $.ajax({ 1144 type: 'POST', 1145 url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2929&f_id=00fa59e3f0&c=?', 1146 // url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2897&f_id=00fa59e3f0&c=?', 1147 data: dataSerialized, 1148 cache: false, 1149 dataType: 'json', 1150 contentType: "application/json; charset=utf-8", 1151 error: function error(_error) { 1152 console.log('Error', _error); 1153 }, 1154 success: function success(res) { 1155 if (res.result === "error") {// var resMessage = "* This email has already been used."; 1156 // $( ".has-error-tablet:eq(2)" ).css( "display", "block" ).html("").append( resMessage ); 1157 // $( "#mce-EMAIL-tablet" ).trigger( "focus" ); 1158 } else { 1159 // $('.thank-you-container').removeClass('d-none'); 1160 // $('.form-container').addClass('d-none'); 1161 // Redirect Page 1162 window.location.href = "/newsletter-signup-page/thank-you"; 1163 } 1164 } 1165 }); 1166 } else { 1167 $(this).css("background-color", "#F7F5EB"); 1168 $(this).css("color", "#302e52"); 1169 } 1170 }); 1171 $("#signup-form-modal #mc-embedded-subscribe-mobile").on("click", function () { 1172 $(".has-error-mobile:eq(0)").css("display", "none"); 1173 $(".has-error-mobile:eq(1)").css("display", "none"); 1174 $(".has-error-mobile:eq(2)").css("display", "none"); 1175 $(".check-ic-fname-mobile").css("display", "none"); 1176 $(".check-ic-lname-mobile").css("display", "none"); 1177 $(".check-ic-email-mobile").css("display", "none"); 1178 $(".warning-ic-fname-mobile").css("display", "none"); 1179 $(".warning-ic-lname-mobile").css("display", "none"); 1180 $(".warning-ic-email-mobile").css("display", "none"); 1181 var isValid = true; 1182 1183 if ($("#mce-FNAME-mobile").val() === "") { 1184 $(".warning-ic-fname-mobile").css("display", "block"); 1185 $("#mce-FNAME-mobile").val(''); 1186 $("#mce-FNAME-mobile").attr("placeholder", "Please enter your first name"); 1187 $("#mce-FNAME-mobile").css("border", "1.5px solid #FFFFFF"); 1188 $("#mce-FNAME-mobile").css("font-weight", "400"); 1189 isValid = false;
1190 } else if (hasSpecialCharacter($("#mce-FNAME-mobile").val())) { 1191 $(".warning-ic-fname-mobile").css("display", "block"); 1192 $("#mce-FNAME-mobile").val(''); 1193 $("#mce-FNAME-mobile").attr("placeholder", "Please enter a valid first name"); 1194 $("#mce-FNAME-mobile").css("border", "1.5px solid #FFFFFF"); 1195 $("#mce-FNAME-mobile").css("font-weight", "400"); 1196 isValid = false; 1197 } else { 1198 $("#mce-FNAME-mobile").css("border", "2.5px solid #FFFFFF"); 1199 $("#mce-FNAME-mobile").css("font-weight", "bold"); 1200 $(".check-ic-fname-mobile").css("display", "block"); 1201 } 1202 1203 if ($("#mce-LNAME-mobile").val() === "") { 1204 $(".warning-ic-lname-mobile").css("display", "block"); 1205 $("#mce-LNAME-mobile").val(''); 1206 $("#mce-LNAME-mobile").attr("placeholder", "Please enter your last name"); 1207 $("#mce-LNAME-mobile").css("border", "1.5px solid #FFFFFF"); 1208 $("#mce-LNAME-mobile").css("font-weight", "400"); 1209 isValid = false; 1210 } else if (hasSpecialCharacter($("#mce-LNAME-mobile").val())) { 1211 $(".warning-ic-lname-mobile").css("display", "block"); 1212 $("#mce-LNAME-mobile").val(''); 1213 $("#mce-LNAME-mobile").attr("placeholder", "Please enter a valid last name"); 1214 $("#mce-LNAME-mobile").css("border", "1.5px solid #FFFFFF"); 1215 $("#mce-LNAME-mobile").css("font-weight", "400"); 1216 isValid = false; 1217 } else { 1218 $("#mce-LNAME-mobile").css("border", "2.5px solid #FFFFFF"); 1219 $("#mce-LNAME-mobile").css("font-weight", "bold"); 1220 $(".check-ic-lname-mobile").css("display", "block"); 1221 } 1222 1223 if ($("#mce-EMAIL-mobile").val() === "") { 1224 $(".warning-ic-email-mobile").css("display", "block"); 1225 $("#mce-EMAIL-mobile").val(''); 1226 $("#mce-EMAIL-mobile").attr("placeholder", "Please enter your email"); 1227 $("#mce-EMAIL-mobile").css("border", "1.5px solid #FFFFFF"); 1228 $("#mce-EMAIL-mobile").css("font-weight", "400"); 1229 isValid = false; 1230 } else if (!isValidEmail($("#mce-EMAIL-mobile").val())) { 1231 $(".warning-ic-email-mobile").css("display", "block"); 1232 $("#mce-EMAIL-mobile").val(''); 1233 $("#mce-EMAIL-mobile").attr("placeholder", "Please enter a valid email"); 1234 $("#mce-EMAIL-mobile").css("border", "1.5px solid #FFFFFF"); 1235 $("#mce-EMAIL-mobile").css("font-weight", "400"); 1236 isValid = false; 1237 } else { 1238 $("#mce-EMAIL-mobile").css("border", "2.5px solid #FFFFFF"); 1239 $("#mce-EMAIL-mobile").css("font-weight", "bold"); 1240 $(".check-ic-email-mobile").css("display", "block"); 1241 } 1242 1243 if (!$("#gdpr_50400-mobile")[0].checked) { 1244 $("#gdpr_50400-mobile").addClass("has-error"); 1245 isValid = false; 1246 } 1247 1248 var bannerHeight = $(".happydays-banner").height(); 1249 1250 if (isValid) { 1251 var dataSerialized = $('#mc-embedded-subscribe-form-mobile').serialize(); 1252 $.ajax({ 1253 type: 'POST', 1254 url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2929&f_id=00fa59e3f0&c=?', 1255 // url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2897&f_id=00fa59e3f0&c=?', 1256 data: dataSerialized, 1257 cache: false, 1258 dataType: 'json', 1259 contentType: "application/json; charset=utf-8", 1260 error: function error(_error2) { 1261 console.log('Error', _error2); 1262 }, 1263 success: function success(res) { 1264 if (res.result === "error") {// var resMessage = "* This email has already been used."; 1265 // $( ".has-error-mobile:eq(2)" ).css( "display", "block" ).html("").append( resMessage ); 1266 // $( "#mce-EMAIL-mobile" ).trigger( "focus" ); 1267 } else { 1268 // $('.mobile-thank-you-container').removeClass('d-none'); 1269 // $('.mobile-form-container').addClass('d-none'); 1270 // Redirect Page 1271 window.location.href = "/newsletter-signup-page/thank-you"; 1272 } 1273 } 1274 }); 1275 } else { 1276 $(this).css("background-color", "#F7F5EB"); 1277 $(this).css("color", "#302e52"); 1278 } 1279 }); 1280 setHeightEqualToWidth(); // Call once on document ready 1281 1282 $(window).resize(setHeightEqualToWidth); 1283 } 1284 }, 1285 signupform: function signupform() { 1286 var $modal = $('#signup-form-modal'); 1287 $modal.find('form').on('form.submit', function () { 1288 $modal.find('[data-dismiss="modal"]').trigger('click'); 1289 }); 1290 1291 if ($modal.data('enable')) { 1292 $modal.show(); 1293 setTimeout(function () { 1294 Cm.modal.showBackdrop(); 1295 $modal.addClass('show'); 1296 }, 50); 1297 } 1298 1299 if ($('#signup-form-modal').length) { 1300 $("#signup-form-modal #mc-embedded-subscribe-tablet").on("click", function () { 1301 $(".has-error-tablet:eq(0)").css("display", "none"); 1302 $(".has-error-tablet:eq(1)").css("display", "none"); 1303 $(".has-error-tablet:eq(2)").css("display", "none"); 1304 var isValid = true; 1305 1306 if ($("#mce-FNAME-tablet").val() === "") { 1307 $(".has-error-tablet:eq(0)").css("display", "block"); // $( "#mce-FNAME" ).trigger("focus"); 1308 1309 isValid = false;
1310 } 1311 1312 if ($("#mce-LNAME-tablet").val() === "") { 1313 $(".has-error-tablet:eq(1)").css("display", "block"); 1314 isValid = false; 1315 } 1316 1317 if ($("#mce-EMAIL-tablet").val() === "") { 1318 $(".has-error-tablet:eq(2)").css("display", "block"); 1319 isValid = false; 1320 } 1321 1322 if (!$("#gdpr_50400-tablet")[0].checked) { 1323 $("#gdpr_50400-tablet").addClass("has-error"); 1324 isValid = false; 1325 } 1326 1327 var bannerHeight = $(".happydays-banner").height(); 1328 1329 if (isValid) { 1330 var dataSerialized = $('#mc-embedded-subscribe-form-tablet').serialize(); 1331 $.ajax({ 1332 type: 'POST', 1333 url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2897&f_id=00fa59e3f0&c=?', 1334 data: dataSerialized, 1335 cache: false, 1336 dataType: 'json', 1337 contentType: "application/json; charset=utf-8", 1338 error: function error(_error3) { 1339 console.log('Error', _error3); 1340 }, 1341 success: function success(res) { 1342 if (res.result === "error") { 1343 var resMessage = "* This email has already been used."; 1344 $(".has-error-tablet:eq(2)").css("display", "block").html("").append(resMessage); 1345 $("#mce-EMAIL-tablet").trigger("focus"); 1346 } else { 1347 $('.thank-you-container').removeClass('d-none'); 1348 $('.form-container').addClass('d-none'); // Redirect Page 1349 // window.location.href = window.location.protocol + path_name + "/thank-you" + search_value; 1350 } 1351 } 1352 }); 1353 } else { 1354 $(this).css("background-color", "#F7F5EB"); 1355 $(this).css("color", "#302e52"); 1356 } 1357 }); 1358 $("#signup-form-modal #mc-embedded-subscribe-mobile").on("click", function () { 1359 $(".has-error-mobile:eq(0)").css("display", "none"); 1360 $(".has-error-mobile:eq(1)").css("display", "none"); 1361 $(".has-error-mobile:eq(2)").css("display", "none"); 1362 var isValid = true; 1363 1364 if ($("#mce-FNAME-mobile").val() === "") { 1365 $(".has-error-mobile:eq(0)").css("display", "block"); // $( "#mce-FNAME" ).trigger("focus"); 1366 1367 isValid = false; 1368 } 1369 1370 if ($("#mce-LNAME-mobile").val() === "") { 1371 $(".has-error-mobile:eq(1)").css("display", "block"); 1372 isValid = false; 1373 } 1374 1375 if ($("#mce-EMAIL-mobile").val() === "") { 1376 $(".has-error-mobile:eq(2)").css("display", "block"); 1377 isValid = false; 1378 } 1379 1380 if (!$("#gdpr_50400-mobile")[0].checked) { 1381 $("#gdpr_50400-mobile").addClass("has-error"); 1382 isValid = false; 1383 } 1384 1385 var bannerHeight = $(".happydays-banner").height(); 1386 1387 if (isValid) { 1388 var dataSerialized = $('#mc-embedded-subscribe-form-mobile').serialize(); 1389 $.ajax({ 1390 type: 'POST', 1391 url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2897&f_id=00fa59e3f0&c=?', 1392 data: dataSerialized, 1393 cache: false, 1394 dataType: 'json', 1395 contentType: "application/json; charset=utf-8", 1396 error: function error(_error4) { 1397 console.log('Error', _error4); 1398 }, 1399 success: function success(res) { 1400 if (res.result === "error") { 1401 var resMessage = "* This email has already been used."; 1402 $(".has-error-mobile:eq(2)").css("display", "block").html("").append(resMessage); 1403 $("#mce-EMAIL-mobile").trigger("focus"); 1404 } else { 1405 $('.mobile-thank-you-container').removeClass('d-none'); 1406 $('.mobile-form-container').addClass('d-none'); // Redirect Page 1407 // window.location.href = window.location.protocol + path_name + "/thank-you" + search_value; 1408 } 1409 } 1410 }); 1411 } else { 1412 $(this).css("background-color", "#F7F5EB"); 1413 $(this).css("color", "#302e52"); 1414 } 1415 }); 1416 } 1417 1418 if ($('.page-template-template-app-signup').length) { 1419 $(".page-template-template-app-signup #mc-embedded-subscribe-tablet").on("click", function () { 1420 $(".has-error-tablet:eq(0)").css("display", "none"); 1421 $(".has-error-tablet:eq(1)").css("display", "none"); 1422 $(".has-error-tablet:eq(2)").css("display", "none"); 1423 var isValid = true; 1424 1425 if ($("#mce-FNAME-tablet").val() === "") { 1426 $(".has-error-tablet:eq(0)").css("display", "block"); // $( "#mce-FNAME" ).trigger("focus"); 1427 1428 isValid = false;
1429 } 1430 1431 if ($("#mce-LNAME-tablet").val() === "") { 1432 $(".has-error-tablet:eq(1)").css("display", "block"); 1433 isValid = false; 1434 } 1435 1436 if ($("#mce-EMAIL-tablet").val() === "") { 1437 $(".has-error-tablet:eq(2)").css("display", "block"); 1438 isValid = false; 1439 } // if( !$( "#gdpr_50400-tablet" )[0].checked ) { 1440 // $( "#gdpr_50400-tablet" ).addClass( "has-error" ); 1441 // isValid = false; 1442 // } 1443 1444 1445 var bannerHeight = $(".happydays-banner").height(); 1446 1447 if (isValid) { 1448 var dataSerialized = $('#mc-embedded-subscribe-form-tablet').serialize(); 1449 $.ajax({ 1450 type: 'POST', 1451 url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2897&f_id=00a259e3f0&c=?', 1452 data: dataSerialized, 1453 cache: false, 1454 dataType: 'json', 1455 contentType: "application/json; charset=utf-8", 1456 error: function error(_error5) { 1457 console.log('Error', _error5); 1458 }, 1459 success: function success(res) { 1460 if (res.result === "error") { 1461 var resMessage = "* This email has already been used."; 1462 $(".has-error-tablet:eq(2)").css("display", "block").html("").append(resMessage); 1463 $("#mce-EMAIL-tablet").trigger("focus"); 1464 } else { 1465 if (window.location.pathname === '/app-signup') { 1466 var search_value = window.location.search; // Get query parameters if any 1467 1468 window.location.href = window.location.origin + '/app-signup/thank-you' + search_value; 1469 } // $('.thank-you-container').removeClass('d-none'); 1470 // $('.form-container').addClass('d-none'); 1471 // // Redirect Page 1472 // window.location.href = window.location.protocol + path_name + "/thank-you" + search_value; 1473 1474 } 1475 } 1476 }); 1477 } else { 1478 $(this).css("background-color", "#F7F5EB"); 1479 $(this).css("color", "#302e52"); 1480 } 1481 }); 1482 $("#signup-form-modal #mc-embedded-subscribe-mobile").on("click", function () { 1483 $(".has-error-mobile:eq(0)").css("display", "none"); 1484 $(".has-error-mobile:eq(1)").css("display", "none"); 1485 $(".has-error-mobile:eq(2)").css("display", "none"); 1486 var isValid = true; 1487 1488 if ($("#mce-FNAME-mobile").val() === "") { 1489 $(".has-error-mobile:eq(0)").css("display", "block"); // $( "#mce-FNAME" ).trigger("focus"); 1490 1491 isValid = false; 1492 } 1493 1494 if ($("#mce-LNAME-mobile").val() === "") { 1495 $(".has-error-mobile:eq(1)").css("display", "block"); 1496 isValid = false; 1497 } 1498 1499 if ($("#mce-EMAIL-mobile").val() === "") { 1500 $(".has-error-mobile:eq(2)").css("display", "block"); 1501 isValid = false; 1502 } // if( !$( "#gdpr_50400-mobile" )[0].checked ) { 1503 // $( "#gdpr_50400-mobile" ).addClass( "has-error" ); 1504 // isValid = false; 1505 // } 1506 1507 1508 var bannerHeight = $(".happydays-banner").height(); 1509 1510 if (isValid) { 1511 var dataSerialized = $('#mc-embedded-subscribe-form-mobile').serialize(); 1512 $.ajax({ 1513 type: 'POST', 1514 url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2897&f_id=00a259e3f0&c=?', 1515 data: dataSerialized, 1516 cache: false, 1517 dataType: 'json', 1518 contentType: "application/json; charset=utf-8", 1519 error: function error(_error6) { 1520 console.log('Error', _error6); 1521 }, 1522 success: function success(res) { 1523 if (res.result === "error") { 1524 var resMessage = "* This email has already been used."; 1525 $(".has-error-mobile:eq(2)").css("display", "block").html("").append(resMessage); 1526 $("#mce-EMAIL-mobile").trigger("focus"); 1527 } else { 1528 if (window.location.pathname === '/app-signup') { 1529 var search_value = window.location.search; // Get query parameters if any 1530 1531 window.location.href = window.location.origin + '/app-signup/thank-you' + search_value; 1532 } // $('.mobile-thank-you-container').removeClass('d-none'); 1533 // $('.mobile-form-container').addClass('d-none'); 1534 // Redirect Page 1535 // window.location.href = window.location.protocol + path_name + "/thank-you" + search_value; 1536 1537 } 1538 } 1539 }); 1540 } else { 1541 $(this).css("background-color", "#F7F5EB"); 1542 $(this).css("color", "#302e52"); 1543 } 1544 }); 1545 } 1546 }, 1547 appsignup: function appsignup() {
1548 var isClicked = localStorage.getItem("ispopupclicked"); 1549 var $modal = $('#app-signup-modal'); 1550 $modal.find('form').on('form.submit', function () { 1551 $modal.find('[data-dismiss="modal"]').trigger('click'); 1552 localStorage.setItem("ispopupclicked", true); 1553 }); 1554 $('#app-signup-modal .signup-button').on('click', function () { 1555 localStorage.setItem("ispopupclicked", true); 1556 window.location.href = "https://camdenmarket.com/app-signup"; 1557 }); 1558 1559 if ($modal.data('enable') && (isClicked === null || isClicked === undefined || isClicked === "")) { 1560 $modal.show(); 1561 setTimeout(function () { 1562 Cm.modal.showBackdrop(); 1563 $modal.addClass('show'); 1564 }, 10000); 1565 } 1566 1567 if ($('#signup-form-modal').length) { 1568 var setHeightEqualToWidth = function setHeightEqualToWidth() { 1569 var signupImage = $('.signup-image'); 1570 1571 if (signupImage.length > 0) { 1572 var width = signupImage.outerWidth(); // Use outerWidth() instead of width() 1573 1574 $('.signup-image').css('height', width + 'px'); 1575 $('.signup-image').css('max-height', width + 'px'); 1576 } 1577 1578 var signupImageMob = $('.si-mobile'); 1579 1580 if (signupImageMob.length > 0) { 1581 var _width2 = signupImageMob.outerWidth(); // Use outerWidth() instead of width() 1582 1583 1584 $('.si-mobile').css('height', _width2 + 'px'); 1585 $('.si-mobile').css('max-height', _width2 + 'px'); 1586 } 1587 }; 1588 1589 // Call on window resize 1590 var isValidEmail = function isValidEmail(email) { 1591 // Regular expression for validating an email address 1592 var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; // Test the email against the regex 1593 1594 return emailRegex.test(email); 1595 }; 1596 1597 var hasSpecialCharacter = function hasSpecialCharacter(str) { 1598 // Regular expression for detecting special characters 1599 var specialCharRegex = /[!@#$%^&*(),.?":{}|<>]/; // Test the string against the regex 1600 1601 return specialCharRegex.test(str); 1602 }; 1603 1604 $('.close-modal').on('click', function () { 1605 localStorage.setItem("ispopupclicked", true); 1606 }); // Menu header 1607 1608 window.scrollTo({ 1609 top: 50, 1610 behavior: "smooth" // This makes the scrolling smooth 1611 1612 }); 1613 $(_this2).scrollTop(50); 1614 1615 if ($(window).width() < 769) { 1616 $('.mobile-form-container').removeClass('d-none'); 1617 $('.mobile-thank-you-container').removeClass('d-none'); 1618 $('.thank-you-container').addClass('d-none'); 1619 $('.form-container').addClass('d-none'); // Menu header 1620 1621 window.scrollTo({ 1622 top: 100, 1623 behavior: "smooth" // This makes the scrolling smooth 1624 1625 }); 1626 $(_this2).scrollTop(100); 1627 } 1628 1629 $("#signup-form-modal #mc-embedded-subscribe-tablet").on("click", function () { 1630 $(".has-error-tablet:eq(0)").css("display", "none"); 1631 $(".has-error-tablet:eq(1)").css("display", "none"); 1632 $(".has-error-tablet:eq(2)").css("display", "none"); 1633 $(".check-ic-fname").css("display", "none"); 1634 $(".check-ic-lname").css("display", "none"); 1635 $(".check-ic-email").css("display", "none"); 1636 $(".warning-ic-fname").css("display", "none"); 1637 $(".warning-ic-lname").css("display", "none"); 1638 $(".warning-ic-email").css("display", "none"); 1639 var isValid = true; 1640 1641 if ($("#mce-FNAME-tablet").val() === "") { 1642 $(".warning-ic-fname").css("display", "block"); 1643 $("#mce-FNAME-tablet").val(''); 1644 $("#mce-FNAME-tablet").attr("placeholder", "Please enter your first name"); 1645 $("#mce-FNAME-tablet").css("border", "1.5px solid #FFFFFF"); 1646 $("#mce-FNAME-tablet").css("font-weight", "400"); 1647 isValid = false; 1648 } else if (hasSpecialCharacter($("#mce-FNAME-tablet").val())) { 1649 $(".warning-ic-fname").css("display", "block"); 1650 $("#mce-FNAME-tablet").val(''); 1651 $("#mce-FNAME-tablet").attr("placeholder", "Please enter a valid first name"); 1652 $("#mce-FNAME-tablet").css("border", "1.5px solid #FFFFFF"); 1653 $("#mce-FNAME-tablet").css("font-weight", "400"); 1654 isValid = false;
1655 } else { 1656 $("#mce-FNAME-tablet").css("border", "2.5px solid #FFFFFF"); 1657 $("#mce-FNAME-tablet").css("font-weight", "bold"); 1658 $(".check-ic-fname").css("display", "block"); 1659 } 1660 1661 if ($("#mce-LNAME-tablet").val() === "") { 1662 $(".warning-ic-lname").css("display", "block"); 1663 $("#mce-LNAME-tablet").val(''); 1664 $("#mce-LNAME-tablet").attr("placeholder", "Please enter your last name"); 1665 $("#mce-LNAME-tablet").css("border", "1.5px solid #FFFFFF"); 1666 $("#mce-LNAME-tablet").css("font-weight", "400"); 1667 isValid = false; 1668 } else if (hasSpecialCharacter($("#mce-LNAME-tablet").val())) { 1669 $(".warning-ic-lname").css("display", "block"); 1670 $("#mce-LNAME-tablet").val(''); 1671 $("#mce-LNAME-tablet").attr("placeholder", "Please enter a valid last name"); 1672 $("#mce-LNAME-tablet").css("border", "1.5px solid #FFFFFF"); 1673 $("#mce-LNAME-tablet").css("font-weight", "400"); 1674 isValid = false; 1675 } else { 1676 $("#mce-LNAME-tablet").css("border", "2.5px solid #FFFFFF"); 1677 $("#mce-LNAME-tablet").css("font-weight", "bold"); 1678 $(".check-ic-lname").css("display", "block"); 1679 } 1680 1681 if ($("#mce-EMAIL-tablet").val() === "") { 1682 $(".warning-ic-email").css("display", "block"); 1683 $("#mce-EMAIL-tablet").val(''); 1684 $("#mce-EMAIL-tablet").attr("placeholder", "Please enter your email address"); 1685 $("#mce-EMAIL-tablet").css("border", "1.5px solid #FFFFFF"); 1686 $("#mce-EMAIL-tablet").css("font-weight", "400"); 1687 isValid = false; 1688 } else if (!isValidEmail($("#mce-EMAIL-tablet").val())) { 1689 $(".warning-ic-email").css("display", "block"); 1690 $("#mce-EMAIL-tablet").val(''); 1691 $("#mce-EMAIL-tablet").attr("placeholder", "Please enter a valid email address"); 1692 $("#mce-EMAIL-tablet").css("border", "1.5px solid #FFFFFF"); 1693 $("#mce-EMAIL-tablet").css("font-weight", "400"); 1694 isValid = false; 1695 } else { 1696 $("#mce-EMAIL-tablet").css("border", "2.5px solid #FFFFFF"); 1697 $("#mce-EMAIL-tablet").css("font-weight", "bold"); 1698 $(".check-ic-email").css("display", "block"); 1699 } 1700 1701 if (!$("#gdpr_50400")[0].checked) { 1702 $("#gdpr_50400").addClass("has-error"); 1703 isValid = false; 1704 } 1705 1706 var bannerHeight = $(".happydays-banner").height(); 1707 1708 if (isValid) { 1709 var dataSerialized = $('#mc-embedded-subscribe-form-tablet').serialize(); 1710 $.ajax({ 1711 type: 'POST', 1712 url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2929&f_id=00fa59e3f0&c=?', 1713 // url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2897&f_id=00fa59e3f0&c=?', 1714 data: dataSerialized, 1715 cache: false, 1716 dataType: 'json', 1717 contentType: "application/json; charset=utf-8", 1718 error: function error(_error7) { 1719 console.log('Error', _error7); 1720 }, 1721 success: function success(res) { 1722 if (res.result === "error") {// var resMessage = "* This email has already been used."; 1723 // $( ".has-error-tablet:eq(2)" ).css( "display", "block" ).html("").append( resMessage ); 1724 // $( "#mce-EMAIL-tablet" ).trigger( "focus" ); 1725 } else { 1726 // $('.thank-you-container').removeClass('d-none'); 1727 // $('.form-container').addClass('d-none'); 1728 // Redirect Page 1729 window.location.href = "/newsletter-signup-page/thank-you"; 1730 } 1731 } 1732 }); 1733 } else { 1734 $(this).css("background-color", "#F7F5EB"); 1735 $(this).css("color", "#302e52"); 1736 } 1737 }); 1738 $("#signup-form-modal #mc-embedded-subscribe-mobile").on("click", function () { 1739 $(".has-error-mobile:eq(0)").css("display", "none"); 1740 $(".has-error-mobile:eq(1)").css("display", "none"); 1741 $(".has-error-mobile:eq(2)").css("display", "none"); 1742 $(".check-ic-fname-mobile").css("display", "none"); 1743 $(".check-ic-lname-mobile").css("display", "none"); 1744 $(".check-ic-email-mobile").css("display", "none"); 1745 $(".warning-ic-fname-mobile").css("display", "none"); 1746 $(".warning-ic-lname-mobile").css("display", "none"); 1747 $(".warning-ic-email-mobile").css("display", "none"); 1748 var isValid = true; 1749 1750 if ($("#mce-FNAME-mobile").val() === "") { 1751 $(".warning-ic-fname-mobile").css("display", "block"); 1752 $("#mce-FNAME-mobile").val(''); 1753 $("#mce-FNAME-mobile").attr("placeholder", "Please enter your first name"); 1754 $("#mce-FNAME-mobile").css("border", "1.5px solid #FFFFFF"); 1755 $("#mce-FNAME-mobile").css("font-weight", "400"); 1756 isValid = false;
1757 } else if (hasSpecialCharacter($("#mce-FNAME-mobile").val())) { 1758 $(".warning-ic-fname-mobile").css("display", "block"); 1759 $("#mce-FNAME-mobile").val(''); 1760 $("#mce-FNAME-mobile").attr("placeholder", "Please enter a valid first name"); 1761 $("#mce-FNAME-mobile").css("border", "1.5px solid #FFFFFF"); 1762 $("#mce-FNAME-mobile").css("font-weight", "400"); 1763 isValid = false; 1764 } else { 1765 $("#mce-FNAME-mobile").css("border", "2.5px solid #FFFFFF"); 1766 $("#mce-FNAME-mobile").css("font-weight", "bold"); 1767 $(".check-ic-fname-mobile").css("display", "block"); 1768 } 1769 1770 if ($("#mce-LNAME-mobile").val() === "") { 1771 $(".warning-ic-lname-mobile").css("display", "block"); 1772 $("#mce-LNAME-mobile").val(''); 1773 $("#mce-LNAME-mobile").attr("placeholder", "Please enter your last name"); 1774 $("#mce-LNAME-mobile").css("border", "1.5px solid #FFFFFF"); 1775 $("#mce-LNAME-mobile").css("font-weight", "400"); 1776 isValid = false; 1777 } else if (hasSpecialCharacter($("#mce-LNAME-mobile").val())) { 1778 $(".warning-ic-lname-mobile").css("display", "block"); 1779 $("#mce-LNAME-mobile").val(''); 1780 $("#mce-LNAME-mobile").attr("placeholder", "Please enter a valid last name"); 1781 $("#mce-LNAME-mobile").css("border", "1.5px solid #FFFFFF"); 1782 $("#mce-LNAME-mobile").css("font-weight", "400"); 1783 isValid = false; 1784 } else { 1785 $("#mce-LNAME-mobile").css("border", "2.5px solid #FFFFFF"); 1786 $("#mce-LNAME-mobile").css("font-weight", "bold"); 1787 $(".check-ic-lname-mobile").css("display", "block"); 1788 } 1789 1790 if ($("#mce-EMAIL-mobile").val() === "") { 1791 $(".warning-ic-email-mobile").css("display", "block"); 1792 $("#mce-EMAIL-mobile").val(''); 1793 $("#mce-EMAIL-mobile").attr("placeholder", "Please enter your email"); 1794 $("#mce-EMAIL-mobile").css("border", "1.5px solid #FFFFFF"); 1795 $("#mce-EMAIL-mobile").css("font-weight", "400"); 1796 isValid = false; 1797 } else if (!isValidEmail($("#mce-EMAIL-mobile").val())) { 1798 $(".warning-ic-email-mobile").css("display", "block"); 1799 $("#mce-EMAIL-mobile").val(''); 1800 $("#mce-EMAIL-mobile").attr("placeholder", "Please enter a valid email"); 1801 $("#mce-EMAIL-mobile").css("border", "1.5px solid #FFFFFF"); 1802 $("#mce-EMAIL-mobile").css("font-weight", "400"); 1803 isValid = false; 1804 } else { 1805 $("#mce-EMAIL-mobile").css("border", "2.5px solid #FFFFFF"); 1806 $("#mce-EMAIL-mobile").css("font-weight", "bold"); 1807 $(".check-ic-email-mobile").css("display", "block"); 1808 } 1809 1810 if (!$("#gdpr_50400-mobile")[0].checked) { 1811 $("#gdpr_50400-mobile").addClass("has-error"); 1812 isValid = false; 1813 } 1814 1815 var bannerHeight = $(".happydays-banner").height(); 1816 1817 if (isValid) { 1818 var dataSerialized = $('#mc-embedded-subscribe-form-mobile').serialize(); 1819 $.ajax({ 1820 type: 'POST', 1821 url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2929&f_id=00fa59e3f0&c=?', 1822 // url: 'https://camdenmarket.us4.list-manage.com/subscribe/post-json?u=78efecf01530132ed95849d8e&id=b074092387&v_id=2897&f_id=00fa59e3f0&c=?', 1823 data: dataSerialized, 1824 cache: false, 1825 dataType: 'json', 1826 contentType: "application/json; charset=utf-8", 1827 error: function error(_error8) { 1828 console.log('Error', _error8); 1829 }, 1830 success: function success(res) { 1831 if (res.result === "error") {// var resMessage = "* This email has already been used."; 1832 // $( ".has-error-mobile:eq(2)" ).css( "display", "block" ).html("").append( resMessage ); 1833 // $( "#mce-EMAIL-mobile" ).trigger( "focus" ); 1834 } else { 1835 // $('.mobile-thank-you-container').removeClass('d-none'); 1836 // $('.mobile-form-container').addClass('d-none'); 1837 // Redirect Page 1838 window.location.href = "/newsletter-signup-page/thank-you"; 1839 } 1840 } 1841 }); 1842 } else { 1843 $(this).css("background-color", "#F7F5EB"); 1844 $(this).css("color", "#302e52"); 1845 } 1846 }); 1847 setHeightEqualToWidth(); // Call once on document ready 1848 1849 $(window).resize(setHeightEqualToWidth); 1850 } 1851 }, 1852 videoplayer: function videoplayer(player) { 1853 var $modal = $('#player-modal'); 1854 $modal.show(); 1855 setTimeout(function () { 1856 Cm.modal.showBackdrop(); 1857 $modal.addClass('show'); 1858 }, 50); 1859 }, 1860 showBackdrop: function showBackdrop() { 1861 $('body').append('<div class="modal-backdrop fade show"></div>'); 1862 }, 1863 hideBackdrop: function hideBackdrop() { 1864 $('.modal-backdrop').fadeOut(function () { 1865 $('.modal-backdrop').remove(); 1866 }); 1867 } 1868}; 1869/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 1870 1871/***/ }), 1872
1873/***/ "./scripts/pages/template-home-v2.js": 1874/*!*******************************************!*\ 1875 !*** ./scripts/pages/template-home-v2.js ***! 1876 \*******************************************/ 1877/*! no static exports found */ 1878/***/ (function(module, exports, __webpack_require__) { 1879 1880/* WEBPACK VAR INJECTION */(function($) {function slickCarousel() { 1881 if (window.matchMedia('(min-width: 992px)').matches) { 1882 $(".explore-container .wrapper .overflow-scroll-mobile").not('.slick-initialized').slick({ 1883 dots: true, 1884 infinite: true, 1885 speed: 300, 1886 slidesToShow: 1, 1887 centerMode: false, 1888 variableWidth: false, 1889 arrows: true, 1890 fade: true, 1891 autoplay: true, 1892 autoplaySpeed: 4000, 1893 pauseOnHover: true, 1894 prevArrow: $(".explore-container .prev"), 1895 nextArrow: $(".explore-container .next"), 1896 appendDots: $(".explore-container .dots") 1897 }); 1898 } 1899 1900 $(".instagram-container .wrapper").not('.slick-initialized').slick({ 1901 dots: false, 1902 infinite: true, 1903 speed: 300, 1904 slidesToShow: 1, 1905 centerMode: false, 1906 variableWidth: true, 1907 arrows: true, 1908 autoplay: false, 1909 autoplaySpeed: 4000, 1910 pauseOnHover: false, 1911 prevArrow: $(".instagram-container .prev"), 1912 nextArrow: $(".instagram-container .next"), 1913 appendDots: $(".instagram-container .dots"), 1914 responsive: [{ 1915 breakpoint: 991, 1916 settings: { 1917 centerMode: false, 1918 variableWidth: true, 1919 arrows: false 1920 } 1921 }] 1922 }); 1923} 1924 1925$(window).scroll(function () { 1926 var scrollDirection = this.oldScroll > this.scrollY; 1927 var scrollTop = $(window).scrollTop(); 1928 this.oldScroll = this.scrollY; 1929 1930 if (scrollTop > 500) { 1931 if (scrollDirection == false) { 1932 navbarNotFixed0(); 1933 } else { 1934 navbarFixed0(); 1935 } 1936 } else if (scrollTop == 0) { 1937 navbarFixed0(); 1938 $(".ico_main_logo2").addClass("hide"); 1939 $(".ico_main_logo").removeClass("hide"); 1940 } 1941 1942 if (!$("#mega-menu-full-dropdown").hasClass("active") && scrollTop > 0) { 1943 $(".navbar-fixed-top").removeClass("top-scroll--modify"); 1944 $(".navbar-fixed-top").addClass("scrolled"); 1945 $(".navbar-fixed-top").addClass("top-scroll--modify-scrolled"); 1946 $(".ico_main_logo2").removeClass("hide"); 1947 $(".navbar-fixed-top").removeClass("navbar--old-bg"); 1948 $(".navbar-pagination").removeClass("navbar--old"); 1949 $(".navbar-fixed-top").removeClass("bg-transparent"); 1950 } else { 1951 navbarFixed0(); 1952 1953 if ($("#mega-menu-full-dropdown").hasClass("active")) { 1954 $(".navbar-fixed-top").removeClass("bg-transparent"); 1955 $(".navbar-fixed-top").addClass("top-scroll--modify-scrolled"); 1956 $(".ico_main_logo2").addClass("hide"); 1957 $(".ico_main_logo").removeClass("hide"); 1958 } else { 1959 $(".navbar-fixed-top").removeClass("top-scroll--modify-scrolled"); 1960 } 1961 1962 $(".navbar-fixed-top").removeClass("scrolled"); 1963 $(".navbar-fixed-top").addClass("top-scroll--modify"); 1964 $(".navbar-fixed-top").addClass("navbar--old-bg"); 1965 $(".navbar-pagination").addClass("navbar--old"); 1966 $(".navbar-fixed-top").addClass("bg-transparent"); 1967 } 1968 1969 bgTransparentContainer(); 1970}); 1971 1972function navbarFixed0() { 1973 $('.navbar-fixed-top').css('position', 'fixed'); 1974 $('.navbar-fixed-top').css('top', 0); 1975} 1976 1977function navbarNotFixed0() { 1978 $('.navbar-fixed-top').css('position', 'fixed'); 1979 $('.navbar-fixed-top').css('top', '-100%'); 1980} 1981 1982$(document).on("click", ".arrow-container", function () { 1983 if (window.innerWidth <= 991) { 1984 var ID = $(this).attr("id"); 1985 1986 if ($(this).hasClass("active")) { 1987 $(this).removeClass("active"); 1988 } else { 1989 $(this).addClass("active"); 1990 } 1991 1992 $("." + ID).slideToggle("active"); 1993 } 1994}); // $(".change-icon").mouseover(function () { 1995// $(".icon_logo").removeClass("active"); 1996// var ID = $(this).attr("id"); 1997// $("." + ID).addClass("active"); 1998// }); 1999// $(".change-icon").mouseleave(function () { 2000// $(".icon_logo").removeClass("active"); 2001// $(".main__ico").addClass("active"); 2002// }); 2003 2004$(".explore-container .carousel-container").mouseover(function () { 2005 $(".explore-container .arrow-dots_container").addClass("hover-arrow"); 2006}); 2007$(".explore-container .carousel-container").mouseleave(function () { 2008 $(".explore-container .arrow-dots_container").removeClass("hover-arrow"); 2009}); 2010$(".burger-ico").click(function () { 2011 openMenu(); 2012 navbarFixed0(); 2013 bgTransparentContainer(); 2014 $(".ico_main_logo").addClass("hide"); 2015 $(".navbar-pagination").removeClass("modify-top--relative"); 2016}); 2017$(".x-ico").click(function () { 2018 navbarFixed0(); 2019 bgTransparentContainer(); 2020 $(".navbar-fixed-top").removeClass("navbar-position"); 2021 $("#text-search").val(""); 2022 $(".panel-menu--search").removeClass("active"); 2023 $(".panel-menu--list").addClass("active"); 2024 $(".ico_main_logo2").removeClass("hide"); 2025 $("#mega-menu-full-dropdown").slideToggle(500); 2026 $(".toggle-button-burger .burger-ico").addClass("active"); 2027 $(".toggle-button-burger .x-ico").removeClass("active"); 2028 $("body").removeClass("overflow-none"); 2029 $(".search-input--container").removeClass("active"); 2030 $(".icon-container--search").addClass("active"); 2031 $(".navbar-fixed-top").addClass("navbar--old-bg"); 2032 $(".navbar-pagination").addClass("navbar--old"); 2033 $("#mega-menu-full-dropdown").removeClass("active"); 2034 $(".navbar-pagination").removeClass("modify-top--relative"); 2035 var scrollTop = $(window).scrollTop(); 2036 2037 if (scrollTop === 0) { 2038 $(".navbar-fixed-top").addClass("navbar--old-bg"); 2039 $(".navbar-pagination").addClass("navbar--old"); 2040 $(".navbar-fixed-top").addClass("top-scroll--modify"); 2041 $(".navbar-fixed-top").removeClass("scrolled"); 2042 $(".ico_main_logo").removeClass("hide"); 2043 $(".navbar-fixed-top").removeClass("top-scroll--modify-scrolled"); 2044 } else { 2045 $(".navbar-fixed-top").removeClass("navbar--old-bg"); 2046 $(".navbar-pagination").removeClass("navbar--old"); 2047 $(".navbar-fixed-top").addClass("scrolled"); 2048 $(".navbar-fixed-top").removeClass("top-scroll--modify"); 2049 $(".navbar-fixed-top").addClass("top-scroll--modify-scrolled"); 2050 } 2051}); 2052$(".search--icon").click(function () { 2053 $("#text-search").val(""); 2054 bgTransparentContainer(); 2055 navbarFixed0(); 2056 searchBarContainer(); 2057}); 2058 2059function openMenu() { 2060 $(".navbar-fixed-top").removeClass("bg-transparent"); 2061 $(".navbar-fixed-top").addClass("navbar-position"); 2062 $("#text-search").val(""); 2063 $(".panel-menu--search").removeClass("active"); 2064 $(".panel-menu--list").addClass("active"); 2065 $(".ico_main_logo2").addClass("hide"); 2066 $(".search-input--container").removeClass("active"); 2067 $(".icon-container--search").addClass("active"); 2068 2069 if (!$("#mega-menu-full-dropdown").hasClass("active")) { 2070 $("#mega-menu-full-dropdown").slideDown("slow"); 2071 $("#mega-menu-full-dropdown").addClass("active"); 2072 } 2073 2074 $(".toggle-button-burger .burger-ico").removeClass("active"); 2075 $(".toggle-button-burger .x-ico").addClass("active"); 2076 $("body").addClass("overflow-none"); 2077 var scrollTop = $(window).scrollTop(); 2078 $(".navbar-fixed-top").removeClass("navbar--old-bg"); 2079 $(".navbar-pagination").removeClass("navbar--old"); 2080 2081 if (scrollTop === 0) { 2082 $(".navbar-fixed-top").addClass("top-scroll--modify"); 2083 $(".navbar-fixed-top").removeClass("scrolled"); 2084 $(".navbar-fixed-top").addClass("top-scroll--modify-scrolled"); 2085 } else { 2086 $(".navbar-fixed-top").addClass("scrolled"); 2087 $(".navbar-fixed-top").removeClass("top-scroll--modify"); 2088 $(".navbar-fixed-top").addClass("top-scroll--modify-scrolled"); 2089 } 2090} 2091 2092function searchBarContainer() { 2093 $(".navbar-fixed-top").removeClass("navbar--old-bg"); 2094 $(".navbar-pagination").removeClass("navbar--old"); 2095 var scrollTop = $(window).scrollTop(); 2096 $(".toggle-button-burger .burger-ico").addClass("active"); 2097 $(".toggle-button-burger .x-ico").removeClass("active"); 2098 $(".navbar-fixed-top").removeClass("navbar--old-bg"); 2099 $(".navbar-pagination").removeClass("navbar--old"); 2100 2101 if ($("#mega-menu-full-dropdown").hasClass("active")) { 2102 $("#mega-menu-full-dropdown").slideToggle("slow"); 2103 $("#mega-menu-full-dropdown").removeClass("active"); 2104 $("body").removeClass("overflow-none"); 2105 } 2106 2107 if ($(".panel-menu--list").hasClass("active") || $(".panel-menu--search").hasClass("active")) { 2108 $(".search-input--container").addClass("active"); 2109 $(".icon-container--search").removeClass("active"); 2110 } else { 2111 $(".search-input--container").removeClass("active"); 2112 $(".icon-container--search").addClass("active"); 2113 } 2114 2115 if (scrollTop === 0) { 2116 $(".navbar-fixed-top").addClass("top-scroll--modify"); 2117 $(".navbar-fixed-top").removeClass("scrolled"); 2118 $(".navbar-fixed-top").addClass("top-scroll--modify-scrolled"); 2119 $(".navbar-fixed-top").addClass("bg-transparent"); 2120 $(".navbar-fixed-top").addClass("navbar--old-bg"); 2121 $(".navbar-pagination").addClass("navbar--old"); 2122 } else { 2123 $(".navbar-fixed-top").addClass("scrolled"); 2124 $(".navbar-fixed-top").removeClass("top-scroll--modify"); 2125 $(".navbar-fixed-top").addClass("top-scroll--modify-scrolled"); 2126 $(".navbar-fixed-top").removeClass("bg-transparent"); 2127 } 2128 2129 $(".navbar-pagination").addClass("modify-top--relative"); 2130 $(".left-icon--container").addClass("mobile-active"); 2131 $(".logo-container").addClass("mobile-active"); 2132 $("#mega-menu-full").addClass("mobile-active"); 2133 $(".search-input--container").addClass("mobile-active"); 2134 2135 if ($(".navbar-fixed-top").hasClass("bg-transparent")) { 2136 $(".ico_main_logo2").addClass("hide"); 2137 $(".ico_main_logo").removeClass("hide"); 2138 } else { 2139 $(".ico_main_logo").addClass("hide"); 2140 $(".ico_main_logo2").removeClass("hide"); 2141 } 2142} 2143 2144$(".x-ico--input").click(function () { 2145 navbarFixed0(); 2146 bgTransparentContainer(); 2147 var scrollTop = $(window).scrollTop(); 2148 searchContainerClose(); 2149 searchContainerCloseMenuNav(); 2150 $(".navbar-fixed-top").removeClass("bg-transparent"); 2151 $(".ico_main_logo").removeClass("hide"); 2152 $(".navbar-pagination").removeClass("modify-top--relative"); 2153 2154 if (scrollTop === 0) { 2155 $(".ico_main_logo").removeClass("hide"); 2156 } 2157}); 2158 2159function searchContainerClose() { 2160 $(".toggle-button-burger .burger-ico").addClass("active"); 2161 $(".toggle-button-burger .x-ico").removeClass("active"); 2162 $(".left-icon--container").removeClass("mobile-active"); 2163 $(".logo-container").removeClass("mobile-active"); 2164 $("#mega-menu-full").removeClass("mobile-active"); 2165 2166 if ($("#mega-menu-full-dropdown").hasClass("active")) { 2167 $("#mega-menu-full-dropdown").slideToggle("slow"); 2168 $("#mega-menu-full-dropdown").removeClass("active"); 2169 $("body").removeClass("overflow-none"); 2170 } 2171} 2172 2173function searchContainerCloseMenuNav() { 2174 $(".icon-container--search").addClass("active"); 2175 $("#text-search").val(""); 2176 $(".search-input--container").removeClass("active"); 2177 $(".search-input--container").removeClass("mobile-active"); 2178 var scrollTop = $(window).scrollTop(); 2179 2180 if (scrollTop === 0) { 2181 $(".navbar-fixed-top").addClass("navbar--old-bg"); 2182 $(".navbar-pagination").addClass("navbar--old"); 2183 $(".navbar-fixed-top").addClass("top-scroll--modify"); 2184 $(".navbar-fixed-top").removeClass("scrolled"); 2185 $(".navbar-fixed-top").removeClass("top-scroll--modify-scrolled"); 2186 } else { 2187 $(".navbar-fixed-top").addClass("scrolled"); 2188 $(".navbar-fixed-top").removeClass("top-scroll--modify"); 2189 $(".navbar-fixed-top").addClass("top-scroll--modify-scrolled"); 2190 $(".ico_main_logo2").removeClass("hide"); 2191 } 2192} 2193 2194function bgTransparentContainer() { 2195 var scrollTop = $(window).scrollTop(); 2196 2197 if (scrollTop === 0 && !$("#mega-menu-full-dropdown").hasClass("active")) { 2198 $(".navbar-fixed-top").addClass("bg-transparent"); 2199 $('.navbar-pagination').css('top', '0 !important'); 2200 $(".navbar-fixed-top").addClass("navbar--old-bg"); 2201 $(".navbar-pagination").addClass("navbar--old"); 2202 } else if ($("#mega-menu-full-dropdown").hasClass("active")) { 2203 $(".navbar-fixed-top").removeClass("bg-transparent"); 2204 $('.navbar-pagination').css('top', '-23px !important'); 2205 $(".ico_main_logo2").addClass("hide"); 2206 $(".ico_main_logo").addClass("hide"); 2207 } else { 2208 $(".navbar-fixed-top").removeClass("bg-transparent"); 2209 } 2210} 2211 2212function searchContainerOpen() { 2213 $("body").addClass("overflow-none"); 2214 $(".ico_main_logo2").addClass("hide"); 2215 $(".panel-menu--search").addClass("active"); 2216 $(".panel-menu--list").removeClass("active"); 2217 $(".navbar-fixed-top").removeClass("bg-transparent"); 2218 var scrollTop = $(window).scrollTop(); 2219 2220 if (scrollTop === 0) { 2221 $(".navbar-fixed-top").removeClass("navbar--old-bg"); 2222 $(".navbar-pagination").removeClass("navbar--old"); 2223 $(".navbar-fixed-top").addClass("top-scroll--modify"); 2224 $(".navbar-fixed-top").removeClass("scrolled"); 2225 $(".navbar-fixed-top").addClass("top-scroll--modify-scrolled"); 2226 } else { 2227 $(".navbar-fixed-top").addClass("scrolled"); 2228 $(".navbar-fixed-top").removeClass("top-scroll--modify"); 2229 $(".navbar-fixed-top").addClass("top-scroll--modify-scrolled"); 2230 } 2231 2232 if (!$("#mega-menu-full-dropdown").hasClass("active")) { 2233 $("#mega-menu-full-dropdown").slideToggle("slow"); 2234 $("#mega-menu-full-dropdown").addClass("active"); 2235 } 2236} 2237/** Search Function - Eleixeis Burce */ 2238 2239 2240$("#text-search").on("keypress", function () { 2241 getSearchData(); 2242 searchContainerOpen(); 2243}); 2244$("#text-search").on("change", function () { 2245 getSearchData(); 2246 searchContainerOpen(); 2247}); 2248$("#text-search").on("keydown", function () { 2249 getSearchData(); 2250 searchContainerOpen(); 2251}); 2252 2253function getSearchData() { 2254 $(".ico_main_logo").addClass("hide"); 2255 $(".navbar-fixed-top").removeClass("bg-transparent"); 2256 $(".navbar-pagination").removeClass("modify-top--relative"); 2257 setTimeout(function () { 2258 var protocol = $(location).attr("protocol"); 2259 var host = $(location).attr("hostname"); 2260 var searchTerm = $("#text-search").val(); 2261 var apiURL = "/wp-json/search-portal/v1/custom/"; 2262 2263 if (searchTerm.length >= 3) { 2264 $(".text-been-search").html("").html(searchTerm); 2265 searchTerm = encodeURIComponent(searchTerm); 2266 searchTerm = searchTerm.replace("%E2%80%99", "xsinglequotex"); 2267 searchTerm = searchTerm.replace("'", "xsinglequotex"); 2268 searchTerm = searchTerm.replace("%26", "xampersandx");
2269 var mainURL = protocol + "//" + host + apiURL + searchTerm; 2270 $.get(mainURL, function (response) { 2271 var _response$fooddrink, _response$thingstodo, _response$shops, _response$events, _response$page, _response$suggestion, _response$stories, _response$experiences; 2272 2273 processResults("#food-drink-more-suggestion-list", "#food-drinks-container", response === null || response === void 0 ? void 0 : (_response$fooddrink = response.fooddrink) === null || _response$fooddrink === void 0 ? void 0 : _response$fooddrink.contents, searchTerm); 2274 processResults("#things-to-do-more-suggestion-list", "#things-to-do-container", response === null || response === void 0 ? void 0 : (_response$thingstodo = response.thingstodo) === null || _response$thingstodo === void 0 ? void 0 : _response$thingstodo.contents, searchTerm); 2275 processResults("#shops-more-suggestion-list", "#shops-container", response === null || response === void 0 ? void 0 : (_response$shops = response.shops) === null || _response$shops === void 0 ? void 0 : _response$shops.contents, searchTerm); 2276 processResults("#events-more-suggestion-list", "#events-container", response === null || response === void 0 ? void 0 : (_response$events = response.events) === null || _response$events === void 0 ? void 0 : _response$events.contents, searchTerm); 2277 processResults("#page-more-suggestion-list", "#page-container", response === null || response === void 0 ? void 0 : (_response$page = response.page) === null || _response$page === void 0 ? void 0 : _response$page.contents, searchTerm); 2278 processResults("#list-top-suggestion", "#list-container", response === null || response === void 0 ? void 0 : (_response$suggestion = response.suggestion) === null || _response$suggestion === void 0 ? void 0 : _response$suggestion.contents, searchTerm); 2279 processResults("#stories-more-suggestion-list", "#stories-container", response === null || response === void 0 ? void 0 : (_response$stories = response.stories) === null || _response$stories === void 0 ? void 0 : _response$stories.contents, searchTerm); 2280 processResults("#experiences-more-suggestion-list", "#experiences-container", response === null || response === void 0 ? void 0 : (_response$experiences = response.experiences) === null || _response$experiences === void 0 ? void 0 : _response$experiences.contents, searchTerm); 2281 }); 2282 } 2283 }, 500); 2284} 2285 2286function processResults(domID, domContainer, domContents, searchTerm) { 2287 var p = $(domID); 2288 var c = $(domContainer); 2289 p.html(""); 2290 2291 if (!domContents.length) { 2292 p.addClass("d-none"); 2293 c.addClass("d-none"); 2294 return; 2295 } else { 2296 p.removeClass("d-none"); 2297 c.removeClass("d-none"); 2298 } 2299 2300 searchTerm = decodeURIComponent(searchTerm); 2301 $.each(domContents, function (k, v) { 2302 var post_title = v.title.toLowerCase(); 2303 var searchFor = post_title.replace(searchTerm.trim().toLowerCase(), "<strong>" + searchTerm.trim().toLowerCase() + "</strong>"); 2304 p.append('<li style="text-transform: capitalize;"><a href="' + v.permalink + '" class="text-white">' + searchFor + "</a></li>"); 2305 }); 2306} 2307 2308function igresize() { 2309 $(".ig-img").each(function () { 2310 var oneheight = $(this).innerHeight(); 2311 $(this).innerWidth(oneheight); 2312 }); 2313} 2314 2315$(document).ready(function () { 2316 igresize(); 2317 slickCarousel(); 2318 $(".video-four-square").hover(hoverVideo, hideVideo); 2319 bgTransparentContainer(); 2320}); 2321$(window).resize(function () { 2322 igresize(); 2323 slickCarousel(); 2324 bgTransparentContainer(); 2325}); 2326$(window).load(function () { 2327 slickCarousel(); 2328 bgTransparentContainer(); 2329}); 2330 2331function hoverVideo() { 2332 $('video', this).get(0).play(); 2333} 2334 2335function hideVideo() { 2336 $('video', this).get(0).pause(); 2337} 2338 2339document.addEventListener("DOMContentLoaded", function () { 2340 // Banner Video 2341 var banner_video_url = "https://wp-media.camdenmarket.com/wp-content/uploads/2023/05/23140223/discover-camden-market-mobile-rf-24.mp4#t=0.1"; // Mobile 2342 2343 var banner_poster_url = "https://wp-media.camdenmarket.com/wp-content/uploads/2023/05/23141148/discover-camden-market-mobile-rf-24.webp"; // Mobile 2344 2345 if ($(window).outerWidth() > 991) { 2346 banner_video_url = "https://wp-media.camdenmarket.com/wp-content/uploads/2023/05/23140217/discover-camden-market-dekstop-rf-24.mp4#t=0.1"; // Desktop 2347 2348 banner_poster_url = "https://wp-media.camdenmarket.com/wp-content/uploads/2023/05/23141146/discover-camden-market-dekstop-rf-24.webp"; // Desktop 2349 } 2350 2351 var lazyVideos = [].slice.call(document.querySelectorAll("video.lazy")); 2352 2353 if ("IntersectionObserver" in window) { 2354 var lazyVideoObserver = new IntersectionObserver(function (entries, observer) {
2355 entries.forEach(function (video) { 2356 if (video.isIntersecting) { 2357 video.target.poster = banner_poster_url; 2358 2359 for (var source in video.target.children) { 2360 var videoSource = video.target.children[source]; 2361 2362 if (typeof videoSource.tagName === "string" && videoSource.tagName === "SOURCE") { 2363 videoSource.src = banner_video_url; 2364 } 2365 } 2366 2367 video.target.load(); 2368 video.target.classList.remove("lazy"); 2369 lazyVideoObserver.unobserve(video.target); 2370 } 2371 }); 2372 }); 2373 lazyVideos.forEach(function (lazyVideo) { 2374 lazyVideoObserver.observe(lazyVideo); 2375 }); 2376 } 2377}); 2378$(document).on("click", function (event) { 2379 if ($(".search-input--container").hasClass("active")) { 2380 if ($(event.target).closest("#mega-menu-full").length === 0 && $(event.target).closest("#mega-menu-full-dropdown").length === 0) { 2381 searchContainerClose(); 2382 searchContainerCloseMenuNav(); 2383 } 2384 } 2385}); 2386/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 2387 2388/***/ }), 2389
2390/***/ "./scripts/post.js": 2391/*!*************************!*\ 2392 !*** ./scripts/post.js ***! 2393 \*************************/ 2394/*! no exports provided */ 2395/***/ (function(module, __webpack_exports__, __webpack_require__) { 2396 2397"use strict"; 2398__webpack_require__.r(__webpack_exports__); 2399/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helper */ "./scripts/helper.js"); 2400 2401Cm.post = { 2402 init: function init() { 2403 var uri = $('.filter__post select').data('uri'); 2404 $('.filter__post select').off('change').on('change', function () { 2405 var p = Object(_helper__WEBPACK_IMPORTED_MODULE_0__["urlParam"])('page') !== null ? '&page=' + Object(_helper__WEBPACK_IMPORTED_MODULE_0__["urlParam"])('page') : ''; 2406 window.location = (wp.archive_url || uri) + (this.value.toLowerCase() != 'all' ? '/?q=' + this.value.replace(/-/g, ' ') : ''); 2407 }); 2408 2409 if (window.location.href.indexOf('/journal/camden-market-summer-sale') > -1) { 2410 window.location.href = '/sale/camden-market-summer-sale'; 2411 } 2412 } 2413}; 2414/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 2415 2416/***/ }), 2417
2418/***/ "./scripts/search.js": 2419/*!***************************!*\ 2420 !*** ./scripts/search.js ***! 2421 \***************************/ 2422/*! no static exports found */ 2423/***/ (function(module, exports, __webpack_require__) { 2424 2425/* WEBPACK VAR INJECTION */(function($) {Cm.search = { 2426 state: 0, 2427 value: '', 2428 timer: null, 2429 $el: null, 2430 active: -1, 2431 hasPost: false, 2432 totalPost: 0, 2433 template: function template() { 2434 return "<a href=\"__URL__\" class=\"list-group-item list-group-item-action\">\n <p class=\"tname\">__NAME__</p>\n <small><em>__TYPE__</em></small>\n </a>"; 2435 }, 2436 init: function init() { 2437 var _this = this; 2438 2439 this.$el = $('.header-search-result'); 2440 $('body').on('focus', '.header-search-form .search-input', function () { 2441 Cm.search.value = this.value; 2442 Cm.search.state = 0; 2443 2444 _this.display(); 2445 }); 2446 $('body').on('click', function (e) { 2447 var isSearch = $(e.target).closest('.header-search-form'); 2448 2449 if (!isSearch || !isSearch.length) { 2450 _this.remove(); 2451 } 2452 }); 2453 $('body').on('keyup keydown input', '.header-search-form .search-input', function (e) { 2454 if (Cm.search.timer) clearTimeout(Cm.search.timer); 2455 2456 var _e = $(this); 2457 2458 var _key = e || window.event; 2459 2460 if (_key.keyCode != '38' && _key.keyCode != '40' && _key.keyCode != '37' && _key.keyCode != '39' && _key.keyCode != '13') { 2461 Cm.search.timer = setTimeout(function () { 2462 Cm.search.value = _e.val(); 2463 Cm.search.state = 1; 2464 2465 _this.display(); 2466 }, 550); 2467 } else { 2468 Cm.search.timer = setTimeout(function () { 2469 if (_key.keyCode == '38' && Cm.search.hasPost) { 2470 // up, -- 2471 if (Cm.search.active <= 0) { 2472 Cm.search.active = Cm.search.totalPost - 1; 2473 } else { 2474 Cm.search.active--; 2475 } 2476 2477 _this.setActive(); 2478 } else if (_key.keyCode == '40' && Cm.search.hasPost) { 2479 // down 2480 if (Cm.search.active >= Cm.search.totalPost - 1) { 2481 Cm.search.active = 0; 2482 } else { 2483 Cm.search.active++; 2484 } 2485 2486 _this.setActive(); 2487 } 2488 }, 150); 2489 2490 if (_key.keyCode == '38' || _key.keyCode == '40') { 2491 return false; 2492 } 2493 2494 if (_key.keyCode == '13') { 2495 _this.openLink(); 2496 } 2497 } 2498 }); 2499 }, 2500 display: function display() { 2501 if (Cm.search.value == '') { 2502 this.$el.find('.list-group').addClass('d-none'); 2503 this.$el.find('.search-hint-text').text(this.$el.find('.search-hint-text').data('default')).removeClass('d-none'); 2504 } 2505 2506 if (Cm.search.state && Cm.search.value != '') { 2507 this.$el.find('.list-group').addClass('d-none'); 2508 this.$el.find('.search-hint-text').text(this.$el.find('.search-hint-text').data('search')).removeClass('d-none'); 2509 Cm.search.hasPost = false; 2510 Cm.search.active = -1; 2511 Cm.search.totalPost = 0; 2512 this.search(); 2513 } 2514 2515 this.$el.removeClass('d-none'); 2516 }, 2517 search: function search() { 2518 var _this = this; 2519 2520 Cm.forms.post({ 2521 data: { 2522 action: 'search_website_content', 2523 search: this.value 2524 }, 2525 success: function success(response) { 2526 var list = ''; 2527 2528 if (response && response.length) { 2529 for (var i = 0; i < response.length; i++) { 2530 var post = response[i]; 2531 list += _this.template().replace('__URL__', post.url).replace('__NAME__', post.title).replace('__TYPE__', post.type); 2532 } 2533 2534 _this.$el.find('.list-group').html(list).removeClass('d-none'); 2535 2536 _this.$el.find('.search-hint-text').addClass('d-none'); 2537 2538 Cm.search.hasPost = true; 2539 Cm.search.totalPost = response.length; 2540 } else { 2541 _this.$el.find('.search-hint-text').text(_this.$el.find('.search-hint-text').data('empty')); 2542 } 2543 }, 2544 fail: function fail() { 2545 _this.$el.find('.search-hint-text').text(_this.$el.find('.search-hint-text').data('error')); 2546 } 2547 }); 2548 }, 2549 setActive: function setActive() { 2550 this.$el.find('.list-group').find('a').removeClass('active-item'); 2551 this.$el.find('.list-group').find('a').eq(this.active).addClass('active-item'); 2552 }, 2553 openLink: function openLink() { 2554 if (this.hasPost && this.active > -1) { 2555 var url = this.$el.find('.list-group').find('a').eq(this.active).attr('href'); 2556 window.location.href = url; 2557 } 2558 }, 2559 remove: function remove() { 2560 this.$el.addClass('d-none'); 2561 } 2562}; 2563/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 2564 2565/***/ }), 2566
2567/***/ "./scripts/slick.js": 2568/*!**************************!*\ 2569 !*** ./scripts/slick.js ***! 2570 \**************************/ 2571/*! no exports provided */ 2572/***/ (function(module, __webpack_exports__, __webpack_require__) { 2573 2574"use strict"; 2575__webpack_require__.r(__webpack_exports__); 2576/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var slick_carousel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! slick-carousel */ "../../../../node_modules/slick-carousel/slick/slick.js"); 2577/* harmony import */ var slick_carousel__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(slick_carousel__WEBPACK_IMPORTED_MODULE_0__); 2578/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helper */ "./scripts/helper.js"); 2579 2580 2581Cm.slick = { 2582 init: function init() { 2583 $('[data-plugin="slick"]').each(function () { 2584 var ds = this.dataset; 2585 var $el = $(this); 2586 var loaderId = '#' + $el.attr('target-loader'); 2587 var settings = $.extend(Cm.o('slick.settings'), { 2588 slidesToShow: Cm.toInt(ds.slickSlidesToShow || Cm.o('slick.settings.slidesToShow')), 2589 slidesToScroll: Cm.toInt(ds.slickSlidesToScroll || Cm.o('slick.settings.slidesToScroll')), 2590 nextArrow: ds.slickArrows || Cm.o('slick.settings.nextArrow'), 2591 dots: Cm.isTrue(ds.slickDots || Cm.o('slick.settings.dots')), 2592 variableWidth: Cm.isTrue(ds.slickVariableWidth || Cm.o('slick.settings.variableWidth')), 2593 responsive: ds.slickResponsive ? JSON.parse(ds.slickResponsive) : Cm.o('slick.settings.responsive'), 2594 autoplay: Cm.isTrue(ds.slickAutoplay || Cm.o('slick.settings.autoplay')), 2595 speed: ds.slickSpeed || Cm.o('slick.settings.speed'), 2596 autoplaySpeed: ds.slickAutoplaySpeed || Cm.o('slick.settings.autoplaySpeed') 2597 }); 2598 $(this).on('init', function (event, slick) { 2599 $(loaderId).remove(); 2600 $el.removeClass('invisible-layer'); 2601 Cm.slick.afterInit(event, slick); 2602 }).slick(settings); 2603 }); 2604 }, 2605 afterInit: function afterInit(event, slick) { 2606 this.screen(event, slick); 2607 var $slider = $(event.currentTarget); 2608 $slider.find('.slider__arrow__left').off('click').on('click', function (e) { 2609 e.preventDefault(); 2610 e.stopPropagation(); 2611 $slider.slick('slickPrev'); 2612 }); 2613 }, 2614 screen: function screen(event, slick) { 2615 var $slider = $(event.currentTarget); 2616 2617 function adjustScreen() { 2618 if ($slider.hasClass('home-slider')) { 2619 // set slick dots position 2620 var height = $($slider.find('.slick-track').children()[0]).find('img').outerHeight(); 2621 $slider.find('.slick-dots').attr('style', 'top: ' + height + 'px;'); // // set width 2622 2623 setTimeout(function () { 2624 $slider.find('.slick-slide').each(function () { 2625 var imgWidth = $(this).find('img').width(); 2626 $(this).find('.slider__subtitle___1q3Cz,.slider__title___1NMVp,.slider__link___1IyWB').css({ 2627 maxWidth: imgWidth + 'px' 2628 }); // $(this).attr('style', 'width: ' + ( $(this).find('img').outerWidth() + 20 ) + 'px;'); 2629 }); 2630 }, 1000); 2631 } else { 2632 var $firstSlide = $slider.find('.slick-slide').eq(0); 2633 $slider.find('.slick-slide').each(function () { 2634 var sw = _helper__WEBPACK_IMPORTED_MODULE_1__["Screen"].width(); 2635 2636 if (_helper__WEBPACK_IMPORTED_MODULE_1__["Screen"].width() < 485) { 2637 $(this).css('width', sw - 70 + 'px'); 2638 } 2639 }); // adjust arrow height on simple sliders 2640 2641 setTimeout(function () { 2642 $slider.find('.slider__arrow__left,.slider__arrow__right').css('height', $firstSlide.find('img').innerHeight() + 'px'); 2643 }, 200); 2644 } // !important: set position on resize 2645 2646 2647 $slider.slick('setPosition'); 2648 } 2649 2650 $(window).resize(adjustScreen); 2651 setTimeout(adjustScreen, 100); 2652 } 2653}; 2654/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 2655 2656/***/ }), 2657
2658/***/ "./scripts/social.js": 2659/*!***************************!*\ 2660 !*** ./scripts/social.js ***! 2661 \***************************/ 2662/*! no static exports found */ 2663/***/ (function(module, exports, __webpack_require__) { 2664 2665/* WEBPACK VAR INJECTION */(function($) {Cm.social = { 2666 init: function init() { 2667 var features = 'width=600,height=600'; 2668 $('.facebook-share-button').on('click', function () { 2669 var url = $('.facebook-share-button').data('href'); 2670 window.open("https://www.facebook.com/sharer/sharer.php?u=".concat(url), 'facebook-share-dialog', features); 2671 }); 2672 $('.twitter-share-button').on('click', function () { 2673 var url = $('.twitter-share-button').data('href'); 2674 var text = $('.twitter-share-button').data('text'); 2675 window.open("https://twitter.com/intent/tweet?text=".concat(text, " ").concat(url, " via @").concat(wp.site_info.name_nospace), 'twitter-share-dialog', features); 2676 }); 2677 $('.pinterest-share-button').on('click', function () { 2678 var url = $('.pinterest-share-button').data('href'); 2679 var text = $('.pinterest-share-button').data('text'); 2680 var media = $('.pinterest-share-button').data('media'); 2681 window.open("http://pinterest.com/pin/create/button?u=".concat(url, "&description=").concat(text, "&media=").concat(media), 'pinterest-share-dialog', features); 2682 }); 2683 } 2684}; 2685/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 2686 2687/***/ }), 2688
2689/***/ "./scripts/videojs.js": 2690/*!****************************!*\ 2691 !*** ./scripts/videojs.js ***! 2692 \****************************/ 2693/*! no static exports found */ 2694/***/ (function(module, exports, __webpack_require__) { 2695 2696/* WEBPACK VAR INJECTION */(function($) {Cm.videoplayer = { 2697 playInc: 0, 2698 template: function template() { 2699 return "\n <video\n id=\"camden-video-player-".concat(Cm.videoplayer.playInc, "\"\n class=\"video-js\"\n controls>\n <source type=\"video/mp4\" src=\"__MP4__\"></source>\n <source type=\"video/webm\" src=\"__WEBM__\"></source>\n <p class=\"vjs-no-js\">\t\t\t\t\t\t\t\t\n <a href=\"https://videojs.com/html5-video-support/\" target=\"_blank\">\n To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video\n </a>\n </p>\n </video>"); 2700 }, 2701 init: function init() { 2702 var btnPlayer = $('[data-plugin="videoplayer"]'), 2703 vjsPlayer; 2704 2705 if (btnPlayer.length) { 2706 $('body').on('click', '[data-plugin="videoplayer"]', function (e) { 2707 var options = { 2708 responsive: true, 2709 fluid: true, 2710 controlBar: { 2711 'liveDisplay': true, 2712 'pictureInPictureToggle': false 2713 } 2714 }; 2715 var $btn = $(this), 2716 $modal = $('#player-modal'); 2717 $('.video-player-wrapper').empty(); 2718 $('.video-player-wrapper').html(Cm.videoplayer.template().replace('__MP4__', $btn.data('srcMp4')).replace('__WEBM__', $btn.data('srcWebm'))); 2719 $modal.find('.video-js').attr('poster', $btn.data('poster')); 2720 setTimeout(function () { 2721 vjsPlayer = videojs('camden-video-player-' + Cm.videoplayer.playInc, options, function onPlayerReady() { 2722 var _player = this; 2723 2724 Cm.modal.videoplayer(_player); // In this context, `this` is the player that was created by Video.js. 2725 2726 setTimeout(function () { 2727 vjsPlayer.play(); 2728 }, 100); // How about an event listener? 2729 2730 this.on('ended', function () {}); 2731 $modal.on('cm.modal.close', function () { 2732 _player.pause(); 2733 }); 2734 }); 2735 Cm.videoplayer.playInc++; 2736 }, 200); 2737 e.stopPropagation(); 2738 e.preventDefault(); 2739 return false; 2740 }); 2741 } 2742 } 2743}; 2744/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "../../../../node_modules/jquery/dist/jquery.js-exposed"))) 2745 2746/***/ }), 2747
2748/***/ "./style.scss": 2749/*!********************!*\ 2750 !*** ./style.scss ***! 2751 \********************/ 2752/*! no exports provided */ 2753/***/ (function(module, __webpack_exports__, __webpack_require__) { 2754 2755"use strict"; 2756__webpack_require__.r(__webpack_exports__); 2757// extracted by mini-css-extract-plugin 2758 2759 2760/***/ })
2760, 2761 2762/***/ 0: 2763/*!******************************************************!*\ 2764 !*** multi @babel/polyfill ./script.js ./style.scss ***! 2765 \******************************************************/ 2766/*! no static exports found */ 2767/***/ (function(module, exports, __webpack_require__) { 2768 2769__webpack_require__(/*! @babel/polyfill */"../../../../node_modules/@babel/polyfill/lib/index.js"); 2770__webpack_require__(/*! ./script.js */"./script.js"); 2771module.exports = __webpack_require__(/*! ./style.scss */"./style.scss"); 2772 2773 2774/***/ }) 2775 2776/******/ }); 2777//# sourceMappingURL=main.bundle.b7c546f7945e3edfa96a.js.map
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.