(function (a, b) {
    function v(c, d, e) {
        var f = 0; var g = e.find("#creative_layer_holder");
        c.find("div").each(function (c) {
            var d = a(this);
            if (d.data("parent") == b) d.data("parent", d.parent());
            if (d.hasClass("creative_layer")) {
                d.css({ opacity: "0.0" });
                d.appendTo(g)
                } 
        });
        e.find("#creative_layer_holder div").each(function (c) {
            var e = a(this);
            if (e.hasClass("creative_layer")) {
                e.css({ opacity: "1.0" });
                if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) {
                    e.addClass("noFilterClass");
                    e.css({ display: "none" })
                } 
            }
            if (e.attr("id") != "ext_ext_before" && !e.hasClass("freshslice") && !e.hasClass("freshbox")) { e.stop(true, true) }
            if (e.data("_top") == b) e.data("_top", e.position().top);
            if (e.data("_left") == b) e.data("_left", e.position().left);
            if (e.data("_op") == b) { e.data("_op", e.css("opacity")) } e.css({ "z-index": 1200 });
            if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) {
                if (e.hasClass("creative_layer")) {
                    e.css({ display: "block" })
                } 
            } else {
                if (e.hasClass("slideup")) {
                    e.animate({
                        top: e.data("_top") + 20 + "px"
                    },
{ duration: 0, queue: false }).delay(d + (f + 1) * 200).animate({ top: e.data("_top") - 20 + "px" },
{ duration: 300, queue: true }); f++
                }
                if (e.hasClass("slideright")) {
                    e.animate({ left: e.data("_left") - 20 + "px" },
{ duration: 0, queue: false }).delay(d + (f + 1) * 200).animate({ left: e.data("_left") + 20 + "px" },
{ duration: 300, queue: true }); f++
                } if (e.hasClass("slidedown")) {
                    e.animate({ top: e.data("_top") - 20 + "px" },
{ duration: 0, queue: false }).delay(d + (f + 1) * 200).animate({ top: e.data("_top") + 20 + "px" },
{ duration: 300, queue: true }); f++
                } if (e.hasClass("slideleft")) {
                    e.animate({ left: e.data("_left") + 20 + "px" },
{ duration: 0, queue: false }).delay(d + (f + 1) * 200).animate({ left: e.data("_left") - 20 + "px" },
{ duration: 300, queue: true }); f++
                } if (e.hasClass("fadeup")) {
                    e.animate({ top: e.data("_top") + 20 + "px", opacity: 0 },
{ duration: 0, queue: false }).delay(d + (f + 1) * 200).animate({ top: e.data("_top") - 20 + "px", opacity: e.data("_op") }, { duration: 300, queue: true }); f++
                }
                if (e.hasClass("faderight")) {
                    e.animate({ left: e.data("_left") - 20 + "px", opacity: 0 },
{ duration: 0, queue: false }).delay(d + (f + 1) * 200).animate({ left: e.data("_left") + 20 + "px", opacity: e.data("_op") },
{ duration: 300, queue: true }); f++
                }
                if (e.hasClass("fadedown")) {
                    e.animate({ top: e.data("_top") - 20 + "px", opacity: 0 },
{ duration: 0, queue: false }).delay(d + (f + 1) * 200).animate({ top: e.data("_top") + 20 + "px", opacity: e.data("_op") },
{ duration: 300, queue: true }); f++
                } if (e.hasClass("fadeleft")) {
                    e.animate({ left: e.data("_left") + 20 + "px", opacity: 0 },
{ duration: 0, queue: false }).delay(d + (f + 1) * 200).animate({ left: e.data("_left") - 20 + "px", opacity: e.data("_op") },
{ duration: 300, queue: true }); f++
                } if (e.hasClass("fade")) {
                    e.animate({ opacity: 0 },
{ duration: 0, queue: false }).delay(d + (f + 1) * 200).animate({ opacity: e.data("_op") },
{ duration: 300, queue: true });
                    f++
                } 
            } 
        })
    }
    function u(a) {
        jQuery(a.find("#drag")).animaDrag({
            speed: 0, interval: 0, easing: null, direction: "vertical",
            boundary: a.find("#mask"),
            boundary_offset: 30, grip: null,
            overlay: false,
            afterDiv: a.data("currentSlide")
        })
    }
    function t(b, c) {
        b.each(function () {
            $this = a(this);
            o($this, c)
        });
        b.find("li").each(function (b) {
            $this = a(this);
            p($this, b, c)
        });
        b.find("ul").css({ display: "block" });
        b.find("#toolbox").animate({ opacity: "1.0" }, 1e3);
        if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) {
            b.find("ul li").css({ display: "block", opacity: "0.0" });
            b.find("ul li").animate({ opacity: "1.0" }, 300)
        }
        else { b.find("ul li").css({ display: "block" }) } b.find("#mainloader").animate({ opacity: "0.3" },
{ duration: 500, complete: function () {
    var b = a(this);
    b.remove()
} 
}); v(b.data("currentSlide"), 500, b)
}
function s(c, d) {
    var e = a('<div id="toolbox" style="opacity:0"></div>');
    if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) {
        e.css({ "z-index": "4200" });
        e.addClass("noFilterClass")
    }
    else { e.css({ "z-index": "4200" }) } c.append(e);
    var f = a("<div id='previous'></div>");
    var g = a("<div id='next'></div>");
    var h = function (b) {
        b.hover(function () {
            var b = a(this);
            if (b.attr("id") == "previous") b.css({ "background-position": "bottom right" });
            else b.css({ "background-position": "bottom left" })
        },
function () {
    $this = a(this); if ($this.attr("id") == "previous") $this.css({ "background-position": "top right" });
    else $this.css({ "background-position": "top left" })
})
};
var i = function (b) {
    b.click(function () {
        var b = a(this);
        var e = c.data("currentSlide").index();
        if (b.attr("id") == "previous") e++;
        else e--;
        if (e == c.data("currentSlide").parent().find("li").size()) e = 0;
        if (e == -1) e = c.data("currentSlide").parent().find("li").size() - 1;
        var f = c.find("li").each(function (f) {
            b = a(this);
            if (f == e) { n(c.data("currentSlide"), b, c, d) } 
        })
    })
};
h(f);
i(f);
h(g);
i(g);
e.append(f);
e.append(g);
var j = a("<div id='mini_divider'></div>");
e.append(j); c.find("li").each(function (f) {
    var g = a(this); var h = g.parent().find("li").size() - 1;
    var i = a("<div id='" + (h - f) + "' class='mini_thumbnail_buttons'></div>");
    e.append(i); if (c.data("currentSlide").index() == h - f) {
        i.data("on", true);
        i.css({ "background-position": "bottom left" })
    }
    var j = a('<div id="cd" class="countdown" style="display:none;background-position:0px 0px"></div>');
    j.data("idNum", h - f);
    i.append(j);
    if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) j.addClass("noFilterClass");
    if (h - f == 0) { j.css({ display: "block" }) } i.hover(function () {
        var d = a(this);
        d.css({ "background-position": "top right" });
        if (d.data().on == true) d.css({ "background-position": "bottom right" });
        var e = a('<div id="image_thumbnail" style="opacity:0.0;left:' + d.position().left + "px;top:" + (d.position().top + 10) + 'px"></div>');
        d.parent().append(e);
        if (d.hasClass("wedding_mini_thumbnail_buttons")) {
            e.addClass("wedding_image_thumbnail")
        }
        else {
            if (d.hasClass("fashion_mini_thumbnail_buttons")) {
                e.addClass("fashion_image_thumbnail")
            }
            else {
                if (d.hasClass("custom_mini_thumbnail_buttons")) {
                    e.addClass("custom_image_thumbnail")
                } 
            } 
        }
        var f = a(this).attr("id"); var g = ""; var h = 0; var i = 0; c.find("li").each(function () {
            var c = a(this);
            if (c.index() == f) {
                var d = c.find("#before");
                g = d.attr("src");
                if (c.data("orgWidth") == b) c.data("orgWidth", d.width());
                if (c.data("orgHeight") == b) c.data("orgHeight", d.height());
                h = c.data("orgWidth"); i = c.data("orgHeight")
            } 
        });
        if (e.width() == 0) { h = h / 5; i = i / 5; e.css({ width: h + "px", height: i + "px" }) }
        else { h = e.width(); i = e.height() } var j = h - 6; var k = i - 6; var l = parseInt(e.css("margin-top"));
        if (l == 0) l = 0 - k - 6; e.css({ left: d.position().left + 10 + -j / 2 + "px", width: j + 6 + "px", height: k + 6 + "px", "margin-top": l + "px" });
        e.append('<div><div><img id="thimg" style="position:absolute;top:3px;left:3px;width:' + j + "px;height:" + k + 'px" src="' + g + '"></div></div>');
        e.append('<div id="loader" style="loader"></div>');
        e.append('<div id="image_thumbnail_arrow" style="position:absolute;left:' + (h / 2 - 4) + "px;top:" + (i - 1) + 'px"></div>');
        if (d.hasClass("wedding_mini_thumbnail_buttons")) {
            e.find("#image_thumbnail_arrow").addClass("wedding_image_thumbnail_arrow")
        }
        else {
            if (d.hasClass("fashion_mini_thumbnail_buttons")) {
                e.find("#image_thumbnail_arrow").addClass("fashion_image_thumbnail_arrow")
            }
            else {
                if (d.hasClass("custom_mini_thumbnail_buttons")) {
                    e.find("#image_thumbnail_arrow").addClass("custom_image_thumbnail_arrow")
                } 
            } 
        }
        e.animate({ opacity: 1, top: +1 }, { duration: 200 })
    },
function () {
    var b = a(this);
    b.css({ "background-position": "top left" });
    if (b.data().on == true) b.css({ "background-position": "bottom left" });
    b.parent().find("#image_thumbnail").remove()
});
i.click(function () {
    var b = a(this);
    if (b.data().on != true) {
        var e = a(this).attr("id");
        var f = c.find("li").each(function (b) {
            var f = a(this); if (b == e) { n(c.data("currentSlide"), f, c, d) } 
        })
    } 
})
});
c.find("#toolbox").css({ width: c.find("#toolbox").width() + "px" })
}
function r(b, c) {
    var d = b.data().dragH; b.each(function () {
        $this = a(this);
        o($this, c)
    }); b.find("li").each(function (b) { $this = a(this); p($this, b, c) });
    b.css({ opacity: "0.0", display: "block" });
    b.animate({ opacity: "1.0" }, 1500); s(b, c, b.data("currentSlide"))
} function q(a, b) {
    a.find("ul").wrap("<div id='mask'></div>");
    a.find("#mask").css({ overflow: "hidden", width: b.width + "px", height: b.height + "px", position: "absolute" })
}
function p(b, c, d) {
    a(b).css({ width: d.width + "px", height: d.height + "px", "z-index": "200", position: "relative", overflow: "hidden", left: 0, top: 0 });
    if (c > 0) a(b).css({ opacity: 0 })
} function o(a, b) {
    a.find(".creative_layer").css({
        width: b.width + "px", height: b.height + "px", position: "absolute", top: "0px", left: "0px"
    });
    a.css({ width: b.width + "px", height: b.height + "px", position: "relative" })
}
function n(c, d, e, f) {
    var g = false; e.find("#creative_layer_holder div").each(function (b) { var c = a(this); var d = c.data("parent"); c.appendTo(d) });
    e.find("li").each(function (b) {
        var e = a(this);
        if (e.index() != c.index() && e.index() != d.index()) {
            e.css({ "z-index": "950", opacity: "0.0" });
            if (a.browser.msie && a.browser.version >= 7 && a.browser.version < 9) e.addClass("noFilterClass")
        } 
    }); c.css({ "z-index": "995" }); d.css({ "z-index": "1000" });
    if (c.data("orgWidth") == b) { c.data("orgWidth", c.find("#before").width()); c.find("#before").data("orgWidth", c.data("orgWidth")) }
    if (c.data("orgHeight") == b) { c.data("orgHeight", c.find("#before").height()); c.find("#before").data("orgHeight", c.data("orgHeight")) }
    if (d.data("orgWidth") == b) { d.data("orgWidth", d.find("#before").width()); d.find("#before").data("orgWidth", d.data("orgWidth")) }
    if (d.data("orgHeight") == b) { d.data("orgHeight", d.find("#before").height()); d.find("#before").data("orgHeight", d.data("orgHeight")) }
    var h = f.pt + f.height / 2 - d.data("orgHeight") / 2;
    var n = f.pl + f.width / 2 - d.data("orgWidth") / 2;
    var o = d.data("orgWidth"); var p = d.data("orgHeight");
    if (o > f.width) o = f.width; if (p > f.height) p = f.height; if (h < f.pt) h = f.pt;
    if (n < f.pl) n = f.pl; e.find("#mask:first").css({ top: h + "px", left: n + "px", width: o + "px", height: p + "px" });
    c.find("#before").css({ width: c.data("orgWidth") + "px", height: c.data("orgHeight") + "px" });
    d.find("#before").css({ width: d.data("orgWidth") + "px", height: d.data("orgHeight") + "px" });
    c.css({ width: f.width + "px", height: f.height + "px" }); d.css({ width: f.width + "px", height: f.height + "px" }); c.find("#before").stop(true, true);
    d.find("#before").stop(true, true); d.stop(true, true); d.find(".freshslice").each(function (b) { var c = a(this); c.remove() });
    d.find(".freshbox").each(function (b) { var c = a(this); c.remove() });
    if (!(a.browser.msie && a.browser.version >= 7 && a.browser.version < 9)) {
        if (d.data("transition") == "gradientfade" || d.data("transition") == "1") {
            g = true; l(d, d.width() / 5); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" });
            d.find("#before").css({ opacity: "0" }); d.find(".freshslice").each(function (b) {
                var c = a(this); c.css({ height: d.height() + "px", top: "0px" });
                if (b == d.find(".freshslice").size() - 1) c.delay(b).animate({ opacity: "1.0" }, { duration: b * 2 + 10, queue: true, complete: m });
                else c.delay(b).animate({ opacity: "1.0" }, { duration: b * 5 + 10, queue: true })
            })
        }
        if (d.data("transition") == "gradientfade2" || d.data("transition") == "2") {
            g = true; k(d, d.height() / 5); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" });
            d.find(".freshslice").each(function (b) {
                var c = a(this); c.css({ width: d.width() + "px", left: "0px" });
                if (b == d.find(".freshslice").size() - 1) c.delay(b).animate({ opacity: "1.0" }, { duration: b * 2 + 10, queue: true, ease: "linear", complete: m });
                else c.delay(b).animate({ opacity: "1.0" }, { duration: b * 3 + 10, queue: true, ease: "linear" })
            })
        }
        if (d.data("transition") == "box-randomfade" || d.data("transition") == "3") {
            g = true; i(d, f.width / 80, f.height / 80); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" });
            var q = []; d.find(".freshbox").each(function (a) { q[a] = a }); for (var r = 0; r < q.length; r++) {
                var s = Math.round(Math.random() * q.length);
                var t = q[s]; q[s] = q[r]; q[r] = t
            } d.find(".freshbox").each(function (b) {
                var c = a(this);
                if (b == d.find(".freshbox").size() - 1) c.delay(b * 15 + 150).animate({ opacity: "1.0" }, { duration: Math.random() * 1e3 + 300, ease: "linear", queue: true, complete: m });
                else c.delay(q[b] * 12 + 120).animate({ opacity: "1.0" }, { duration: Math.random() * 1e3 + 300, ease: "linear", queue: true })
            })
        }
        if (d.data("transition") == "box-randomzoom" || d.data("transition") == "4") {
            g = true; i(d, f.width / 80, f.height / 80); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" });
            var q = []; d.find(".freshbox").each(function (a) { q[a] = a }); for (var r = 0; r < q.length; r++) {
                var s = Math.round(Math.random() * q.length);
                var t = q[s]; q[s] = q[r]; q[r] = t
            } d.find(".freshbox").each(function (b) {
                var c = a(this);
                var e = c.width();
                var f = c.height();
                var e = c.width();
                var f = c.height();
                c.css({ width: "0px", height: "0px", opacity: "1.0", "-webkit-border-radius": "5px", "-moz-border-radius": "5px", "border-radius": "5px" });
                if (b == d.find(".freshbox").size() - 1) c.delay(b * 30 + 170).animate({ width: e + 10 + "px", height: f + 10 + "px" }, { duration: 250, ease: "linear", queue: true, complete: m });
                else c.delay(q[b] * 28 + 120).animate({ width: 10 + e + "px", height: f + 10 + "px" }, { duration: 250, ease: "linear", queue: true })
            })
        }
        if (d.data("transition") == "box-diagonalzoom" || d.data("transition") == "5") {
            g = true; i(d, f.width / 80, f.height / 80); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0.0" });
            var u = false;
            var w = 1;
            var x = 0;
            var y = 1;
            var z = Math.round(f.width / 80);
            var A = Math.round(f.height / 80);
            var B = d.find(".freshbox").size();
            for (var C = 0; C < B; C++) {
                var D = d.find(".freshbox:eq(" + (w - 1) + ")");
                if (w - (z - 1) > x * z) { w = w - (z - 1) } else { w = y; w = w + z; y = w } if (w - z * (x + 1) == 0) x++;
                if (w > B) { u = true; w = y - z + 1; y = w } var E = D.width();
                var F = D.height(); D.css({ width: "0px", height: "0px", opacity: "1.0", "-webkit-border-radius": "5px", "-moz-border-radius": "5px", "border-radius": "5px" });
                if (C == d.find(".freshbox").size() - 1) D.delay(C * 30).animate({ width: E + 10 + "px", height: F + 10 + "px" }, { duration: 660, ease: "linear", queue: true, complete: m });
                else D.delay(C * 30).animate({ width: 10 + E + "px", height: F + 10 + "px" }, { duration: 660, ease: "linear", queue: true })
            } 
        }
        if (d.data("transition") == "box-diagonalfade" || d.data("transition") == "6") {
            g = true; i(d, f.width / 80, f.height / 80); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0.0" });
            var u = false; var w = 1;
            var x = 0;
            var y = 1;
            var z = Math.round(f.width / 80);
            var A = Math.round(f.height / 80);
            var B = d.find(".freshbox").size();
            for (var C = 0; C < B; C++) {
                var D = d.find(".freshbox:eq(" + (w - 1) + ")");
                if (w - (z - 1) > x * z) { w = w - (z - 1) }
                else { w = y; w = w + z; y = w } if (w - z * (x + 1) == 0) x++;
                if (w > B) {
                    u = true; w = y - z + 1;
                    y = w
                } var E = D.width();
                var F = D.height();
                D.css({ opacity: "0.0" });
                if (C == d.find(".freshbox").size() - 1) D.delay(C * 30).animate({ opacity: "1.0" }, { duration: 660, ease: "linear", queue: true, complete: m });
                else D.delay(C * 30).animate({ opacity: "1.0" }, { duration: 660, ease: "linear", queue: true })
            } 
        }
        if (d.data("transition") == "box-leftfade" || d.data("transition") == "7") {
            g = true;
            i(d, f.width / 80, f.height / 80); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0.0" });
            var u = false;
            var w = 1;
            var x = 2;
            var y = 1;
            var z = Math.round(f.width / 80);
            var A = Math.round(f.height / 80);
            var B = d.find(".freshbox").size();
            for (var C = 0; C < B; C++) {
                var D = d.find(".freshbox:eq(" + (w - 1) + ")"); w = w + z;
                if (w > B) { w = x; x++ } D.css({ opacity: "0.0" });
                if (C == d.find(".freshbox").size() - 1) D.delay(C * 30).animate({ opacity: "1.0" }, { duration: 660, ease: "linear", queue: true, complete: m });
                else D.delay(C * 30).animate({ opacity: "1.0" }, { duration: 660, ease: "linear", queue: true })
            } 
        }
        if (d.data("transition") == "box-leftzoom" || d.data("transition") == "8") {
            g = true; i(d, f.width / 80, f.height / 80); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0.0" });
            var u = false;
            var w = 1;
            var x = 2;
            var y = 1;
            var z = Math.round(f.width / 80);
            var A = Math.round(f.height / 80);
            var B = d.find(".freshbox").size();
            for (var C = 0; C < B; C++) {
                var D = d.find(".freshbox:eq(" + (w - 1) + ")"); w = w + z;
                if (w > B) { w = x; x++ } var E = D.width();
                var F = D.height(); D.css({ width: "0px", height: "0px", opacity: "1.0", "-webkit-border-radius": "5px", "-moz-border-radius": "5px", "border-radius": "5px" });
                if (C == d.find(".freshbox").size() - 1) D.delay(C * 30).animate({ width: E + 10 + "px", height: F + 10 + "px" }, { duration: 660, ease: "linear", queue: true, complete: m });
                else D.delay(C * 30).animate({ width: E + 10 + "px", height: F + 10 + "px" }, { duration: 660, ease: "linear", queue: true })
            } 
        }
        if (d.data("transition") == "ghost" || d.data("transition") == "9") {
            g = true; j(d, 3); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" }); d.find(".freshslice").each(function (b) {
                var c = a(this);
                var e = 140; if (b == 1) e = 80;
                if (b == 2) e = 20; c.css({ opacity: "0", top: "0px", left: e + "px" });
                if (b == d.find(".freshslice").size() - 1) c.delay(b * 290).animate({ opacity: "1.0", left: "0px" }, { duration: 800, queue: true, complete: m });
                else c.delay(b * 290).animate({ opacity: "1.0", left: "0px" }, { duration: 800, queue: true })
            })
        }
        if (d.data("transition") == "camfocus" || d.data("transition") == "10") {
            g = true; j(d, 15); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" }); d.find(".freshslice").each(function (b) {
                var c = a(this); c.css({ opacity: "0.0" }); c.animate({ opacity: Math.random() * .7, top: Math.random() * 20 - 10 + "px", left: Math.random() * 20 - 10 + "px" }, { duration: 600 });
                if (b == d.find(".freshslice").size() - 1) c.animate({ opacity: "1.0", left: "0px", top: "0px" }, { duration: 600, queue: true, complete: m });
                else c.animate({ opacity: "1.0", left: "0px", top: "0px" }, { duration: 600, queue: true })
            })
        }
        if (d.data("transition") == "rollo2" || d.data("transition") == "11") {
            g = true; k(d, 5); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" }); d.find(".freshslice").each(function (b) {
                var c = a(this); c.css({ width: d.width() + "px", left: "0px", top: parseInt(c.css("top")) + 100 + "px" });
                if (b == d.find(".freshslice").size() - 1) c.delay(b * 125).animate({ opacity: "1.0", top: parseInt(c.css("top")) - 100 + "px" }, { duration: 310, queue: true, complete: m });
                else c.delay(b * 125).animate({ opacity: "1.0", top: parseInt(c.css("top")) - 100 + "px" }, { duration: 310, queue: true })
            })
        }
        if (d.data("transition") == "curtain2" || d.data("transition") == "12") {
            g = true; l(d, 5); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" }); d.find(".freshslice").each(function (b) {
                var c = a(this); c.css({ height: d.height() + "px", top: "0px", left: parseInt(c.css("left")) + 100 + "px" });
                if (b == d.find(".freshslice").size() - 1) c.delay(b * 165).animate({ opacity: "1.0", left: parseInt(c.css("left")) - 100 + "px" }, { duration: 260, queue: true, complete: m });
                else c.delay(b * 165).animate({ opacity: "1.0", left: parseInt(c.css("left")) - 100 + "px" }, { duration: 260, queue: true })
            })
        }
        if (d.data("transition") == "rain" || d.data("transition") == "13") {
            g = true; l(d, f.width / 30); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" }); d.find(".freshslice").each(function (b) {
                var c = a(this);
                var e = f.width / 32; c.css({ height: d.height() + "px", top: 0 - f.height + "px" }); if (b == d.find(".freshslice").size() - 1) c.delay(b * (80 - b) + 50).animate({ opacity: "1.0", top: "0px" }, { duration: 680, queue: true, complete: m });
                else c.delay(Math.random() * b * (80 - b) + 50).animate({ opacity: "1.0", top: "0px" }, { duration: 680, queue: true })
            })
        }
        if (d.data("transition") == "fountain" || d.data("transition") == "14") {
            g = true; l(d, f.width / 30); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" });
            var G = f.width / 30;
            var H = 100 + 70 * G / 2; d.find(".freshslice").each(function (b) {
                var c = a(this);
                c.css({ height: d.height() + "px", top: 0 - f.height + "px" });
                if (b < G / 2) H = H - 70;
                else H = H + 70;
                if (b == d.find(".freshslice").size() - 1) c.delay(H).animate({ opacity: "1.0", top: "0px" }, { duration: 690, queue: true, complete: m });
                else c.delay(H).animate({ opacity: "1.0", top: "0px" }, { duration: 690, queue: true })
            })
        }
        if (d.data("transition") == "wave" || d.data("transition") == "15") {
            g = true; l(d, f.width / 30); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" }); d.find(".freshslice").each(function (b) {
                var c = a(this);
                var e = f.width / 32; c.css({ height: d.height() + "px", top: 0 - f.height + "px" });
                if (b == d.find(".freshslice").size() - 1) c.delay(b * (90 - b)).animate({ opacity: "1.0", top: "0px" }, { duration: 670, queue: true, complete: m });
                else c.delay(b * (90 - b)).animate({ opacity: "1.0", top: "0px" }, { duration: 670, queue: true })
            })
        }
        if (d.data("transition") == "zipper" || d.data("transition") == "16") {
            g = true; l(d, f.width / 30); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" });
            var I = 0; d.find(".freshslice").each(function (b) {
                var c = a(this);
                var e = f.width / 32;
                if (I == 0) { c.css({ height: d.height() + "px", top: 0 - f.height + "px" }); I = 1 }
                else { c.css({ height: d.height() + "px", top: f.height + "px" }); I = 0 }
                if (b == d.find(".freshslice").size() - 1) c.delay(b * 70).animate({ opacity: "1.0", top: "0px" }, { duration: 560, easing: "easeOutSine", queue: true, complete: m });
                else c.delay(b * 70).animate({ opacity: "1.0", top: "0px" }, { duration: 560, easing: "easeOutSine", queue: true })
            })
        }
        if (d.data("transition") == "curtain" || d.data("transition") == "17") {
            g = true; l(d, f.width / 30); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" });
            d.find("#before").css({ opacity: "0" }); d.find(".freshslice").each(function (b) {
                var c = a(this);
                var e = f.width / 30; c.css({ height: d.height() + "px", top: "0px", left: parseInt(c.css("left")) + e + "px" });
                if (b == d.find(".freshslice").size() - 1) c.delay(b * (80 - b)).animate({ opacity: "1.0", left: parseInt(c.css("left")) - e + "px" }, { duration: 610, queue: true, complete: m });
                else c.delay(b * (80 - b)).animate({ opacity: "1.0", left: parseInt(c.css("left")) - e + "px" }, { duration: 610, queue: true })
            })
        }
        if (d.data("transition") == "rollo" || d.data("transition") == "18") {
            g = true;
            k(d, f.height / 30); d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" });
            d.find(".freshslice").each(function (b) {
                var c = a(this);
                var e = f.height / 30; c.css({ width: d.width() + "px", left: "0px", top: parseInt(c.css("top")) + e + "px" });
                if (b == d.find(".freshslice").size() - 1) c.delay(b * (80 - b)).animate({ opacity: "1.0", top: parseInt(c.css("top")) - e + "px" }, { duration: 610, queue: true, complete: m });
                else c.delay(b * (80 - b)).animate({ opacity: "1.0", top: parseInt(c.css("top")) - e + "px" }, { duration: 610, queue: true })
            })
        }
        if (d.data("transition") == "zoomme" || d.data("transition") == "19") {
            g = true; c.css({ "z-index": "1000" });
            d.css({ "z-index": "995" }); c.stop(true, true); d.stop(true, true);
            c.find("#before").css({ width: c.data("orgWidth") + "px", height: c.data("orgHeight") + "px" }); d.find("#before").css({ width: d.data("orgWidth") + "px", height: d.data("orgHeight") + "px" });
            c.animate({ width: 2 * f.width + "px", height: 2 * f.height + "px", left: 0 - f.width / 2 + "px", top: 0 - f.height / 2 + "px", opacity: "0.0" }, { duration: 250, queue: true });
            c.find("#before").animate({ width: 2 * f.width + "px", height: 2 * f.height + "px" }, { duration: 800, queue: false });
            d.css({ position: "absolute", top: "0px", left: "0px", opacity: "1.0" }); d.find("#before").css({ opacity: "0" })
            d.find("#before").animate({ opacity: "1.0" }, { duration: 600 })
        } 
    }
    if (d.data("transition") == "slide-updown" || d.data("transition") == "20") {
        g = true; var J = true; e.find("li").each(function () {
            D = a(this);
            if (D.index() != c.index() && D.index() != d.index()) D.css({ opacity: 0 })
        });
        if (c.index() > d.index()) J = false;
        if (c.index() == 0 && d.index() != 1) J = false;
        if (c.index() == c.parent().find("li").size() - 1 && d.index() == 0) J = true;
        if (J) {
            c.animate({ top: 0 - f.height }, { duration: 250, queue: false });
            d.css({ opacity: "1.0", position: "absolute", top: f.height, left: "0px", width: f.width, height: f.height }); d.animate({ left: "0px", top: "0px", opacity: "1.0" }, { duration: 650, queue: false })
        }
        else {
            c.animate({ top: f.height }, { duration: 250, queue: false });
            d.css({ opacity: "1.0", position: "absolute", top: 0 - f.height + "px", left: "0px", width: f.width, height: f.height }); d.animate({ left: "0px", top: "0px", opacity: "1.0" }, { duration: 650, queue: false })
        } 
    }
    if (g == false) {
        var J = true; e.find("li").each(function () {
            D = a(this);
            if (D.index() != c.index() && D.index() != d.index()) D.css({ opacity: 0 })
        });
        if (c.index() > d.index()) J = false;
        if (c.index() == 0 && d.index() != 1) J = false;
        if (c.index() == c.parent().find("li").size() - 1 && d.index() == 0) J = true;
        if (J) {
            c.animate({ left: 0 - f.width }, { duration: 650, queue: false });
            d.css({ opacity: "1.0", position: "absolute", top: "0px", left: f.width, width: f.width, height: f.height }); d.animate({ left: "0px", top: "0px", opacity: "1.0" }, { duration: 650, queue: false })
        }
        else {
            c.animate({ left: f.width }, { duration: 650, queue: false });
            d.css({ opacity: "1.0", position: "absolute", top: "0px", left: 0 - f.width, width: f.width, height: f.height }); d.animate({ left: "0px", top: "0px", opacity: "1.0" }, { duration: 650, queue: false })
        } 
    }
    c.parent().parent().parent().find(".mini_thumbnail_buttons").each(function (b) {
        var c = a(this);
        c.css({ "background-position": "top left" });
        c.data("on", false); c.find("#cd").css({ display: "none" });
        if (b == d.parent().find("li").size() - d.index() - 1) {
            c.data("on", true);
            c.find("#cd").data("t", 0);
            c.find("#cd").css({ display: "block" });
            c.css({ "background-position": "bottom left" })
        } 
    });
    e.data("currentSlide", d);
    v(d, 1500, e)
} function m() {
    var b = a(this).parent(); b.find("#before").css({ opacity: "1" });
    b.find(".freshslice").each(function (b) { var c = a(this); c.remove() });
    b.find(".freshsbox").each(function (b) {
        var c = a(this);
        c.remove()
    })
}
function l(b, c) {
    for (var d = 0; d < c; d++) {
        var e = Math.round(b.width() / c);
        var f = b.find("#before").attr("src"); if (d == c - 1) { b.append(a('<div class="freshslice"></div>').css({ left: e * d + "px", width: b.width() - e * d + "px", position: "absolute", height: "0px", opacity: "0", background: "url(" + f + ") no-repeat -" + (e + d * e - e) + "px 0%" })) }
        else { b.append(a('<div class="freshslice"></div>').css({ left: e * d + "px", width: e + "px", position: "absolute", height: "0px", opacity: "0", background: "url(" + f + ") no-repeat -" + (e + d * e - e) + "px 0%" })) } 
    } 
}
function k(b, c) {
    for (var d = 0; d < c; d++) {
        var e = Math.round(b.height() / c);
        var f = b.find("#before").attr("src");
        if (d == c - 1) { b.append(a('<div class="freshslice"></div>').css({ top: e * d + "px", height: b.height() - e * d + "px", position: "absolute", width: b.width() + "px", opacity: "0", background: "url(" + f + ") no-repeat -0px " + (0 - d * e) + "px" })) }
        else { b.append(a('<div class="freshslice"></div>').css({ top: e * d + "px", height: e + "px", position: "absolute", width: b.width() + "px", opacity: "0", background: "url(" + f + ") no-repeat -0px " + (0 - d * e) + "px" })) } 
    } 
}
function j(b, c) {
    for (var d = 0; d < c; d++) {
        var e = b.find("#before").attr("src"); b.append(a('<div class="freshslice"></div>').css({ left: "0px", position: "absolute", height: b.height() + "px", width: b.width() + "px", opacity: "0", background: "url(" + e + ") no-repeat" }))
    } 
}
function i(b, c, d) {
    var e = Math.round(b.width() / c);
    var f = Math.round(b.height() / d);
    var g = b.find("#before").attr("src");
    for (var h = 0; h < d; h++) {
        for (var i = 0; i < c; i++) {
            if (i == c - 1) { b.append(a('<div class="freshbox"></div>').css({ position: "absolute", opacity: 0, left: e * i + "px", top: f * h + "px", width: b.width() - e * i + "px", height: f + "px", background: "url(" + g + ") no-repeat -" + (e + i * e - e) + "px -" + (f + h * f - f) + "px" })) }
            else { b.append(a('<div class="freshbox"></div>').css({ position: "absolute", opacity: 0, left: e * i + "px", top: f * h + "px", width: e + "px", height: f + "px", background: "url(" + g + ") no-repeat -" + (e + i * e - e) + "px -" + (f + h * f - f) + "px" })) } 
        } 
    } 
}
function h(b) {
    b.find("li >img").each(function () {
        var b = a(this); b.attr({ id: "before" }); b.parent().find("#before").wrapAll("<div id='ba_images'></div>"); b.parent().find("#before").wrap("<div id='ext_ext_before'><div id='ext_before'></div></div>");
        var c = b.parent().parent().parent().find("#before").parent().parent();
        var d = c.find("#before").parent();
        var e = d.find("#before"); c.css({ position: "absolute", "z-index": "1", top: "0px", left: "0px" }); d.css({ position: "absolute", "z-index": "1", top: "0px", left: "0px" })
    })
}
function g(b, c) {
    var d = b.data("ba_images");
    var e = b.data("ba_imagesLoaded");
    var f = new Image; a(f).css("display", "none"); a(f).attr("src", d[e]);
    if (f.complete || f.readyState === 4) {
        e++; if (e == d.length) { b.data("loaded", "true"); t(b, c) }
        else { b.data("ba_imagesLoaded", e); g(b, c) } 
    }
    else {
        a(f).load(function () {
            e++;
            if (e == d.length) { b.data("loaded", "true"); t(b, c) }
            else { b.data("ba_imagesLoaded", e); g(b, c) } 
        })
    } 
}
function f(b) {
    var c = new Array; var d = 0; b.find("ul li img").each(function (b) {
        var e = a(this); c[d] = e.attr("src"); d++
    }); b.data("ba_images", c)
}
function e(b, c) {
    if (c.theme == "none") { }
    if (c.theme == "custom") {
        b.addClass("custom_frame_basic"); b.addClass("custom_frame_bg");
        d(c, b); b.append('<div id="screw_lt" class="custom_topleftscrew" style="top:' + c.t + "px;left:" + c.l + 'px"></div>');
        b.append('<div id="screw_rt" class="custom_toprightscrew" style="top:' + c.t + "px;left:" + c.r + 'px"></div>');
        b.append('<div id="screw_lb" class="custom_bottomleftscrew" style="top:' + c.b + "px;left:" + c.l + 'px"></div>');
        b.append('<div id="screw_rb" class="custom_bottomrightscrew" style="top:' + c.b + "px;left:" + c.r + 'px"></div>');
        b.find("#toolbox").addClass("custom_toolbox"); b.find("#cd").addClass("custom_countdown");
        b.find("#mini_divider").addClass("custom_mini_divider"); b.find("#previous").addClass("custom_previous");
        b.find("#next").addClass("custom_next"); b.find("#mask").addClass("custom_mask");
        b.find(".mini_thumbnail_buttons").each(function (b) {
            var c = a(this); c.addClass("custom_mini_thumbnail_buttons")
        });
        b.append('<div id="frame_innershadow" class="frame_custom_innershadow" style="top:' + 2 * c.t + "px;z-index:1002;position:absolute;width:" + c.width + "px;height:" + c.height + 'px"></div>');
        b.append('<div id="reflection" class="frame_custom_reflection" style="top:' + 2 * c.t + "px;z-index:1005;position:absolute;width:" + c.width + "px;height:" + c.height + 'px"></div>');
        if (b.find("#creative_layer_holder").size() == 0) b.append('<div id="creative_layer_holder" class="creative_layer"  style="z-index:1007;position:absolute;width:' + c.width + "px;height:" + c.height + 'px"></div>')
    }
    if (c.theme == "sport") {
        b.addClass("sport_frame_basic");
        b.addClass("sport_frame_bg");
        d(c, b); c.r = -8 + c.r; c.b = -8 + c.b; c.m = 2 * c.l + c.width / 2; c.w = 290; c.off = c.m - 145;
        if (c.off < 2 * c.l) { c.off = 2 * c.l; c.w = c.r - c.pr / 2 - c.off } c.e = c.r + c.pr / 2; b.append('<div id="top_decor" class="sport_decor" style="top:0px;left:' + c.off + "px;width:" + c.w + 'px"></div>');
        b.append('<div id="right_decor" class="sport_right_decor_button" style="top:' + 2 * c.t + "px;left:" + (5 + c.e) + 'px"></div>');
        b.append('<div id="screw_lt" class="sport_topscrew" style="top:' + c.t + "px;left:" + c.l + 'px"></div>');
        b.append('<div id="screw_rt" class="sport_topscrew" style="top:' + c.t + "px;left:" + c.r + 'px"></div>');
        b.append('<div id="screw_lb" class="sport_bottomscrew" style="top:' + c.b + "px;left:" + c.l + 'px"></div>');
        b.append('<div id="screw_rb" class="sport_bottomscrew" style="top:' + c.b + "px;left:" + c.r + 'px"></div>');
        var e = b.find("#toolbox"); e.addClass("sport_toolbox"); b.find("#cd").addClass("sport_countdown");
        b.find("#mini_divider").addClass("sport_mini_divider"); b.find("#previous").addClass("sport_previous");
        b.find("#next").addClass("sport_next"); b.find("#mask").addClass("sport_mask"); b.find(".mini_thumbnail_buttons").each(function (b) {
            var c = a(this); c.addClass("sport_mini_thumbnail_buttons")
        }); e.css({ top: c.height - 10 + "px" });
        b.append('<div id="frame_innershadow" class="frame_sport_innershadow" style="top:' + 2 * c.t + "px;z-index:1002;position:absolute;width:" + c.width + "px;height:" + c.height + 'px"></div>');
        b.append('<div id="reflection" class="frame_sport_reflection" style="top:' + 2 * c.t + "px;z-index:1005;position:absolute;width:" + c.width + "px;height:" + c.height + 'px"></div>');
        if (b.find("#creative_layer_holder").size() == 0) b.append('<div id="creative_layer_holder" class="creative_layer"  style="z-index:1007;position:absolute;width:' + c.width + "px;height:" + c.height + 'px"></div>')
    }
if(c.theme=="wedding"){b.addClass("wedding_frame_basic");b.addClass("wedding_frame_bg");d(c,b);c.r=-8+c.r;c.b=c.pt+c.height+c.pb-57;c.m=2*c.l+c.width/2;c.w=c.width;c.e=c.r+c.pr/2;c.off=c.tl;b.append('<div id="top_decor" class="wedding_decor_top" style="top:'+(c.pt/2-24)+"px;left:"+c.off+"px;width:"+c.w+'px"></div>');b.append('<div id="bottom_decor" class="wedding_decor_top" style="top:'+c.b+"px;left:"+c.off+"px;width:"+c.w+'px"></div>');b.append('<div id="frame_innershadow" class="frame_wedding_innershadow" style="top:'+2*c.t+"px;z-index:1002;position:absolute;width:"+c.width+"px;height:"+c.height+'px"></div>');b.append('<div id="reflection" class="frame_wedding_reflection" style="top:'+2*c.t+"px;z-index:1005;position:absolute;width:"+c.width+"px;height:"+c.height+'px"></div>');if(b.find("#creative_layer_holder").size()==0)b.append('<div id="creative_layer_holder" class="creative_layer" style="z-index:1007;position:absolute;width:'+c.width+"px;height:"+c.height+'px"></div>');b.append('<div id="fineborder" class="wedding_fine_border" style="top:'+(2*c.t-5)+"px;left:"+(2*c.l-5)+"px;z-index:1005;width:"+(c.width+8)+"px;height:"+(c.height+8)+'px;"></div>');var e=b.find("#toolbox");e.addClass("wedding_toolbox");b.find("#cd").addClass("wedding_countdown");b.find("#mini_divider").addClass("wedding_mini_divider");b.find("#previous").addClass("wedding_previous");b.find("#next").addClass("wedding_next");b.find(".mini_thumbnail_buttons").each(function(b){var c=a(this);c.addClass("wedding_mini_thumbnail_buttons")});e.css({top:c.height+10+"px"})}if(c.theme=="fashion"){b.addClass("fashion_frame_basic");b.addClass("fashion_frame_bg");d(c,b);c.r=c.r-8;c.b=c.pt+c.height+c.pb-57;c.m=2*c.l+c.width/2;c.w=c.width+2*c.l+c.pr+26;c.e=c.r+c.pr/2;var f=35;var g=2*c.t+c.height;b.append('<div id="toolbox2" class="fashion_toolbox_background" style="top:'+g+"px;height:"+f+"px;left:"+(0-13)+"px;width:"+c.w+'px"></div>');b.append('<div id="toolbox_turnback_left" class="fashion_toolbox_background_turnback_left" style="top:'+(g-6)+"px;left:"+(0-13)+'px"></div>');b.append('<div id="toolbox_turnback_right" class="fashion_toolbox_background_turnback_right" style="top:'+(g-6)+"px;left:"+(c.w-26)+'px"></div>');b.find("#toolbox").addClass("fashion_toolbox");b.find("#cd").addClass("fashion_countdown");b.find("#mini_divider").addClass("fashion_mini_divider");b.find("#previous").addClass("fashion_previous");b.find("#next").addClass("fashion_next");b.find(".mini_thumbnail_buttons").each(function(b){var c=a(this);c.addClass("fashion_mini_thumbnail_buttons")});b.find("#toolbox").css({top:g-15+"px"});b.append('<div id="frame_innershadow" class="frame_fashion_innershadow" style="top:'+2*c.t+"px;z-index:1002;position:absolute;width:"+c.width+"px;height:"+c.height+'px"></div>');b.append('<div id="reflection" class="frame_fashion_reflection" style="top:'+2*c.t+"px;z-index:1005;position:absolute;width:"+c.width+"px;height:"+c.height+'px"></div>');if(b.find("#creative_layer_holder").size()==0)b.append('<div id="creative_layer_holder" class="creative_layer" style="z-index:1007;position:absolute;width:'+c.width+"px;height:"+c.height+'px"></div>')}var h=b.find("#creative_layer_holder");h.css({position:"absolute","margin-top":c.pt+"px","margin-left":c.pl+"px"})}function d(a,b){a.pt=parseInt(b.css("padding-top"));a.pl=parseInt(b.css("padding-left"));a.pr=parseInt(b.css("padding-right"));a.pb=parseInt(b.css("padding-bottom"));a.l=a.pl/2;a.t=a.pt/2;a.r=a.pl+a.width+a.pr/2;a.b=a.pt+a.height+a.pb/2}function c(b,c){var d=b.parent().parent().find("#panel");d.hover(function(){var b=a(this);b.stop();b.animate({left:"-10px"},{duration:400})},function(){var b=a(this);b.stop();b.animate({left:"-140px"},{duration:400})});var f=d.parent().parent().find("#background_pic img:first");d.find("#trlist").change(function(){var c=a(this);b.find("ul li").data("transition",c.val())});d.find("#bgselector").children().click(function(){var b=a(this);f.css({display:"block"});if(b.index()==0){f.css({display:"none"});f.parent().parent().css({background:"none"});f.parent().parent().css({"background-color":"#8e774e"})}if(b.index()==1){f.css({display:"none"});f.parent().parent().css({background:"url(images/background/sport-pattern.jpg)"})}if(b.index()==2)f.attr("src","images/background/wedding.jpg");if(b.index()==3)f.attr("src","images/background/fashion.jpg");if(b.index()==4)f.attr("src","images/background/custom.jpg");if(b.index()==5){f.css({display:"none"});f.parent().parent().css({background:"none"});f.parent().parent().css({"background-color":"#953948"})}});d.find(".themeselector").children().click(function(){var f=a(this);d.find(".wedding").css({color:"#A6B8CC"});d.find(".fashion").css({color:"#A6B8CC"});d.find(".custom").css({color:"#A6B8CC"});d.find(".sport").css({color:"#A6B8CC"});f.css({color:"#fff"});c.theme=String(f.html()).toLowerCase();b.removeClass("custom_frame_basic");b.removeClass("custom_frame_bg");b.removeClass("sport_frame_basic");b.removeClass("sport_frame_bg");b.removeClass("fashion_frame_basic");b.removeClass("fashion_frame_bg");b.removeClass("wedding_frame_basic");b.removeClass("wedding_frame_bg");b.find("*").each(function(){var b=a(this);b.removeClass("custom_toolbox");b.removeClass("custom_countdown");b.removeClass("custom_mini_divider");b.removeClass("custom_previous");b.removeClass("custom_next");b.removeClass("custom_mask");b.removeClass("custom_mini_thumbnail_buttons");b.removeClass("wedding_toolbox");b.removeClass("wedding_countdown");b.removeClass("wedding_mini_divider");b.removeClass("wedding_previous");b.removeClass("wedding_next");b.removeClass("wedding_mask");b.removeClass("wedding_mini_thumbnail_buttons");b.removeClass("fashion_toolbox");b.removeClass("fashion_countdown");b.removeClass("fashion_mini_divider");b.removeClass("fashion_previous");b.removeClass("fashion_next");b.removeClass("fashion_mask");b.removeClass("fashion_mini_thumbnail_buttons");b.removeClass("sport_toolbox");b.removeClass("sport_countdown");b.removeClass("sport_mini_divider");b.removeClass("sport_previous");b.removeClass("sport_next");b.removeClass("sport_mask");b.removeClass("sport_mini_thumbnail_buttons");if(b.attr("id")=="screw_lt")b.remove();if(b.attr("id")=="top_decor")b.remove();if(b.attr("id")=="right_decor")b.remove();if(b.attr("id")=="bottom_decor")b.remove();if(b.attr("id")=="screw_lb")b.remove();if(b.attr("id")=="screw_rt")b.remove();if(b.attr("id")=="screw_rb")b.remove();if(b.attr("id")=="frame_innershadow")b.remove();if(b.attr("id")=="reflection")b.remove();if(b.attr("id")=="toolbox_turnback_left")b.remove();if(b.attr("id")=="toolbox_turnback_right")b.remove();if(b.attr("id")=="toolbox2")b.remove();if(b.attr("id")=="fineborder")b.remove()});e(b,c);var g=b.data("currentSlide").index();g++;if(g==b.data("currentSlide").parent().find("li").size())g=0;if(g==-1)g=b.data("currentSlide").parent().find("li").size()-1;actMT=0;var h=b.find("li").each(function(d){f=a(this);if(d==g){n(b.data("currentSlide"),f,b,c)}})})}a.fn.extend({frames_slider:function(d){var i={width:876,height:300,theme:"none",timer:2e3,hidetoolbar:0};var d=a.extend({},a.fn.frames_slider.defaults,d);return this.each(function(){var i=new Array;var j=0;var k=a(this);k.css({display:"none"});var l=d;l.ie=a.browser.msie&&a.browser.version>=7&&a.browser.version<9;if(l.timer==b)l.timer=2e3;if(l.hidetoolbar==b)l.hidetoolbar=0;k.data("off",parseInt(k.css("padding-top")));k.data("ba_imagesLoaded",0);var m=k.find("li").first();k.data("currentSlide",m);q(k,l);h(k);var o=a("<div id='mainloader' class='loader'></div>");k.append(o);k.find("ul").css({display:"none"});k.find("ul li").css({display:"none"});r(k,l);e(k,l);c(k,l);f(k);g(k,l);k.hover(function(){var b=a(this);b.data("mouseOver","0");b.data("hideT",0);b.find("#toolbox").stop(true,true);if(a.browser.msie&&a.browser.version>=7&&a.browser.version<9){b.find("#toolbox").css({display:"block"})}else{b.find("#toolbox").animate({opacity:"1.0"},{duration:100})}if(l.ie)var c=a('<div id="fh_pause" class="pause_sign" style="left:'+(l.width+l.pl-45)+"px;top:"+(l.pt+10)+'px"></div>');else var c=a('<div id="fh_pause" class="pause_sign" style="opacity:0.0;left:'+(l.width+l.pl-55)+"px;top:"+(l.pt+10)+'px"></div>');b.append(c);if(!l.ie)c.animate({opacity:"1.0",left:l.width+l.pl-45+"px"},{duration:300})},function(){var b=a(this);b.data("mouseOver","1");b.data("hideT",0);b.find("#fh_pause").remove()});k.data("hideT",0);if(l.hidetoolbar!=0){setInterval(function(){if(k.data("loaded")=="true"){if(k.data("mouseOver")!="0")k.data("hideT",k.data("hideT")+100);if(k.data("hideT")>=l.hidetoolbar){if(a.browser.msie&&a.browser.version>=7&&a.browser.version<9){k.find("#toolbox").css({display:"none"})}else{k.find("#toolbox").animate({opacity:"0.0"},{duration:400})}}}},100)}setInterval(function(){if(k.data("loaded")=="true"){k.find("#cd").each(function(){var c=a(this);if(c.data("idNum")==k.data("currentSlide").index()){if(l.timer!=0){if(c.data("t")==b)c.data("t",0);var d=c.data("t");c.css({"background-position":"0px "+(d-10)+"px"});if(d<=-1e3){var e=k.data("currentSlide").index();e++;if(e==k.data("currentSlide").parent().find("li").size())e=0;if(e==-1)e=k.data("currentSlide").parent().find("li").size()-1;d=0;var f=k.find("li").each(function(b){c=a(this);if(b==e){n(k.data("currentSlide"),c,k,l)}})}if(k.data("mouseOver")!="0")c.data("t",d-10)}else{};}})}},l.timer/100)})}});})(jQuery)
