Index: pro-violet-viettel/www/deploy/20150304/application/modules/ajax/controllers/preview.php
===================================================================
--- pro-violet-viettel/www/deploy/20150304/application/modules/ajax/controllers/preview.php	(revision 789)
+++ pro-violet-viettel/www/deploy/20150304/application/modules/ajax/controllers/preview.php	(revision 790)
@@ -16,6 +16,13 @@
             $fileId =  $this->input->post('fileId',TRUE);
             $data = $this->vservices->getPreview($fileId); 
-            $data=  json_encode($data);
+            $data=  json_decode($data,true);
+            if ($data['total']==0)
+            {
+                echo "Cháº¿ Äá» xem trÆ°á»c khÃŽng kháº£ dá»¥ng, vui lÃ²ng táº£i xuá»ng Äá» xem";
+            }
+            else
+            {
             $this->load->view('preview/index', $data);
+            }
 	}
 
Index: pro-violet-viettel/www/deploy/20150304/application/modules/ajax/views/preview/index.php
===================================================================
--- pro-violet-viettel/www/deploy/20150304/application/modules/ajax/views/preview/index.php	(revision 789)
+++ pro-violet-viettel/www/deploy/20150304/application/modules/ajax/views/preview/index.php	(revision 790)
@@ -1,19 +1,83 @@
-<!doctype html>
-<head>
+  <style>
 
 
-    <script type="text/javascript">
-    $(function(){
-      $("#slides").slidesjs({
-        width: 940,
-        height: 528
-      });
-    });
-  </script>
-</head>
+    #slides {
+      display: none
+    }
+
+    #slides .slidesjs-navigation {
+      margin-top:3px;
+    }
+
+    #slides .slidesjs-previous {
+      margin-right: 5px;
+      float: left;
+    }
+
+    #slides .slidesjs-next {
+      margin-right: 5px;
+      float: left;
+    }
+
+    .slidesjs-pagination {
+      
+      float: right;
+      
+    }
+
+    .slidesjs-pagination li {
+      float: left;
+      list-style: none;
+      width: 25px;
+      text-align: center;
+      margin-bottom: 10px;
+    }
+
+    .slidesjs-pagination li a {
+      display: inline; 
+      height: 0;
+     width: 25px;
+      background-position: 0 0;
+      padding: 5px 5px 5px 5px;
+      overflow: hidden;
+      color: #000;
+    }
+
+    .slidesjs-pagination li a.active,
+    .slidesjs-pagination li a:hover.active {
+      background-position: 0 -13px;
+      background-color: #428bca !important;
+    }
+
+    .slidesjs-pagination li a:hover {
+      background-position: 0 -26px
+    }
+
+    #slides a:link,
+    #slides a:visited {
+      color: #333
+    }
+
+    #slides a:hover,
+    #slides a:active {
+      color: #9e2020
+    }
+
+    .navbar {
+      overflow: hidden
+    }
+  </style>
 <body>
-  <div id="slides">
-    <img src="http://sbgapi.violet.vn/previews/294/0.png">
-    <img src="http://sbgapi.violet.vn/previews/294/1.png">
-  </div>
+    <?php echo $filename;?>
+    <div id="slides" style="display: none;">
+        <?php
+        for ($i=0;$i<$total;$i++)
+        {
+        ?>
+    <img src="http://sbgapi.violet.vn/<?php echo $folder."/".$i;?>.png">
+    <?php
+    }?>
+    <a href="#" class="slidesjs-previous slidesjs-navigation"><i class="icon-chevron-left icon-large"></i></a>
+      <a href="#" class="slidesjs-next slidesjs-navigation"><i class="icon-chevron-right icon-large"></i></a>
+    </div>
 </body>
