(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://cdn.cloudconcepts.com.au/analytics.js','ga');
ga('create', '', 'auto');
ga('send', 'pageview');
$(document).ready(function()
{
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 500) {
//clearHeader, not clearheader - caps H
$(".header").addClass("underliner");
}
else {
//clearHeader, not clearheader - caps H
$(".header").removeClass("underliner");
}
});
$(".no_repeat_event").on("click",function(){
$(".repeateventdetails").slideUp(500);
});
$(".repeat_event").on("click",function(){
$(".repeateventdetails").slideDown(500);
});
$('.upload-btn-wrapper input').change(function() {
var i = $(this).prev('button').clone();
var file = $(this)[0].files[0].name;
$(this).prev('button').after('
' + file + '
').html('SELECTED');
});
$("#siq_searchForm input").on("keyup",function(){
$('#siq_searchForm').css("width","300px");
});
$(".savepostdate").on("click",function(){
var $_this = $(this);
$_this.html(" Updating the date...");
var bpage = $(this).data("bpage");
var dateofpost=$(".datefor" + bpage).val();
$.post( '/includes/contentmanager.php', {bpage : bpage, action : 'updatetimestamp', dateofpost : dateofpost}, function(data) {
if (data.status==="false")
{
alert(data.feedback);
$(".duplicatespecificpage").click();
}
else{
$_this.html("All done...");
}
},'json');
});
$(".showreadmore").on("click",function(){
var sectionidtoshow= $(this).data("sectionidtoshow");
$(".readmoresection." + sectionidtoshow).slideToggle();
});
$("#sectiontosearchinput").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#sectiontosearch div.sectioncontainer").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
$("#postcodesearch").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#propertylistings div.listingdiv").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
$(".prefilledenquiry").on("click", function(e) {
var indexoflink = $(this).data("indexoflink");
var prefilledenquiry = decodeURIComponent($(this).data("prefilledenquiry"));
var existingmessage= $("#message").data("ogtext");
if (existingmessage)
{
$("#message").val(existingmessage + " " + prefilledenquiry);
}
else
{
$("#message").val(prefilledenquiry);
}
$([document.documentElement, document.body]).animate({
scrollTop: $("form #name").offset().top
}, 500);
$("#sendcontact").addClass("animated").addClass("tada");
});
$(".sendcallbackrequest").click(function(){
if ($(".sendcallbackrequest #subject").val()==="")
{
alert("Please tell us what you would like to speak to us about, so that we can organise the right person to contact you");
$(".sendcallbackrequest #subject").focus();
return false;
}
else if ($("#callbackphone").val()==="")
{
alert("Please enter your phone number...");
$("#callbackphone").focus();
return false;
}
else
{
$(this).html(" Sending your callback request...");
$.post( '/includes/ajax.php', $('.callbackrequestform :input').serialize(), function(data) {
$(".callbackrequestform").slideUp(200).html("" + data.feedback + "
").slideDown(500);
},'json');
}
});
$(".modalb4link").click(function(){
var href = $(this).data('href');
$(".cccmsformbutton").attr("href",href);
$(".cccmsformbutton").attr("target","_blank");
$(".cccmsformbutton").html("Continue to " + href);
$(".sendtourl input").val(href);
});
$(".imagelinks img").each(function(){
var target = $(this).closest('.imagelinks').find('a').data("target");
var toggle = $(this).closest('.imagelinks').find('a').data("toggle");
$(this).attr("data-target",target);
$(this).attr("data-toggle",toggle);
});
$('a[href^="http://"]').attr('target','_blank');
$('a[href^="https://"]').attr('target','_blank');
$("#sendcontact").click(function(){
var a_href = $(this).attr("href");
if (a_href!="" && a_href!=null)
{
ga('send', 'event', 'Goals', 'Send Message');
}
});
$(".copyright .container .row .col-md-6 p").append("Website built by Cloud Concepts");
$("#sendcontact").click(function(){
$(this).html(" Sending your message...");
$.post( "/includes/ajax.php", $(this).closest('form').serialize(), function(data) {
if (data.result===true)
{
$("#sendcontact, fieldset").slideUp(200);
$("#contactformfeedback p").html(data.feedback);
$("#contactformfeedback").slideDown(500);
ga('send', 'event', 'Goals', 'Send Contact');
hj('vpv', '/contact-us.html/contactsent');
}
},"json");
});
$(".addtofavourites").click(function(){
$_this=$(this);
var previoushtml=$_this.html();
var imagebuyinginfo=$(this).data("imagebuyinginfo");
$_this.html('');
$.post( "/includes/contentmanager.php", {action:'addtofavourites', imagebuyinginfo : imagebuyinginfo, image: $_this.data("image"), description: $_this.data("description") }, function(data) {
if (data.result===true)
{
$_this.html(" In Cart");
$(".viewfavourites").removeClass("hidden").attr("href","favourites.html?id=" + data.identifier);
ga('send', 'event', 'Goals', 'Add to Cart');
}
else
{
$_this.html(" Add to Cart");
$(".viewfavourites").removeClass("hidden").attr("href","favourites.html?id=" + data.identifier);
ga('send', 'event', 'Goals', 'Remove from Cart');
}
},"json");
});
$(".cbp-filter-item").click(function(){
$("img.lazyload").trigger("appear");
});
$("a").click(function(){
var a_href = $(this).attr("href");
var label = $(this).html;
if (a_href!="" && a_href!=null)
{
if (a_href.indexOf("gensolve")!=-1)
{
var pathName = window.location.pathname;
ga('send', 'event', 'Goals', 'Book Online', label);
}
if (a_href.indexOf("mailto")!=-1)
{
var pathName = window.location.pathname;
ga('send', 'event', 'Goals', 'Click to Email', label);
}
if (a_href.indexOf("tel")!=-1)
{
var pathName = window.location.pathname;
ga('send', 'event', 'Goals', 'Click to Call', label);
$.post( '/includes/ajax.php', {notification : "callmade", "source" : window.location.origin }, function(data) {
},'json');
}
if (a_href.indexOf("contact")!=-1)
{
var pathName = window.location.pathname;
ga('send', 'event', 'Goals', 'Lookup Contact', a_href);
}
}
});
$(".togglereadmore").click(function(){
var contentid = $(this).data("contentid");
$("div." + contentid).slideToggle(700);
});
$(".btn-u").click(function(){
var a_href = $(this).attr("href");
var label = $(this).html;
var pathName = window.location.pathname;
ga('send', 'event', 'Button Click', a_href, label);
});
$("#sendbookingrequest").click(function(){
var $thebutton = $(this);
$thebutton.html(" Sending your booking request...");
$.post( "/includes/ajax.php", $('#bookingmodal form').serialize(), function(data) {
if (data.result===true)
{
$("#bookingmodal #cancelbutton").html("Close");
$("#bookingformfeedback p").html(data.feedback);
$("#bookingformfeedback").slideDown(500);
$thebutton.html(" Your booking request has been sent...");
var pathName = window.location.pathname;
ga('send', 'event', 'Goals', 'Send BookingRequest', pathName);
}
else
{
$("#bookingformfeedback p").html(data.feedback);
$("#bookingformfeedback").slideDown(500);
}
},"json");
});
$(".subquery").hide();
$('.MODALIFRAMEUPBUTTON').click(function(){
var iframesrc = $(this).data("iframesrc");
$("#iframeModal iframe").attr('src',iframesrc);
$("#iframeModal").modal("show");
});
});
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});