!function(e){"function"==typeof define&&define.amd?define("carouselPreview",e):e()}(function(){"use strict";jQuery(function(t){t(".gallery-prev-btn").click(function(e){e.preventDefault(),t(this).parents(".element").find(".gallery-carousel.owl-carousel").trigger("prev.owl.carousel")}),t(".gallery-next-btn").click(function(e){e.preventDefault(),t(this).parents(".element").find(".gallery-carousel.owl-carousel").trigger("next.owl.carousel")})}),MyListing.GalleryCarouselPreview=function(){jQuery(function(n){n(".gallerySlider").each(function(){var e=n(this),t=e.find(".galleryPreview"),i=e.find(".gallery-thumb");t.length&&t.owlCarousel({items:1,center:!0,dotsContainer:"#customDots",autoHeight:!0}),e.find(".slide-thumb").click(function(e){e.preventDefault();e=n(this).data("slide-no");t.trigger("to.owl.carousel",e)}),i.each(function(){var e=n(this).data("items")?n(this).data("items"):4,t=n(this).data("items-mobile")?n(this).data("items-mobile"):2;n(this).owlCarousel({margin:10,items:e,mouseDrag:!1,responsive:{0:{items:t},600:{items:3<e?3:e},1e3:{items:e}}})}),e.find(".gallery-prev-btn").click(function(e){e.preventDefault(),i.trigger("prev.owl.carousel")}),e.find(".gallery-next-btn").click(function(e){e.preventDefault(),i.trigger("next.owl.carousel")}),setTimeout(function(){n(window).trigger("resize")},100)})})},MyListing.GalleryCarouselPreview()});
