(function(a, b, c) {
    b.fn.imagesLoaded = function(a) {
        function h() {
            if (--d <= 0 && this.src !== f) {
                setTimeout(g);
                b.unbind("load error", h)
            }
        }
        function g() {
            a.call(e, b)
        }
        var b = this.find("img"),
        d = b.length,
        e = this,
        f = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
        if (!d) {
            g()
        }
        b.bind("load error", h).each(function() {
            if (this.complete || this.complete === c) {
                var a = this.src;
                this.src = f;
                this.src = a
            }
        });
        return this
    };
    b.slicebox = function(a, c) {
        this.$element = b(c);
        this._create(a)
    };
    b.slicebox.defaults = {
        orientation: "v",
        perspective: 1200,
        slicesCount: 1,
        disperseFactor: 0,
        colorHiddenSides: "#222",
        sequentialRotation: false,
        sequentialFactor: 0,
        speed3d: 1000,
        speed: 4000,
        fallbackEasing: "easeOutExpo",
        slideshow: true,
        slideshowTime: 4e3
    };
    b.slicebox.prototype = {
        _create: function(a) {
            var c = this;
            c.options = b.extend(true, {},
            b.slicebox.defaults, a);
            c._validate(c.options);
            var d = c.$element.find("img");
            c.$element.imagesLoaded(function() {
                if (Modernizr.csstransforms3d) {
                    c.box = new b.Box3d(c.options, d, c.$element);
                    d.remove()
                } else c.box = new b.Box(c.options, d, c.$element)
            })
        },
        add: function(a, b) {
            this.box.addImages(a);
            a.remove();
            if (b) b.call(a)
        },
        _validate: function(a) {
            if (Modernizr.csstransforms3d) {
                if (a.slicesCount < 0) a.slicesCount = 1;
                else if (a.slicesCount > 15) a.slicesCount = 15;
                else if (a.slicesCount % 2 === 0) a.slicesCount++;
                if (a.disperseFactor < 0) a.disperseFactor = 0
            }
            if (a.orientation !== "v" && a.orientation !== "h") a.orientation = "v"
        },
        destroy: function(a) {
            this._destroy(a)
        },
        _destroy: function(c) {
            this.element.unbind(".slicebox").removeData("slicebox");
            b(a).unbind(".slicebox");
            if (c) c.call()
        },
        option: function(a, c) {
            if (b.isPlainObject(a)) {
                this.options = b.extend(true, this.options, a)
            }
        }
    };
    b.Box3d = function(a, b, c) {
        this.size = {
            width: b.width(),
            height: b.height()
        };
        this.slices = new Array;
        this.animating = false;
        this.$images = b;
        this.imagesCount = this.$images.length;
        this.imageCurrent = 0;
        this.orientation = a.orientation;
        this.wrapper = c;
        this.info = false;
        this._createBox(a);
        this._configureSlices(a);
        this._showInfo();
        if (a.slideshow) {
            this.isSlideshowActive = true;
            this._slideshow(a);
            this.OptionPlay.addClass("rb-nav-pause").removeClass("sb-nav-play")
        }
    };
    b.Box3d.prototype = {
        _createBox: function(a) {
            var c = {
                width: this.size.width + "px",
                height: this.size.height + "px",
                "z-index": 10,
                position: "relative",
                "-webkit-perspective": a.perspective
            };
            this.$box = b("<div>").css(c).appendTo(this.wrapper.css({
                width: c.width,
                height: c.height
            }));
            this._addNavigation();
            this._addOptions();
            b('<div class="sb-shadow"/>').appendTo(this.wrapper);
            this._initEvents(a);
            for (var d = 0; d < a.slicesCount; ++d) {
                var e = new b.Slice3d(a, this.size, this.orientation),
                f = e.createSlice(a, d, this.$images);
                this.slices.push(e);
                f.appendTo(this.$box)
            }
            this._setSize(a)
        },
        _addNavigation: function() {
            this.NavPrev = b('<span class="sb-nav-prev">Previous Slide</span>');
            this.NavNext = b('<span class="sb-nav-next">Next Slide</span>');
            var a = b('<div class="sb-nav">').append(this.NavPrev).append(this.NavNext);
            this.wrapper.append(a)
        },
        _addOptions: function() {
            this.OptionPlay = b('<span class="sb-nav-play">Autoplay</span>');
            this.OptionInfo = b('<span class="sb-nav-info">Info</span>');
            var a = b('<div class="sb-options">').append(this.OptionPlay).append(this.OptionInfo);
            this.wrapper.append(a)
        },
        _initEvents: function(a) {
            var b = this;
            b.NavNext.bind("click.slicebox",
            function(c) {
                b.navigate("next", a)
            });
            b.NavPrev.bind("click.slicebox",
            function(c) {
                b.navigate("prev", a)
            });
            b.OptionPlay.bind("click.slicebox",
            function(c) {
                if (!b.isSlideshowActive) {
                    if (b.animating) return false;
                    b.isSlideshowActive = true;
                    b._slideshow(a, true);
                    b.OptionPlay.addClass("rb-nav-pause").removeClass("sb-nav-play")
                } else {
                    b._stopSlideshow()
                }
            });
            b.OptionInfo.bind("click.slicebox",
            function(a) {
                if (!b.info) {
                    b._showInfo()
                } else {
                    b._hideInfo()
                }
            })
        },
        _showInfo: function() {
            if (this.animating) return false;
            //this._stopSlideshow();
            var a = this.$images.eq(this.imageCurrent).attr("title");
            var href = this.$images.eq(this.imageCurrent).attr("rel");
            if(href != undefined) {
	            b('<div class="sb-title"><a href="'+ href +'" title="'+ a + '">' + a + "</a></div>").appendTo(this.wrapper).stop().animate({
	                height: "38px",
	                bottom: "0px"
	            },
	            300);
	        } else {
	        	b('<div class="sb-title"><span>' + a + "</span></div>").appendTo(this.wrapper).stop().animate({
	        	    height: "38px",
	        	    bottom: "0px"
	        	},
	        	300);
	        }
            this.OptionInfo.addClass("sb-nav-noinfo").removeClass("sb-nav-info");
            this.info = true
        },
        _hideInfo: function() {
            if (this.animating) return false;
            this.wrapper.find("div.sb-title").remove();
            this.OptionInfo.addClass("sb-nav-info").removeClass("sb-nav-noinfo");
            this.info = false
        },
        _setSize: function(a) {
            if (this.orientation === "v") {
                var b = Math.floor(this.size.width / a.slicesCount) * a.slicesCount + "px";
                this.$box.css("width", b);
                this.wrapper.css("width", b)
            } else {
                var c = Math.floor(this.size.height / a.slicesCount) * a.slicesCount + "px";
                this.$box.css("height", c);
                this.wrapper.css("height", c)
            }
        },
        _configureSlices: function(a) {
            var b = Math.ceil(a.slicesCount / 2),
            c = this;
            for (var d = 0, e = c.slices.length; d < e; ++d) {
                var f = c.slices[d],
                g = f.getEl();
                if (d < b) {
                    if (this.orientation === "v") g.css({
                        zIndex: (d + 1) * 100,
                        left: f.size.width * d + "px",
                        top: "0px"
                    });
                    else if (this.orientation === "h") g.css({
                        zIndex: (d + 1) * 100,
                        top: f.size.height * d + "px",
                        left: "0px"
                    })
                } else {
                    if (this.orientation === "v") g.css({
                        zIndex: (a.slicesCount - d) * 100,
                        left: f.size.width * d + "px",
                        top: "0px"
                    });
                    else g.css({
                        zIndex: (a.slicesCount - d) * 100,
                        top: f.size.height * d + "px",
                        left: "0px"
                    })
                }
                f.disperseFactor = a.disperseFactor * (d + 1 - b)
            }
        },
        navigate: function(a, b) {
            var c = this;
            if (c.animating) return false;
            c._stopSlideshow();
            if (c.info) c._hideInfo();
            c.animating = true;
            this._rotateBox(a, b)
        },
        _rotateBox: function(a, b, c) {
            var d = this;
            if (a === "next") {
                if (d.imageCurrent < d.imagesCount - 1)++d.imageCurrent;
                else d.imageCurrent = 0
            } else if (a === "prev") {
                if (d.imageCurrent < 1) d.imageCurrent = d.imagesCount - 1;
                else--d.imageCurrent
            }
            for (var e = 0, f = d.slices.length; e < f; ++e) {
                var g = d.slices[e];
                g.rotate(a, e, b, d.$images, d.imageCurrent,
                function(a) {
                    if (a === b.slicesCount - 1) {
                        d.animating = false;
                        d._showInfo()
                        if (c) c.call()
                    }
                })
            }            
        },
        addImages: function(a, b) {
            this.$images = this.$images.add(a);
            this.imagesCount = this.$images.length;
            if (b) b.call(a)
        },
        _slideshow: function(a, b) {
            if (!this.isSlideshowActive) return false;
            clearTimeout(this.slideshowT);
            var c = this;
            if (b) c._slideshowFunc(a);
            c.slideshowT = setTimeout(function() {
                c._slideshowFunc(a)
            },
            a.slideshowTime)
        },
        _slideshowFunc: function(a) {
            var b = this;
            if (b.info) b._hideInfo();
            b.animating = true;
            b._rotateBox("next", a,
            function() {
                b._slideshow(a)
            })
        },
        _stopSlideshow: function() {
            this.isSlideshowActive = false;
            clearTimeout(this.slideshowT);
            this.OptionPlay.addClass("sb-nav-play").removeClass("rb-nav-pause")
        }
    };
    b.Slice3d = function(a, b, c) {
        this.orientation = c;
        this._setSize(a, b, c);
        this.side = 1;
        this._configureStyles(a)
    };
    b.Slice3d.prototype = {
        _configureStyles: function(a) {
            this.style = {
                width: this.size.width + "px",
                height: this.size.height + "px",
                position: "absolute",
                "-webkit-transform-style": "preserve-3d",
                "-webkit-transition": "-webkit-transform " + a.speed3d + "ms",
                "-webkit-backface-visibility": "hidden"
            };
            if (this.orientation === "v") {
                this.animationStyles = {
                    side1: {
                        "-webkit-transform": "translate3d( 0, 0, -" + this.size.height / 2 + "px )"
                    },
                    side2: {
                        "-webkit-transform": "translate3d( 0, 0,  -" + this.size.height / 2 + "px ) rotate3d( 1, 0, 0, -90deg )"
                    },
                    side3: {
                        "-webkit-transform": "translate3d( 0, 0,  -" + this.size.height / 2 + "px ) rotate3d( 1, 0, 0, -180deg )"
                    },
                    side4: {
                        "-webkit-transform": "translate3d( 0, 0,  -" + this.size.height / 2 + "px ) rotate3d( 1, 0, 0, -270deg )"
                    }
                };
                this.sidesStyles = {
                    frontSideStyle: {
                        width: this.size.width + "px",
                        height: this.size.height + "px",
                        "background-color": a.colorHiddenSides,
                        "-webkit-transform": "rotate3d( 0, 1, 0, 0deg ) translate3d( 0, 0, " + this.size.height / 2 + "px )"
                    },
                    backSideStyle: {
                        width: this.size.width + "px",
                        height: this.size.height + "px",
                        "background-color": a.colorHiddenSides,
                        "-webkit-transform": "rotate3d( 0, 1, 0, 180deg ) translate3d( 0, 0, " + this.size.height / 2 + "px ) rotateZ( 180deg )"
                    },
                    rightSideStyle: {
                        width: this.size.height + "px",
                        height: this.size.height + "px",
                        left: this.size.width / 2 - this.size.height / 2 + "px",
                        "background-color": a.colorHiddenSides,
                        "-webkit-transform": "rotate3d( 0, 1, 0, 90deg ) translate3d( 0, 0, " + this.size.width / 2 + "px )"
                    },
                    leftSideStyle: {
                        width: this.size.height + "px",
                        height: this.size.height + "px",
                        left: this.size.width / 2 - this.size.height / 2 + "px",
                        "background-color": a.colorHiddenSides,
                        "-webkit-transform": "rotate3d( 0, 1, 0, -90deg ) translate3d( 0, 0, " + this.size.width / 2 + "px )"
                    },
                    topSideStyle: {
                        width: this.size.width + "px",
                        height: this.size.height + "px",
                        "background-color": a.colorHiddenSides,
                        "-webkit-transform": "rotate3d( 1, 0, 0, 90deg ) translate3d( 0, 0, " + this.size.height / 2 + "px )"
                    },
                    bottomSideStyle: {
                        width: this.size.width + "px",
                        height: this.size.height + "px",
                        "background-color": a.colorHiddenSides,
                        "-webkit-transform": "rotate3d( 1, 0, 0, -90deg ) translate3d( 0, 0, " + this.size.height / 2 + "px )"
                    }
                }
            } else if (this.orientation === "h") {
                this.animationStyles = {
                    side1: {
                        "-webkit-transform": "translate3d( 0, 0, -" + this.size.width / 2 + "px )"
                    },
                    side2: {
                        "-webkit-transform": "translate3d( 0, 0, -" + this.size.width / 2 + "px ) rotate3d( 0, 1, 0, -90deg )"
                    },
                    side3: {
                        "-webkit-transform": "translate3d( 0, 0, -" + this.size.width / 2 + "px ) rotate3d( 0, 1, 0, -180deg )"
                    },
                    side4: {
                        "-webkit-transform": "translate3d( 0, 0, -" + this.size.width / 2 + "px ) rotate3d( 0, 1, 0, -270deg )"
                    }
                };
                this.sidesStyles = {
                    frontSideStyle: {
                        width: this.size.width + "px",
                        height: this.size.height + "px",
                        "background-color": a.colorHiddenSides,
                        "-webkit-transform": "rotate3d( 0, 1, 0, 0deg ) translate3d( 0, 0, " + this.size.width / 2 + "px )"
                    },
                    backSideStyle: {
                        width: this.size.width + "px",
                        height: this.size.height + "px",
                        "background-color": a.colorHiddenSides,
                        "-webkit-transform": "rotate3d( 0, 1, 0, 180deg ) translate3d( 0, 0, " + this.size.width / 2 + "px ) "
                    },
                    rightSideStyle: {
                        width: this.size.width + "px",
                        height: this.size.height + "px",
                        "background-color": a.colorHiddenSides,
                        "-webkit-transform": "rotate3d( 0, 1, 0, 90deg ) translate3d( 0, 0, " + this.size.width / 2 + "px )"
                    },
                    leftSideStyle: {
                        width: this.size.width + "px",
                        height: this.size.height + "px",
                        "background-color": a.colorHiddenSides,
                        "-webkit-transform": "rotate3d( 0, 1, 0, -90deg ) translate3d( 0, 0, " + this.size.width / 2 + "px )"
                    },
                    topSideStyle: {
                        width: this.size.width + "px",
                        height: this.size.width + "px",
                        "background-color": a.colorHiddenSides,
                        top: this.size.height / 2 - this.size.width / 2,
                        "-webkit-transform": "rotate3d( 1, 0, 0, 90deg ) translate3d( 0, 0, " + this.size.height / 2 + "px )"
                    },
                    bottomSideStyle: {
                        width: this.size.width + "px",
                        height: this.size.width + "px",
                        "background-color": a.colorHiddenSides,
                        top: this.size.height / 2 - this.size.width / 2,
                        "-webkit-transform": "rotate3d( 1, 0, 0, -90deg ) translate3d( 0, 0, " + this.size.height / 2 + "px )"
                    }
                }
            }
        },
        _setSize: function(a, b) {
            if (this.orientation === "v") this.size = {
                width: Math.floor(b.width / a.slicesCount),
                height: b.height
            };
            else if (this.orientation === "h") this.size = {
                width: b.width,
                height: Math.floor(b.height / a.slicesCount)
            }
        },
        createSlice: function(a, c, d) {
            $slice = b("<div/>").css(this.style).css(this.animationStyles.side1).append(b("<div/>").addClass("sb-side").css(this.sidesStyles.frontSideStyle)).append(b("<div/>").addClass("sb-side").css(this.sidesStyles.backSideStyle)).append(b("<div/>").addClass("sb-side").css(this.sidesStyles.rightSideStyle)).append(b("<div/>").addClass("sb-side").css(this.sidesStyles.leftSideStyle)).append(b("<div/>").addClass("sb-side").css(this.sidesStyles.topSideStyle)).append(b("<div/>").addClass("sb-side").css(this.sidesStyles.bottomSideStyle));
            this.element = $slice;
            this._showImage(c, 0, d);
            return $slice
        },
        _showImage: function(a, b, c) {
            var d;
            switch (this.side) {
            case 1:
                d = 0;
                break;
            case 2:
                if (this.orientation === "v") d = 4;
                else if (this.orientation === "h") d = 2;
                break;
            case 3:
                d = 1;
                break;
            case 4:
                if (this.orientation === "v") d = 5;
                else if (this.orientation === "h") d = 3;
                break
            }
            var e = {};
            if (this.orientation === "v") {
                e.backgroundImage = "url(" + c.eq(b).attr("src") + ")";
                e.backgroundPosition = -(a * this.size.width) + "px 0px"
            } else if (this.orientation === "h") {
                e.backgroundImage = "url(" + c.eq(b).attr("src") + ")";
                e.backgroundPosition = "0px -" + a * this.size.height + "px"
            }
            this.element.children().eq(d).css(e)
        },
        getEl: function() {
            return this.element
        },
        rotate: function(a, b, c, d, e, f) {
            var g = this,
            h,
            i = c.sequentialRotation ? c.sequentialFactor * b: 0;
            setTimeout(function() {
                if (a === "next") {
                    switch (g.side) {
                    case 1:
                        animationStyle = g.animationStyles.side2;
                        g.side = 2;
                        break;
                    case 2:
                        animationStyle = g.animationStyles.side3;
                        g.side = 3;
                        break;
                    case 3:
                        animationStyle = g.animationStyles.side4;
                        g.side = 4;
                        break;
                    case 4:
                        animationStyle = g.animationStyles.side1;
                        g.side = 1;
                        break
                    }
                } else if (a === "prev") {
                    switch (g.side) {
                    case 1:
                        animationStyle = g.animationStyles.side4;
                        g.side = 4;
                        break;
                    case 2:
                        animationStyle = g.animationStyles.side1;
                        g.side = 1;
                        break;
                    case 3:
                        animationStyle = g.animationStyles.side2;
                        g.side = 2;
                        break;
                    case 4:
                        animationStyle = g.animationStyles.side3;
                        g.side = 3;
                        break
                    }
                }
                g._showImage(b, e, d);

                var h = {},
                i = {};
                if (g.orientation === "v") {
                    h.left = "+=" + g.disperseFactor + "px";
                    i.left = "-=" + g.disperseFactor + "px"
                } else if (g.orientation === "h") {
                    h.top = "+=" + g.disperseFactor + "px";
                    i.top = "-=" + g.disperseFactor + "px"
                }
                g.element.css(animationStyle).animate(h, c.speed3d / 2 - 50).animate(i, c.speed3d / 2 - 50,
                function() {
                    if (f) f.call(this, b)
                })
            },
            i)
        }
    };
    b.Box = function(a, b, c) {
        this.size = {
            width: b.width(),
            height: b.height()
        };
        this.animating = false;
        this.$images = b;
        this.imagesCount = this.$images.length;
        this.imageCurrent = 0;
        this.orientation = a.orientation;
        this.wrapper = c;
        this.info = false;
        this._createBox(a);
        this._configureImages(a);
        if (a.slideshow) {
            this.isSlideshowActive = true;
            this._slideshow(a);
            this.OptionPlay.addClass("rb-nav-pause").removeClass("sb-nav-play")
        }
    };
    b.Box.prototype = {
        _createBox: function(a) {
            var c = {
                width: this.size.width + "px",
                height: this.size.height + "px",
                "z-index": 10,
                position: "relative",
                overflow: "hidden"
            };
            this.$box = b("<div>").css(c).appendTo(this.wrapper.css({
                width: c.width,
                height: c.height
            }).addClass("sb-slider-fb")).append(this.$images.show());
            this._addNavigation();
            this._addOptions();
            b('<div class="sb-shadow"/>').appendTo(this.wrapper);
            this._initEvents(a)
        },
        _configureImages: function(a) {
            var c = this;
            c.$images.each(function(d) {
                var e = b(this);
                if (d === 0) {
                    e.css({
                        left: "0px",
                        top: "0px"
                    })
                } else {
                    if (a.orientation === "v") e.css({
                        left: "0px",
                        top: -c.size.height + "px"
                    });
                    else if (a.orientation === "h") e.css({
                        left: c.size.width + "px",
                        top: "0px"
                    })
                }
            })
        },
        _addNavigation: function() {
            this.NavPrev = b('<span class="sb-nav-prev">Previous Slide</span>');
            this.NavNext = b('<span class="sb-nav-next">Next Slide</span>');
            var a = b('<div class="sb-nav">').append(this.NavPrev).append(this.NavNext);
            this.wrapper.append(a)
        },
        _addOptions: function() {
            this.OptionPlay = b('<span class="sb-nav-play">Autoplay</span>');
            this.OptionInfo = b('<span class="sb-nav-info">Info</span>');
            var a = b('<div class="sb-options">').append(this.OptionPlay).append(this.OptionInfo);
            this.wrapper.append(a)
        },
        _initEvents: function(a) {
            var b = this;
            b.NavNext.bind("click.slicebox",
            function(c) {
                b.navigate("next", a)
            });
            b.NavPrev.bind("click.slicebox",
            function(c) {
                b.navigate("prev", a)
            });
            b.OptionPlay.bind("click.slicebox",
            function(c) {
                if (!b.isSlideshowActive) {
                    if (b.animating) return false;
                    b.isSlideshowActive = true;
                    b._slideshow(a, true);
                    b.OptionPlay.addClass("rb-nav-pause").removeClass("sb-nav-play")
                } else {
                    b._stopSlideshow()
                }
            });
            b.OptionInfo.bind("click.slicebox",
            function(a) {
                if (!b.info) {
                    b._showInfo()
                } else {
                    b._hideInfo()
                }
            })
        },
        _showInfo: function() {
            if (this.animating) return false;
            this._stopSlideshow();
            var a = this.$images.eq(this.imageCurrent).attr("title");
            b('<div class="sb-title"><span>' + a + "</span></div>").appendTo(this.wrapper).stop().animate({
                height: "38px",
                bottom: "0px"
            },
            300);
            this.OptionInfo.addClass("sb-nav-noinfo").removeClass("sb-nav-info");
            this.info = true
        },
        _hideInfo: function() {
            if (this.animating) return false;
            this.wrapper.find("div.sb-title").remove();
            this.OptionInfo.addClass("sb-nav-info").removeClass("sb-nav-noinfo");
            this.info = false
        },
        navigate: function(a, b) {
            var c = this;
            if (c.animating) return false;
            c._stopSlideshow();
            if (c.info) c._hideInfo();
            c.animating = true;
            this._slide(a, b);
        },
        _slide: function(a, b, c) {
            var d = this,
            e = d.$images.eq(d.imageCurrent);
            if (a === "next") {
                if (d.imageCurrent < d.imagesCount - 1)++d.imageCurrent;
                else d.imageCurrent = 0
            } else if (a === "prev") {
                if (d.imageCurrent < 1) d.imageCurrent = d.imagesCount - 1;
                else--d.imageCurrent
            }
            var f = {},
            g = {};
            if (b.orientation === "v") {
                f.top = a === "next" ? d.size.height + "px": -d.size.height + "px";
                g.top = "0px"
            } else if (b.orientation === "h") {
                f.left = a === "next" ? -d.size.width + "px": d.size.width + "px";
                g.left = "0px"
            }
            e.stop().animate(f, b.speed, b.fallbackEasing);
            var h = d.$images.eq(d.imageCurrent);
            if (a === "next") {
                if (b.orientation === "v") h.css("top", -d.size.height + "px");
                else if (b.orientation === "h") h.css("left", d.size.width + "px")
            } else {
                if (b.orientation === "v") h.css("top", d.size.height + "px");
                else if (b.orientation === "h") h.css("left", -d.size.width + "px")
            }
            d.$images.eq(d.imageCurrent).stop().animate(g, b.speed, b.fallbackEasing,
            function() {
                d.animating = false;
                if (c) c.call()
            })
        },
        _slideshow: function(a, b) {
            if (!this.isSlideshowActive) return false;
            clearTimeout(this.slideshowT);
            var c = this;
            if (b) c._slideshowFunc(a);
            c.slideshowT = setTimeout(function() {
                c._slideshowFunc(a)
            },
            a.slideshowTime)
        },
        _slideshowFunc: function(a) {
            var b = this;
            if (b.info) b._hideInfo();
            b.animating = true;
            b._slide("next", a,
            function() {
                b._slideshow(a)
            })
        },
        _stopSlideshow: function() {
            this.isSlideshowActive = false;
            clearTimeout(this.slideshowT);
            this.OptionPlay.addClass("sb-nav-play").removeClass("rb-nav-pause")
        },
        addImages: function(a, b) {
            this.$images = this.$images.add(a);
            this.imagesCount = this.$images.length;
            if (b) b.call(a)
        }
    };
    var d = function(a) {
        if (this.console) {
            console.error(a)
        }
    };
    b.fn.slicebox = function(a) {
        if (typeof a === "string") {
            var c = Array.prototype.slice.call(arguments, 1);
            this.each(function() {
                var e = b.data(this, "slicebox");
                if (!e) {
                    d("cannot call methods on slicebox prior to initialization; " + "attempted to call method '" + a + "'");
                    return
                }
                if (!b.isFunction(e[a]) || a.charAt(0) === "_") {
                    d("no such method '" + a + "' for slicebox instance");
                    return
                }
                e[a].apply(e, c)
            })
        } else {
            this.each(function() {
                var c = b.data(this, "slicebox");
                if (!c) {
                    b.data(this, "slicebox", new b.slicebox(a, this))
                }
            })
        }
        return this
    }
})(window, jQuery)
