/*-- Byron Brown custom.js --*/
jQuery(document).ready(function ($) {
$('.footer-top-left .row .col-xs-12 p').append('')
//If not in site editor...
if ( !(window.location.href.indexOf("?editkey=") > -1) && $('#home-bodycontent').length ) {
//Move horizontal search to bottom of hero section
$('#horizontal-search').appendTo('.cover').wrap('
');
$('#home-bodycontent .cover-title-inner').show();
$('#custom-horizontal-search').show();
//If you have testimonials and custom testimonials section exists
if ( $('#testimonials-carousel').length && $('#testimonials-wrapper').length ) {
//Move testimonials to custom section on home page
$('#testimonials-wrapper .content').prepend($('#testimonials'));
//Remove default testimonials carousel wrapper from homepage
$('#testimonials-carousel').remove();
} else {
//If no testimonials, remove custom testimonial section on home page
$('#testimonials-wrapper').remove();
}
//If you have solds and custom solds section exists
if ( $('.listings.container').length && $('#sold-wrapper').length ) {
var hasSolds = false;
$('.listings.container').each(function( i ) {
console.log($(this).find('.page-header h2 span').text());
if ( $(this).find('.page-header h2:contains("Just Listed")').length) {
$hasSolds = true;
//Move solds to custom section on home page
$('#sold-wrapper .content').prepend(this);
//Add custom owl override scripts to bottom of body
var script = document.createElement("script");
//script.type = "text/javascript";
//script.src = "https://kvtemplates.rocks/templates/luxeagent/recent-sold-carousel.js";
script.innerHTML = 'jQuery(document).ready(function(b){var a=b("#sold-wrapper .listing-carousel");var c=a.data();var d=c["owl.carousel"].options;d.items=2;d.responsive={0:{items:1,stagePadding:0},768:{items:2},1200:{items:3}};d.stagePadding=60;d.loop=true;d.margin=10;a.trigger("refresh.owl.carousel");b("#next-sold").click(function(){a.trigger("next.owl.carousel")});b("#prev-sold").click(function(){a.trigger("prev.owl.carousel")})});';
document.body.appendChild(script);
return false;
}
}); //END EACH
//If no sold carousel, remove custom section wrapper from homepage
if (!$hasSolds){
$('#sold-wrapper').remove();
}
}
} //END IF NOT IN CUSTOMIZER
});
jQuery(document).ready(function ($) {
//$('#home-bodycontent .cover .cover-title-inner').attr({'data-aos':'fade-left', 'data-aos-delay':'250'}).show();
$('#home-bodycontent .cover #custom-horizontal-search').attr({'data-aos':'fade-up', 'data-aos-delay':'500'}).show();
$(function(){
function change_index(){
$('#home-bodycontent #agent-intro').attr('style','z-index:0;');
$('#home-bodycontent .cover #custom-horizontal-search').removeAttr('data-aos');
};
window.setTimeout( change_index, 1000 );
});
});