

(function () {
    var loopaSmartEvents = window._loopaSmartEvents;

    loopaSmartEvents.publisherData = {
    pubId: '667a4c407d79574e418bcd92',
    extraPublisherIds: '',
    siteScript: '\\n\\n<script>\\n  !function(e,i){if(!e.pixie){var n=e.pixie=function(e,i,a){n.actionQueue.push({action:e,actionValue:i,params:a})};n.actionQueue=[];var a=i.createElement("script");a.async=!0,a.src="//acdn.adnxs.com/dmp/up/pixie.js";var t=i.getElementsByTagName("head")[0];t.insertBefore(a,t.firstChild)}}(window,document);\\n  pixie(\'init\', \'dabbdc01-90c1-44f8-87f1-c1d67dc949f8\');\\n</script>\\n\\n\\n<script>\\n  pixie(\'event\', \'PageView\');\\n</script>\\n\\n\\n<script type=\'text/javascript\'>\\n  window._tfa = window._tfa || [];\\n  window._tfa.push({notify: \'event\', name: \'page_view\', id: 1711495});\\n  !function (t, f, a, x) {\\n         if (!document.getElementById(x)) {\\n            t.async = 1;t.src = a;t.id=x;f.parentNode.insertBefore(t, f);\\n         }\\n  }(document.createElement(\'script\'),\\n  document.getElementsByTagName(\'script\')[0],\\n  \'//cdn.taboola.com/libtrc/unip/1711495/tfa.js\',\\n  \'tb_tfa_script\');\\n</script>\\n\\n\\n\\n<script>\\n  !function(f,b,e,v,n,t,s)\\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version=\'2.0\';\\n  n.queue=[];t=b.createElement(e);t.async=!0;\\n  t.src=v;s=b.getElementsByTagName(e)[0];\\n  s.parentNode.insertBefore(t,s)}(window, document,\'script\',\\n  \'https://connect.facebook.net/en_US/fbevents.js\');\\n  fbq(\'init\', \'575832347832723\');\\n  fbq(\'track\', \'PageView\');\\n</script>\\n\\n\\n<script>\\n  // Share \\n  document.querySelectorAll("#copy-link").forEach((item) => {\\n    item.addEventListener("click", function () {\\n      loopa.push({\\n        event: \'conversion\',\\n        data: { type: "Share" }\\n      });\\n    });\\n  });\\n\\n  // AddToCalendar\\n  document.querySelectorAll("button[value=\'Add to Calendar\']").forEach((item) => {\\n    item.addEventListener("click", function () {\\n      loopa.push({\\n        event: \'conversion\',\\n        data: { type: "AddToCalendar" }\\n      });\\n    });\\n  });\\n\\n  // ClickToCall\\n  document.querySelectorAll("a[href*=\'tel:\']").forEach((item) => {\\n    item.addEventListener("click", function () {\\n      loopa.push({\\n        event: \'conversion\',\\n        data: { type: "ClickToCall" }\\n      });\\n    });\\n  });\\n\\n  // ClickToEmail\\n  document.querySelectorAll("a[href*=\'mailto:\']").forEach((item) => {\\n    item.addEventListener("click", function () {\\n      loopa.push({\\n        event: \'conversion\',\\n        data: { type: "ClickToEmail" }\\n      });\\n    });\\n  });\\n\\n  // EnquiryForm\\n  document.querySelectorAll("#Form_ListingContactForm_action_sendListingContact").forEach((item) => {\\n    item.addEventListener("click", function () {\\n      loopa.push({\\n        event: \'conversion\',\\n        data: { type: "EnquiryForm" }\\n      });\\n    });\\n  });\\n\\n  // RequestAppraisal\\n  document.querySelectorAll("#Form_AppraisalForm_action_requestAppraisal").forEach((item) => {\\n    item.addEventListener("click", function () {\\n      loopa.push({\\n        event: \'conversion\',\\n        data: { type: "RequestAppraisal" }\\n      });\\n    });\\n  });\\n\\n  // ViewGallery\\n  document.querySelectorAll("#launch-modal-button").forEach((item) => {\\n    item.addEventListener("click", function () {\\n      loopa.push({\\n        event: \'conversion\',\\n        data: { type: "ViewGallery" }\\n      });\\n    });\\n  });\\n\\n  // ViewAgentProfile\\n  document.querySelectorAll("a[href*=\'/agent/\']").forEach((item) => {\\n    item.addEventListener("click", function () {\\n      loopa.push({\\n        event: \'conversion\',\\n        data: { type: "ViewAgentProfile" }\\n      });\\n    });\\n  });\\n  \\n  // Contact Mortgage Calculator\\n  document.querySelectorAll("a[href*=\'/mortgage-repayment\']").forEach((item) => {\\n    item.addEventListener("click", function () {\\n      loopa.push({\\n        event: \'conversion\',\\n        data: { type: "MortgageCalculator" }\\n      });\\n    });\\n  });\\n\\n  // chat bot click\\n  const myChatBotClick = document.querySelector(".sf-new-bubble.sf-chat-bubble-position-right");\\n  if(myChatBotClick) {\\n  //console.log("ChatBotClick");\\n 	 myChatBotClick.addEventListener("click", function () {\\n        loopa.push({\\n          event: \'conversion\',\\n          data: { type: "ChatBotClick" }\\n        });\\n  \\n  		//CHATBOT BOOK VIEWING CLICK\\n  		const myBookPrivateViewingClick = document.querySelectorAll(".sf-box div");\\n  		if(myBookPrivateViewingClick) {\\n  			//console.log("myBookPrivateViewingClick");\\n  			myBookPrivateViewingClick.forEach((item) => {\\n              if(item.innerText != null && item.innerText.toLowerCase().includes("book viewing")) {\\n                  //console.log("BookPrivateViewing");\\n                  item.addEventListener("click", function () {\\n                    loopa.push({\\n                      event: \'conversion\',\\n                      data: { type: "BookPrivateViewing" }\\n                    });\\n                  });\\n               }\\n  \\n  				// Contact Agent click\\n              const myContactAgent = document.querySelector("#sf-chat-options-form button.submit-button");\\n              if(myContactAgent) {\\n                   //console.log("Contact Agent click");\\n                    myContactAgent.addEventListener("click", function () {\\n                      loopa.push({\\n                         event: \'conversion\',\\n                       data: {type:"ContactAgent"}\\n                    });\\n                });\\n              }\\n            });\\n  		}\\n  	});\\n  }\\n  \\n  // request private viewing\\n  document.querySelectorAll(".sf-chat-container .sf-chat-option-wrapper .sf-chat-option > div").forEach((item) => {\\n    if(item.innerText != null && item.innerText.toLowerCase().includes("book viewing")) {\\n      item.addEventListener("click", function () {\\n        loopa.push({\\n          event: \'conversion\',\\n          data: { type: "BookPrivateViewing" }\\n        });\\n      });\\n    }\\n  });\\n  \\n  // chatbot form submission\\n  document.querySelectorAll(".sf-box .submit-button").forEach((item) => {\\n      item.addEventListener("click", function () {\\n        loopa.push({\\n          event: \'conversion\',\\n          data: { type: "ContactAgent" }\\n        });\\n      });\\n  });\\n\\n</script>',
    productScript: '',
    conversionScript: '\\n\\n<script>\\n	fbq(\'trackSingle\', \'575832347832723\', \'Lead\', {\\n		enquiryType: \'[[TYPE]]\'\\n	});\\n\\n	pixie("event", "Lead", {\\n		item_type: "[[TYPE]]"\\n	});\\n\\n	_tfa.push({ notify: \'event\', name: "[[TYPE]]", id: 1711495 });\\n</script>',
    addToCartScript: '',
    genericActionScript: '',
    allowCookieMessage: false,
    messageSelector: '',
    includePostscribe: false,
    autoTriggerOnHashChange: false,
    enableEU: false,
    postParsedData: false,
    audienceSplitScript: '',
    enableActionTracking: false,
    parsingMode: 2,
    collectParsingListFromUserActivity: false
    };

    loopaSmartEvents.productParsingData = {
    title: function() { return document.querySelector("#description h2") && document.querySelector("#description h2").textContent },
    itemUrl: function() { return document.querySelector('meta[property="og:url"]') && document.querySelector('meta[property="og:url"]').content },
    productId: function() { return (document.location.href.indexOf("/buy") > 0 || document.location.href.indexOf("/rent") > 0) && document.querySelector('meta[property="og:image"]') && document.querySelector('meta[property="og:image"]').content && document.querySelector('meta[property="og:image"]').content.match(/VaultPhotos\/(\d+)\//) && document.querySelector('meta[property="og:image"]').content.match(/VaultPhotos\/(\d+)\//).length > 1 ? document.querySelector('meta[property="og:image"]').content.match(/VaultPhotos\/(\d+)\//)[1] + '.xml' : '' },
    description: function() { return '' },
    mainImage: function() { return document.querySelector('meta[property="og:image"]') && document.querySelector('meta[property="og:image"]').content },
    images: function() { return '' },
    language: function() { return '' },
    price: function() { return (function () {
  var price = document.querySelector('.max-w-property-banner-content .body-large') && document.querySelector('.max-w-property-banner-content .body-large').innerText;
  if (price && price.indexOf("$") >= 0) {
    var priceText = price.replace(/[^\d]/ig, "");
    if (priceText.length >= 6) return priceText;
  }

  return "500000";
})(); },
    rrp: function() { return '' },
    brandName: function() { return '' },
    colour: function() { return (function () {  var elements = document.querySelectorAll('.max-w-property-banner-content .flex.gap-2.p-1.items-center.justify-center span');  var livingSpace = '1';  if (elements && elements.length > 0) {    for (var i = 0; i < elements.length; i++) {      if (elements[i].innerText && elements[i].innerText.indexOf('Living') > -1) {        livingSpace = elements[i].innerText.replace(/[^\d]/ig, "");        break;      }    }  }  return livingSpace;})(); },
    stock: function() { return '' },
    category: function() { return '' },
    subCategory: function() { return '' },
    mpn: function() { return '' },
    gtin: function() { return '' },
    productType: function() { return '' },
    customField1: function() { return '' },
    customField2: function() { return '' },
    customField3: function() { return '' },
    customField4: function() { return '' },
    customField5: function() { return '' },
    customField6: function() { return '' },
    customField7: function() { return (function () {
	var el = document.querySelectorAll('.max-w-property-banner-content img');
	var imgeStr = '';
	if (el && el.length > 0) {
		for (var i = 0; i < el.length; i++) {
			if (i !== 0) {
				imgeStr += ',';
			}

			imgeStr += el[i].src.replace(/\?.*$/, '');
		}
	}

	return imgeStr;
})(); },
    customField8: function() { return '' },
    customField9: function() { return '' },
    customField10: function() { return '' },
    customField11: function() { return '' },
    customField12: function() { return '' },
    customField13: function() { return '' },
    customField14: function() { return '' },
    customField15: function() { return '' },
    customField16: function() { return '' },
    latitude: function() { return '' },
    longitude: function() { return '' }
    };

    loopaSmartEvents.gdprSettings = {
    mode: 'BlockEu',
    applyRulesOutsideEu: false,
    cookieAllowedCheckScript: function() { return false },
    cookieDisabledCheckScript: function() { return false }
    };

    loopaSmartEvents.userData = {
    hasCookie: false,
    userId: ''    
    };

    }());
