<div class='images'>
  <img class='image' src="/userUpload/images/Alanger/20151008_132123.jpg">
  <img class='image' src="/userUpload/images/Alanger/20151008_132307.jpg">
  <img class='image' src="/userUpload/images/Alanger/20151122_092300.jpg">

</div>
<style>.image {position: absolute;top: 50%;left: 50%;height: 200px;width: 200px;margin-top: -110px;margin-left: -105px;border: 5px solid #fff;border-bottom-width: 15px;-moz-box-shadow: 0 2px 5px rgba(30, 30, 30, 0.25);-webkit-box-shadow: 0 2px 5px rgba(30, 30, 30, 0.25);box-shadow: 0 2px 5px rgba(30, 30, 30, 0.25);z-index: 2;-moz-transition: -moz-transform 0.3s ease-in-out;-o-transition: -o-transform 0.3s ease-in-out;-webkit-transition: -webkit-transform 0.3s ease-in-out;ransition: transform 0.3s ease-in-out;}.image:first-child {-moz-transform: rotate(8deg);-ms-transform: rotate(8deg);-webkit-transform: rotate(8deg);transform: rotate(8deg);}.image:nth-child(2) {-moz-transform: rotate(2deg);-ms-transform: rotate(2deg);-webkit-transform: rotate(2deg);transform: rotate(2deg);}.image:nth-child(3) {-moz-transform: rotate(-3deg);-ms-transform: rotate(-3deg);-webkit-transform: rotate(-3deg); transform: rotate(-3deg);}.image:nth-child(4) {-moz-transform: rotate(-10deg);-ms-transform: rotate(-10deg);-webkit-transform: rotate(-10deg);transform: rotate(-10deg);}.image:last-child {-moz-transform: rotate(-5deg);-ms-transform: rotate(-5deg);-webkit-transform: rotate(-5deg);transform: rotate(-5deg);}</style>
<script>
&(function() {
  var cssTransition, imageOffset, imageWidth, images, queue, timeout, touch;
 
  cssTransition = function() {
    var body, i, len, style, vendor, vendors;
    body = document.body || document.documentElement;
    style = body.style;
    vendors = ['Moz', 'Webkit', 'O'];
    if (typeof style['transition'] === 'string') {
      return true;
    }
    for (i = 0, len = vendors.length; i < len; i++) {if (window.CP.shouldStopExecution(1)){break;}
      vendor = vendors[i];
      if (typeof style[vendor + 'Transition'] === 'string') {
        return true;
      }
    }
window.CP.exitedLoop(1);
 
    return false;
  };
 
  queue = false;
 
  touch = document.documentElement['ontouchstart'] !== void 0;
 
  images = document.querySelector('.images');
 
  imageWidth = images.firstElementChild.offsetWidth;
 
  imageOffset = images.firstElementChild.offsetLeft;
 
  timeout = cssTransition() ? [300, 400] : [0, 0];
 
  images.addEventListener((touch ? 'touchend' : 'click'), function(event) {
    var direction, lastClassList;
    if (queue) {
      return;
    }
    queue = true;
    if (((touch ? event.changedTouches[0].pageX : event.pageX) - imageOffset) > imageWidth / 2) {
      direction = 'slide-right';
    } else {
      direction = 'slide-left';
    }
    lastClassList = images.lastElementChild.classList;
    lastClassList.add(direction);
    return setTimeout(function() {
      lastClassList.remove(direction);
      lastClassList.add('back');
      return setTimeout(function() {
        images.insertBefore(images.lastElementChild, images.firstElementChild);
        lastClassList.remove('back');
        return queue = false;
      }, timeout[0]);
    }, timeout[1]);
  }, false);
 
}).call(this);</script>