(function (a) {
    a.fn.DOPThumbnailGallery = function (ai) {
        var K = {
            SettingsXMLFilePath: "ThumbnailGallery/xml/SettingsThumbnailGallery.xml",
            ContentXMLFilePath: "ThumbnailGallery/xml/ThumbnailGallery.xml"
        },
            az = this,
            aI = "100%",
            t = "100%",
            ah = "css",
            m = "none",
            aS = "0",
            W = "bottom",
            au = "false",
            aa = "000000",
            aN = "100",
            A = 2,
            B = 10,
            E = 10,
            an = 10,
            D = 10,
            J = "ThumbnailGallery/images/ThumbnailLoader.gif",
            aG = 60,
            x = 60,
            ao = "50",
            ax = "100",
            ac = "100",
            aL = "000000",
            av = "ffffff",
            aR = "ffffff",
            N = 0,
            g = "000000",
            Z = "000000",
            d = "000000",
            aM = 3,
            aP = 3,
            aq = 3,
            C = 3,
            L = "ThumbnailGallery/images/ImageLoader.gif",
            aB = "css",
            o = "30",
            V = "fit",
            U = "1000",
            R = 20,
            G = 20,
            I = 20,
            aQ = 20,
            M = 10,
            aA = 10,
            aC = 10,
            v = 10,
            c = "true",
            aj = "ffffff",
            ag = "ffffff",
            P = "666666",
            H = "000000",
            aU = "30",
            ae = "30",
            n = "auto",
            j = "70",
            e = "bbbbbb",
            p = "888888",
            F = "css",
            ay = "70",
            at = "bottom",
            aO = "888888",
            Q = "bbbbbb",
            am = 0,
            ab = 0,
            aT = 0,
            aD = 0,
            u = 10,
            S = 10,
            i = 10,
            T = 10,
            aK = "true",
            aw = "css",
            l = "css",
            al = "css",
            z = "false",
            ad = "5000",
            aE = "true",
            X = "false",
            s = "2000",
            k = new Array(),
            ak = new Array(),
            Y = new Array(),
            w = new Array(),
            ar = 0,
            O = false,
            af = 0,
            r = 0,
            b = 0,
            h = false,
            q = 0,
            y = 0,
            f, ap, aF, aH = {
                init: function () {
                    return this.each(function () {
                        aH.parseContentXML();
                        a(window).bind("resize.DOPThumbnailGallery", aH.initRP);
                        a(window).bind("scroll.DOPThumbnailGallery", aH.initRP)
                    })
                },
                parseContentXML: function () {
                    var aW, aX, aV, aZ, aY;
                    for (aW = 1; aW <= 300; aW++) {
                        if (aW < 10) {
                            aX = "places/image0" + aW + ".jpg";
                            aV = "places/thumbs/image0" + aW + ".jpg"
                        } else {
                            aX = "places/image" + aW + ".jpg";
                            aV = "places/thumbs/image" + aW + ".jpg"
                        }
                        aZ = "";
                        aY = "";
                        if (aW == 1) {
                            aZ = ""
                        }
                        
                        k.push(aX);
                        ak.push(aV);
                        Y.push(aZ);
                        w.push(aY)
                    }
                    ar = k.length;
                    aH.initGallery()
                },
                initGallery: function () {
                    var aV = new Array();
                    aV.push('<div class="DOP_ThumbnailGallery_Container">');
                    aV.push('   <div class="DOP_ThumbnailGallery_Background"></div>');
                    aV.push('   <div class="DOP_ThumbnailGallery_ThumbnailsContainer">');
                    aV.push('       <div class="DOP_ThumbnailGallery_ThumbnailsBg"></div>');
                    aV.push('       <div class="DOP_ThumbnailGallery_ThumbnailsWrapper">');
                    aV.push('           <div class="DOP_ThumbnailGallery_Thumbnails"></div>');
                    aV.push("       </div>");
                    aV.push("   </div>");
                    aV.push('   <div class="DOP_ThumbnailGallery_ImageWrapper">');
                    aV.push('       <div class="DOP_ThumbnailGallery_ImageBg"></div>');
                    aV.push('       <div class="DOP_ThumbnailGallery_Image"></div>');
                    aV.push('       <div class="DOP_ThumbnailGallery_Caption">');
                    aV.push('           <div class="DOP_ThumbnailGallery_CaptionBg"></div>');
                    aV.push('           <div class="DOP_ThumbnailGallery_CaptionTextWrapper">');
                    aV.push('               <div class="DOP_ThumbnailGallery_CaptionTitle"></div>');
                    aV.push('               <div class="DOP_ThumbnailGallery_CaptionTextContainer">');
                    aV.push('                   <div class="DOP_ThumbnailGallery_CaptionText"></div>');
                    aV.push("               </div>");
                    aV.push("           </div>");
                    aV.push("       </div>");
                    aV.push("   </div>");
                    if (c == "true") {
                        aV.push('   <div class="DOP_ThumbnailGallery_NavigationLeft">');
                        aV.push('       <div class="Icon"></div>');
                        aV.push("   </div>");
                        aV.push('   <div class="DOP_ThumbnailGallery_NavigationRight">');
                        aV.push('       <div class="Icon"></div>');
                        aV.push("   </div>")
                    }
                    if (aK == "true") {
                        aV.push('   <div class="DOP_ThumbnailGallery_Tooltip"></div>')
                    }
                    aV.push("</div>");
                    az.html(aV.join(""));
                    aH.initSettings()
                },
                initSettings: function () {
                    aH.initContainer();
                    aH.initBackground();
                    aH.initThumbnails();
                    aH.initImage();
                    if (c == "true") {
                        aH.initNavigation()
                    }
                    if (aK == "true") {
                        aH.initTooltip()
                    }
                    aH.initCaption();
                    if (X == "true") {
                        aH.initAutoHide()
                    }
                },
                initRP: function () {
                    aH.rpContainer();
                    aH.rpBackground();
                    aH.rpThumbnails();
                    aH.rpImage();
                    if (c == "true") {
                        aH.rpNavigation()
                    }
                },
                initContainer: function () {
                    a(".DOP_ThumbnailGallery_Container", az).css("display", "block");
                    aH.rpContainer()
                },
                rpContainer: function () {
                    if (aI != "css") {
                        if (aI == "100%") {
                            a(".DOP_ThumbnailGallery_Container", az).width(a(az).width())
                        } else {
                            a(".DOP_ThumbnailGallery_Container", az).width(aI)
                        }
                    }
                    if (t != "css") {
                        if (t == "100%") {
                            a(".DOP_ThumbnailGallery_Container", az).height(a(az).height())
                        } else {
                            a(".DOP_ThumbnailGallery_Container", az).height(t)
                        }
                    }
                },
                initBackground: function () {
                    if (ah != "css") {
                        a(".DOP_ThumbnailGallery_Background", az).css("background-color", "#" + ah)
                    }
                    a(".DOP_ThumbnailGallery_Background", az).css("opacity", parseInt(aS) / 100);
                    if (m != "none") {
                        var aV = new Image();
                        a(aV).load(function () {
                            O = true;
                            a(".DOP_ThumbnailGallery_Background", az).html(this);
                            af = a("img", ".DOP_ThumbnailGallery_Background", az).width();
                            r = a("img", ".DOP_ThumbnailGallery_Background", az).height();
                            aH.rpBackground();
                            a("img", ".DOP_ThumbnailGallery_Background", az).css("opacity", 0);
                            a("img", ".DOP_ThumbnailGallery_Background", az).stop(true, true).animate({
                                opacity: "1"
                            }, 600)
                        }).attr("src", m)
                    }
                    aH.rpBackground()
                },
                rpBackground: function () {
                    if (aI != "css") {
                        if (aI == "100%") {
                            a(".DOP_ThumbnailGallery_Background", az).width(a(az).width())
                        } else {
                            a(".DOP_ThumbnailGallery_Background", az).width(aI)
                        }
                    }
                    if (t != "css") {
                        if (t == "100%") {
                            a(".DOP_ThumbnailGallery_Background", az).height(a(az).height())
                        } else {
                            a(".DOP_ThumbnailGallery_Background", az).height(t)
                        }
                    }
                    if (m != "none" && O) {
                        aJ.resizeItem2(a(".DOP_ThumbnailGallery_Background", az), a(".DOP_ThumbnailGallery_Background", az).children(), a(".DOP_ThumbnailGallery_Background", az).width(), a(".DOP_ThumbnailGallery_Background", az).height(), af, r, "center")
                    }
                },
                initThumbnails: function () {
                    if (aa != "css") {
                        a(".DOP_ThumbnailGallery_ThumbnailsBg", az).css("background-color", "#" + aa)
                    }
                    a(".DOP_ThumbnailGallery_ThumbnailsBg", az).css("opacity", parseInt(aN / 100));
                    aH.rpThumbnails();
                    a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).css("margin-top", B);
                    a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).css("margin-left", D);
                    if (W == "top") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).css("margin-top", 0 - a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).height());
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-top": 0
                        }, 600)
                    }
                    if (W == "right") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).css("margin-left", a(".DOP_ThumbnailGallery_Container", az).width());
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-left": a(".DOP_ThumbnailGallery_Container", az).width() - a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).width()
                        }, 600)
                    }
                    if (W == "bottom") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).css("margin-top", a(".DOP_ThumbnailGallery_Container", az).height());
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-top": a(".DOP_ThumbnailGallery_Container", az).height() - a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).height()
                        }, 600)
                    }
                    if (W == "left") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).css("margin-left", 0 - a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).width());
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-left": 0
                        }, 600)
                    }
                    a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).hover(function () {
                        thumbnailsMove = true
                    });
                    aH.moveThumbnails();
                    aH.loadThumb(1)
                },
                loadThumb: function (aW) {
                    aH.initThumb(aW);
                    var aV = new Image();
                    a(aV).load(function () {
                        a("#DOP_ThumbnailGallery_Thumb_" + aW, az).html(this);
                        aH.loadCompleteThumb(aW);
                        if (aW < ar) {
                            aH.loadThumb(aW + 1)
                        }
                    }).attr("src", ak[aW - 1])
                },
                initThumb: function (aW) {
                    var aV = new Array();
                    aV.push('<div class="DOP_ThumbnailGallery_ThumbContainer" id="DOP_ThumbnailGallery_ThumbContainer_' + aW + '">');
                    aV.push('   <div class="DOP_ThumbnailGallery_Thumb" id="DOP_ThumbnailGallery_Thumb_' + aW + '"></div>');
                    aV.push("</div>");
                    if (W == "top" || W == "bottom") {
                        if (aW == 1) {
                            a(".DOP_ThumbnailGallery_Thumbnails", az).width(a(".DOP_ThumbnailGallery_Thumbnails", az).width() + aG + (2 * N) + aP + C)
                        } else {
                            a(".DOP_ThumbnailGallery_Thumbnails", az).width(a(".DOP_ThumbnailGallery_Thumbnails", az).width() + aG + (2 * N) + aP + C + A)
                        }
                    }
                    a(".DOP_ThumbnailGallery_Thumbnails", az).append(aV.join(""));
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).css("opacity", parseInt(ao) / 100);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).width(aG + aP + C);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).height(x + aM + aq);
                    a("#DOP_ThumbnailGallery_Thumb_" + aW, az).css("margin-top", aM);
                    a("#DOP_ThumbnailGallery_Thumb_" + aW, az).css("margin-left", C);
                    a("#DOP_ThumbnailGallery_Thumb_" + aW, az).css("margin-bottom", aq);
                    a("#DOP_ThumbnailGallery_Thumb_" + aW, az).css("margin-right", aP);
                    if (W == "top" || W == "bottom") {
                        a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).height(x + aM + aq)
                    } else {
                        a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).width(aG + aP + C)
                    }
                    if (W == "top" || W == "bottom") {
                        a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).css("float", "left")
                    }
                    if (aW != "1") {
                        if (W == "top" || W == "bottom") {
                            a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).css("margin-left", A)
                        } else {
                            a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).css("margin-top", A)
                        }
                    }
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).css("background-color", "#" + aL);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).css("border-width", N);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).css("border-color", "#" + g);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aW, az).addClass("DOP_ThumbnailGallery_ThumbLoader");
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aW + ".DOP_ThumbnailGallery_ThumbLoader", az).css("background-image", "url(" + J + ")");
                    if (W == "top" || W == "bottom") {
                        if (a(".DOP_ThumbnailGallery_Thumbnails", az).width() <= a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).width()) {
                            aJ.hCenterItem(a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az), a(".DOP_ThumbnailGallery_Thumbnails", az), a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).width())
                        } else {
                            if (parseInt(a(".DOP_ThumbnailGallery_Thumbnails", az).css("margin-left")) >= 0) {
                                a(".DOP_ThumbnailGallery_Thumbnails", az).css("margin-left", 0)
                            }
                        }
                    } else {
                        if (a(".DOP_ThumbnailGallery_Thumbnails", az).height() <= a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).height()) {
                            aJ.vCenterItem(a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az), a(".DOP_ThumbnailGallery_Thumbnails", az), a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).height())
                        } else {
                            if (parseInt(a(".DOP_ThumbnailGallery_Thumbnails", az).css("margin-top")) >= 0) {
                                a(".DOP_ThumbnailGallery_Thumbnails", az).css("margin-top", 0)
                            }
                        }
                    }
                },
                loadCompleteThumb: function (aV) {
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aV + ".DOP_ThumbnailGallery_ThumbLoader", az).css("background-image", "none");
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aV, az).removeClass("DOP_ThumbnailGallery_ThumbLoader");
                    aJ.resizeItem2(a("#DOP_ThumbnailGallery_Thumb_" + aV, az), a("#DOP_ThumbnailGallery_Thumb_" + aV, az).children(), aG, x, a("img", "#DOP_ThumbnailGallery_Thumb_" + aV, az).width(), a("img", "#DOP_ThumbnailGallery_Thumb_" + aV, az).height(), "center");
                    a("img", "#DOP_ThumbnailGallery_Thumb_" + aV, az).css("opacity", 0);
                    a("img", "#DOP_ThumbnailGallery_Thumb_" + aV, az).stop(true, true).animate({
                        opacity: "1"
                    }, 600);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aV, az).hover(function () {
                        if (b != aV) {
                            a(this).stop(true, true).animate({
                                opacity: parseInt(ax) / 100
                            }, 300);
                            a(this).css("background-color", "#" + av);
                            a(this).css("border-color", "#" + Z)
                        }
                        if (aK == "true") {
                            aH.showTooltip(aV - 1)
                        }
                    }, function () {
                        if (b != aV) {
                            a(this).stop(true, true).animate({
                                opacity: parseInt(ao) / 100
                            }, 300);
                            a(this).css("background-color", "#" + aL);
                            a(this).css("border-color", "#" + g)
                        }
                        if (aK == "true") {
                            a(".DOP_ThumbnailGallery_Tooltip", az).css("display", "none")
                        }
                    });
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + aV, az).click(function () {
                        if (h) {
                            aH.loadImage(aV)
                        }
                    })
                },
                rpThumbnails: function () {
                    if (W == "top" || W == "bottom") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).width(a(".DOP_ThumbnailGallery_Container", az).width());
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).height(x + (2 * N) + aM + aq + B + an);
                        a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).width(a(".DOP_ThumbnailGallery_Container", az).width() - E - D);
                        a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).height(x + (2 * N) + aM + aq);
                        if (a(".DOP_ThumbnailGallery_Thumbnails", az).width() <= a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).width()) {
                            aJ.hCenterItem(a(".DOP_ThumbnailGallery_ThumbnailsContainer", az), a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az), a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).width())
                        } else {
                            if (parseInt(a(".DOP_ThumbnailGallery_Thumbnails", az).css("margin-left")) >= 0) {
                                a(".DOP_ThumbnailGallery_Thumbnails", az).css("margin-left", 0)
                            }
                        }
                    } else {
                        if (W == "right" || W == "left") {
                            a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).width(aG + (2 * N) + aP + C + E + D);
                            a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).height(a(".DOP_ThumbnailGallery_Container", az).height());
                            a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).width(aG + (2 * N) + aP + C);
                            a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).height(a(".DOP_ThumbnailGallery_Container", az).height() - B - an);
                            if (a(".DOP_ThumbnailGallery_Thumbnails", az).height() <= a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).height()) {
                                aJ.vCenterItem(a(".DOP_ThumbnailGallery_ThumbnailsContainer", az), a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az), a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).height())
                            } else {
                                if (parseInt(a(".DOP_ThumbnailGallery_Thumbnails", az).css("margin-top")) >= 0) {
                                    a(".DOP_ThumbnailGallery_Thumbnails", az).css("margin-top", 0)
                                }
                            }
                        }
                    }
                    a(".DOP_ThumbnailGallery_ThumbnailsBg", az).width(a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).width());
                    a(".DOP_ThumbnailGallery_ThumbnailsBg", az).height(a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).height());
                    if (W == "top") {
                        aJ.topItem(a(".DOP_ThumbnailGallery_Container", az), a(".DOP_ThumbnailGallery_ThumbnailsContainer", az), a(".DOP_ThumbnailGallery_Container", az).height())
                    } else {
                        if (W == "right") {
                            aJ.rightItem(a(".DOP_ThumbnailGallery_Container", az), a(".DOP_ThumbnailGallery_ThumbnailsContainer", az), a(".DOP_ThumbnailGallery_Container", az).width())
                        } else {
                            if (W == "left") {
                                aJ.leftItem(a(".DOP_ThumbnailGallery_Container", az), a(".DOP_ThumbnailGallery_ThumbnailsContainer", az), a(".DOP_ThumbnailGallery_Container", az).width())
                            } else {
                                aJ.bottomItem(a(".DOP_ThumbnailGallery_Container", az), a(".DOP_ThumbnailGallery_ThumbnailsContainer", az), a(".DOP_ThumbnailGallery_Container", az).height())
                            }
                        }
                    }
                },
                moveThumbnails: function () {
                    if (aJ.isTouchDevice()) {
                        a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).css("overflow", "scroll")
                    } else {
                        a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).mousemove(function (aX) {
                            var aZ, aW, aY, aV;
                            if ((W == "top" || W == "bottom") && a(".DOP_ThumbnailGallery_Thumbnails", az).width() > a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).width()) {
                                aZ = aG + aP + C + 2 * N;
                                aY = aX.clientX - a(this).offset().left + parseInt(a(this).css("margin-left")) + a(document).scrollLeft();
                                aV = 0 - (aY - aZ - A) * (a(".DOP_ThumbnailGallery_Thumbnails", az).width() - a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).width()) / (a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).width() - 2 * aZ);
                                if (aV < (-1) * (a(".DOP_ThumbnailGallery_Thumbnails", az).width() - a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).width())) {
                                    aV = (-1) * (a(".DOP_ThumbnailGallery_Thumbnails", az).width() - a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).width())
                                }
                                if (aV > 0) {
                                    aV = 0
                                }
                                a(".DOP_ThumbnailGallery_Thumbnails", az).css("margin-left", aV)
                            }
                            if ((W == "right" || W == "left") && a(".DOP_ThumbnailGallery_Thumbnails", az).height() > a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).height()) {
                                aW = x + aM + aq + 2 * N;
                                aY = aX.clientY - a(this).offset().top + parseInt(a(this).css("margin-top")) + a(document).scrollTop();
                                aV = 0 - (aY - aW - A) * (a(".DOP_ThumbnailGallery_Thumbnails", az).height() - a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).height()) / (a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).height() - 2 * aW);
                                if (aV < (-1) * (a(".DOP_ThumbnailGallery_Thumbnails", az).height() - a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).height())) {
                                    aV = (-1) * (a(".DOP_ThumbnailGallery_Thumbnails", az).height() - a(".DOP_ThumbnailGallery_ThumbnailsWrapper", az).height())
                                }
                                if (aV > 0) {
                                    aV = 0
                                }
                                a(".DOP_ThumbnailGallery_Thumbnails", az).css("margin-top", aV)
                            }
                        })
                    }
                },
                initImage: function () {
                    if (aB != "css") {
                        a(".DOP_ThumbnailGallery_ImageBg", az).css("background-color", "#" + aB)
                    }
                    a(".DOP_ThumbnailGallery_ImageBg", az).css("opacity", parseInt(o) / 100);
                    aH.rpImage();
                    aH.loadImage(1)
                },
                loadImage: function (aV) {
                    clearInterval(f);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + b, az).stop(true, true).animate({
                        opacity: parseInt(ao) / 100
                    }, 300);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + b, az).css("background-color", "#" + aL);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + b, az).css("border-color", "#" + g);
                    b = aV;
                    h = false;
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + b, az).stop(true, true).animate({
                        opacity: parseInt(ac) / 100
                    }, 300);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + b, az).css("background-color", "#" + aR);
                    a("#DOP_ThumbnailGallery_ThumbContainer_" + b, az).css("border-color", "#" + d);
                    a(".DOP_ThumbnailGallery_NavigationLeft", az).css("display", "none");
                    a(".DOP_ThumbnailGallery_NavigationRight", az).css("display", "none");
                    aH.hideCaption();
                    a(".DOP_ThumbnailGallery_Image", az).stop(true, true).animate({
                        opacity: "0"
                    }, parseInt(U) / 2, function () {
                        a(".DOP_ThumbnailGallery_Image", az).html("");
                        a(".DOP_ThumbnailGallery_ImageBg", az).addClass("DOP_ThumbnailGallery_ImageLoader");
                        a(".DOP_ThumbnailGallery_ImageLoader", az).css("background-image", "url(" + L + ")");
                        var aW = new Image();
                        a(aW).load(function () {
                            h = true;
                            a(".DOP_ThumbnailGallery_CaptionTitle", az).html(Y[aV - 1]);
                            a(".DOP_ThumbnailGallery_CaptionText", az).html(w[aV - 1]);
                            a(".DOP_ThumbnailGallery_Image", az).removeClass("DOP_ThumbnailGallery_BigLoader");
                            a(".DOP_ThumbnailGallery_Image", az).html(this);
                            a(".DOP_ThumbnailGallery_ImageLoader", az).css("background-image", "none");
                            a(".DOP_ThumbnailGallery_ImageBg", az).removeClass("DOP_ThumbnailGallery_ImageLoader");
                            q = a(this).width();
                            y = a(this).height();
                            a(".DOP_ThumbnailGallery_Image", az).css("opacity", 0);
                            if (V == "fit") {
                                var a0 = 0,
                                    a3 = 0,
                                    a4 = 0,
                                    aY = 0,
                                    aZ = q,
                                    a2 = y,
                                    aX = a(".DOP_ThumbnailGallery_ImageWrapper", az).width() - aQ - G,
                                    a1 = a(".DOP_ThumbnailGallery_ImageWrapper", az).height() - R - I;
                                if (aZ <= aX && a2 <= a1) {
                                    a0 = aZ;
                                    a3 = a2
                                } else {
                                    a3 = a1;
                                    a0 = (aZ * a1) / a2;
                                    if (a0 > aX) {
                                        a0 = aX;
                                        a3 = (a2 * aX) / aZ
                                    }
                                }
                                a4 = (a(".DOP_ThumbnailGallery_ImageWrapper", az).width() - a0) / 2;
                                aY = (a(".DOP_ThumbnailGallery_ImageWrapper", az).height() - a3) / 2;
                                a(".DOP_ThumbnailGallery_ImageBg", az).stop(true, true).animate({
                                    width: a0,
                                    height: a3,
                                    "margin-left": a4,
                                    "margin-top": aY
                                }, parseInt(U) / 2, function () {
                                    aH.rpImage();
                                    aH.showCaption();
                                    a(".DOP_ThumbnailGallery_Image", az).stop(true, true).animate({
                                        opacity: "1"
                                    }, parseInt(U) / 2, function () {
                                        if (!aF) {
                                            a(".DOP_ThumbnailGallery_NavigationLeft", az).css("display", "block");
                                            a(".DOP_ThumbnailGallery_NavigationRight", az).css("display", "block")
                                        }
                                        if (z == "true") {
                                            if ((aE == "true" && b == ar) || b < ar) {
                                                f = setInterval(aH.nextImage, parseInt(ad))
                                            }
                                        }
                                    })
                                })
                            } else {
                                aH.rpImage();
                                a(".DOP_ThumbnailGallery_Image", az).stop(true, true).animate({
                                    opacity: "1"
                                }, parseInt(U), function () {
                                    if (!aF) {
                                        a(".DOP_ThumbnailGallery_NavigationLeft", az).css("display", "block");
                                        a(".DOP_ThumbnailGallery_NavigationRight", az).css("display", "block")
                                    }
                                    if (z == "true") {
                                        if ((aE == "true" && b == ar) || b < ar) {
                                            f = setInterval(aH.nextImage, parseInt(ad))
                                        }
                                    }
                                })
                            }
                        }).attr("src", k[aV - 1])
                    })
                },
                rpImage: function () {
                    a(".DOP_ThumbnailGallery_ImageWrapper", az).width(a(".DOP_ThumbnailGallery_Container", az).width());
                    a(".DOP_ThumbnailGallery_ImageWrapper", az).height(a(".DOP_ThumbnailGallery_Container", az).height());
                    if (au == "false") {
                        if (W == "top" || W == "bottom") {
                            a(".DOP_ThumbnailGallery_ImageWrapper", az).height(a(".DOP_ThumbnailGallery_Container", az).height() - a(".DOP_ThumbnailGallery_ThumbnailsContainer").height())
                        } else {
                            a(".DOP_ThumbnailGallery_ImageWrapper", az).width(a(".DOP_ThumbnailGallery_Container", az).width() - a(".DOP_ThumbnailGallery_ThumbnailsContainer").width())
                        }
                        if (W == "top") {
                            a(".DOP_ThumbnailGallery_ImageWrapper", az).css("margin-top", a(".DOP_ThumbnailGallery_ThumbnailsContainer").height())
                        }
                        if (W == "left") {
                            a(".DOP_ThumbnailGallery_ImageWrapper", az).css("margin-left", a(".DOP_ThumbnailGallery_ThumbnailsContainer").width())
                        }
                    }
                    if (V == "fit") {
                        var aY = 0,
                            a1 = 0,
                            a2 = 0,
                            aW = 0,
                            aX = q,
                            a0 = y,
                            aV = a(".DOP_ThumbnailGallery_ImageWrapper", az).width() - aQ - G,
                            aZ = a(".DOP_ThumbnailGallery_ImageWrapper", az).height() - R - I;
                        if (q == 0 || y == 0) {
                            aX = 200;
                            a0 = 200
                        }
                        if (aX <= aV && a0 <= aZ) {
                            aY = aX;
                            a1 = a0
                        } else {
                            a1 = aZ;
                            aY = (aX * aZ) / a0;
                            if (aY > aV) {
                                aY = aV;
                                a1 = (a0 * aV) / aX
                            }
                        }
                        a(".DOP_ThumbnailGallery_ImageBg", az).width(aY);
                        a(".DOP_ThumbnailGallery_ImageBg", az).height(a1);
                        a(".DOP_ThumbnailGallery_Image", az).width(aY - v - aA);
                        a(".DOP_ThumbnailGallery_Image", az).height(a1 - M - aC);
                        a(".DOP_ThumbnailGallery_Image", az).children().width(aY - v - aA);
                        a(".DOP_ThumbnailGallery_Image", az).children().height(a1 - M - aC);
                        aJ.centerItem(a(".DOP_ThumbnailGallery_ImageWrapper", az), a(".DOP_ThumbnailGallery_ImageBg", az), a(".DOP_ThumbnailGallery_ImageWrapper", az).width(), a(".DOP_ThumbnailGallery_ImageWrapper", az).height());
                        aJ.centerItem(a(".DOP_ThumbnailGallery_ImageWrapper", az), a(".DOP_ThumbnailGallery_Image", az), a(".DOP_ThumbnailGallery_ImageWrapper", az).width(), a(".DOP_ThumbnailGallery_ImageWrapper", az).height())
                    } else {
                        a(".DOP_ThumbnailGallery_ImageBg", az).width(a(".DOP_ThumbnailGallery_ImageWrapper", az).width());
                        a(".DOP_ThumbnailGallery_ImageBg", az).height(a(".DOP_ThumbnailGallery_ImageWrapper", az).height());
                        aJ.resizeItem2(a(".DOP_ThumbnailGallery_ImageWrapper", az), a(".DOP_ThumbnailGallery_Image", az).children(), a(".DOP_ThumbnailGallery_ImageWrapper", az).width(), a(".DOP_ThumbnailGallery_ImageWrapper", az).height(), q, y, "center")
                    }
                    aH.rpCaption();
                    aH.rpNavigation()
                },
                initNavigation: function () {
                    a(".DOP_ThumbnailGallery_NavigationLeft", az).css("background-color", "#" + aj);
                    a(".DOP_ThumbnailGallery_NavigationRight", az).css("background-color", "#" + aj);
                    a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-top-color", "#" + aj);
                    a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-bottom-color", "#" + aj);
                    a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-left-color", "#" + aj);
                    a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-top-color", "#" + aj);
                    a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-bottom-color", "#" + aj);
                    a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-right-color", "#" + aj);
                    a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-right-color", "#" + P);
                    a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-left-color", "#" + P);
                    a(".DOP_ThumbnailGallery_NavigationLeft").css("opacity", parseInt(aU) / 100);
                    a(".DOP_ThumbnailGallery_NavigationRight").css("opacity", parseInt(aU) / 100);
                    a(".DOP_ThumbnailGallery_NavigationLeft", az).hover(function () {
                        a(".DOP_ThumbnailGallery_NavigationLeft", az).css("background-color", "#" + ag);
                        a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-top-color", "#" + ag);
                        a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-bottom-color", "#" + ag);
                        a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-left-color", "#" + ag);
                        a(".DOP_ThumbnailGallery_NavigationLeft", az).css("opacity", parseInt(ae) / 100);
                        a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-right-color", "#" + H)
                    }, function () {
                        a(".DOP_ThumbnailGallery_NavigationLeft", az).css("background-color", "#" + aj);
                        a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-top-color", "#" + aj);
                        a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-bottom-color", "#" + aj);
                        a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-left-color", "#" + aj);
                        a(".DOP_ThumbnailGallery_NavigationLeft", az).css("opacity", parseInt(aU) / 100);
                        a(".DOP_ThumbnailGallery_NavigationLeft .Icon", az).css("border-right-color", "#" + P)
                    });
                    a(".DOP_ThumbnailGallery_NavigationRight", az).hover(function () {
                        a(".DOP_ThumbnailGallery_NavigationRight", az).css("background-color", "#" + ag);
                        a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-top-color", "#" + ag);
                        a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-bottom-color", "#" + ag);
                        a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-right-color", "#" + ag);
                        a(".DOP_ThumbnailGallery_NavigationRight", az).css("opacity", parseInt(ae) / 100);
                        a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-left-color", "#" + H)
                    }, function () {
                        a(".DOP_ThumbnailGallery_NavigationRight", az).css("background-color", "#" + aj);
                        a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-top-color", "#" + aj);
                        a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-bottom-color", "#" + aj);
                        a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-right-color", "#" + aj);
                        a(".DOP_ThumbnailGallery_NavigationRight", az).css("opacity", parseInt(aU) / 100);
                        a(".DOP_ThumbnailGallery_NavigationRight .Icon", az).css("border-left-color", "#" + P)
                    });
                    a(".DOP_ThumbnailGallery_NavigationLeft", az).click(function () {
                        if (h) {
                            aH.previousImage()
                        }
                    });
                    a(".DOP_ThumbnailGallery_NavigationRight", az).click(function () {
                        if (h) {
                            aH.nextImage()
                        }
                    })
                },
                rpNavigation: function () {
                    a(".DOP_ThumbnailGallery_NavigationLeft", az).css("margin-left", parseFloat(a(".DOP_ThumbnailGallery_ImageWrapper", az).css("margin-left")) + parseInt(a(".DOP_ThumbnailGallery_Image", az).css("margin-left")));
                    a(".DOP_ThumbnailGallery_NavigationRight", az).css("margin-left", parseFloat(a(".DOP_ThumbnailGallery_ImageWrapper", az).css("margin-left")) + parseInt(a(".DOP_ThumbnailGallery_Image", az).css("margin-left")) + (a(".DOP_ThumbnailGallery_Image", az).width() - a(".DOP_ThumbnailGallery_NavigationRight", az).width()));
                    a(".DOP_ThumbnailGallery_NavigationLeft", az).css("margin-top", parseFloat(a(".DOP_ThumbnailGallery_ImageWrapper", az).css("margin-top")) + parseInt(a(".DOP_ThumbnailGallery_Image", az).css("margin-top")) + (a(".DOP_ThumbnailGallery_Image", az).height() - a(".DOP_ThumbnailGallery_NavigationLeft", az).height()) / 2);
                    a(".DOP_ThumbnailGallery_NavigationRight", az).css("margin-top", parseFloat(a(".DOP_ThumbnailGallery_ImageWrapper", az).css("margin-top")) + parseInt(a(".DOP_ThumbnailGallery_Image", az).css("margin-top")) + (a(".DOP_ThumbnailGallery_Image", az).height() - a(".DOP_ThumbnailGallery_NavigationRight", az).height()) / 2)
                },
                nextImage: function () {
                    if (b == ar) {
                        aH.loadImage(1)
                    } else {
                        aH.loadImage(b + 1)
                    }
                },
                previousImage: function () {
                    if (b == 1) {
                        aH.loadImage(ar)
                    } else {
                        aH.loadImage(b - 1)
                    }
                },
                initTooltip: function () {
                    a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).mousemove(function (aV) {
                        var aX = aV.clientX - a(this).offset().left + parseInt(a(this).css("margin-left")) + a(document).scrollLeft();
                        var aW = aV.clientY - a(this).offset().top + parseInt(a(this).css("margin-top")) + a(document).scrollTop();
                        a(".DOP_ThumbnailGallery_Tooltip", az).css("margin-left", aX - 10);
                        a(".DOP_ThumbnailGallery_Tooltip", az).css("margin-top", aW - a(".DOP_ThumbnailGallery_Tooltip", az).height() - 15)
                    })
                },
                showTooltip: function (aW) {
                    var aV = new Array();
                    aV.push(Y[aW]);
                    aV.push('<div class="DOP_ThumbnailGallery_Tooltip_ArrowBorder"></div>');
                    aV.push('<div class="DOP_ThumbnailGallery_Tooltip_Arrow"></div>');
                    a(".DOP_ThumbnailGallery_Tooltip", az).html(aV.join(""));
                    if (aw != "css") {
                        a(".DOP_ThumbnailGallery_Tooltip", az).css("background-color", "#" + aw);
                        a(".DOP_ThumbnailGallery_Tooltip_Arrow", az).css("border-top-color", "#" + aw)
                    }
                    if (l != "css") {
                        a(".DOP_ThumbnailGallery_Tooltip", az).css("border-color", "#" + l);
                        a(".DOP_ThumbnailGallery_Tooltip_ArrowBorder", az).css("border-top-color", "#" + l)
                    }
                    if (al != "css") {
                        a(".DOP_ThumbnailGallery_Tooltip", az).css("color", "#" + al)
                    }
                    if (Y[aW] != "") {
                        a(".DOP_ThumbnailGallery_Tooltip", az).css("display", "block")
                    }
                },
                initCaption: function () {
                    a(".DOP_ThumbnailGallery_Caption", az).css("opacity", 0);
                    if (F != "css") {
                        a(".DOP_ThumbnailGallery_CaptionBg", az).css("background-color", "#" + F)
                    }
                    a(".DOP_ThumbnailGallery_CaptionBg", az).css("opacity", parseInt(ay) / 100);
                    if (e != "css") {
                        a(".DOP_ThumbnailGallery_CaptionTitle", az).css("color", "#" + e)
                    }
                    if (p != "css") {
                        a(".DOP_ThumbnailGallery_CaptionText", az).css("color", "#" + p)
                    }
                },
                showCaption: function () {
                    if (h && a(".DOP_ThumbnailGallery_CaptionTitle", az).html() != "" && a(".DOP_ThumbnailGallery_CaptionText", az).html() != "") {
                        a(".DOP_ThumbnailGallery_Caption", az).css("display", "block");
                        a(".DOP_ThumbnailGallery_Caption", az).stop(true, true).animate({
                            opacity: "1"
                        }, 600, function () {
                            a(".DOP_ThumbnailGallery_CaptionTextContainer", az).height(a(".DOP_ThumbnailGallery_CaptionTextWrapper", az).height() - a(".DOP_ThumbnailGallery_CaptionTitle", az).height() - 5);
                            if (aJ.isTouchDevice()) {
                                a(".DOP_ThumbnailGallery_CaptionTextContainer", az).css("overflow", "scroll")
                            } else {
                                a(".DOP_ThumbnailGallery_CaptionTextContainer", az).jScrollPane();
                                if (aO != "css") {
                                    a(".jspDrag", az).css("background-color", "#" + aO)
                                }
                                if (Q != "css") {
                                    a(".jspTrack", az).css("background-color", "#" + Q)
                                }
                            }
                        })
                    }
                },
                hideCaption: function () {
                    a(".DOP_ThumbnailGallery_Caption", az).stop(true, true).animate({
                        opacity: "0"
                    }, 600, function () {
                        a(this).css("display", "none")
                    })
                },
                rpCaption: function () {
                    if (n == "auto") {
                        a(".DOP_ThumbnailGallery_Caption", az).width(a(".DOP_ThumbnailGallery_Image", az).width())
                    } else {
                        a(".DOP_ThumbnailGallery_Caption", az).width(parseInt(n) + aD + ab)
                    }
                    if (j == "auto") {
                        a(".DOP_ThumbnailGallery_Caption", az).height(a(".DOP_ThumbnailGallery_Image", az).height())
                    } else {
                        a(".DOP_ThumbnailGallery_Caption", az).height(parseInt(j) + am + aT)
                    }
                    if (at == "top") {
                        aJ.hCenterItem(a(".DOP_ThumbnailGallery_ImageWrapper", az), a(".DOP_ThumbnailGallery_Caption", az), a(".DOP_ThumbnailGallery_ImageWrapper", az).width());
                        a(".DOP_ThumbnailGallery_Caption", az).css("margin-top", parseInt(a(".DOP_ThumbnailGallery_Image", az).css("margin-top")))
                    } else {
                        if (at == "right") {
                            aJ.vCenterItem(a(".DOP_ThumbnailGallery_ImageWrapper", az), a(".DOP_ThumbnailGallery_Caption", az), a(".DOP_ThumbnailGallery_ImageWrapper", az).height());
                            a(".DOP_ThumbnailGallery_Caption", az).css("margin-left", parseInt(a(".DOP_ThumbnailGallery_Image", az).css("margin-left")) + a(".DOP_ThumbnailGallery_Image", az).width() - a(".DOP_ThumbnailGallery_Caption", az).width())
                        } else {
                            if (at == "left") {
                                aJ.vCenterItem(a(".DOP_ThumbnailGallery_ImageWrapper", az), a(".DOP_ThumbnailGallery_Caption", az), a(".DOP_ThumbnailGallery_ImageWrapper", az).height());
                                a(".DOP_ThumbnailGallery_Caption", az).css("margin-left", parseInt(a(".DOP_ThumbnailGallery_Image", az).css("margin-left")))
                            } else {
                                aJ.hCenterItem(a(".DOP_ThumbnailGallery_ImageWrapper", az), a(".DOP_ThumbnailGallery_Caption", az), a(".DOP_ThumbnailGallery_ImageWrapper", az).width());
                                a(".DOP_ThumbnailGallery_Caption", az).css("margin-top", parseInt(a(".DOP_ThumbnailGallery_Image", az).css("margin-top")) + a(".DOP_ThumbnailGallery_Image", az).height() - a(".DOP_ThumbnailGallery_Caption", az).height())
                            }
                        }
                    }
                    a(".DOP_ThumbnailGallery_CaptionBg", az).width(a(".DOP_ThumbnailGallery_Caption", az).width() - aD - ab);
                    a(".DOP_ThumbnailGallery_CaptionBg", az).height(a(".DOP_ThumbnailGallery_Caption", az).height() - am - aT);
                    a(".DOP_ThumbnailGallery_CaptionBg", az).css("margin-top", am);
                    a(".DOP_ThumbnailGallery_CaptionBg", az).css("margin-left", aD);
                    a(".DOP_ThumbnailGallery_CaptionTextWrapper", az).css("margin-top", am + u);
                    a(".DOP_ThumbnailGallery_CaptionTextWrapper", az).css("margin-left", aD + T);
                    a(".DOP_ThumbnailGallery_CaptionTextWrapper", az).width(a(".DOP_ThumbnailGallery_CaptionBg", az).width() - T - S);
                    a(".DOP_ThumbnailGallery_CaptionTextWrapper", az).height(a(".DOP_ThumbnailGallery_CaptionBg", az).height() - u - i);
                    a(".DOP_ThumbnailGallery_CaptionTextContainer", az).height(a(".DOP_ThumbnailGallery_CaptionTextWrapper", az).height() - a(".DOP_ThumbnailGallery_CaptionTitle", az).height() - 5);
                    if (aJ.isTouchDevice()) {
                        a(".DOP_ThumbnailGallery_CaptionTextContainer", az).css("overflow", "scroll")
                    } else {
                        a(".DOP_ThumbnailGallery_CaptionTextContainer", az).jScrollPane();
                        if (aO != "css") {
                            a(".jspDrag", az).css("background-color", "#" + aO)
                        }
                        if (Q != "css") {
                            a(".jspTrack", az).css("background-color", "#" + Q)
                        }
                    }
                },
                initAutoHide: function () {
                    ap = setInterval(aH.hideItems, parseInt(s));
                    a(".DOP_ThumbnailGallery_Container", az).hover(function () {
                        aH.showItems()
                    }, function () {
                        ap = setInterval(aH.hideItems, parseInt(s))
                    })
                },
                showItems: function () {
                    clearInterval(ap);
                    aF = false;
                    if (h) {
                        a(".DOP_ThumbnailGallery_NavigationLeft", az).css("display", "block");
                        a(".DOP_ThumbnailGallery_NavigationRight", az).css("display", "block")
                    }
                    if (W == "top") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-top": 0
                        }, 600)
                    }
                    if (W == "right") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-left": a(".DOP_ThumbnailGallery_Container", az).width() - a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).width()
                        }, 600)
                    }
                    if (W == "bottom") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-top": a(".DOP_ThumbnailGallery_Container", az).height() - a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).height()
                        }, 600)
                    }
                    if (W == "left") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-left": 0
                        }, 600)
                    }
                    aH.showCaption()
                },
                hideItems: function () {
                    clearInterval(ap);
                    aF = true;
                    a(".DOP_ThumbnailGallery_NavigationLeft", az).css("display", "none");
                    a(".DOP_ThumbnailGallery_NavigationRight", az).css("display", "none");
                    if (W == "top") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-top": 0 - a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).height()
                        }, 600)
                    }
                    if (W == "right") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-left": a(".DOP_ThumbnailGallery_Container", az).width()
                        }, 600)
                    }
                    if (W == "bottom") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-top": a(".DOP_ThumbnailGallery_Container", az).height()
                        }, 600)
                    }
                    if (W == "left") {
                        a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).stop(true, true).animate({
                            "margin-left": 0 - a(".DOP_ThumbnailGallery_ThumbnailsContainer", az).width()
                        }, 600)
                    }
                    aH.hideCaption()
                }
            },
            aJ = {
                resizeItem: function (a2, aX, aZ, aV, aW, a0, a1) {
                    var aY = 0,
                        a3 = 0;
                    if (aW <= aZ && a0 <= aV) {
                        aY = aW;
                        a3 = a0
                    } else {
                        a3 = aV;
                        aY = (aW * aV) / a0;
                        if (aY > aZ) {
                            aY = aZ;
                            a3 = (a0 * aZ) / aW
                        }
                    }
                    aX.width(aY);
                    aX.height(a3);
                    if (a1.toLowerCase() == "top") {
                        aJ.topItem(a2, aX, aV)
                    }
                    if (a1.toLowerCase() == "bottom") {
                        aJ.bottomItem(a2, aX, aV)
                    }
                    if (a1.toLowerCase() == "left") {
                        aJ.leftItem(a2, aX, aZ)
                    }
                    if (a1.toLowerCase() == "right") {
                        aJ.rightItem(a2, aX, aZ)
                    }
                    if (a1.toLowerCase() == "horizontal-center") {
                        aJ.hCenterItem(a2, aX, aZ)
                    }
                    if (a1.toLowerCase() == "vertical-center") {
                        aJ.vCenterItem(a2, aX, aV)
                    }
                    if (a1.toLowerCase() == "center") {
                        aJ.centerItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "top-left") {
                        aJ.tlItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "top-center") {
                        aJ.tcItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "top-right") {
                        aJ.trItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "middle-left") {
                        aJ.mlItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "middle-right") {
                        aJ.mrItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "bottom-left") {
                        aJ.blItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "bottom-center") {
                        aJ.bcItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "bottom-right") {
                        aJ.brItem(a2, aX, aZ, aV)
                    }
                },
                resizeItem2: function (a2, aX, aZ, aV, aW, a0, a1) {
                    var aY = 0,
                        a3 = 0;
                    a3 = aV;
                    aY = (aW * aV) / a0;
                    if (aY < aZ) {
                        aY = aZ;
                        a3 = (a0 * aZ) / aW
                    }
                    aX.width(aY);
                    aX.height(a3);
                    if (a1.toLowerCase() == "top") {
                        aJ.topItem(a2, aX, aV)
                    }
                    if (a1.toLowerCase() == "bottom") {
                        aJ.bottomItem(a2, aX, aV)
                    }
                    if (a1.toLowerCase() == "left") {
                        aJ.leftItem(a2, aX, aZ)
                    }
                    if (a1.toLowerCase() == "right") {
                        aJ.rightItem(a2, aX, aZ)
                    }
                    if (a1.toLowerCase() == "horizontal-center") {
                        aJ.hCenterItem(a2, aX, aZ)
                    }
                    if (a1.toLowerCase() == "vertical-center") {
                        aJ.vCenterItem(a2, aX, aV)
                    }
                    if (a1.toLowerCase() == "center") {
                        aJ.centerItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "top-left") {
                        aJ.tlItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "top-center") {
                        aJ.tcItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "top-right") {
                        aJ.trItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "middle-left") {
                        aJ.mlItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "middle-right") {
                        aJ.mrItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "bottom-left") {
                        aJ.blItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "bottom-center") {
                        aJ.bcItem(a2, aX, aZ, aV)
                    }
                    if (a1.toLowerCase() == "bottom-right") {
                        aJ.brItem(a2, aX, aZ, aV)
                    }
                },
                topItem: function (aW, aX, aV) {
                    aW.height(aV);
                    aX.css("margin-top", 0)
                },
                bottomItem: function (aW, aX, aV) {
                    aW.height(aV);
                    aX.css("margin-top", aV - aX.height())
                },
                leftItem: function (aW, aX, aV) {
                    aW.width(aV);
                    aX.css("margin-left", 0)
                },
                rightItem: function (aW, aX, aV) {
                    aW.width(aV);
                    aX.css("margin-left", aW.width() - aX.width())
                },
                hCenterItem: function (aW, aX, aV) {
                    aW.width(aV);
                    aX.css("margin-left", (aV - aX.width()) / 2)
                },
                vCenterItem: function (aW, aX, aV) {
                    aW.height(aV);
                    aX.css("margin-top", (aV - aX.height()) / 2)
                },
                centerItem: function (aX, aY, aV, aW) {
                    aJ.hCenterItem(aX, aY, aV);
                    aJ.vCenterItem(aX, aY, aW)
                },
                tlItem: function (aX, aY, aV, aW) {
                    aJ.topItem(aX, aY, aW);
                    aJ.leftItem(aX, aY, aV)
                },
                tcItem: function (aX, aY, aV, aW) {
                    aJ.topItem(aX, aY, aW);
                    aJ.hCenterItem(aX, aY, aV)
                },
                trItem: function (aX, aY, aV, aW) {
                    aJ.topItem(aX, aY, aW);
                    aJ.rightItem(aX, aY, aV)
                },
                mlItem: function (aX, aY, aV, aW) {
                    aJ.vCenterItem(aX, aY, aW);
                    aJ.leftItem(aX, aY, aV)
                },
                mrItem: function (aX, aY, aV, aW) {
                    aJ.vCenterItem(aX, aY, aW);
                    aJ.rightItem(aX, aY, aV)
                },
                blItem: function (aX, aY, aV, aW) {
                    aJ.bottomItem(aX, aY, aW);
                    aJ.leftItem(aX, aY, aV)
                },
                bcItem: function (aX, aY, aV, aW) {
                    aJ.bottomItem(aX, aY, aW);
                    aJ.hCenterItem(aX, aY, aV)
                },
                brItem: function (aX, aY, aV, aW) {
                    aJ.bottomItem(aX, aY, aW);
                    aJ.rightItem(aX, aY, aV)
                },
                randomize: function (aV) {
                    aV.sort(function () {
                        return 0.5 - Math.random()
                    });
                    return aV
                },
                randomString: function (aZ) {
                    var aX = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",
                        aY = "";
                    for (var aW = 0; aW < aZ; aW++) {
                        var aV = Math.floor(Math.random() * aX.length);
                        aY += aX.substring(aV, aV + 1)
                    }
                    return aY
                },
                isIE8Browser: function () {
                    var aW = false,
                        aV = navigator.userAgent.toLowerCase();
                    if (aV.indexOf("msie 8") != -1) {
                        aW = true
                    }
                    return aW
                },
                isTouchDevice: function () {
                    var aV = false,
                        aW = navigator.userAgent.toLowerCase();
                    if (aW.indexOf("android") != -1) {
                        aV = true
                    }
                    if (aW.indexOf("blackberry") != -1) {
                        aV = true
                    }
                    if (aW.indexOf("ipad") != -1) {
                        aV = true
                    }
                    if (aW.indexOf("iphone") != -1) {
                        aV = true
                    }
                    if (aW.indexOf("ipod") != -1) {
                        aV = true
                    }
                    if (aW.indexOf("palm") != -1) {
                        aV = true
                    }
                    if (aW.indexOf("series60") != -1) {
                        aV = true
                    }
                    if (aW.indexOf("symbian") != -1) {
                        aV = true
                    }
                    if (aW.indexOf("windows ce") != -1) {
                        aV = true
                    }
                    return aV
                }
            };
        return aH.init.apply(this)
    }
})(jQuery);
