jQuery(document).ready(function() {
var member_car_count= jQuery(".member_car_count").last().val();
//alert(member_car_count);
var syncp1 = jQuery("#lowercarousel1");
var syncl1 = jQuery("#uppercarousel1");
syncp1.owlCarousel({
singleItem : true,
slideSpeed : 1000,
navigation: false, autoHeight: true, touchDrag : false,
mouseDrag : false,
pagination:false,
afterAction : syncPosition1,
responsiveRefreshRate : 200,
});
syncl1.owlCarousel({
items : 5,
itemsDesktop : [1199,4],
itemsDesktopSmall : [979,3],
itemsTablet : [768,2], autoHeight: true, touchDrag : false,
mouseDrag : false,
itemsMobile : [479,1],
navigation: true,
pagination:false,
navigationText:['',''],
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(".owl-item").eq(0).addClass("synced");
}
});
function syncPosition1(el){
var current = this.currentItem;
console.log(current+"test");
jQuery("#uppercarousel1")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if(jQuery("#uppercarousel1").data("owlCarousel") !== undefined){
center(current)
}
}
jQuery("#uppercarousel1").on("click", ".owl-item", function(e){
e.preventDefault();
var number = jQuery(this).data("owlItem");
syncp1.trigger("owl.goTo",number);
console.log("click"+number);
});
function center(number){
var sync1visible = syncl1.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for(var i in sync1visible){
if(num === sync1visible[i]){
var found = true;
}
}
if(found===false){
if(num>sync1visible[sync1visible.length-1]){
syncl1.trigger("owl.goTo", num - sync1visible.length+2)
}else{
if(num - 1 === -1){
num = 0;
}
syncl1.trigger("owl.goTo", num);
}
} else if(num === sync2visible[sync1visible.length-1]){
syncl1.trigger("owl.goTo", sync1visible[1])
} else if(num === sync1visible[0]){
syncl1.trigger("owl.goTo", num-1)
}
}
var syncp2 = jQuery("#lowercarousel2");
var syncl2 = jQuery("#uppercarousel2");
syncp2.owlCarousel({
singleItem : true,
slideSpeed : 1000,
navigation: false, autoHeight: true, touchDrag : false,
mouseDrag : false,
pagination:false,
afterAction : syncPosition2,
responsiveRefreshRate : 200,
});
syncl2.owlCarousel({
items : 5,
itemsDesktop : [1199,4],
itemsDesktopSmall : [979,3],
itemsTablet : [768,2], autoHeight: true, touchDrag : false,
mouseDrag : false,
itemsMobile : [479,1],
navigation: true,
pagination:false,
navigationText:['',''],
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(".owl-item").eq(0).addClass("synced");
}
});
function syncPosition2(el){
var current = this.currentItem;
console.log(current+"test");
jQuery("#uppercarousel2")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if(jQuery("#uppercarousel2").data("owlCarousel") !== undefined){
center(current)
}
}
jQuery("#uppercarousel2").on("click", ".owl-item", function(e){
e.preventDefault();
var number = jQuery(this).data("owlItem");
syncp2.trigger("owl.goTo",number);
console.log("click"+number);
});
function center(number){
var sync2visible = syncl2.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for(var i in sync2visible){
if(num === sync2visible[i]){
var found = true;
}
}
if(found===false){
if(num>sync2visible[sync2visible.length-1]){
syncl2.trigger("owl.goTo", num - sync2visible.length+2)
}else{
if(num - 1 === -1){
num = 0;
}
syncl2.trigger("owl.goTo", num);
}
} else if(num === sync2visible[sync2visible.length-1]){
syncl2.trigger("owl.goTo", sync2visible[1])
} else if(num === sync2visible[0]){
syncl2.trigger("owl.goTo", num-1)
}
}
var syncp3 = jQuery("#lowercarousel3");
var syncl3 = jQuery("#uppercarousel3");
syncp3.owlCarousel({
singleItem : true,
slideSpeed : 1000,
navigation: false, autoHeight: true, touchDrag : false,
mouseDrag : false,
pagination:false,
afterAction : syncPosition3,
responsiveRefreshRate : 200,
});
syncl3.owlCarousel({
items : 5,
itemsDesktop : [1199,4],
itemsDesktopSmall : [979,3],
itemsTablet : [768,2], autoHeight: true, touchDrag : false,
mouseDrag : false,
itemsMobile : [479,1],
navigation: true,
pagination:false,
navigationText:['',''],
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(".owl-item").eq(0).addClass("synced");
}
});
function syncPosition3(el){
var current = this.currentItem;
console.log(current+"test");
jQuery("#uppercarousel3")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if(jQuery("#uppercarousel3").data("owlCarousel") !== undefined){
center(current)
}
}
jQuery("#uppercarousel3").on("click", ".owl-item", function(e){
e.preventDefault();
var number = jQuery(this).data("owlItem");
syncp3.trigger("owl.goTo",number);
console.log("click"+number);
});
function center(number){
var sync3visible = syncl3.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for(var i in sync3visible){
if(num === sync3visible[i]){
var found = true;
}
}
if(found===false){
if(num>sync3visible[sync3visible.length-1]){
syncl3.trigger("owl.goTo", num - sync3visible.length+2)
}else{
if(num - 1 === -1){
num = 0;
}
syncl3.trigger("owl.goTo", num);
}
} else if(num === sync2visible[sync3visible.length-1]){
syncl3.trigger("owl.goTo", sync3visible[1])
} else if(num === sync3visible[0]){
syncl3.trigger("owl.goTo", num-1)
}
}
var syncp4 = jQuery("#lowercarousel4");
var syncl4 = jQuery("#uppercarousel4");
syncp4.owlCarousel({
singleItem : true,
slideSpeed : 1000,
navigation: false, autoHeight: true, touchDrag : false,
mouseDrag : false,
pagination:false,
afterAction : syncPosition4,
responsiveRefreshRate : 200,
});
syncl4.owlCarousel({
items : 5,
itemsDesktop : [1199,4],
itemsDesktopSmall : [979,3],
itemsTablet : [768,2], autoHeight: true, touchDrag : false,
mouseDrag : false,
itemsMobile : [479,1],
navigation: true,
pagination:false,
navigationText:['',''],
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(".owl-item").eq(0).addClass("synced");
}
});
function syncPosition4(el){
var current = this.currentItem;
console.log(current+"test");
jQuery("#uppercarousel4")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if(jQuery("#uppercarousel4").data("owlCarousel") !== undefined){
center(current)
}
}
jQuery("#uppercarousel4").on("click", ".owl-item", function(e){
e.preventDefault();
var number = jQuery(this).data("owlItem");
syncp4.trigger("owl.goTo",number);
console.log("click"+number);
});
function center(number){
var sync4visible = syncl4.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for(var i in sync4visible){
if(num === sync4visible[i]){
var found = true;
}
}
if(found===false){
if(num>sync4visible[sync4visible.length-1]){
syncl4.trigger("owl.goTo", num - sync4visible.length+2)
}else{
if(num - 1 === -1){
num = 0;
}
syncl4.trigger("owl.goTo", num);
}
} else if(num === sync2visible[sync4visible.length-1]){
syncl4.trigger("owl.goTo", sync4visible[1])
} else if(num === sync4visible[0]){
syncl4.trigger("owl.goTo", num-1)
}
}
var syncp5 = jQuery("#lowercarousel5");
var syncl5 = jQuery("#uppercarousel5");
syncp5.owlCarousel({
singleItem : true,
slideSpeed : 1000,
navigation: false, autoHeight: true, touchDrag : false,
mouseDrag : false,
pagination:false,
afterAction : syncPosition5,
responsiveRefreshRate : 200,
});
syncl5.owlCarousel({
items : 5,
itemsDesktop : [1199,4],
itemsDesktopSmall : [979,3],
itemsTablet : [768,2], autoHeight: true, touchDrag : false,
mouseDrag : false,
itemsMobile : [479,1],
navigation: true,
pagination:false,
navigationText:['',''],
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(".owl-item").eq(0).addClass("synced");
}
});
function syncPosition5(el){
var current = this.currentItem;
console.log(current+"test");
jQuery("#uppercarousel5")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if(jQuery("#uppercarousel5").data("owlCarousel") !== undefined){
center(current)
}
}
jQuery("#uppercarousel5").on("click", ".owl-item", function(e){
e.preventDefault();
var number = jQuery(this).data("owlItem");
syncp5.trigger("owl.goTo",number);
console.log("click"+number);
});
function center(number){
var sync5visible = syncl5.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for(var i in sync5visible){
if(num === sync5visible[i]){
var found = true;
}
}
if(found===false){
if(num>sync5visible[sync5visible.length-1]){
syncl5.trigger("owl.goTo", num - sync5visible.length+2)
}else{
if(num - 1 === -1){
num = 0;
}
syncl5.trigger("owl.goTo", num);
}
} else if(num === sync2visible[sync5visible.length-1]){
syncl5.trigger("owl.goTo", sync5visible[1])
} else if(num === sync5visible[0]){
syncl5.trigger("owl.goTo", num-1)
}
}
var syncp6 = jQuery("#lowercarousel6");
var syncl6 = jQuery("#uppercarousel6");
syncp6.owlCarousel({
singleItem : true,
slideSpeed : 1000,
navigation: false, autoHeight: true, touchDrag : false,
mouseDrag : false,
pagination:false,
afterAction : syncPosition6,
responsiveRefreshRate : 200,
});
syncl6.owlCarousel({
items : 5,
itemsDesktop : [1199,4],
itemsDesktopSmall : [979,3],
itemsTablet : [768,2], autoHeight: true, touchDrag : false,
mouseDrag : false,
itemsMobile : [479,1],
navigation: true,
pagination:false,
navigationText:['',''],
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(".owl-item").eq(0).addClass("synced");
}
});
function syncPosition6(el){
var current = this.currentItem;
console.log(current+"test");
jQuery("#uppercarousel6")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if(jQuery("#uppercarousel6").data("owlCarousel") !== undefined){
center(current)
}
}
jQuery("#uppercarousel6").on("click", ".owl-item", function(e){
e.preventDefault();
var number = jQuery(this).data("owlItem");
syncp6.trigger("owl.goTo",number);
console.log("click"+number);
});
function center(number){
var sync6visible = syncl6.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for(var i in sync6visible){
if(num === sync6visible[i]){
var found = true;
}
}
if(found===false){
if(num>sync6visible[sync6visible.length-1]){
syncl6.trigger("owl.goTo", num - sync6visible.length+2)
}else{
if(num - 1 === -1){
num = 0;
}
syncl6.trigger("owl.goTo", num);
}
} else if(num === sync2visible[sync6visible.length-1]){
syncl6.trigger("owl.goTo", sync6visible[1])
} else if(num === sync6visible[0]){
syncl6.trigger("owl.goTo", num-1)
}
}
var syncp7 = jQuery("#lowercarousel7");
var syncl7 = jQuery("#uppercarousel7");
syncp7.owlCarousel({
singleItem : true,
slideSpeed : 1000,
navigation: false, autoHeight: true, touchDrag : false,
mouseDrag : false,
pagination:false,
afterAction : syncPosition7,
responsiveRefreshRate : 200,
});
syncl7.owlCarousel({
items : 5,
itemsDesktop : [1199,4],
itemsDesktopSmall : [979,3],
itemsTablet : [768,2], autoHeight: true, touchDrag : false,
mouseDrag : false,
itemsMobile : [479,1],
navigation: true,
pagination:false,
navigationText:['',''],
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(".owl-item").eq(0).addClass("synced");
}
});
function syncPosition7(el){
var current = this.currentItem;
console.log(current+"test");
jQuery("#uppercarousel7")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if(jQuery("#uppercarousel7").data("owlCarousel") !== undefined){
center(current)
}
}
jQuery("#uppercarousel7").on("click", ".owl-item", function(e){
e.preventDefault();
var number = jQuery(this).data("owlItem");
syncp7.trigger("owl.goTo",number);
console.log("click"+number);
});
function center(number){
var sync7visible = syncl7.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for(var i in sync7visible){
if(num === sync7visible[i]){
var found = true;
}
}
if(found===false){
if(num>sync7visible[sync7visible.length-1]){
syncl7.trigger("owl.goTo", num - sync7visible.length+2)
}else{
if(num - 1 === -1){
num = 0;
}
syncl7.trigger("owl.goTo", num);
}
} else if(num === sync2visible[sync7visible.length-1]){
syncl7.trigger("owl.goTo", sync7visible[1])
} else if(num === sync7visible[0]){
syncl7.trigger("owl.goTo", num-1)
}
}
var syncp8 = jQuery("#lowercarousel8");
var syncl8 = jQuery("#uppercarousel8");
syncp8.owlCarousel({
singleItem : true,
slideSpeed : 1000,
navigation: false, autoHeight: true, touchDrag : false,
mouseDrag : false,
pagination:false,
afterAction : syncPosition8,
responsiveRefreshRate : 200,
});
syncl8.owlCarousel({
items : 5,
itemsDesktop : [1199,4],
itemsDesktopSmall : [979,3],
itemsTablet : [768,2], autoHeight: true, touchDrag : false,
mouseDrag : false,
itemsMobile : [479,1],
navigation: true,
pagination:false,
navigationText:['',''],
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(".owl-item").eq(0).addClass("synced");
}
});
function syncPosition8(el){
var current = this.currentItem;
console.log(current+"test");
jQuery("#uppercarousel8")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if(jQuery("#uppercarousel8").data("owlCarousel") !== undefined){
center(current)
}
}
jQuery("#uppercarousel8").on("click", ".owl-item", function(e){
e.preventDefault();
var number = jQuery(this).data("owlItem");
syncp8.trigger("owl.goTo",number);
console.log("click"+number);
});
function center(number){
var sync8visible = syncl8.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for(var i in sync8visible){
if(num === sync8visible[i]){
var found = true;
}
}
if(found===false){
if(num>sync8visible[sync8visible.length-1]){
syncl8.trigger("owl.goTo", num - sync8visible.length+2)
}else{
if(num - 1 === -1){
num = 0;
}
syncl8.trigger("owl.goTo", num);
}
} else if(num === sync2visible[sync8visible.length-1]){
syncl8.trigger("owl.goTo", sync8visible[1])
} else if(num === sync8visible[0]){
syncl8.trigger("owl.goTo", num-1)
}
}
var syncp9 = jQuery("#lowercarousel9");
var syncl9 = jQuery("#uppercarousel9");
syncp9.owlCarousel({
singleItem : true,
slideSpeed : 1000,
navigation: false, autoHeight: true, touchDrag : false,
mouseDrag : false,
pagination:false,
afterAction : syncPosition9,
responsiveRefreshRate : 200,
});
syncl9.owlCarousel({
items : 5,
itemsDesktop : [1199,4],
itemsDesktopSmall : [979,3],
itemsTablet : [768,2], autoHeight: true, touchDrag : false,
mouseDrag : false,
itemsMobile : [479,1],
navigation: true,
pagination:false,
navigationText:['',''],
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(".owl-item").eq(0).addClass("synced");
}
});
function syncPosition9(el){
var current = this.currentItem;
console.log(current+"test");
jQuery("#uppercarousel9")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if(jQuery("#uppercarousel9").data("owlCarousel") !== undefined){
center(current)
}
}
jQuery("#uppercarousel9").on("click", ".owl-item", function(e){
e.preventDefault();
var number = jQuery(this).data("owlItem");
syncp9.trigger("owl.goTo",number);
console.log("click"+number);
});
function center(number){
var sync9visible = syncl9.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for(var i in sync9visible){
if(num === sync9visible[i]){
var found = true;
}
}
if(found===false){
if(num>sync9visible[sync9visible.length-1]){
syncl9.trigger("owl.goTo", num - sync9visible.length+2)
}else{
if(num - 1 === -1){
num = 0;
}
syncl9.trigger("owl.goTo", num);
}
} else if(num === sync2visible[sync9visible.length-1]){
syncl9.trigger("owl.goTo", sync9visible[1])
} else if(num === sync9visible[0]){
syncl9.trigger("owl.goTo", num-1)
}
}
});