\";\n html +=\n \"
\" +\n (i + 1) +\n ' of ' +\n tourLength +\n '
';\n if (tourLength > i + 1) {\n html +=\n \"
';\n } else {\n html += '
End of Tour
';\n }\n\n html += '
';\n\n tour.append(html);\n });\n\n $('.tour-next').click(function () {\n var elem = $(this);\n var target_element = elem.attr('href');\n\n $(target_element).fadeIn();\n\n $('html, body').animate(\n {\n scrollTop: $(target_element).offset().top,\n },\n 1000,\n );\n\n return false;\n });\n },\n\n /* basic tab */\n\n basic_tab: function () {\n /* Basic Tab */\n\n $('.tab-control-wrap .tab-control').click(function () {\n var tab_id = $(this).attr('data-tab');\n\n $('.tab-control-wrap .tab-control').removeClass('current');\n $('.tab-content').removeClass('current');\n\n $(this).addClass('current');\n $('#' + tab_id).addClass('current');\n\n $('.how-it-works-slider').slick('unslick');\n console.log('#' + tab_id);\n $('#' + tab_id + '-slick').slick({\n dots: true,\n arrows: true,\n autoplay: true,\n autoplaySpeed: 2000,\n });\n });\n },\n\n type_effect: function () {\n // type js\n\n if ($('#typedSubtitle').length > 0) {\n var sentences = $('#typedSubtitle').attr('data-sentences');\n\n if (sentences) {\n sentences = sentences.split('|');\n\n $('#typedSubtitle').typed({\n strings: sentences,\n showCursor: false,\n typeSpeed: 30,\n });\n }\n }\n },\n };\n\n $(document).ready(cubbi.init);\n})(jQuery);\n\njQuery(document).ready(function ($) {\n var sr = ScrollReveal();\n\n $('.sidebar-sticky').stickySidebar({\n topSpacing: 10,\n bottomSpacing: 0,\n containerSelector: '.wrapper.fixed',\n innerWrapperSelector: '.sideber-inner',\n });\n\n // click on scroll target\n\n $('.click-sroll-target').click(function () {\n var elem = $(this);\n var target = elem.attr('href');\n\n $('html, body').animate(\n {\n scrollTop: $(target).offset().top,\n },\n 1000,\n );\n });\n\n function getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n\n function getRandomFloat(min, max) {\n return (Math.random() * (min - max) + max).toFixed(2);\n }\n\n $('.menu-toggle').click(function () {\n $('body').toggleClass('toggled');\n });\n\n $('[data-bg]').each(function () {\n var elem = $(this);\n var bgSrc = elem.attr('data-bg');\n\n elem.css({\n 'background-image': 'url(' + bgSrc + ')',\n });\n });\n\n $('.how-it-works-slider').slick({\n dots: true,\n arrows: true,\n autoplay: true,\n autoplaySpeed: 2000,\n });\n\n /* scroll reveal start */\n\n var hero_phone = {\n scale: 1,\n delay: 1000,\n duration: 500,\n origin: 'right',\n distance: '100px',\n },\n hero_tagline = {\n scale: 1,\n origin: 'bottom',\n distance: '40px',\n },\n hero_badge = {\n scale: 1,\n origin: 'bottom',\n distance: '40px',\n delay: 500,\n },\n smallHeader = {\n scale: 1,\n origin: 'bottom',\n distance: '20px',\n delay: 800,\n rotate: {\n x: 0,\n y: 0,\n z: 0,\n },\n },\n largerHeader = {\n scale: 1,\n origin: 'bottom',\n distance: '20px',\n delay: 400,\n rotate: {\n x: 0,\n y: 0,\n z: 0,\n },\n },\n sectionContent = {\n scale: 1,\n origin: 'bottom',\n distance: '20px',\n delay: 700,\n duration: 300,\n rotate: {\n x: 0,\n y: 0,\n z: 0,\n },\n },\n btnCta = {\n scale: 0.9,\n delay: 600,\n },\n signup_stats_panel = {\n scale: 0.9,\n delay: 1000,\n afterReveal: function (domEl) {\n statsTenants.innerHTML = 4910;\n statsLandlords.innerHTML = 3148;\n statsProperties.innerHTML = 3777;\n },\n };\n signup_stats_panel = {\n scale: 0.9,\n delay: 1000,\n afterReveal: function (domEl) {\n statsSavings.innerHTML = 26724300;\n },\n };\n\n sr.reveal('h1.tagline', hero_tagline);\n sr.reveal('.up-sr', hero_phone);\n sr.reveal('.hero-review-badge', hero_badge);\n\n $('.bubbles span').each(function () {\n var elem = $(this);\n var randomScaleVal = getRandomFloat(0, 1);\n sr.reveal(elem, {\n scale: randomScaleVal,\n distance: 0,\n delay: getRandomInt(1000, 1500),\n });\n });\n\n $('.landlords-photo-section span').each(function (i) {\n i++;\n var elem = $(this);\n var d = i * 500;\n sr.reveal(elem, {\n scale: 0.5,\n distance: 0,\n delay: d,\n });\n });\n\n /* reveal section content */\n\n /* scroll small header */\n\n sr.reveal('.sr-small-header', smallHeader);\n sr.reveal('.sr-large-header', largerHeader);\n sr.reveal('.sr-content', sectionContent);\n\n sr.reveal('.sr-btn-cta', btnCta);\n\n /* Testimonials */\n\n function groupedSrReveal(elements, fr_origin) {\n fr_origin = typeof fr_origin !== 'undefined' ? fr_origin : 'bottom';\n elements.each(function (i) {\n i++;\n var elem = $(this);\n var d = i * 120;\n\n sr.reveal(elem, {\n scale: 1,\n origin: fr_origin,\n distance: '40px',\n delay: d,\n });\n });\n }\n\n groupedSrReveal($('.section-about-items > div'));\n\n groupedSrReveal($('.no-slider .testimonials .testimonial-wrap'));\n\n groupedSrReveal($('.faq-accordion-animate > div'), 'left');\n\n groupedSrReveal($('.team .team-member-wrap'));\n\n groupedSrReveal($('.protection-container .protection-widget-wrap'));\n\n /* Testimonials */\n\n $('.testimonial').slick({\n dots: true,\n arrows: true,\n autoplay: true,\n autoplaySpeed: 5000,\n });\n\n /* Accordion */\n\n $('.faq-accordion [data-accordion]').accordion({\n transitionSpeed: 300,\n });\n\n /*\n property slider\n */\n\n // $('.property-slider').on('click', function () {\n // console.log(\"rer\");\n // $('body').addClass('open-modal');\n // });\n\n $('.image-slider').slick();\n\n var galleryInit;\n $('.property-slider .slick-slide').on('click', function () {\n $('body').addClass('open-modal');\n // open gallery\n console.log(galleryInit);\n if (galleryInit === undefined) {\n galleryInit = $('.pgwSlideshow').pgwSlideshow({});\n }\n });\n\n // navigate to properly show page when clicking on property item\n $('.explore-property-widget .image-slider').on('click', function () {\n window.location.href = $(this)\n .parents('.explore-property-widget')\n .find('a')\n .attr('href');\n });\n\n $('.gallery_modal .close').click(function () {\n $('body').removeClass('open-modal');\n });\n\n /* Stats */\n\n var statsTenants = document.querySelector('.stats-tenants');\n var statsLandlords = document.querySelector('.stats-landlords');\n var statsProperties = document.querySelector('.stats-properties');\n var statsSavings = document.querySelector('.stats-savings');\n\n if (statsTenants) {\n od_statsTenants = new Odometer({\n el: statsTenants,\n value: 0,\n\n // Any option (other than auto and selector) can be passed in here\n format: '(,ddd)',\n theme: 'minimal',\n });\n }\n\n if (statsLandlords) {\n od_statsLandlords = new Odometer({\n el: statsLandlords,\n value: 0,\n\n // Any option (other than auto and selector) can be passed in here\n format: '(,ddd)',\n theme: 'minimal',\n });\n }\n\n if (statsTenants) {\n od_statsProperties = new Odometer({\n el: statsProperties,\n value: 0,\n\n // Any option (other than auto and selector) can be passed in here\n format: '(,ddd)',\n theme: 'minimal',\n });\n }\n\n if (statsSavings) {\n od_statsSavings = new Odometer({\n el: statsSavings,\n value: 0,\n\n // Any option (other than auto and selector) can be passed in here\n format: '(,ddd)',\n theme: 'minimal',\n });\n }\n\n sr.reveal('.signup .panel-white', signup_stats_panel);\n\n $('.animate-to-link').click(function () {\n var elem = $(this);\n var target_element = elem.attr('href');\n\n $(target_element).fadeIn();\n\n console.log(target_element);\n $('html, body').animate(\n {\n scrollTop: $(target_element).offset().top,\n },\n 1000,\n );\n\n return false;\n });\n\n $('.search-mobile-icon').click(function () {\n $('.search-mobile').show();\n });\n\n $('.search-mobile .close').click(function () {\n $('.search-mobile').hide();\n });\n});\n","jQuery(document).ready(function($){\n \n // Hide Header on on scroll down\n var didScroll;\n var lastScrollTop = 0;\n var delta = 10;\n var navbarHeight = $('header').outerHeight();\n\n $(window).scroll(function(event){\n didScroll = true;\n });\n\n setInterval(function() {\n if (didScroll) {\n hasScrolled();\n didScroll = false;\n }\n }, 250);\n\n function hasScrolled() {\n var st = $(this).scrollTop();\n // Make sure they scroll more than delta\n if(Math.abs(lastScrollTop - st) <= delta) {\n return;\n }\n\n // If they scrolled down and are past the navbar, add class .nav-up.\n // This is necessary so you never see what is \"behind\" the navbar.\n if ((st > lastScrollTop && st > navbarHeight )|| st < 100){\n // Scroll Down\n $('header').removeClass('nav-down').addClass('nav-up');\n } else {\n // Scroll Up\n if(st + $(window).height() < $(document).height()) {\n $('header').removeClass('nav-up').addClass('nav-down');\n }\n }\n \n \n if( st == 0 ) {\n $('header').removeClass('nav-down');\n }\n \n\n lastScrollTop = st;\n } \n \n});\n","var calculator = function(weekly, agentFee){\n\t// only integers or out you go\n\tif(weekly !== parseInt(weekly, 10)) { return null }\n\tif(agentFee !== parseInt(agentFee, 10)) { return null }\n\tvar cubbi = weekly * 0.02 * 52 + 199;\n\tvar agent = weekly * (agentFee/100) * 52 + (weekly * 2) + 200 + 108;\n\tvar savings = (agent - cubbi);\n\tvar saved = (savings / agent) * 100;\n\treturn { cubbi: cubbi, agent: agent, savings: savings, saved: saved }\n};\n\nvar format = function(number) {\n\treturn number.toFixed(2).replace(/(\\d)(?=(\\d{3})+\\.)/g, '$1,').split('.')[0];\n};\n\nvar buyObject = function(amount) {\n\tamount = amount * 1;\n\tswitch(true) {\n\t\tcase (amount < 500):\n\t\t\treturn \"buy a new Apple watch\";\n\t\t\tbreak;\n\t\tcase (amount < 1000):\n\t\t\treturn \"buy a new 50inch TV\";\n\t\t\tbreak;\n\t\tcase (amount < 1500):\n\t\t\treturn \"buy a new laptop\";\n\t\t\tbreak;\n\t\tcase (amount < 2000):\n\t\t\treturn \"buy a home entertainment system\";\n\t\t\tbreak;\n\t\tcase (amount < 2500):\n\t\t\treturn \"go on a holiday to New Zealand\";\n\t\t\tbreak;\n\t\tcase (amount < 3500):\n\t\t\treturn \"buy a full set of kitchen appliances\";\n\t\t\tbreak;\n\t\tcase (amount < 5000):\n\t\t\treturn \"buy a new scooter\";\n\t\t\tbreak;\n\t\tcase (amount < 7000):\n\t\t\treturn \"go on family holiday to Hawaii\";\n\t\t\tbreak;\n\t\tcase (amount < 10000):\n\t\t\treturn \"Paint and re-carpet your entire home\";\n\t\t\tbreak;\t\t\t\n\t\tdefault:\n\t\t\treturn \"buy a new kitchen\";\n\t\tbreak;\n\t}\n}\n\n$(document).ready(function() {\n\t$('.rent-input').keyup(function(e){\n calc();\n\t});\n\n $('.agent-fee-input').keyup(function(e){\n calc();\n });\n\n\tfunction calc() {\n var weekly = parseInt($('#rent-amount').val().replace(/[^0-9]/g, ''), 10);\n var agentFee = parseInt($('#agent-fee').val().replace(/[^0-9]/g, ''), 10);\n var result = calculator(weekly, agentFee);\n if (result === null) { return };\n $('.savings-result').text(\"$\"+format(result.savings));\n $('.agent-result').text(\"$\"+format(result.agent));\n $('.cubbi-result').text(\"$\"+format(result.cubbi));\n $('.saved-result').text(\"\"+format(result.saved));\n $('.agent-fee-print').text(format(agentFee)+\"%\");\n $('.save-object').text(buyObject(result.savings));\n }\n\n\t$('.rent-input input').trigger('keyup');\n\n\t$('.show-all').click(function(e){\n var elem = $(this);\n $(elem.attr('data-target-panel') ).show();\n return false;\n\t});\n});","/**\n * PgwSlideshow - Version 2.0\n *\n * Copyright 2014, Jonathan M. Piat\n * http://pgwjs.com - http://pagawa.com\n * \n * Released under the GNU GPLv3 license - http://opensource.org/licenses/gpl-3.0\n */\n(function(a){a.fn.pgwSlideshow=function(q){var i={mainClassName:\"pgwSlideshow\",transitionEffect:\"sliding\",displayList:true,displayControls:true,touchControls:true,autoSlide:false,beforeSlide:false,afterSlide:false,maxHeight:null,adaptiveDuration:200,transitionDuration:500,intervalDuration:3000};if(this.length==0){return this}else{if(this.length>1){this.each(function(){a(this).pgwSlideshow(q)});return this}}var j=this;j.plugin=this;j.config={};j.data=[];j.currentSlide=0;j.slideCount=0;j.resizeEvent=null;j.intervalEvent=null;j.touchFirstPosition=null;j.touchListLastPosition=false;j.window=a(window);var p=function(){j.config=a.extend({},i,q);g();if(j.config.displayList){b()}j.window.resize(function(){clearTimeout(j.resizeEvent);j.resizeEvent=setTimeout(function(){e();var r=j.plugin.find(\".ps-current > ul > li.elt_\"+j.currentSlide+\" img\").height();h(r);if(j.config.displayList){b();n()}},100)});if(j.config.autoSlide){k()}return true};var h=function(r,s){if(j.config.maxHeight){if(r+j.plugin.find(\".ps-list\").height()>j.config.maxHeight){r=j.config.maxHeight-j.plugin.find(\".ps-list\").height()}}if(typeof j.plugin.find(\".ps-current\").animate==\"function\"){j.plugin.find(\".ps-current\").stop().animate({height:r},j.config.adaptiveDuration,function(){if(j.config.maxHeight){j.plugin.find(\".ps-current > ul > li img\").css(\"max-height\",r+\"px\")}})}else{j.plugin.find(\".ps-current\").css(\"height\",r);if(j.config.maxHeight){j.plugin.find(\".ps-current > ul > li img\").css(\"max-height\",r+\"px\")}}return true};var c=function(){var r=0;j.plugin.show();j.plugin.find(\".ps-list > ul > li\").show().each(function(){r+=a(this).width()});j.plugin.find(\".ps-list > ul\").width(r);return true};var e=function(){if(j.plugin.width()<=480){j.plugin.addClass(\"narrow\").removeClass(\"wide\")}else{j.plugin.addClass(\"wide\").removeClass(\"narrow\")}return true};var g=function(){j.plugin.removeClass(\"pgwSlideshow\").removeClass(j.config.mainClassName);j.plugin.wrap('