$(function(){
$("#owl-content").owlCarousel({
// animateOut: 'zoomOut',
// animateIn: 'fadeInLeft',
items: 1,
//lazyLoad:false,
margin: 0,
loop: true,
dots: false,
nav: true,
autoHeight: true,
// autoplay: true,
// autoplayHoverPause: false,
// smartSpeed: 500,
mouseDrag: false
});
$(".owl-trueblack").owlCarousel({
// animateOut: 'zoomOut',
// animateIn: 'fadeInLeft',
items: 1,
//lazyLoad:false,
margin: 0,
loop: true,
dots: true,
nav: false,
//autoHeight: true,
autoplay: true,
autoplayHoverPause: false,
smartSpeed: 500,
mouseDrag: true
});
$('.wtb-anchor').bind('click',function(event){
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top -50
}, 800);
event.preventDefault();
});
$(".twentytwenty-container").twentytwenty({
default_offset_pct: 0.5, // How much of the before image is visible when the page loads
orientation: 'horizontal', // Orientation of the before and after images ('horizontal' or 'vertical')
before_label: '', // Set a custom before label
after_label: '', // Set a custom after label
no_overlay: true, //Do not show the overlay with before and after
move_slider_on_hover: false, // Move slider on mouse hover?
move_with_handle_only: true, // Allow a user to swipe anywhere on the image to control slider movement.
click_to_move: false // Allow a user to click (or tap) anywhere on the image to move the slider to that locations.
});
setInterval(function() {
var e = $("#compare-one .twentytwenty-handle").offset().left
, t = $("body").prop("scrollWidth") / 2
, n = $("#compare-one .twentytwenty-before").width() / 8
, i = 0;
$("body").prop("scrollWidth") < 721 && (i = 20),
e + i > t + n ? ($("#compare-one .textRight1").addClass("disappear"),
$("#compare-one .textRight2").addClass("disappear"),
$("#compare-one .textLeft1").removeClass("disappear"),
$("#compare-one .textLeft2").removeClass("disappear")) : e + i < t - n ? ($("#compare-one .textLeft1").addClass("disappear"),
$("#compare-one .textLeft2").addClass("disappear"),
$("#compare-one .textRight1").removeClass("disappear"),
$("#compare-one .textRight2").removeClass("disappear")) : ($("#compare-one .textLeft1").removeClass("disappear"),
$("#compare-one .textLeft2").removeClass("disappear"),
$("#compare-one .textRight1").removeClass("disappear"),
$("#compare-one .textRight2").removeClass("disappear"))
}, 300)
setInterval(function() {
var e = $("#compare-two .twentytwenty-handle").offset().left
, t = $("body").prop("scrollWidth") / 2
, n = $("#compare-two .twentytwenty-before").width() / 8
, i = 0;
$("body").prop("scrollWidth") < 721 && (i = 20),
e + i > t + n ? ($("#compare-two .textRight1").addClass("disappear"),
$("#compare-two .textRight2").addClass("disappear"),
$("#compare-two .textLeft1").removeClass("disappear"),
$("#compare-two .textLeft2").removeClass("disappear")) : e + i < t - n ? ($("#compare-two .textLeft1").addClass("disappear"),
$("#compare-two .textLeft2").addClass("disappear"),
$("#compare-two .textRight1").removeClass("disappear"),
$("#compare-two .textRight2").removeClass("disappear")) : ($("#compare-two .textLeft1").removeClass("disappear"),
$("#compare-two .textLeft2").removeClass("disappear"),
$("#compare-two .textRight1").removeClass("disappear"),
$("#compare-two .textRight2").removeClass("disappear"))
}, 300)
});