jQuery(document).ready(function () {
    jQuery("#send_message").click(function (g) {
        g.preventDefault();
        var c = false;
        var b = jQuery("#name").val();
        var a = jQuery("#email").val();
        var d = jQuery("#subject").val();
        var f = jQuery("#message").val();
        if (b.length == 0) {
            var c = true;
            jQuery("#name_error").fadeIn(500)
        } else {
            jQuery("#name_error").fadeOut(500)
        }
        if (a.length == 0 || a.indexOf("@") == "-1") {
            var c = true;
            jQuery("#email_error").fadeIn(500)
        } else {
            jQuery("#email_error").fadeOut(500)
        }
        if (d.length == 0) {
            var c = true;
            jQuery("#subject_error").fadeIn(500)
        } else {
            jQuery("#subject_error").fadeOut(500)
        }
        if (f.length == 0) {
            var c = true;
            jQuery("#message_error").fadeIn(500)
        } else {
            jQuery("#message_error").fadeOut(500)
        }
        if (c == false) {
            jQuery("#send_message").attr({
                disabled: "true",
                value: "Sending..."
            });
            jQuery.post("http://dev.waldhaus-basel.ch/send_email.php", jQuery("#contact_form").serialize(), function (e) {
                if (e == "sent") {
                    jQuery("#cf_submit_p").remove();
                    jQuery("#mail_success").fadeIn(500)
                } else {
                    jQuery("#mail_fail").fadeIn(500);
                    jQuery("#send_message").removeAttr("disabled").attr("value", "Send The Message")
                }
            })
        }
    })
});
jQuery.fn.fadeIn = function (a, b) {
    return this.animate({
        opacity: "show"
    }, a, function () {
        if (jQuery.browser.msie) {
            this.style.removeAttribute("filter")
        }
        if (jQuery.isFunction(b)) {
            b()
        }
    })
};
jQuery.fn.fadeOut = function (a, b) {
    return this.animate({
        opacity: "hide"
    }, a, function () {
        if (jQuery.browser.msie) {
            this.style.removeAttribute("filter")
        }
        if (jQuery.isFunction(b)) {
            b()
        }
    })
};
jQuery.fn.fadeTo = function (a, c, b) {
    return this.animate({
        opacity: c
    }, a, function () {
        if (c == 1 && jQuery.browser.msie) {
            this.style.removeAttribute("filter")
        }
        if (jQuery.isFunction(b)) {
            b()
        }
    })
};
eval(function (h, b, i, d, g, f) {
    g = function (a) {
        return (a < b ? "" : g(parseInt(a / b))) + ((a = a % b) > 35 ? String.fromCharCode(a + 29) : a.toString(36))
    };
    if (!"".replace(/^/, String)) {
        while (i--) {
            f[g(i)] = d[i] || g(i)
        }
        d = [function (a) {
            return f[a]
        }];
        g = function () {
            return "\\w+"
        };
        i = 1
    }
    while (i--) {
        if (d[i]) {
            h = h.replace(new RegExp("\\b" + g(i) + "\\b", "g"), d[i])
        }
    }
    return h
}("h.i['1a']=h.i['z'];h.O(h.i,{y:'D',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});", 62, 74, "||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce".split("|"), 0, {}));
(function (B) {
    var L, T, Q, M, d, m, J, A, O, z, C = 0,
        H = {},
        j = [],
        e = 0,
        G = {},
        y = [],
        f = null,
        o = new Image(),
        i = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,
        k = /[^\.]\.(swf)\s*$/i,
        p, N = 1,
        h = 0,
        t = "",
        b, c, P = false,
        s = B.extend(B("<div/>")[0], {
            prop: 0
        }),
        S = B.browser.msie && B.browser.version < 7 && !window.XMLHttpRequest,
        r = function () {
            T.hide();
            o.onerror = o.onload = null;
            if (f) {
                f.abort()
            }
            L.empty()
        },
        x = function () {
            if (false === H.onError(j, C, H)) {
                T.hide();
                P = false;
                return
            }
            H.titleShow = false;
            H.width = "auto";
            H.height = "auto";
            L.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
            n()
        },
        w = function () {
            var Z = j[C],
                W, Y, ab, aa, V, X;
            r();
            H = B.extend({}, B.fn.fancybox.defaults, (typeof B(Z).data("fancybox") == "undefined" ? H : B(Z).data("fancybox")));
            X = H.onStart(j, C, H);
            if (X === false) {
                P = false;
                return
            } else {
                if (typeof X == "object") {
                    H = B.extend(H, X)
                }
            }
            ab = H.title || (Z.nodeName ? B(Z).attr("title") : Z.title) || "";
            if (Z.nodeName && !H.orig) {
                H.orig = B(Z).children("img:first").length ? B(Z).children("img:first") : B(Z)
            }
            if (ab === "" && H.orig && H.titleFromAlt) {
                ab = H.orig.attr("alt")
            }
            W = H.href || (Z.nodeName ? B(Z).attr("href") : Z.href) || null;
            if ((/^(?:javascript)/i).test(W) || W == "#") {
                W = null
            }
            if (H.type) {
                Y = H.type;
                if (!W) {
                    W = H.content
                }
            } else {
                if (H.content) {
                    Y = "html"
                } else {
                    if (W) {
                        if (W.match(i)) {
                            Y = "image"
                        } else {
                            if (W.match(k)) {
                                Y = "swf"
                            } else {
                                if (B(Z).hasClass("iframe")) {
                                    Y = "iframe"
                                } else {
                                    if (W.indexOf("#") === 0) {
                                        Y = "inline"
                                    } else {
                                        Y = "ajax"
                                    }
                                }
                            }
                        }
                    }
                }
            }
            if (!Y) {
                x();
                return
            }
            if (Y == "inline") {
                Z = W.substr(W.indexOf("#"));
                Y = B(Z).length > 0 ? "inline" : "ajax"
            }
            H.type = Y;
            H.href = W;
            H.title = ab;
            if (H.autoDimensions) {
                if (H.type == "html" || H.type == "inline" || H.type == "ajax") {
                    H.width = "auto";
                    H.height = "auto"
                } else {
                    H.autoDimensions = false
                }
            }
            if (H.modal) {
                H.overlayShow = true;
                H.hideOnOverlayClick = false;
                H.hideOnContentClick = false;
                H.enableEscapeButton = false;
                H.showCloseButton = false
            }
            H.padding = parseInt(H.padding, 10);
            H.margin = parseInt(H.margin, 10);
            L.css("padding", (H.padding + H.margin));
            B(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change", function () {
                B(this).replaceWith(m.children())
            });
            switch (Y) {
            case "html":
                L.html(H.content);
                n();
                break;
            case "inline":
                if (B(Z).parent().is("#fancybox-content") === true) {
                    P = false;
                    return
                }
                B('<div class="fancybox-inline-tmp" />').hide().insertBefore(B(Z)).bind("fancybox-cleanup", function () {
                    B(this).replaceWith(m.children())
                }).bind("fancybox-cancel", function () {
                    B(this).replaceWith(L.children())
                });
                B(Z).appendTo(L);
                n();
                break;
            case "image":
                P = false;
                B.fancybox.showActivity();
                o = new Image();
                o.onerror = function () {
                    x()
                };
                o.onload = function () {
                    P = true;
                    o.onerror = o.onload = null;
                    F()
                };
                o.src = W;
                break;
            case "swf":
                H.scrolling = "no";
                aa = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + H.width + '" height="' + H.height + '"><param name="movie" value="' + W + '"></param>';
                V = "";
                B.each(H.swf, function (ac, ad) {
                    aa += '<param name="' + ac + '" value="' + ad + '"></param>';
                    V += " " + ac + '="' + ad + '"'
                });
                aa += '<embed src="' + W + '" type="application/x-shockwave-flash" width="' + H.width + '" height="' + H.height + '"' + V + "></embed></object>";
                L.html(aa);
                n();
                break;
            case "ajax":
                P = false;
                B.fancybox.showActivity();
                H.ajax.win = H.ajax.success;
                f = B.ajax(B.extend({}, H.ajax, {
                    url: W,
                    data: H.ajax.data || {},
                    error: function (ac, ae, ad) {
                        if (ac.status > 0) {
                            x()
                        }
                    },
                    success: function (ad, af, ac) {
                        var ae = typeof ac == "object" ? ac : f;
                        if (ae.status == 200) {
                            if (typeof H.ajax.win == "function") {
                                X = H.ajax.win(W, ad, af, ac);
                                if (X === false) {
                                    T.hide();
                                    return
                                } else {
                                    if (typeof X == "string" || typeof X == "object") {
                                        ad = X
                                    }
                                }
                            }
                            L.html(ad);
                            n()
                        }
                    }
                }));
                break;
            case "iframe":
                E();
                break
            }
        },
        n = function () {
            var V = H.width,
                W = H.height;
            if (V.toString().indexOf("%") > -1) {
                V = parseInt((B(window).width() - (H.margin * 2)) * parseFloat(V) / 100, 10) + "px"
            } else {
                V = V == "auto" ? "auto" : V + "px"
            }
            if (W.toString().indexOf("%") > -1) {
                W = parseInt((B(window).height() - (H.margin * 2)) * parseFloat(W) / 100, 10) + "px"
            } else {
                W = W == "auto" ? "auto" : W + "px"
            }
            L.wrapInner('<div style="width:' + V + ";height:" + W + ";overflow: " + (H.scrolling == "auto" ? "auto" : (H.scrolling == "yes" ? "scroll" : "hidden")) + ';position:relative;"></div>');
            H.width = L.width();
            H.height = L.height();
            E()
        },
        F = function () {
            H.width = o.width;
            H.height = o.height;
            B("<img />").attr({
                id: "fancybox-img",
                src: o.src,
                alt: H.title
            }).appendTo(L);
            E()
        },
        E = function () {
            var W, V;
            T.hide();
            if (M.is(":visible") && false === G.onCleanup(y, e, G)) {
                B.event.trigger("fancybox-cancel");
                P = false;
                return
            }
            P = true;
            B(m.add(Q)).unbind();
            B(window).unbind("resize.fb scroll.fb");
            B(document).unbind("keydown.fb");
            if (M.is(":visible") && G.titlePosition !== "outside") {
                M.css("height", M.height())
            }
            y = j;
            e = C;
            G = H;
            if (G.overlayShow) {
                Q.css({
                    "background-color": G.overlayColor,
                    opacity: G.overlayOpacity,
                    cursor: G.hideOnOverlayClick ? "pointer" : "auto",
                    height: B(document).height()
                });
                if (!Q.is(":visible")) {
                    if (S) {
                        B("select:not(#fancybox-tmp select)").filter(function () {
                            return this.style.visibility !== "hidden"
                        }).css({
                            visibility: "hidden"
                        }).one("fancybox-cleanup", function () {
                            this.style.visibility = "inherit"
                        })
                    }
                    Q.show()
                }
            } else {
                Q.hide()
            }
            c = R();
            l();
            if (M.is(":visible")) {
                B(J.add(O).add(z)).hide();
                W = M.position(), b = {
                    top: W.top,
                    left: W.left,
                    width: M.width(),
                    height: M.height()
                };
                V = (b.width == c.width && b.height == c.height);
                m.fadeTo(G.changeFade, 0.3, function () {
                    var X = function () {
                            m.html(L.contents()).fadeTo(G.changeFade, 1, v)
                        };
                    B.event.trigger("fancybox-change");
                    m.empty().removeAttr("filter").css({
                        "border-width": G.padding,
                        width: c.width - G.padding * 2,
                        height: H.autoDimensions ? "auto" : c.height - h - G.padding * 2
                    });
                    if (V) {
                        X()
                    } else {
                        s.prop = 0;
                        B(s).animate({
                            prop: 1
                        }, {
                            duration: G.changeSpeed,
                            easing: G.easingChange,
                            step: U,
                            complete: X
                        })
                    }
                });
                return
            }
            M.removeAttr("style");
            m.css("border-width", G.padding);
            if (G.transitionIn == "elastic") {
                b = I();
                m.html(L.contents());
                M.show();
                if (G.opacity) {
                    c.opacity = 0
                }
                s.prop = 0;
                B(s).animate({
                    prop: 1
                }, {
                    duration: G.speedIn,
                    easing: G.easingIn,
                    step: U,
                    complete: v
                });
                return
            }
            if (G.titlePosition == "inside" && h > 0) {
                A.show()
            }
            m.css({
                width: c.width - G.padding * 2,
                height: H.autoDimensions ? "auto" : c.height - h - G.padding * 2
            }).html(L.contents());
            M.css(c).fadeIn(G.transitionIn == "none" ? 0 : G.speedIn, v)
        },
        D = function (V) {
            if (V && V.length) {
                if (G.titlePosition == "float") {
                    return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + V + '</td><td id="fancybox-title-float-right"></td></tr></table>'
                }
                return '<div id="fancybox-title-' + G.titlePosition + '">' + V + "</div>"
            }
            return false
        },
        l = function () {
            t = G.title || "";
            h = 0;
            A.empty().removeAttr("style").removeClass();
            if (G.titleShow === false) {
                A.hide();
                return
            }
            t = B.isFunction(G.titleFormat) ? G.titleFormat(t, y, e, G) : D(t);
            if (!t || t === "") {
                A.hide();
                return
            }
            A.addClass("fancybox-title-" + G.titlePosition).html(t).appendTo("body").show();
            switch (G.titlePosition) {
            case "inside":
                A.css({
                    width: c.width - (G.padding * 2),
                    marginLeft: G.padding,
                    marginRight: G.padding
                });
                h = A.outerHeight(true);
                A.appendTo(d);
                c.height += h;
                break;
            case "over":
                A.css({
                    marginLeft: G.padding,
                    width: c.width - (G.padding * 2),
                    bottom: G.padding
                }).appendTo(d);
                break;
            case "float":
                A.css("left", parseInt((A.width() - c.width - 40) / 2, 10) * -1).appendTo(M);
                break;
            default:
                A.css({
                    width: c.width - (G.padding * 2),
                    paddingLeft: G.padding,
                    paddingRight: G.padding
                }).appendTo(M);
                break
            }
            A.hide()
        },
        g = function () {
            if (G.enableEscapeButton || G.enableKeyboardNav) {
                B(document).bind("keydown.fb", function (V) {
                    if (V.keyCode == 27 && G.enableEscapeButton) {
                        V.preventDefault();
                        B.fancybox.close()
                    } else {
                        if ((V.keyCode == 37 || V.keyCode == 39) && G.enableKeyboardNav && V.target.tagName !== "INPUT" && V.target.tagName !== "TEXTAREA" && V.target.tagName !== "SELECT") {
                            V.preventDefault();
                            B.fancybox[V.keyCode == 37 ? "prev" : "next"]()
                        }
                    }
                })
            }
            if (!G.showNavArrows) {
                O.hide();
                z.hide();
                return
            }
            if ((G.cyclic && y.length > 1) || e !== 0) {
                O.show()
            }
            if ((G.cyclic && y.length > 1) || e != (y.length - 1)) {
                z.show()
            }
        },
        v = function () {
            if (!B.support.opacity) {
                m.get(0).style.removeAttribute("filter");
                M.get(0).style.removeAttribute("filter")
            }
            if (H.autoDimensions) {
                m.css("height", "auto")
            }
            M.css("height", "auto");
            if (t && t.length) {
                A.show()
            }
            if (G.showCloseButton) {
                J.show()
            }
            g();
            if (G.hideOnContentClick) {
                m.bind("click", B.fancybox.close)
            }
            if (G.hideOnOverlayClick) {
                Q.bind("click", B.fancybox.close)
            }
            B(window).bind("resize.fb", B.fancybox.resize);
            if (G.centerOnScroll) {
                B(window).bind("scroll.fb", B.fancybox.center)
            }
            if (G.type == "iframe") {
                B('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + (B.browser.msie ? 'allowtransparency="true""' : "") + ' scrolling="' + H.scrolling + '" src="' + G.href + '"></iframe>').appendTo(m)
            }
            M.show();
            P = false;
            B.fancybox.center();
            G.onComplete(y, e, G);
            K()
        },
        K = function () {
            var V, W;
            if ((y.length - 1) > e) {
                V = y[e + 1].href;
                if (typeof V !== "undefined" && V.match(i)) {
                    W = new Image();
                    W.src = V
                }
            }
            if (e > 0) {
                V = y[e - 1].href;
                if (typeof V !== "undefined" && V.match(i)) {
                    W = new Image();
                    W.src = V
                }
            }
        },
        U = function (W) {
            var V = {
                width: parseInt(b.width + (c.width - b.width) * W, 10),
                height: parseInt(b.height + (c.height - b.height) * W, 10),
                top: parseInt(b.top + (c.top - b.top) * W, 10),
                left: parseInt(b.left + (c.left - b.left) * W, 10)
            };
            if (typeof c.opacity !== "undefined") {
                V.opacity = W < 0.5 ? 0.5 : W
            }
            M.css(V);
            m.css({
                width: V.width - G.padding * 2,
                height: V.height - (h * W) - G.padding * 2
            })
        },
        u = function () {
            return [B(window).width() - (G.margin * 2), B(window).height() - (G.margin * 2), B(document).scrollLeft() + G.margin, B(document).scrollTop() + G.margin]
        },
        R = function () {
            var V = u(),
                Z = {},
                W = G.autoScale,
                X = G.padding * 2,
                Y;
            if (G.width.toString().indexOf("%") > -1) {
                Z.width = parseInt((V[0] * parseFloat(G.width)) / 100, 10)
            } else {
                Z.width = G.width + X
            }
            if (G.height.toString().indexOf("%") > -1) {
                Z.height = parseInt((V[1] * parseFloat(G.height)) / 100, 10)
            } else {
                Z.height = G.height + X
            }
            if (W && (Z.width > V[0] || Z.height > V[1])) {
                if (H.type == "image" || H.type == "swf") {
                    Y = (G.width) / (G.height);
                    if ((Z.width) > V[0]) {
                        Z.width = V[0];
                        Z.height = parseInt(((Z.width - X) / Y) + X, 10)
                    }
                    if ((Z.height) > V[1]) {
                        Z.height = V[1];
                        Z.width = parseInt(((Z.height - X) * Y) + X, 10)
                    }
                } else {
                    Z.width = Math.min(Z.width, V[0]);
                    Z.height = Math.min(Z.height, V[1])
                }
            }
            Z.top = parseInt(Math.max(V[3] - 20, V[3] + ((V[1] - Z.height - 40) * 0.5)), 10);
            Z.left = parseInt(Math.max(V[2] - 20, V[2] + ((V[0] - Z.width - 40) * 0.5)), 10);
            return Z
        },
        q = function (V) {
            var W = V.offset();
            W.top += parseInt(V.css("paddingTop"), 10) || 0;
            W.left += parseInt(V.css("paddingLeft"), 10) || 0;
            W.top += parseInt(V.css("border-top-width"), 10) || 0;
            W.left += parseInt(V.css("border-left-width"), 10) || 0;
            W.width = V.width();
            W.height = V.height();
            return W
        },
        I = function () {
            var Y = H.orig ? B(H.orig) : false,
                X = {},
                W, V;
            if (Y && Y.length) {
                W = q(Y);
                X = {
                    width: W.width + (G.padding * 2),
                    height: W.height + (G.padding * 2),
                    top: W.top - G.padding - 20,
                    left: W.left - G.padding - 20
                }
            } else {
                V = u();
                X = {
                    width: G.padding * 2,
                    height: G.padding * 2,
                    top: parseInt(V[3] + V[1] * 0.5, 10),
                    left: parseInt(V[2] + V[0] * 0.5, 10)
                }
            }
            return X
        },
        a = function () {
            if (!T.is(":visible")) {
                clearInterval(p);
                return
            }
            B("div", T).css("top", (N * -40) + "px");
            N = (N + 1) % 12
        };
    B.fn.fancybox = function (V) {
        if (!B(this).length) {
            return this
        }
        B(this).data("fancybox", B.extend({}, V, (B.metadata ? B(this).metadata() : {}))).unbind("click.fb").bind("click.fb", function (X) {
            X.preventDefault();
            if (P) {
                return
            }
            P = true;
            B(this).blur();
            j = [];
            C = 0;
            var W = B(this).attr("rel") || "";
            if (!W || W == "" || W === "nofollow") {
                j.push(this)
            } else {
                j = B("a[rel=" + W + "], area[rel=" + W + "]");
                C = j.index(this)
            }
            w();
            return
        });
        return this
    };
    B.fancybox = function (Y) {
        var X;
        if (P) {
            return
        }
        P = true;
        X = typeof arguments[1] !== "undefined" ? arguments[1] : {};
        j = [];
        C = parseInt(X.index, 10) || 0;
        if (B.isArray(Y)) {
            for (var W = 0, V = Y.length; W < V; W++) {
                if (typeof Y[W] == "object") {
                    B(Y[W]).data("fancybox", B.extend({}, X, Y[W]))
                } else {
                    Y[W] = B({}).data("fancybox", B.extend({
                        content: Y[W]
                    }, X))
                }
            }
            j = jQuery.merge(j, Y)
        } else {
            if (typeof Y == "object") {
                B(Y).data("fancybox", B.extend({}, X, Y))
            } else {
                Y = B({}).data("fancybox", B.extend({
                    content: Y
                }, X))
            }
            j.push(Y)
        }
        if (C > j.length || C < 0) {
            C = 0
        }
        w()
    };
    B.fancybox.showActivity = function () {
        clearInterval(p);
        T.show();
        p = setInterval(a, 66)
    };
    B.fancybox.hideActivity = function () {
        T.hide()
    };
    B.fancybox.next = function () {
        return B.fancybox.pos(e + 1)
    };
    B.fancybox.prev = function () {
        return B.fancybox.pos(e - 1)
    };
    B.fancybox.pos = function (V) {
        if (P) {
            return
        }
        V = parseInt(V);
        j = y;
        if (V > -1 && V < y.length) {
            C = V;
            w()
        } else {
            if (G.cyclic && y.length > 1) {
                C = V >= y.length ? 0 : y.length - 1;
                w()
            }
        }
        return
    };
    B.fancybox.cancel = function () {
        if (P) {
            return
        }
        P = true;
        B.event.trigger("fancybox-cancel");
        r();
        H.onCancel(j, C, H);
        P = false
    };
    B.fancybox.close = function () {
        if (P || M.is(":hidden")) {
            return
        }
        P = true;
        if (G && false === G.onCleanup(y, e, G)) {
            P = false;
            return
        }
        r();
        B(J.add(O).add(z)).hide();
        B(m.add(Q)).unbind();
        B(window).unbind("resize.fb scroll.fb");
        B(document).unbind("keydown.fb");
        m.find("iframe").attr("src", S && /^https/i.test(window.location.href || "") ? "javascript:void(false)" : "about:blank");
        if (G.titlePosition !== "inside") {
            A.empty()
        }
        M.stop();

        function V() {
            Q.fadeOut("fast");
            A.empty().hide();
            M.hide();
            B.event.trigger("fancybox-cleanup");
            m.empty();
            G.onClosed(y, e, G);
            y = H = [];
            e = C = 0;
            G = H = {};
            P = false
        }
        if (G.transitionOut == "elastic") {
            b = I();
            var W = M.position();
            c = {
                top: W.top,
                left: W.left,
                width: M.width(),
                height: M.height()
            };
            if (G.opacity) {
                c.opacity = 1
            }
            A.empty().hide();
            s.prop = 1;
            B(s).animate({
                prop: 0
            }, {
                duration: G.speedOut,
                easing: G.easingOut,
                step: U,
                complete: V
            })
        } else {
            M.fadeOut(G.transitionOut == "none" ? 0 : G.speedOut, V)
        }
    };
    B.fancybox.resize = function () {
        if (Q.is(":visible")) {
            Q.css("height", B(document).height())
        }
        B.fancybox.center(true)
    };
    B.fancybox.center = function () {
        var V, W;
        if (P) {
            return
        }
        W = arguments[0] === true ? 1 : 0;
        V = u();
        if (!W && (M.width() > V[0] || M.height() > V[1])) {
            return
        }
        M.stop().animate({
            top: parseInt(Math.max(V[3] - 20, V[3] + ((V[1] - m.height() - 40) * 0.5) - G.padding)),
            left: parseInt(Math.max(V[2] - 20, V[2] + ((V[0] - m.width() - 40) * 0.5) - G.padding))
        }, typeof arguments[0] == "number" ? arguments[0] : 200)
    };
    B.fancybox.init = function () {
        if (B("#fancybox-wrap").length) {
            return
        }
        B("body").append(L = B('<div id="fancybox-tmp"></div>'), T = B('<div id="fancybox-loading"><div></div></div>'), Q = B('<div id="fancybox-overlay"></div>'), M = B('<div id="fancybox-wrap"></div>'));
        d = B('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(M);
        d.append(m = B('<div id="fancybox-content"></div>'), J = B('<a id="fancybox-close"></a>'), A = B('<div id="fancybox-title"></div>'), O = B('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'), z = B('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));
        J.click(B.fancybox.close);
        T.click(B.fancybox.cancel);
        O.click(function (V) {
            V.preventDefault();
            B.fancybox.prev()
        });
        z.click(function (V) {
            V.preventDefault();
            B.fancybox.next()
        });
        if (B.fn.mousewheel) {
            M.bind("mousewheel.fb", function (V, W) {
                if (P) {
                    V.preventDefault()
                } else {
                    if (B(V.target).get(0).clientHeight == 0 || B(V.target).get(0).scrollHeight === B(V.target).get(0).clientHeight) {
                        V.preventDefault();
                        B.fancybox[W > 0 ? "prev" : "next"]()
                    }
                }
            })
        }
        if (!B.support.opacity) {
            M.addClass("fancybox-ie")
        }
        if (S) {
            T.addClass("fancybox-ie6");
            M.addClass("fancybox-ie6");
            B('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || "") ? "javascript:void(false)" : "about:blank") + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(d)
        }
    };
    B.fn.fancybox.defaults = {
        padding: 10,
        margin: 40,
        opacity: false,
        modal: false,
        cyclic: false,
        scrolling: "auto",
        width: 560,
        height: 340,
        autoScale: true,
        autoDimensions: true,
        centerOnScroll: false,
        ajax: {},
        swf: {
            wmode: "transparent"
        },
        hideOnOverlayClick: true,
        hideOnContentClick: false,
        overlayShow: true,
        overlayOpacity: 0.7,
        overlayColor: "#777",
        titleShow: true,
        titlePosition: "float",
        titleFormat: null,
        titleFromAlt: false,
        transitionIn: "fade",
        transitionOut: "fade",
        speedIn: 300,
        speedOut: 300,
        changeSpeed: 300,
        changeFade: "fast",
        easingIn: "swing",
        easingOut: "swing",
        showCloseButton: true,
        showNavArrows: true,
        enableEscapeButton: true,
        enableKeyboardNav: true,
        onStart: function () {},
        onCancel: function () {},
        onComplete: function () {},
        onCleanup: function () {},
        onClosed: function () {},
        onError: function () {}
    };
    B(document).ready(function () {
        B.fancybox.init()
    })
})(jQuery);
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.4
*
* Requires: 1.2.2+
*/
(function (c) {
    function a(f) {
        var d = f || window.event,
            g = [].slice.call(arguments, 1),
            l = 0,
            j = 0,
            k = 0;
        f = c.event.fix(d);
        f.type = "mousewheel";
        if (f.wheelDelta) {
            l = f.wheelDelta / 120
        }
        if (f.detail) {
            l = -f.detail / 3
        }
        k = l;
        if (d.axis !== undefined && d.axis === d.HORIZONTAL_AXIS) {
            k = 0;
            j = -1 * l
        }
        if (d.wheelDeltaY !== undefined) {
            k = d.wheelDeltaY / 120
        }
        if (d.wheelDeltaX !== undefined) {
            j = -1 * d.wheelDeltaX / 120
        }
        g.unshift(f, l, j, k);
        return c.event.handle.apply(this, g)
    }
    var b = ["DOMMouseScroll", "mousewheel"];
    c.event.special.mousewheel = {
        setup: function () {
            if (this.addEventListener) {
                for (var d = b.length; d;) {
                    this.addEventListener(b[--d], a, false)
                }
            } else {
                this.onmousewheel = a
            }
        },
        teardown: function () {
            if (this.removeEventListener) {
                for (var d = b.length; d;) {
                    this.removeEventListener(b[--d], a, false)
                }
            } else {
                this.onmousewheel = null
            }
        }
    };
    c.fn.extend({
        mousewheel: function (d) {
            return d ? this.bind("mousewheel", d) : this.trigger("mousewheel")
        },
        unmousewheel: function (d) {
            return this.unbind("mousewheel", d)
        }
    })
})(jQuery);
(function (b) {
    var a = function (k, r) {
            var h = b.extend({}, b.fn.nivoSlider.defaults, r);
            var n = {
                currentSlide: 0,
                currentImage: "",
                totalSlides: 0,
                randAnim: "",
                running: false,
                paused: false,
                stop: false
            };
            var e = b(k);
            e.data("nivo:vars", n);
            e.css("position", "relative");
            e.addClass("nivoSlider");
            var f = e.children();
            f.each(function () {
                var u = b(this);
                var t = "";
                if (!u.is("img")) {
                    if (u.is("a")) {
                        u.addClass("nivo-imageLink");
                        t = u
                    }
                    u = u.find("img:first")
                }
                var s = u.width();
                if (s == 0) {
                    s = u.attr("width")
                }
                var i = u.height();
                if (i == 0) {
                    i = u.attr("height")
                }
                if (s > e.width()) {
                    e.width(s)
                }
                if (i > e.height()) {
                    e.height(i)
                }
                if (t != "") {
                    t.css("display", "none")
                }
                u.css("display", "none");
                n.totalSlides++
            });
            if (h.startSlide > 0) {
                if (h.startSlide >= n.totalSlides) {
                    h.startSlide = n.totalSlides - 1
                }
                n.currentSlide = h.startSlide
            }
            if (b(f[n.currentSlide]).is("img")) {
                n.currentImage = b(f[n.currentSlide])
            } else {
                n.currentImage = b(f[n.currentSlide]).find("img:first")
            }
            if (b(f[n.currentSlide]).is("a")) {
                b(f[n.currentSlide]).css("display", "block")
            }
            e.css("background", 'url("' + n.currentImage.attr("src") + '") no-repeat');
            for (var l = 0; l < h.slices; l++) {
                var p = Math.round(e.width() / h.slices);
                if (l == h.slices - 1) {
                    e.append(b('<div class="nivo-slice"></div>').css({
                        left: (p * l) + "px",
                        width: (e.width() - (p * l)) + "px"
                    }))
                } else {
                    e.append(b('<div class="nivo-slice"></div>').css({
                        left: (p * l) + "px",
                        width: p + "px"
                    }))
                }
            }
            e.append(b('<div class="nivo-caption"><p></p></div>').css({
                display: "none",
                opacity: h.captionOpacity
            }));
            if (n.currentImage.attr("title") != "") {
                var o = n.currentImage.attr("title");
                if (o.substr(0, 1) == "#") {
                    o = b(o).html()
                }
                b(".nivo-caption p", e).html(o);
                b(".nivo-caption", e).fadeIn(h.animSpeed)
            }
            var d = 0;
            if (!h.manualAdvance && f.length > 1) {
                d = setInterval(function () {
                    q(e, f, h, false)
                }, h.pauseTime)
            }
            if (h.directionNav) {
                e.append('<div class="nivo-directionNav"><a class="nivo-prevNav">Prev</a><a class="nivo-nextNav">Next</a></div>');
                if (h.directionNavHide) {
                    b(".nivo-directionNav", e).hide();
                    e.hover(function () {
                        b(".nivo-directionNav", e).show()
                    }, function () {
                        b(".nivo-directionNav", e).hide()
                    })
                }
                b("a.nivo-prevNav", e).live("click", function () {
                    if (n.running) {
                        return false
                    }
                    clearInterval(d);
                    d = "";
                    n.currentSlide -= 2;
                    q(e, f, h, "prev")
                });
                b("a.nivo-nextNav", e).live("click", function () {
                    if (n.running) {
                        return false
                    }
                    clearInterval(d);
                    d = "";
                    q(e, f, h, "next")
                })
            }
            if (h.controlNav) {
                var m = b('<div class="nivo-controlNav"></div>');
                e.append(m);
                for (var l = 0; l < f.length; l++) {
                    if (h.controlNavThumbs) {
                        var g = f.eq(l);
                        if (!g.is("img")) {
                            g = g.find("img:first")
                        }
                        if (h.controlNavThumbsFromRel) {
                            m.append('<a class="nivo-control" rel="' + l + '"><img src="' + g.attr("rel") + '" alt="" /></a>')
                        } else {
                            m.append('<a class="nivo-control" rel="' + l + '"><img src="' + g.attr("src").replace(h.controlNavThumbsSearch, h.controlNavThumbsReplace) + '" alt="" /></a>')
                        }
                    } else {
                        m.append('<a class="nivo-control" rel="' + l + '">' + (l + 1) + "</a>")
                    }
                }
                b(".nivo-controlNav a:eq(" + n.currentSlide + ")", e).addClass("active");
                b(".nivo-controlNav a", e).live("click", function () {
                    if (n.running) {
                        return false
                    }
                    if (b(this).hasClass("active")) {
                        return false
                    }
                    clearInterval(d);
                    d = "";
                    e.css("background", 'url("' + n.currentImage.attr("src") + '") no-repeat');
                    n.currentSlide = b(this).attr("rel") - 1;
                    q(e, f, h, "control")
                })
            }
            if (h.keyboardNav) {
                b(window).keypress(function (i) {
                    if (i.keyCode == "37") {
                        if (n.running) {
                            return false
                        }
                        clearInterval(d);
                        d = "";
                        n.currentSlide -= 2;
                        q(e, f, h, "prev")
                    }
                    if (i.keyCode == "39") {
                        if (n.running) {
                            return false
                        }
                        clearInterval(d);
                        d = "";
                        q(e, f, h, "next")
                    }
                })
            }
            if (h.pauseOnHover) {
                e.hover(function () {
                    n.paused = true;
                    clearInterval(d);
                    d = ""
                }, function () {
                    n.paused = false;
                    if (d == "" && !h.manualAdvance) {
                        d = setInterval(function () {
                            q(e, f, h, false)
                        }, h.pauseTime)
                    }
                })
            }
            e.bind("nivo:animFinished", function () {
                n.running = false;
                b(f).each(function () {
                    if (b(this).is("a")) {
                        b(this).css("display", "none")
                    }
                });
                if (b(f[n.currentSlide]).is("a")) {
                    b(f[n.currentSlide]).css("display", "block")
                }
                if (d == "" && !n.paused && !h.manualAdvance) {
                    d = setInterval(function () {
                        q(e, f, h, false)
                    }, h.pauseTime)
                }
                h.afterChange.call(this)
            });
            var c = function (u, t) {
                    var v = b(".nivo-slice", u);
                    var s = 0;
                    v.each(function () {
                        var w = b(this);
                        var i = Math.round(u.width() / t.slices);
                        if (s == t.slices - 1) {
                            w.css("width", (u.width() - (i * s)) + "px")
                        } else {
                            w.css("width", i + "px")
                        }
                        s++
                    })
                };
            var q = function (s, t, w, z) {
                    var A = s.data("nivo:vars");
                    if (A && (A.currentSlide == A.totalSlides - 1)) {
                        w.lastSlide.call(this)
                    }
                    if ((!A || A.stop) && !z) {
                        return false
                    }
                    w.beforeChange.call(this);
                    if (!z) {
                        s.css("background", 'url("' + A.currentImage.attr("src") + '") no-repeat')
                    } else {
                        if (z == "prev") {
                            s.css("background", 'url("' + A.currentImage.attr("src") + '") no-repeat')
                        }
                        if (z == "next") {
                            s.css("background", 'url("' + A.currentImage.attr("src") + '") no-repeat')
                        }
                    }
                    A.currentSlide++;
                    if (A.currentSlide == A.totalSlides) {
                        A.currentSlide = 0;
                        w.slideshowEnd.call(this)
                    }
                    if (A.currentSlide < 0) {
                        A.currentSlide = (A.totalSlides - 1)
                    }
                    if (b(t[A.currentSlide]).is("img")) {
                        A.currentImage = b(t[A.currentSlide])
                    } else {
                        A.currentImage = b(t[A.currentSlide]).find("img:first")
                    }
                    if (w.controlNav) {
                        b(".nivo-controlNav a", s).removeClass("active");
                        b(".nivo-controlNav a:eq(" + A.currentSlide + ")", s).addClass("active")
                    }
                    if (A.currentImage.attr("title") != "") {
                        var B = A.currentImage.attr("title");
                        if (B.substr(0, 1) == "#") {
                            B = b(B).html()
                        }
                        if (b(".nivo-caption", s).css("display") == "block") {
                            b(".nivo-caption p", s).fadeOut(w.animSpeed, function () {
                                b(this).html(B);
                                b(this).fadeIn(w.animSpeed)
                            })
                        } else {
                            b(".nivo-caption p", s).html(B)
                        }
                        b(".nivo-caption", s).fadeIn(w.animSpeed)
                    } else {
                        b(".nivo-caption", s).fadeOut(w.animSpeed)
                    }
                    var y = 0;
                    b(".nivo-slice", s).each(function () {
                        var i = Math.round(s.width() / w.slices);
                        b(this).css({
                            height: "0px",
                            opacity: "0",
                            background: 'url("' + A.currentImage.attr("src") + '") no-repeat -' + ((i + (y * i)) - i) + "px 0%"
                        });
                        y++
                    });
                    if (w.effect == "random") {
                        var C = new Array("sliceDownRight", "sliceDownLeft", "sliceUpRight", "sliceUpLeft", "sliceUpDown", "sliceUpDownLeft", "fold", "fade", "slideInRight", "slideInLeft");
                        A.randAnim = C[Math.floor(Math.random() * (C.length + 1))];
                        if (A.randAnim == undefined) {
                            A.randAnim = "fade"
                        }
                    }
                    if (w.effect.indexOf(",") != -1) {
                        var C = w.effect.split(",");
                        A.randAnim = C[Math.floor(Math.random() * (C.length))];
                        if (A.randAnim == undefined) {
                            A.randAnim = "fade"
                        }
                    }
                    A.running = true;
                    if (w.effect == "sliceDown" || w.effect == "sliceDownRight" || A.randAnim == "sliceDownRight" || w.effect == "sliceDownLeft" || A.randAnim == "sliceDownLeft") {
                        var u = 0;
                        var y = 0;
                        c(s, w);
                        var E = b(".nivo-slice", s);
                        if (w.effect == "sliceDownLeft" || A.randAnim == "sliceDownLeft") {
                            E = b(".nivo-slice", s)._reverse()
                        }
                        E.each(function () {
                            var i = b(this);
                            i.css({
                                top: "0px"
                            });
                            if (y == w.slices - 1) {
                                setTimeout(function () {
                                    i.animate({
                                        height: "100%",
                                        opacity: "1.0"
                                    }, w.animSpeed, "", function () {
                                        s.trigger("nivo:animFinished")
                                    })
                                }, (100 + u))
                            } else {
                                setTimeout(function () {
                                    i.animate({
                                        height: "100%",
                                        opacity: "1.0"
                                    }, w.animSpeed)
                                }, (100 + u))
                            }
                            u += 50;
                            y++
                        })
                    } else {
                        if (w.effect == "sliceUp" || w.effect == "sliceUpRight" || A.randAnim == "sliceUpRight" || w.effect == "sliceUpLeft" || A.randAnim == "sliceUpLeft") {
                            var u = 0;
                            var y = 0;
                            c(s, w);
                            var E = b(".nivo-slice", s);
                            if (w.effect == "sliceUpLeft" || A.randAnim == "sliceUpLeft") {
                                E = b(".nivo-slice", s)._reverse()
                            }
                            E.each(function () {
                                var i = b(this);
                                i.css({
                                    bottom: "0px"
                                });
                                if (y == w.slices - 1) {
                                    setTimeout(function () {
                                        i.animate({
                                            height: "100%",
                                            opacity: "1.0"
                                        }, w.animSpeed, "", function () {
                                            s.trigger("nivo:animFinished")
                                        })
                                    }, (100 + u))
                                } else {
                                    setTimeout(function () {
                                        i.animate({
                                            height: "100%",
                                            opacity: "1.0"
                                        }, w.animSpeed)
                                    }, (100 + u))
                                }
                                u += 50;
                                y++
                            })
                        } else {
                            if (w.effect == "sliceUpDown" || w.effect == "sliceUpDownRight" || A.randAnim == "sliceUpDown" || w.effect == "sliceUpDownLeft" || A.randAnim == "sliceUpDownLeft") {
                                var u = 0;
                                var y = 0;
                                var D = 0;
                                c(s, w);
                                var E = b(".nivo-slice", s);
                                if (w.effect == "sliceUpDownLeft" || A.randAnim == "sliceUpDownLeft") {
                                    E = b(".nivo-slice", s)._reverse()
                                }
                                E.each(function () {
                                    var i = b(this);
                                    if (y == 0) {
                                        i.css("top", "0px");
                                        y++
                                    } else {
                                        i.css("bottom", "0px");
                                        y = 0
                                    }
                                    if (D == w.slices - 1) {
                                        setTimeout(function () {
                                            i.animate({
                                                height: "100%",
                                                opacity: "1.0"
                                            }, w.animSpeed, "", function () {
                                                s.trigger("nivo:animFinished")
                                            })
                                        }, (100 + u))
                                    } else {
                                        setTimeout(function () {
                                            i.animate({
                                                height: "100%",
                                                opacity: "1.0"
                                            }, w.animSpeed)
                                        }, (100 + u))
                                    }
                                    u += 50;
                                    D++
                                })
                            } else {
                                if (w.effect == "fold" || A.randAnim == "fold") {
                                    var u = 0;
                                    var y = 0;
                                    c(s, w);
                                    b(".nivo-slice", s).each(function () {
                                        var i = b(this);
                                        var v = i.width();
                                        i.css({
                                            top: "0px",
                                            height: "100%",
                                            width: "0px"
                                        });
                                        if (y == w.slices - 1) {
                                            setTimeout(function () {
                                                i.animate({
                                                    width: v,
                                                    opacity: "1.0"
                                                }, w.animSpeed, "", function () {
                                                    s.trigger("nivo:animFinished")
                                                })
                                            }, (100 + u))
                                        } else {
                                            setTimeout(function () {
                                                i.animate({
                                                    width: v,
                                                    opacity: "1.0"
                                                }, w.animSpeed)
                                            }, (100 + u))
                                        }
                                        u += 50;
                                        y++
                                    })
                                } else {
                                    if (w.effect == "fade" || A.randAnim == "fade") {
                                        var x = b(".nivo-slice:first", s);
                                        x.css({
                                            height: "100%",
                                            width: s.width() + "px"
                                        });
                                        x.animate({
                                            opacity: "1.0"
                                        }, (w.animSpeed * 2), "", function () {
                                            s.trigger("nivo:animFinished")
                                        })
                                    } else {
                                        if (w.effect == "slideInRight" || A.randAnim == "slideInRight") {
                                            var x = b(".nivo-slice:first", s);
                                            x.css({
                                                height: "100%",
                                                width: "0px",
                                                opacity: "1"
                                            });
                                            x.animate({
                                                width: s.width() + "px"
                                            }, (w.animSpeed * 2), "", function () {
                                                s.trigger("nivo:animFinished")
                                            })
                                        } else {
                                            if (w.effect == "slideInLeft" || A.randAnim == "slideInLeft") {
                                                var x = b(".nivo-slice:first", s);
                                                x.css({
                                                    height: "100%",
                                                    width: "0px",
                                                    opacity: "1",
                                                    left: "",
                                                    right: "0px"
                                                });
                                                x.animate({
                                                    width: s.width() + "px"
                                                }, (w.animSpeed * 2), "", function () {
                                                    x.css({
                                                        left: "0px",
                                                        right: ""
                                                    });
                                                    s.trigger("nivo:animFinished")
                                                })
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                };
            var j = function (i) {
                    if (this.console && typeof console.log != "undefined") {
                        console.log(i)
                    }
                };
            this.stop = function () {
                if (!b(k).data("nivo:vars").stop) {
                    b(k).data("nivo:vars").stop = true;
                    j("Stop Slider")
                }
            };
            this.start = function () {
                if (b(k).data("nivo:vars").stop) {
                    b(k).data("nivo:vars").stop = false;
                    j("Start Slider")
                }
            };
            h.afterLoad.call(this)
        };
    b.fn.nivoSlider = function (c) {
        return this.each(function () {
            var d = b(this);
            if (d.data("nivoslider")) {
                return
            }
            var e = new a(this, c);
            d.data("nivoslider", e)
        })
    };
    b.fn.nivoSlider.defaults = {
        effect: "random",
        slices: 15,
        animSpeed: 500,
        pauseTime: 3000,
        startSlide: 0,
        directionNav: true,
        directionNavHide: true,
        controlNav: true,
        controlNavThumbs: false,
        controlNavThumbsFromRel: false,
        controlNavThumbsSearch: ".jpg",
        controlNavThumbsReplace: "_thumb.jpg",
        keyboardNav: true,
        pauseOnHover: true,
        manualAdvance: false,
        captionOpacity: 0.8,
        beforeChange: function () {},
        afterChange: function () {},
        slideshowEnd: function () {},
        lastSlide: function () {},
        afterLoad: function () {}
    };
    b.fn._reverse = [].reverse
})(jQuery);
(function (a) {
    a.organicTabs = function (c, b) {
        var d = this;
        d.$el = a(c);
        d.$nav = d.$el.find(".nav2");
        d.init = function () {
            d.options = a.extend({}, a.organicTabs.defaultOptions, b);
            a(".hide").css({
                position: "relative",
                top: 0,
                left: 0,
                display: "none"
            });
            d.$nav.delegate("li > a", "click", function () {
                var g = d.$el.find("a.current").attr("href").substring(1),
                    f = a(this),
                    e = f.attr("href").substring(1),
                    h = d.$el.find(".list-wrap"),
                    i = h.height();
                h.height(i);
                if ((e != g) && (d.$el.find(":animated").length == 0)) {
                    d.$el.find("#" + g).fadeOut(d.options.speed, function () {
                        d.$el.find("#" + e).fadeIn(d.options.speed);
                        var j = d.$el.find("#" + e).height();
                        h.animate({
                            height: j
                        });
                        d.$el.find(".nav2 li a").removeClass("current");
                        f.addClass("current")
                    })
                }
                return false
            })
        };
        d.init()
    };
    a.organicTabs.defaultOptions = {
        speed: 300
    };
    a.fn.organicTabs = function (b) {
        return this.each(function () {
            (new a.organicTabs(this, b))
        })
    }
})(jQuery);
