thumbnail.on("click", ".owl-item", function (e) {
e.preventDefault();
var number = $(this).data("owlItem");
full.trigger("owl.goTo", number);
});
function center(number) {
var thumbnailvisible = thumbnail.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for (var i in thumbnailvisible) {
if (num === thumbnailvisible[i]) {
var found = true;
}
}
if (found === false) {
if (num > thumbnailvisible[thumbnailvisible.length - 1]) {
thumbnail.trigger("owl.goTo", num - thumbnailvisible.length + 2)
} else {
if (num - 1 === -1) {
num = 0;
}
thumbnail.trigger("owl.goTo", num);
}
} else if (num === thumbnailvisible[thumbnailvisible.length - 1]) {
thumbnail.trigger("owl.goTo", thumbnailvisible[1])
} else if (num === thumbnailvisible[0]) {
thumbnail.trigger("owl.goTo", num - 1)
}