//JQuery
window.mySwipe = $('#mySwipe').Swipe().data('Swipe');
var numClick = 0;
$("#next").bind('click',function(){
    numClick += 1;
    indexSwipe = mySwipe.getPos();
    curIndex = "#index"+indexSwipe;
    preIndex = "#index"+(indexSwipe-1);
    nextIndex = "#index"+(indexSwipe+1);
    if(indexSwipe == 0){
        $(curIndex).css("z-index",numClick);
        $("#index6").css("z-index",numClick);
        $(nextIndex).css("z-index",numClick);
    }else if(indexSwipe == 6){
        $(curIndex).css("z-index",numClick);
        $("#index5").css("z-index",numClick);
        $("#index0").css("z-index",numClick);
    }else{
    $(indexSwipe).css("z-index",numClick);
    $(preIndex).css("z-index",numClick);
    $(nextIndex).css("z-index",numClick);
    }
});

$("#prev").bind('click',function(){
    numClick += 1;
    indexSwipe = mySwipe.getPos();
    curIndex = "#index"+indexSwipe;
    preIndex = "#index"+(indexSwipe-1);
    nextIndex = "#index"+(indexSwipe+1);
    if(indexSwipe == 0){
        $(curIndex).css("z-index",numClick);
        $("#index6").css("z-index",numClick);
        $(nextIndex).css("z-index",numClick);
    }else if(indexSwipe == 6){
        $(curIndex).css("z-index",numClick);
        $("#index5").css("z-index",numClick);
        $("#index0").css("z-index",numClick);
    }else{
    $(indexSwipe).css("z-index",numClick);
    $(preIndex).css("z-index",numClick);
    $(nextIndex).css("z-index",numClick);
    }
});
