//

' + title + '

' sync2 = '
' post_item1 += sync1 post_item2 += sync2 post_html1.innerHTML = post_item1 post_html2.innerHTML = post_item2 } } getInfo(); deferimg('#sync1 img', 10); var total_banner = 6; var sync1 = $("#sync1"); var sync2 = $("#sync2"); var slidesPerPage = (total_banner < 6) ? total_banner : 6; var syncedSecondary = true; sync1.owlCarousel({ items: 1, slideSpeed: 2000, nav: true, autoplay: true, autoplayTimeout: 30000, dots: false, loop: true, responsiveRefreshRate: 200, navText: ['', ''], }).on('changed.owl.carousel', syncPosition); sync2 .on('initialized.owl.carousel', function() { sync2.find(".owl-item").eq(0).addClass("current"); }) .owlCarousel({ items: slidesPerPage, dots: false, nav: false, margin: 10, smartSpeed: 200, slideSpeed: 500, slideBy: slidesPerPage, responsiveRefreshRate: 100, items: 6 }).on('changed.owl.carousel', syncPosition2); function syncPosition(el) { var count = el.item.count - 1; var current = Math.round(el.item.index - (el.item.count / 2) - .5); if (current < 0) { current = count; } if (current > count) { current = 0; } sync2 .find(".owl-item") .removeClass("current") .eq(current) .addClass("current"); var onscreen = sync2.find('.owl-item.active').length - 1; var start = sync2.find('.owl-item.active').first().index(); var end = sync2.find('.owl-item.active').last().index(); if (current > end) { sync2.data('owl.carousel').to(current, 100, true); } if (current < start) { sync2.data('owl.carousel').to(current - onscreen, 100, true); } } function syncPosition2(el) { if (syncedSecondary) { var number = el.item.index; sync1.data('owl.carousel').to(number, 100, true); } } sync2.on("click", ".owl-item", function(e) { e.preventDefault(); var number = $(this).index(); sync1.data('owl.carousel').to(number, 300, true); }); $('.loaderpro').remove(); $('#sync1').owlCarousel(); $('#sync2').owlCarousel(); }) //]]>