Homes Available
$(document).ready(function(){
$('.c-slide').slick({
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
speed: 1000,
autoplaySpeed: 6000,
arrows: true,
//draggable: false,
autoplay: true,
});
});
skrollr.init({
forceHeight: false
});
function snav_anchor() {
var window_top = $(window).scrollTop();
var div_top = $('#snav-anchor').offset().top;
if (window_top > div_top) {
$('.snav, .snav-menu').addClass('anchor');
$('.content-page').addClass('margin-anchor');
} else {
$('.snav, .snav-menu').removeClass('anchor');
$('.content-page').removeClass('margin-anchor');
}
}
$(function () {
$(window).scroll(snav_anchor);
snav_anchor();
});
var sections = $('.content-page > h2'),
links = $('.snav'),
lis = $('.snav>ul>li');
$(window).scroll(function() {
var currentPosition = $(this).scrollTop();
links.removeClass('selected');
lis.removeClass('active-slide');
sections.each(function() {
var top = $(this).offset().top,
bottom = top + $(this).height();
if (currentPosition >= top && currentPosition <= bottom) {
var link = $('a[href="#' + this.id + '"]');
link.addClass('selected');
link.parent().addClass('active-slide');
}
});
});