Index: pro-violet-viettel/www/deploy/20150304/assets/js/jquery.slides.js
===================================================================
--- pro-violet-viettel/www/deploy/20150304/assets/js/jquery.slides.js	(revision 789)
+++ pro-violet-viettel/www/deploy/20150304/assets/js/jquery.slides.js	(revision 790)
@@ -1,598 +1,457 @@
-// Generated by CoffeeScript 1.6.1
-(function() { 
-
-  (function($, window, document) {
-    var Plugin, defaults, pluginName;
-    pluginName = "slidesjs";
-    defaults = {
-      width: 940,
-      height: 528,
-      start: 1,
-      navigation: {
-        active: true,
-        effect: "slide"
-      },
-      pagination: {
-        active: true,
-        effect: "slide"
-      },
-      play: {
-        active: false,
-        effect: "slide",
-        interval: 5000,
-        auto: false,
-        swap: true,
-        pauseOnHover: false,
-        restartDelay: 2500
-      },
-      effect: {
-        slide: {
-          speed: 500
-        },
-        fade: {
-          speed: 300,
-          crossfade: true
+/*
+  SlidesJS 3.0.3 http://slidesjs.com
+  (c) 2013 by Nathan Searles http://nathansearles.com
+  Updated: March 15th, 2013
+  Apache License: http://www.apache.org/licenses/LICENSE-2.0
+*/
+(function () {
+    (function (a, b, c) {
+        var d,
+        e,
+        f;
+        return f = 'slidesjs',
+        e = {
+            width: 940,
+            height: 528,
+            start: 1,
+            navigation: {
+                active: !0,
+                effect: 'slide'
+            },
+            pagination: {
+                active: !0,
+                effect: 'slide'
+            },
+            play: {
+                active: !1,
+                effect: 'slide',
+                interval: 5000,
+                auto: !1,
+                swap: !0,
+                pauseOnHover: !1,
+                restartDelay: 2500
+            },
+            effect: {
+                slide: {
+                    speed: 500
+                },
+                fade: {
+                    speed: 300,
+                    crossfade: !0
+                }
+            },
+            callback: {
+                loaded: function () {
+                },
+                start: function () {
+                },
+                complete: function () {
+                }
+            }
+        },
+        d = function () {
+            function b(b, c) {
+                this.element = b,
+                this.options = a.extend(!0, {
+                }, e, c),
+                this._defaults = e,
+                this._name = f,
+                this.init()
+            }
+            return b
+        }(),
+        d.prototype.init = function () {
+            var c,
+            d,
+            e,
+            f,
+            g,
+            h,
+            i = this;
+            return c = a(this.element),
+            this.data = a.data(this),
+            a.data(this, 'animating', !1),
+            a.data(this, 'total', c.children() .not('.slidesjs-navigation', c) .length),
+            a.data(this, 'current', this.options.start - 1),
+            a.data(this, 'vendorPrefix', this._getVendorPrefix()),
+            'undefined' != typeof TouchEvent && (a.data(this, 'touch', !0), this.options.effect.slide.speed = this.options.effect.slide.speed / 2),
+            c.css({
+                overflow: 'hidden'
+            }),
+            c.slidesContainer = c.children() .not('.slidesjs-navigation', c) .wrapAll('<div class=\'slidesjs-container\'>', c) .parent() .css({
+                overflow: 'hidden',
+                position: 'relative'
+            }),
+            a('.slidesjs-container', c) .wrapInner('<div class=\'slidesjs-control\'>', c) .children(),
+            a('.slidesjs-control', c) .css({
+                position: 'relative',
+                left: 0
+            }),
+            a('.slidesjs-control', c) .children() .addClass('slidesjs-slide') .css({
+                position: 'absolute',
+                top: 0,
+                left: 0,
+                width: '100%',
+                zIndex: 0,
+                display: 'none',
+                webkitBackfaceVisibility: 'hidden'
+            }),
+            a.each(a('.slidesjs-control', c) .children(), function (b) {
+                var c;
+                return c = a(this),
+                c.attr('slidesjs-index', b)
+            }),
+            this.data.touch && (a('.slidesjs-control', c) .on('touchstart', function (a) {
+                return i._touchstart(a)
+            }), a('.slidesjs-control', c) .on('touchmove', function (a) {
+                return i._touchmove(a)
+            }), a('.slidesjs-control', c) .on('touchend', function (a) {
+                return i._touchend(a)
+            })),
+            c.fadeIn(0),
+            this.update(),
+            this.data.touch && this._setuptouch(),
+            a('.slidesjs-control', c) .children(':eq(' + this.data.current + ')') .eq(0) .fadeIn(0, function () {
+                return a(this) .css({
+                    zIndex: 10
+                })
+            }),
+            this.options.navigation.active && (g = a('<a>', {
+                'class': 'slidesjs-previous slidesjs-navigation',
+                href: '#',
+                title: 'Previous',
+                text: 'Previous'
+            }) .appendTo(c), d = a('<a>', {
+                'class': 'slidesjs-next slidesjs-navigation',
+                href: '#',
+                title: 'Next',
+                text: 'Next'
+            }) .appendTo(c)),
+            a('.slidesjs-next', c) .click(function (a) {
+                return a.preventDefault(),
+                i.stop(!0),
+                i.next(i.options.navigation.effect)
+            }),
+            a('.slidesjs-previous', c) .click(function (a) {
+                return a.preventDefault(),
+                i.stop(!0),
+                i.previous(i.options.navigation.effect)
+            }),
+            this.options.play.active && (f = a('<a>', {
+                'class': 'slidesjs-play slidesjs-navigation',
+                href: '#',
+                title: 'Play',
+                text: 'Play'
+            }) .appendTo(c), h = a('<a>', {
+                'class': 'slidesjs-stop slidesjs-navigation',
+                href: '#',
+                title: 'Stop',
+                text: 'Stop'
+            }) .appendTo(c), f.click(function (a) {
+                return a.preventDefault(),
+                i.play(!0)
+            }), h.click(function (a) {
+                return a.preventDefault(),
+                i.stop(!0)
+            }), this.options.play.swap && h.css({
+                display: 'none'
+            })),
+            this.options.pagination.active && (e = a('<ul>', {
+                'class': 'slidesjs-pagination'
+            }) .appendTo(c), a.each(Array(this.data.total), function (b) {
+                var c,
+                d;
+                return c = a('<li>', {
+                    'class': 'slidesjs-pagination-item'
+                }) .appendTo(e),
+                d = a('<a>', {
+                    href: '#',
+                    'data-slidesjs-item': b,
+                    html: b + 1
+                }) .appendTo(c),
+                d.click(function (b) {
+                    return b.preventDefault(),
+                    i.stop(!0),
+                    i.goto(1 * a(b.currentTarget) .attr('data-slidesjs-item') + 1)
+                })
+            })),
+            a(b) .bind('resize', function () {
+                return i.update()
+            }),
+            this._setActive(),
+            this.options.play.auto && this.play(),
+            this.options.callback.loaded(this.options.start)
+        },
+        d.prototype._setActive = function (b) {
+            var c,
+            d;
+            return c = a(this.element),
+            this.data = a.data(this),
+            d = b > - 1 ? b : this.data.current,
+            a('.active', c) .removeClass('active'),
+            a('li:eq(' + d + ') a', c) .addClass('active')
+        },
+        d.prototype.update = function () {
+            var b,
+            c,
+            d;
+            return b = a(this.element),
+            this.data = a.data(this),
+            a('.slidesjs-control', b) .children(':not(:eq(' + this.data.current + '))') .css({
+                display: 'none',
+                left: 0,
+                zIndex: 0
+            }),
+            d = b.width(),
+            c = this.options.height / this.options.width * d,
+            this.options.width = d,
+            this.options.height = c,
+            a('.slidesjs-control, .slidesjs-container', b) .css({
+                width: d,
+                height: c
+            })
+        },
+        d.prototype.next = function (b) {
+            var c;
+            return c = a(this.element),
+            this.data = a.data(this),
+            a.data(this, 'direction', 'next'),
+            void 0 === b && (b = this.options.navigation.effect),
+            'fade' === b ? this._fade()  : this._slide()
+        },
+        d.prototype.previous = function (b) {
+            var c;
+            return c = a(this.element),
+            this.data = a.data(this),
+            a.data(this, 'direction', 'previous'),
+            void 0 === b && (b = this.options.navigation.effect),
+            'fade' === b ? this._fade()  : this._slide()
+        },
+        d.prototype.goto = function (b) {
+            var c,
+            d;
+            if (c = a(this.element), this.data = a.data(this), void 0 === d && (d = this.options.pagination.effect), b > this.data.total ? b = this.data.total : 1 > b && (b = 1), 'number' == typeof b) return 'fade' === d ? this._fade(b)  : this._slide(b);
+            if ('string' == typeof b) {
+                if ('first' === b) return 'fade' === d ? this._fade(0)  : this._slide(0);
+                if ('last' === b) return 'fade' === d ? this._fade(this.data.total)  : this._slide(this.data.total)
+            }
+        },
+        d.prototype._setuptouch = function () {
+            var b,
+            c,
+            d,
+            e;
+            return b = a(this.element),
+            this.data = a.data(this),
+            e = a('.slidesjs-control', b),
+            c = this.data.current + 1,
+            d = this.data.current - 1,
+            0 > d && (d = this.data.total - 1),
+            c > this.data.total - 1 && (c = 0),
+            e.children(':eq(' + c + ')') .css({
+                display: 'block',
+                left: this.options.width
+            }),
+            e.children(':eq(' + d + ')') .css({
+                display: 'block',
+                left: - this.options.width
+            })
+        },
+        d.prototype._touchstart = function (b) {
+            var c,
+            d;
+            return c = a(this.element),
+            this.data = a.data(this),
+            d = b.originalEvent.touches[0],
+            this._setuptouch(),
+            a.data(this, 'touchtimer', Number(new Date)),
+            a.data(this, 'touchstartx', d.pageX),
+            a.data(this, 'touchstarty', d.pageY),
+            b.stopPropagation()
+        },
+        d.prototype._touchend = function (b) {
+            var c,
+            d,
+            e,
+            f,
+            g,
+            h,
+            i,
+            j = this;
+            return c = a(this.element),
+            this.data = a.data(this),
+            h = b.originalEvent.touches[0],
+            f = a('.slidesjs-control', c),
+            f.position() .left > 0.5 * this.options.width || f.position() .left > 0.1 * this.options.width && 250 > Number(new Date) - this.data.touchtimer ? (a.data(this, 'direction', 'previous'), this._slide())  : f.position() .left < - (0.5 * this.options.width) || f.position() .left < - (0.1 * this.options.width) && 250 > Number(new Date) - this.data.touchtimer ? (a.data(this, 'direction', 'next'), this._slide())  : (e = this.data.vendorPrefix, i = e + 'Transform', d = e + 'TransitionDuration', g = e + 'TransitionTimingFunction', f[0].style[i] = 'translateX(0px)', f[0].style[d] = 0.85 * this.options.effect.slide.speed + 'ms'),
+            f.on('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd', function () {
+                return e = j.data.vendorPrefix,
+                i = e + 'Transform',
+                d = e + 'TransitionDuration',
+                g = e + 'TransitionTimingFunction',
+                f[0].style[i] = '',
+                f[0].style[d] = '',
+                f[0].style[g] = ''
+            }),
+            b.stopPropagation()
+        },
+        d.prototype._touchmove = function (b) {
+            var c,
+            d,
+            e,
+            f,
+            g;
+            return c = a(this.element),
+            this.data = a.data(this),
+            f = b.originalEvent.touches[0],
+            d = this.data.vendorPrefix,
+            e = a('.slidesjs-control', c),
+            g = d + 'Transform',
+            a.data(this, 'scrolling', Math.abs(f.pageX - this.data.touchstartx) < Math.abs(f.pageY - this.data.touchstarty)),
+            this.data.animating || this.data.scrolling || (b.preventDefault(), this._setuptouch(), e[0].style[g] = 'translateX(' + (f.pageX - this.data.touchstartx) + 'px)'),
+            b.stopPropagation()
+        },
+        d.prototype.play = function (b) {
+            var c,
+            d,
+            e,
+            f = this;
+            return c = a(this.element),
+            this.data = a.data(this),
+            !this.data.playInterval && (b && (d = this.data.current, this.data.direction = 'next', 'fade' === this.options.play.effect ? this._fade()  : this._slide()), a.data(this, 'playInterval', setInterval(function () {
+                return d = f.data.current,
+                f.data.direction = 'next',
+                'fade' === f.options.play.effect ? f._fade()  : f._slide()
+            }, this.options.play.interval)), e = a('.slidesjs-container', c), this.options.play.pauseOnHover && (e.unbind(), e.bind('mouseenter', function () {
+                return f.stop()
+            }), e.bind('mouseleave', function () {
+                return f.options.play.restartDelay ? a.data(f, 'restartDelay', setTimeout(function () {
+                    return f.play(!0)
+                }, f.options.play.restartDelay))  : f.play()
+            })), a.data(this, 'playing', !0), a('.slidesjs-play', c) .addClass('slidesjs-playing'), this.options.play.swap) ? (a('.slidesjs-play', c) .hide(), a('.slidesjs-stop', c) .show())  : void 0
+        },
+        d.prototype.stop = function (b) {
+            var c;
+            return c = a(this.element),
+            this.data = a.data(this),
+            clearInterval(this.data.playInterval),
+            this.options.play.pauseOnHover && b && a('.slidesjs-container', c) .unbind(),
+            a.data(this, 'playInterval', null),
+            a.data(this, 'playing', !1),
+            a('.slidesjs-play', c) .removeClass('slidesjs-playing'),
+            this.options.play.swap ? (a('.slidesjs-stop', c) .hide(), a('.slidesjs-play', c) .show())  : void 0
+        },
+        d.prototype._slide = function (b) {
+            var c,
+            d,
+            e,
+            f,
+            g,
+            h,
+            i,
+            j,
+            k,
+            l,
+            m = this;
+            return c = a(this.element),
+            this.data = a.data(this),
+            this.data.animating || b === this.data.current + 1 ? void 0 : (a.data(this, 'animating', !0), d = this.data.current, b > - 1 ? (b -= 1, l = b > d ? 1 : - 1, e = b > d ? - this.options.width : this.options.width, g = b)  : (l = 'next' === this.data.direction ? 1 : - 1, e = 'next' === this.data.direction ? - this.options.width : this.options.width, g = d + l), - 1 === g && (g = this.data.total - 1), g === this.data.total && (g = 0), this._setActive(g), i = a('.slidesjs-control', c), b > - 1 && i.children(':not(:eq(' + d + '))') .css({
+                display: 'none',
+                left: 0,
+                zIndex: 0
+            }), i.children(':eq(' + g + ')') .css({
+                display: 'block',
+                left: l * this.options.width,
+                zIndex: 10
+            }), this.options.callback.start(d + 1), this.data.vendorPrefix ? (h = this.data.vendorPrefix, k = h + 'Transform', f = h + 'TransitionDuration', j = h + 'TransitionTimingFunction', i[0].style[k] = 'translateX(' + e + 'px)', i[0].style[f] = this.options.effect.slide.speed + 'ms', i.on('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd', function () {
+                return i[0].style[k] = '',
+                i[0].style[f] = '',
+                i.children(':eq(' + g + ')') .css({
+                    left: 0
+                }),
+                i.children(':eq(' + d + ')') .css({
+                    display: 'none',
+                    left: 0,
+                    zIndex: 0
+                }),
+                a.data(m, 'current', g),
+                a.data(m, 'animating', !1),
+                i.unbind('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd'),
+                i.children(':not(:eq(' + g + '))') .css({
+                    display: 'none',
+                    left: 0,
+                    zIndex: 0
+                }),
+                m.data.touch && m._setuptouch(),
+                m.options.callback.complete(g + 1)
+            }))  : i.stop() .animate({
+                left: e
+            }, this.options.effect.slide.speed, function () {
+                return i.css({
+                    left: 0
+                }),
+                i.children(':eq(' + g + ')') .css({
+                    left: 0
+                }),
+                i.children(':eq(' + d + ')') .css({
+                    display: 'none',
+                    left: 0,
+                    zIndex: 0
+                }, a.data(m, 'current', g), a.data(m, 'animating', !1), m.options.callback.complete(g + 1))
+            }))
+        },
+        d.prototype._fade = function (b) {
+            var c,
+            d,
+            e,
+            f,
+            g,
+            h = this;
+            return c = a(this.element),
+            this.data = a.data(this),
+            this.data.animating || b === this.data.current + 1 ? void 0 : (a.data(this, 'animating', !0), d = this.data.current, b ? (b -= 1, g = b > d ? 1 : - 1, e = b)  : (g = 'next' === this.data.direction ? 1 : - 1, e = d + g), - 1 === e && (e = this.data.total - 1), e === this.data.total && (e = 0), this._setActive(e), f = a('.slidesjs-control', c), f.children(':eq(' + e + ')') .css({
+                display: 'none',
+                left: 0,
+                zIndex: 10
+            }), this.options.callback.start(d + 1), this.options.effect.fade.crossfade ? (f.children(':eq(' + this.data.current + ')') .stop() .fadeOut(this.options.effect.fade.speed), f.children(':eq(' + e + ')') .stop() .fadeIn(this.options.effect.fade.speed, function () {
+                return f.children(':eq(' + e + ')') .css({
+                    zIndex: 0
+                }),
+                a.data(h, 'animating', !1),
+                a.data(h, 'current', e),
+                h.options.callback.complete(e + 1)
+            }))  : f.children(':eq(' + d + ')') .stop() .fadeOut(this.options.effect.fade.speed, function () {
+                return f.children(':eq(' + e + ')') .stop() .fadeIn(h.options.effect.fade.speed, function () {
+                    return f.children(':eq(' + e + ')') .css({
+                        zIndex: 10
+                    })
+                }),
+                a.data(h, 'animating', !1),
+                a.data(h, 'current', e),
+                h.options.callback.complete(e + 1)
+            }))
+        },
+        d.prototype._getVendorPrefix = function () {
+            var a,
+            b,
+            d,
+            e,
+            f;
+            for (a = c.body || c.documentElement, d = a.style, e = 'transition', f = [
+                'Moz',
+                'Webkit',
+                'Khtml',
+                'O',
+                'ms'
+            ], e = e.charAt(0) .toUpperCase() + e.substr(1), b = 0; f.length > b; ) {
+                if ('string' == typeof d[f[b] + e]) return f[b];
+                b++
+            }
+            return !1
+        },
+        a.fn[f] = function (b) {
+            return this.each(function () {
+                return a.data(this, 'plugin_' + f) ? void 0 : a.data(this, 'plugin_' + f, new d(this, b))
+            })
         }
-      },
-      callback: {
-        loaded: function() {},
-        start: function() {},
-        complete: function() {}
-      }
-    };
-    Plugin = (function() {
-
-      function Plugin(element, options) {
-        this.element = element;
-        this.options = $.extend(true, {}, defaults, options);
-        this._defaults = defaults;
-        this._name = pluginName;
-        this.init();
-      }
-
-      return Plugin;
-
-    })();
-    Plugin.prototype.init = function() {
-      var $element, nextButton, pagination, playButton, prevButton, stopButton,
-        _this = this;
-      $element = $(this.element);
-      this.data = $.data(this);
-      $.data(this, "animating", false);
-      $.data(this, "total", $element.children().not(".slidesjs-navigation", $element).length);
-      $.data(this, "current", this.options.start - 1);
-      $.data(this, "vendorPrefix", this._getVendorPrefix());
-      if (typeof TouchEvent !== "undefined") {
-        $.data(this, "touch", true);
-        this.options.effect.slide.speed = this.options.effect.slide.speed / 2;
-      }
-      $element.css({
-        overflow: "hidden"
-      });
-      $element.slidesContainer = $element.children().not(".slidesjs-navigation", $element).wrapAll("<div class='slidesjs-container'>", $element).parent().css({
-        overflow: "hidden",
-        position: "relative"
-      });
-      $(".slidesjs-container", $element).wrapInner("<div class='slidesjs-control'>", $element).children();
-      $(".slidesjs-control", $element).css({
-        position: "relative",
-        left: 0
-      });
-      $(".slidesjs-control", $element).children().addClass("slidesjs-slide").css({
-        position: "absolute",
-        top: 0,
-        left: 0,
-        width: "100%",
-        zIndex: 0,
-        display: "none",
-        webkitBackfaceVisibility: "hidden"
-      });
-      $.each($(".slidesjs-control", $element).children(), function(i) {
-        var $slide;
-        $slide = $(this);
-        return $slide.attr("slidesjs-index", i);
-      });
-      if (this.data.touch) {
-        $(".slidesjs-control", $element).on("touchstart", function(e) {
-          return _this._touchstart(e);
-        });
-        $(".slidesjs-control", $element).on("touchmove", function(e) {
-          return _this._touchmove(e);
-        });
-        $(".slidesjs-control", $element).on("touchend", function(e) {
-          return _this._touchend(e);
-        });
-      }
-      $element.fadeIn(0);
-      this.update();
-      if (this.data.touch) {
-        this._setuptouch();
-      }
-      $(".slidesjs-control", $element).children(":eq(" + this.data.current + ")").eq(0).fadeIn(0, function() {
-        return $(this).css({
-          zIndex: 10
-        });
-      });
-      if (this.options.navigation.active) {
-        prevButton = $("<a>", {
-          "class": "slidesjs-previous slidesjs-navigation",
-          href: "#",
-          title: "Previous",
-          text: "Previous"
-        }).appendTo($element);
-        nextButton = $("<a>", {
-          "class": "slidesjs-next slidesjs-navigation",
-          href: "#",
-          title: "Next",
-          text: "Next"
-        }).appendTo($element);
-      }
-      $(".slidesjs-next", $element).click(function(e) {
-        e.preventDefault();
-        _this.stop(true);
-        return _this.next(_this.options.navigation.effect);
-      });
-      $(".slidesjs-previous", $element).click(function(e) {
-        e.preventDefault();
-        _this.stop(true);
-        return _this.previous(_this.options.navigation.effect);
-      });
-      if (this.options.play.active) {
-        playButton = $("<a>", {
-          "class": "slidesjs-play slidesjs-navigation",
-          href: "#",
-          title: "Play",
-          text: "Play"
-        }).appendTo($element);
-        stopButton = $("<a>", {
-          "class": "slidesjs-stop slidesjs-navigation",
-          href: "#",
-          title: "Stop",
-          text: "Stop"
-        }).appendTo($element);
-        playButton.click(function(e) {
-          e.preventDefault();
-          return _this.play(true);
-        });
-        stopButton.click(function(e) {
-          e.preventDefault();
-          return _this.stop(true);
-        });
-        if (this.options.play.swap) {
-          stopButton.css({
-            display: "none"
-          });
-        }
-      }
-      if (this.options.pagination.active) {
-        pagination = $("<ul>", {
-          "class": "slidesjs-pagination"
-        }).appendTo($element);
-        $.each(new Array(this.data.total), function(i) {
-          var paginationItem, paginationLink;
-          paginationItem = $("<li>", {
-            "class": "slidesjs-pagination-item"
-          }).appendTo(pagination);
-          paginationLink = $("<a>", {
-            href: "#",
-            "data-slidesjs-item": i,
-            html: i + 1
-          }).appendTo(paginationItem);
-          return paginationLink.click(function(e) {
-            e.preventDefault();
-            _this.stop(true);
-            return _this.goto(($(e.currentTarget).attr("data-slidesjs-item") * 1) + 1);
-          });
-        });
-      }
-      $(window).bind("resize", function() {
-        return _this.update();
-      });
-      this._setActive();
-      if (this.options.play.auto) {
-        this.play();
-      }
-      return this.options.callback.loaded(this.options.start);
-    };
-    Plugin.prototype._setActive = function(number) {
-      var $element, current;
-      $element = $(this.element);
-      this.data = $.data(this);
-      current = number > -1 ? number : this.data.current;
-      $(".active", $element).removeClass("active");
-      return $(".slidesjs-pagination li:eq(" + current + ") a", $element).addClass("active");
-    };
-    Plugin.prototype.update = function() {
-      var $element, height, width;
-      $element = $(this.element);
-      this.data = $.data(this);
-      $(".slidesjs-control", $element).children(":not(:eq(" + this.data.current + "))").css({
-        display: "none",
-        left: 0,
-        zIndex: 0
-      });
-      width = $element.width();
-      height = (this.options.height / this.options.width) * width;
-      this.options.width = width;
-      this.options.height = height;
-      return $(".slidesjs-control, .slidesjs-container", $element).css({
-        width: width,
-        height: height
-      });
-    };
-    Plugin.prototype.next = function(effect) {
-      var $element;
-      $element = $(this.element);
-      this.data = $.data(this);
-      $.data(this, "direction", "next");
-      if (effect === void 0) {
-        effect = this.options.navigation.effect;
-      }
-      if (effect === "fade") {
-        return this._fade();
-      } else {
-        return this._slide();
-      }
-    };
-    Plugin.prototype.previous = function(effect) {
-      var $element;
-      $element = $(this.element);
-      this.data = $.data(this);
-      $.data(this, "direction", "previous");
-      if (effect === void 0) {
-        effect = this.options.navigation.effect;
-      }
-      if (effect === "fade") {
-        return this._fade();
-      } else {
-        return this._slide();
-      }
-    };
-    Plugin.prototype.goto = function(number) {
-      var $element, effect;
-      $element = $(this.element);
-      this.data = $.data(this);
-      if (effect === void 0) {
-        effect = this.options.pagination.effect;
-      }
-      if (number > this.data.total) {
-        number = this.data.total;
-      } else if (number < 1) {
-        number = 1;
-      }
-      if (typeof number === "number") {
-        if (effect === "fade") {
-          return this._fade(number);
-        } else {
-          return this._slide(number);
-        }
-      } else if (typeof number === "string") {
-        if (number === "first") {
-          if (effect === "fade") {
-            return this._fade(0);
-          } else {
-            return this._slide(0);
-          }
-        } else if (number === "last") {
-          if (effect === "fade") {
-            return this._fade(this.data.total);
-          } else {
-            return this._slide(this.data.total);
-          }
-        }
-      }
-    };
-    Plugin.prototype._setuptouch = function() {
-      var $element, next, previous, slidesControl;
-      $element = $(this.element);
-      this.data = $.data(this);
-      slidesControl = $(".slidesjs-control", $element);
-      next = this.data.current + 1;
-      previous = this.data.current - 1;
-      if (previous < 0) {
-        previous = this.data.total - 1;
-      }
-      if (next > this.data.total - 1) {
-        next = 0;
-      }
-      slidesControl.children(":eq(" + next + ")").css({
-        display: "block",
-        left: this.options.width
-      });
-      return slidesControl.children(":eq(" + previous + ")").css({
-        display: "block",
-        left: -this.options.width
-      });
-    };
-    Plugin.prototype._touchstart = function(e) {
-      var $element, touches;
-      $element = $(this.element);
-      this.data = $.data(this);
-      touches = e.originalEvent.touches[0];
-      this._setuptouch();
-      $.data(this, "touchtimer", Number(new Date()));
-      $.data(this, "touchstartx", touches.pageX);
-      $.data(this, "touchstarty", touches.pageY);
-      return e.stopPropagation();
-    };
-    Plugin.prototype._touchend = function(e) {
-      var $element, duration, prefix, slidesControl, timing, touches, transform,
-        _this = this;
-      $element = $(this.element);
-      this.data = $.data(this);
-      touches = e.originalEvent.touches[0];
-      slidesControl = $(".slidesjs-control", $element);
-      if (slidesControl.position().left > this.options.width * 0.5 || slidesControl.position().left > this.options.width * 0.1 && (Number(new Date()) - this.data.touchtimer < 250)) {
-        $.data(this, "direction", "previous");
-        this._slide();
-      } else if (slidesControl.position().left < -(this.options.width * 0.5) || slidesControl.position().left < -(this.options.width * 0.1) && (Number(new Date()) - this.data.touchtimer < 250)) {
-        $.data(this, "direction", "next");
-        this._slide();
-      } else {
-        prefix = this.data.vendorPrefix;
-        transform = prefix + "Transform";
-        duration = prefix + "TransitionDuration";
-        timing = prefix + "TransitionTimingFunction";
-        slidesControl[0].style[transform] = "translateX(0px)";
-        slidesControl[0].style[duration] = this.options.effect.slide.speed * 0.85 + "ms";
-      }
-      slidesControl.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd", function() {
-        prefix = _this.data.vendorPrefix;
-        transform = prefix + "Transform";
-        duration = prefix + "TransitionDuration";
-        timing = prefix + "TransitionTimingFunction";
-        slidesControl[0].style[transform] = "";
-        slidesControl[0].style[duration] = "";
-        return slidesControl[0].style[timing] = "";
-      });
-      return e.stopPropagation();
-    };
-    Plugin.prototype._touchmove = function(e) {
-      var $element, prefix, slidesControl, touches, transform;
-      $element = $(this.element);
-      this.data = $.data(this);
-      touches = e.originalEvent.touches[0];
-      prefix = this.data.vendorPrefix;
-      slidesControl = $(".slidesjs-control", $element);
-      transform = prefix + "Transform";
-      $.data(this, "scrolling", Math.abs(touches.pageX - this.data.touchstartx) < Math.abs(touches.pageY - this.data.touchstarty));
-      if (!this.data.animating && !this.data.scrolling) {
-        e.preventDefault();
-        this._setuptouch();
-        slidesControl[0].style[transform] = "translateX(" + (touches.pageX - this.data.touchstartx) + "px)";
-      }
-      return e.stopPropagation();
-    };
-    Plugin.prototype.play = function(next) {
-      var $element, currentSlide, slidesContainer,
-        _this = this;
-      $element = $(this.element);
-      this.data = $.data(this);
-      if (!this.data.playInterval) {
-        if (next) {
-          currentSlide = this.data.current;
-          this.data.direction = "next";
-          if (this.options.play.effect === "fade") {
-            this._fade();
-          } else {
-            this._slide();
-          }
-        }
-        $.data(this, "playInterval", setInterval((function() {
-          currentSlide = _this.data.current;
-          _this.data.direction = "next";
-          if (_this.options.play.effect === "fade") {
-            return _this._fade();
-          } else {
-            return _this._slide();
-          }
-        }), this.options.play.interval));
-        slidesContainer = $(".slidesjs-container", $element);
-        if (this.options.play.pauseOnHover) {
-          slidesContainer.unbind();
-          slidesContainer.bind("mouseenter", function() {
-            return _this.stop();
-          });
-          slidesContainer.bind("mouseleave", function() {
-            if (_this.options.play.restartDelay) {
-              return $.data(_this, "restartDelay", setTimeout((function() {
-                return _this.play(true);
-              }), _this.options.play.restartDelay));
-            } else {
-              return _this.play();
-            }
-          });
-        }
-        $.data(this, "playing", true);
-        $(".slidesjs-play", $element).addClass("slidesjs-playing");
-        if (this.options.play.swap) {
-          $(".slidesjs-play", $element).hide();
-          return $(".slidesjs-stop", $element).show();
-        }
-      }
-    };
-    Plugin.prototype.stop = function(clicked) {
-      var $element;
-      $element = $(this.element);
-      this.data = $.data(this);
-      clearInterval(this.data.playInterval);
-      if (this.options.play.pauseOnHover && clicked) {
-        $(".slidesjs-container", $element).unbind();
-      }
-      $.data(this, "playInterval", null);
-      $.data(this, "playing", false);
-      $(".slidesjs-play", $element).removeClass("slidesjs-playing");
-      if (this.options.play.swap) {
-        $(".slidesjs-stop", $element).hide();
-        return $(".slidesjs-play", $element).show();
-      }
-    };
-    Plugin.prototype._slide = function(number) {
-      var $element, currentSlide, direction, duration, next, prefix, slidesControl, timing, transform, value,
-        _this = this;
-      $element = $(this.element);
-      this.data = $.data(this);
-      if (!this.data.animating && number !== this.data.current + 1) {
-        $.data(this, "animating", true);
-        currentSlide = this.data.current;
-        if (number > -1) {
-          number = number - 1;
-          value = number > currentSlide ? 1 : -1;
-          direction = number > currentSlide ? -this.options.width : this.options.width;
-          next = number;
-        } else {
-          value = this.data.direction === "next" ? 1 : -1;
-          direction = this.data.direction === "next" ? -this.options.width : this.options.width;
-          next = currentSlide + value;
-        }
-        if (next === -1) {
-          next = this.data.total - 1;
-        }
-        if (next === this.data.total) {
-          next = 0;
-        }
-        this._setActive(next);
-        slidesControl = $(".slidesjs-control", $element);
-        if (number > -1) {
-          slidesControl.children(":not(:eq(" + currentSlide + "))").css({
-            display: "none",
-            left: 0,
-            zIndex: 0
-          });
-        }
-        slidesControl.children(":eq(" + next + ")").css({
-          display: "block",
-          left: value * this.options.width,
-          zIndex: 10
-        });
-        this.options.callback.start(currentSlide + 1);
-        if (this.data.vendorPrefix) {
-          prefix = this.data.vendorPrefix;
-          transform = prefix + "Transform";
-          duration = prefix + "TransitionDuration";
-          timing = prefix + "TransitionTimingFunction";
-          slidesControl[0].style[transform] = "translateX(" + direction + "px)";
-          slidesControl[0].style[duration] = this.options.effect.slide.speed + "ms";
-          return slidesControl.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd", function() {
-            slidesControl[0].style[transform] = "";
-            slidesControl[0].style[duration] = "";
-            slidesControl.children(":eq(" + next + ")").css({
-              left: 0
-            });
-            slidesControl.children(":eq(" + currentSlide + ")").css({
-              display: "none",
-              left: 0,
-              zIndex: 0
-            });
-            $.data(_this, "current", next);
-            $.data(_this, "animating", false);
-            slidesControl.unbind("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd");
-            slidesControl.children(":not(:eq(" + next + "))").css({
-              display: "none",
-              left: 0,
-              zIndex: 0
-            });
-            if (_this.data.touch) {
-              _this._setuptouch();
-            }
-            return _this.options.callback.complete(next + 1);
-          });
-        } else {
-          return slidesControl.stop().animate({
-            left: direction
-          }, this.options.effect.slide.speed, (function() {
-            slidesControl.css({
-              left: 0
-            });
-            slidesControl.children(":eq(" + next + ")").css({
-              left: 0
-            });
-            return slidesControl.children(":eq(" + currentSlide + ")").css({
-              display: "none",
-              left: 0,
-              zIndex: 0
-            }, $.data(_this, "current", next), $.data(_this, "animating", false), _this.options.callback.complete(next + 1));
-          }));
-        }
-      }
-    };
-    Plugin.prototype._fade = function(number) {
-      var $element, currentSlide, next, slidesControl, value,
-        _this = this;
-      $element = $(this.element);
-      this.data = $.data(this);
-      if (!this.data.animating && number !== this.data.current + 1) {
-        $.data(this, "animating", true);
-        currentSlide = this.data.current;
-        if (number) {
-          number = number - 1;
-          value = number > currentSlide ? 1 : -1;
-          next = number;
-        } else {
-          value = this.data.direction === "next" ? 1 : -1;
-          next = currentSlide + value;
-        }
-        if (next === -1) {
-          next = this.data.total - 1;
-        }
-        if (next === this.data.total) {
-          next = 0;
-        }
-        this._setActive(next);
-        slidesControl = $(".slidesjs-control", $element);
-        slidesControl.children(":eq(" + next + ")").css({
-          display: "none",
-          left: 0,
-          zIndex: 10
-        });
-        this.options.callback.start(currentSlide + 1);
-        if (this.options.effect.fade.crossfade) {
-          slidesControl.children(":eq(" + this.data.current + ")").stop().fadeOut(this.options.effect.fade.speed);
-          return slidesControl.children(":eq(" + next + ")").stop().fadeIn(this.options.effect.fade.speed, (function() {
-            slidesControl.children(":eq(" + next + ")").css({
-              zIndex: 0
-            });
-            $.data(_this, "animating", false);
-            $.data(_this, "current", next);
-            return _this.options.callback.complete(next + 1);
-          }));
-        } else {
-          return slidesControl.children(":eq(" + currentSlide + ")").stop().fadeOut(this.options.effect.fade.speed, (function() {
-            slidesControl.children(":eq(" + next + ")").stop().fadeIn(_this.options.effect.fade.speed, (function() {
-              return slidesControl.children(":eq(" + next + ")").css({
-                zIndex: 10
-              });
-            }));
-            $.data(_this, "animating", false);
-            $.data(_this, "current", next);
-            return _this.options.callback.complete(next + 1);
-          }));
-        }
-      }
-    };
-    Plugin.prototype._getVendorPrefix = function() {
-      var body, i, style, transition, vendor;
-      body = document.body || document.documentElement;
-      style = body.style;
-      transition = "transition";
-      vendor = ["Moz", "Webkit", "Khtml", "O", "ms"];
-      transition = transition.charAt(0).toUpperCase() + transition.substr(1);
-      i = 0;
-      while (i < vendor.length) {
-        if (typeof style[vendor[i] + transition] === "string") {
-          return vendor[i];
-        }
-        i++;
-      }
-      return false;
-    };
-    return $.fn[pluginName] = function(options) {
-      return this.each(function() {
-        if (!$.data(this, "plugin_" + pluginName)) {
-          return $.data(this, "plugin_" + pluginName, new Plugin(this, options));
-        }
-      });
-    };
-  })(jQuery, window, document);
-
-}).call(this); 
+    }) (jQuery, window, document)
+}) .call(this);
