var touchSlop = 0;
var mLastClientX, mLastClientY;
var isDragging = false;

function initTouchSlop(appTouchSlop) {
    touchSlop = appTouchSlop;
}

//var swiper = new Swiper('.swiper-container', {
//                        slidesPerView: 2,
//                        centeredSlides: true,
//                        spaceBetween: 10,
//                        loop: true,
//                        preloadImages: false,
//                        });
//
//swiper.on('touchStart', function(event) {
//    var touch = event.touches;
//    mLastClientX = touch.currentX;
//    mLastClientY = touch.currentY;
//    isDragging = false;
//    window.imagelistener.requestDisallowInterceptTouchEvent(true);
//});
//
//swiper.on('touchMove', function(event) {
//    if (!isDragging) {
//        var touch = event.touches;
//        var xDiff = Math.abs(touch.currentX - mLastClientX);
//        var yDiff = Math.abs(touch.currentY - mLastClientY);
//
//        if (xDiff >= touchSlop) {
//            isDragging = true;
//        } else if(yDiff > touchSlop) {
//            isDragging = true;
//            window.imagelistener.requestDisallowInterceptTouchEvent(false);
//        }
//    }
//
//    isDragging = true;
//    window.imagelistener.requestDisallowInterceptTouchEvent(true);
//});
//
//swiper.on('touchEnd', function(event) {
//    isDragging = false;
//    window.imagelistener.requestDisallowInterceptTouchEvent(false);
//});
//
//
//if ('addEventListener' in document) {
//    document.addEventListener("touchstart", function(){}, true);
//    /*document.addEventListener('DOMContentLoaded', function() {
//                              FastClick.attach(document.body);
//                              }, false);*/
//}