function bindSwiper(){
var events = {start: 'touchstart', move: 'touchmove', end: 'touchend'},
move_last_x = 0,
move_last_y = 0,
end = 0,
left_or_right = '',
event_center = {
_touchMove_start : function(e,obj){
move_last_x = e.originalEvent.touches[0].clientX;
move_last_y = e.originalEvent.touches[0].clientY;
eventTouch = 0;
},_touchMove_move : function(e,obj){
eventTouch = 1;
if ( move_last_x < 1)return;
end = 1;
var x = e.originalEvent.touches[0].clientX;
if(move_last_x > x){
left_or_right = 'left';
}else{
left_or_right = 'right';
}
},_touchMove_end : function(e,obj){
if ( end < 1 ) {
return;
}
end = 0;
if(left_or_right == 'left'){
if(pageNumber % 2 == 0){
pageNumber +=2;
}else{
pageNumber +=1;
}
toPageNumber(pageNumber);
}else{
if(pageNumber % 2 == 0){
pageNumber -=1;
}else{
pageNumber -=2;
}
toPageNumber(pageNumber);
}
}
};
$("#topdiv").bind(events.start,function(e){event_center._touchMove_start(e,function(){})});
$("#topdiv").bind(events.move,function(e){event_center._touchMove_move(e,function(){})});
$("#topdiv").bind(events.end,function(e){event_center._touchMove_end(e,function(){})});
}