if (isIE == "undefined") {
    var isIE = false
}
if (isIE6 == "undefined") {
    var isIE6 = false
}
if (lightbox == "undefined") {
    var lightbox = 0
}
jQuery.easing.jswing = jQuery.easing.swing;
jQuery.extend(jQuery.easing, {
    def: "easeOutQuad",
    swing: function(e, f, a, h, g) {
        return jQuery.easing[jQuery.easing.def](e, f, a, h, g)
    },
    easeInQuad: function(e, f, a, h, g) {
        return h * (f /= g) * f + a
    },
    easeOutQuad: function(e, f, a, h, g) {
        return - h * (f /= g) * (f - 2) + a
    },
    easeInOutQuad: function(e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f + a
        }
        return - h / 2 * ((--f) * (f - 2) - 1) + a
    },
    easeInCubic: function(e, f, a, h, g) {
        return h * (f /= g) * f * f + a
    },
    easeOutCubic: function(e, f, a, h, g) {
        return h * ((f = f / g - 1) * f * f + 1) + a
    },
    easeInOutCubic: function(e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f * f + a
        }
        return h / 2 * ((f -= 2) * f * f + 2) + a
    },
    easeInQuart: function(e, f, a, h, g) {
        return h * (f /= g) * f * f * f + a
    },
    easeOutQuart: function(e, f, a, h, g) {
        return - h * ((f = f / g - 1) * f * f * f - 1) + a
    },
    easeInOutQuart: function(e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f * f * f + a
        }
        return - h / 2 * ((f -= 2) * f * f * f - 2) + a
    },
    easeInQuint: function(e, f, a, h, g) {
        return h * (f /= g) * f * f * f * f + a
    },
    easeOutQuint: function(e, f, a, h, g) {
        return h * ((f = f / g - 1) * f * f * f * f + 1) + a
    },
    easeInOutQuint: function(e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f * f * f * f + a
        }
        return h / 2 * ((f -= 2) * f * f * f * f + 2) + a
    },
    easeInSine: function(e, f, a, h, g) {
        return - h * Math.cos(f / g * (Math.PI / 2)) + h + a
    },
    easeOutSine: function(e, f, a, h, g) {
        return h * Math.sin(f / g * (Math.PI / 2)) + a
    },
    easeInOutSine: function(e, f, a, h, g) {
        return - h / 2 * (Math.cos(Math.PI * f / g) - 1) + a
    },
    easeInExpo: function(e, f, a, h, g) {
        return (f == 0) ? a: h * Math.pow(2, 10 * (f / g - 1)) + a
    },
    easeOutExpo: function(e, f, a, h, g) {
        return (f == g) ? a + h: h * ( - Math.pow(2, -10 * f / g) + 1) + a
    },
    easeInOutExpo: function(e, f, a, h, g) {
        if (f == 0) {
            return a
        }
        if (f == g) {
            return a + h
        }
        if ((f /= g / 2) < 1) {
            return h / 2 * Math.pow(2, 10 * (f - 1)) + a
        }
        return h / 2 * ( - Math.pow(2, -10 * --f) + 2) + a
    },
    easeInCirc: function(e, f, a, h, g) {
        return - h * (Math.sqrt(1 - (f /= g) * f) - 1) + a
    },
    easeOutCirc: function(e, f, a, h, g) {
        return h * Math.sqrt(1 - (f = f / g - 1) * f) + a
    },
    easeInOutCirc: function(e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return - h / 2 * (Math.sqrt(1 - f * f) - 1) + a
        }
        return h / 2 * (Math.sqrt(1 - (f -= 2) * f) + 1) + a
    },
    easeInElastic: function(f, h, e, l, k) {
        var i = 1.70158;
        var j = 0;
        var g = l;
        if (h == 0) {
            return e
        }
        if ((h /= k) == 1) {
            return e + l
        }
        if (!j) {
            j = k * 0.3
        }
        if (g < Math.abs(l)) {
            g = l;
            var i = j / 4
        } else {
            var i = j / (2 * Math.PI) * Math.asin(l / g)
        }
        return - (g * Math.pow(2, 10 * (h -= 1)) * Math.sin((h * k - i) * (2 * Math.PI) / j)) + e
    },
    easeOutElastic: function(f, h, e, l, k) {
        var i = 1.70158;
        var j = 0;
        var g = l;
        if (h == 0) {
            return e
        }
        if ((h /= k) == 1) {
            return e + l
        }
        if (!j) {
            j = k * 0.3
        }
        if (g < Math.abs(l)) {
            g = l;
            var i = j / 4
        } else {
            var i = j / (2 * Math.PI) * Math.asin(l / g)
        }
        return g * Math.pow(2, -10 * h) * Math.sin((h * k - i) * (2 * Math.PI) / j) + l + e
    },
    easeInOutElastic: function(f, h, e, l, k) {
        var i = 1.70158;
        var j = 0;
        var g = l;
        if (h == 0) {
            return e
        }
        if ((h /= k / 2) == 2) {
            return e + l
        }
        if (!j) {
            j = k * (0.3 * 1.5)
        }
        if (g < Math.abs(l)) {
            g = l;
            var i = j / 4
        } else {
            var i = j / (2 * Math.PI) * Math.asin(l / g)
        }
        if (h < 1) {
            return - 0.5 * (g * Math.pow(2, 10 * (h -= 1)) * Math.sin((h * k - i) * (2 * Math.PI) / j)) + e
        }
        return g * Math.pow(2, -10 * (h -= 1)) * Math.sin((h * k - i) * (2 * Math.PI) / j) * 0.5 + l + e
    },
    easeInBack: function(e, f, a, i, h, g) {
        if (g == undefined) {
            g = 1.70158
        }
        return i * (f /= h) * f * ((g + 1) * f - g) + a
    },
    easeOutBack: function(e, f, a, i, h, g) {
        if (g == undefined) {
            g = 1.70158
        }
        return i * ((f = f / h - 1) * f * ((g + 1) * f + g) + 1) + a
    },
    easeInOutBack: function(e, f, a, i, h, g) {
        if (g == undefined) {
            g = 1.70158
        }
        if ((f /= h / 2) < 1) {
            return i / 2 * (f * f * (((g *= (1.525)) + 1) * f - g)) + a
        }
        return i / 2 * ((f -= 2) * f * (((g *= (1.525)) + 1) * f + g) + 2) + a
    },
    easeInBounce: function(e, f, a, h, g) {
        return h - jQuery.easing.easeOutBounce(e, g - f, 0, h, g) + a
    },
    easeOutBounce: function(e, f, a, h, g) {
        if ((f /= g) < (1 / 2.75)) {
            return h * (7.5625 * f * f) + a
        } else {
            if (f < (2 / 2.75)) {
                return h * (7.5625 * (f -= (1.5 / 2.75)) * f + 0.75) + a
            } else {
                if (f < (2.5 / 2.75)) {
                    return h * (7.5625 * (f -= (2.25 / 2.75)) * f + 0.9375) + a
                } else {
                    return h * (7.5625 * (f -= (2.625 / 2.75)) * f + 0.984375) + a
                }
            }
        }
    },
    easeInOutBounce: function(e, f, a, h, g) {
        if (f < g / 2) {
            return jQuery.easing.easeInBounce(e, f * 2, 0, h, g) * 0.5 + a
        }
        return jQuery.easing.easeOutBounce(e, f * 2 - g, 0, h, g) * 0.5 + h * 0.5 + a
    }
}); (function(a) {
    a.fn.loopedSlider = function(b) {
        var c = {
            container: ".slide-container",
            slides: ".slides",
            pagination: ".pagination",
            containerClick: false,
            autoStart: 0,
            restart: 0,
            slidespeed: 333,
            fadespeed: 133,
            autoHeight: true,
            easing: "easeOutQuart"
        };
        this.each(function() {
            var j = a(this);
            var g = a.extend(c, b);
            var x = a(g.pagination + " li a", j);
            var i = 0;
            var z = 1;
            var A = a(g.slides, j).find("li.slide").size();
            var q = a(g.slides, j).find("li.slide").outerWidth();
            var e = 0;
            var v = false;
            var h = 0;
            var f = 0;
            var y = 0;
            a(g.slides, j).css({
                width: (A * q)
            });
            a(g.slides, j).find("li.slide").each(function() {
                a(this).css({
                    position: "absolute",
                    left: e,
                    display: "block"
                });
                e = e + q
            });
            a(x, j).each(function() {
                h = h + 1;
                a(this).attr("rel", h);
                a(x.eq(0), j).parent().addClass("active")
            });
            a(g.slides, j).find("li.slide:eq(" + (A - 1) + ")").css({
                position: "absolute",
                left: -q
            });
            if (A > 3) {
                a(g.slides, j).find("li.slide:eq(" + (A - 1) + ")").css({
                    position: "absolute",
                    left: -q
                })
            }
            if (g.autoHeight) {
                r(z)
            }
            a(".next", j).click(function() {
                if (v === false) {
                    d("next", true);
                    if (g.autoStart) {
                        if (g.restart) {
                            l()
                        } else {
                            clearInterval(sliderIntervalID)
                        }
                    }
                }
                return false
            });
            a(".previous", j).click(function() {
                if (v === false) {
                    d("prev", true);
                    if (g.autoStart) {
                        if (g.restart) {
                            l()
                        } else {
                            clearInterval(sliderIntervalID)
                        }
                    }
                }
                return false
            });
            if (g.containerClick) {
                a(g.container, j).click(function() {
                    if (v === false) {
                        d("next", true);
                        if (g.autoStart) {
                            if (g.restart) {
                                l()
                            } else {
                                clearInterval(sliderIntervalID)
                            }
                        }
                    }
                    return false
                })
            }
            a(x, j).click(function() {
                if (a(this).parent().hasClass("active")) {
                    return false
                } else {
                    z = a(this).attr("rel");
                    a(x, j).parent().siblings().removeClass("active");
                    a(this).parent().addClass("active");
                    d("fade", z);
                    if (g.autoStart) {
                        if (g.restart) {
                            l()
                        } else {
                            clearInterval(sliderIntervalID)
                        }
                    }
                }
                return false
            });
            if (g.autoStart) {
                sliderIntervalID = setInterval(function() {
                    if (v === false) {
                        d("next", true)
                    }
                },
                g.autoStart);
                function l() {
                    if (g.restart) {
                        clearInterval(sliderIntervalID);
                        clearInterval(f);
                        clearTimeout(y);
                        y = setTimeout(function() {
                            f = setInterval(function() {
                                d("next", true)
                            },
                            g.autoStart)
                        },
                        g.restart)
                    } else {
                        sliderIntervalID = setInterval(function() {
                            if (v === false) {
                                d("next", true)
                            }
                        },
                        g.autoStart)
                    }
                }
            }
            function k(m) {
                if (m === A + 1) {
                    m = 1
                }
                if (m === 0) {
                    m = A
                }
                a(x, j).parent().siblings().removeClass("active");
                a(x + '[rel="' + (m) + '"]', j).parent().addClass("active")
            }
            function r(m) {
                if (m === A + 1) {
                    m = 1
                }
                if (m === 0) {
                    m = A
                }
                var n = a(g.slides, j).find("li.slide:eq(" + (m - 1) + ")", j).outerHeight();
                a(g.container, j).animate({
                    height: n
                },
                g.autoHeight, g.easing)
            }
            function d(m, n) {
                v = true;
                switch (m) {
                case "next":
                    z = z + 1;
                    i = ( - (z * q - q));
                    k(z);
                    if (g.autoHeight) {
                        r(z)
                    }
                    if (A < 3) {
                        if (z === 3) {
                            a(g.slides, j).find("li.slide:eq(0)").css({
                                left: (A * q)
                            })
                        }
                        if (z === 2) {
                            a(g.slides, j).find("li.slide:eq(" + (A - 1) + ")").css({
                                position: "absolute",
                                left: (q)
                            })
                        }
                    }
                    a(g.slides, j).animate({
                        left: i
                    },
                    g.slidespeed, g.easing,
                    function() {
                        if (z === A + 1) {
                            z = 1;
                            a(g.slides, j).css({
                                left: 0
                            },
                            function() {
                                a(g.slides, j).animate({
                                    left: i
                                })
                            });
                            a(g.slides, j).find("li.slide:eq(0)").css({
                                left: 0
                            });
                            a(g.slides, j).find("li.slide:eq(" + (A - 1) + ")").css({
                                position: "absolute",
                                left: -q
                            })
                        }
                        if (z === A) {
                            a(g.slides, j).find("li.slide:eq(0)").css({
                                left: (A * q)
                            })
                        }
                        if (z === A - 1) {
                            a(g.slides, j).find("li.slide:eq(" + (A - 1) + ")").css({
                                left: A * q - q
                            })
                        }
                        v = false
                    });
                    break;
                case "prev":
                    z = z - 1;
                    i = ( - (z * q - q));
                    k(z);
                    if (g.autoHeight) {
                        r(z)
                    }
                    if (A < 3) {
                        if (z === 0) {
                            a(g.slides, j).find("li.slide:eq(" + (A - 1) + ")").css({
                                position: "absolute",
                                left: ( - q)
                            })
                        }
                        if (z === 1) {
                            a(g.slides, j).find("li.slide:eq(0)").css({
                                position: "absolute",
                                left: 0
                            })
                        }
                    }
                    a(g.slides, j).animate({
                        left: i
                    },
                    g.slidespeed, g.easing,
                    function() {
                        if (z === 0) {
                            z = A;
                            a(g.slides, j).find("li.slide:eq(" + (A - 1) + ")").css({
                                position: "absolute",
                                left: (A * q - q)
                            });
                            a(g.slides, j).css({
                                left: -(A * q - q)
                            });
                            a(g.slides, j).find("li.slide:eq(0)").css({
                                left: (A * q)
                            })
                        }
                        if (z === 2) {
                            a(g.slides, j).find("li.slide:eq(0)").css({
                                position: "absolute",
                                left: 0
                            })
                        }
                        if (z === 1) {
                            a(g.slides, j).find("li.slide:eq(" + (A - 1) + ")").css({
                                position: "absolute",
                                left: -q
                            })
                        }
                        v = false
                    });
                    break;
                case "fade":
                    z = [z] * 1;
                    i = ( - (z * q - q));
                    k(z);
                    if (g.autoHeight) {
                        r(z)
                    }
                    a(g.slides, j).find("li:slide").fadeOut(g.fadespeed,
                    function() {
                        a(g.slides, j).css({
                            left: i
                        });
                        a(g.slides, j).find("li.slide:eq(" + (A - 1) + ")").css({
                            left: A * q - q
                        });
                        a(g.slides, j).find("li.slide:eq(0)").css({
                            left: 0
                        });
                        if (z === A) {
                            a(g.slides, j).find("li.slide:eq(0)").css({
                                left: (A * q)
                            })
                        }
                        if (z === 1) {
                            a(g.slides, j).find("li.slide:eq(" + (A - 1) + ")").css({
                                position: "absolute",
                                left: -q
                            })
                        }
                        a(g.slides, j).find("li:slide").fadeIn(g.fadespeed);
                        v = false
                    });
                    break;
                default:
                    break
                }
            }
        })
    }
})(jQuery); (function(a) {
    a.fn.clearField = function(b) {
        b = a.extend({
            blurClass: "clearFieldBlurred",
            activeClass: "clearFieldActive"
        },
        b);
        a(this).each(function() {
            var c = a(this);
            if (c.attr("rel") == undefined) {
                c.attr("rel", c.val()).addClass(b.blurClass)
            }
            c.focus(function() {
                if (c.val() == c.attr("rel")) {
                    var d = "";
                    if (c.attr("name") == "url") {
                        d = "http://"
                    }
                    c.val(d).removeClass(b.blurClass).addClass(b.activeClass)
                }
            });
            c.blur(function() {
                if ((c.val() == ("")) || ((c.attr("name") == "url") && (c.val() == ("http://")))) {
                    c.val(c.attr("rel")).removeClass(b.activeClass).addClass(b.blurClass)
                }
            })
        });
        return a
    }
})(jQuery); (function(f) {
    var e,
    d,
    c = false,
    b = new Image,
    h,
    g = 1,
    a = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i;
    f.fn.fancybox = function(j) {
        j = f.extend({},
        f.fn.fancybox.defaults, j);
        var r = this;
        function m() {
            e = this;
            d = j;
            k();
            return false
        }
        function k() {
            if (c) {
                return
            }
            if (f.isFunction(d.callbackOnStart)) {
                d.callbackOnStart()
            }
            d.itemArray = [];
            d.itemCurrent = 0;
            if (j.itemArray.length > 0) {
                d.itemArray = j.itemArray
            } else {
                var t = {};
                if (!e.rel || e.rel == "") {
                    var t = {
                        href: e.href,
                        title: e.title
                    };
                    if (f(e).children("img:first").length) {
                        t.orig = f(e).children("img:first")
                    }
                    d.itemArray.push(t)
                } else {
                    var u = f(r).filter("a[rel=" + e.rel + "]");
                    var t = {};
                    for (var s = 0; s < u.length; s++) {
                        t = {
                            href: u[s].href,
                            title: u[s].title
                        };
                        if (f(u[s]).children("img:first").length) {
                            t.orig = f(u[s]).children("img:first")
                        }
                        d.itemArray.push(t)
                    }
                    while (d.itemArray[d.itemCurrent].href != e.href) {
                        d.itemCurrent++
                    }
                }
            }
            if (d.overlayShow) {
                if (isIE6) {
                    f("embed, object, select").css("visibility", "hidden")
                }
                f("#fancyoverlay").css("opacity", 0).show().animate({
                    opacity: d.overlayOpacity
                },
                166)
            }
            n()
        }
        function n() {
            f("#fancyright, #fancyleft, #fancytitle").fadeOut(333);
            var s = d.itemArray[d.itemCurrent].href;
            if (s.match(/#/)) {
                var t = window.location.href.split("#")[0];
                t = s.replace(t, "");
                t = t.substr(t.indexOf("#"));
                l('<div id="fancydiv">' + f(t).html() + "</div>", d.frameWidth, d.frameHeight)
            } else {
                if (s.match(a)) {
                    b = new Image;
                    b.src = s;
                    if (b.complete) {
                        q()
                    } else {
                        f.fn.fancybox.showLoading();
                        f(b).unbind().bind("load",
                        function() {
                            f(".fancyloading").hide();
                            q()
                        })
                    }
                } else {
                    if (s.match("iframe") || e.className.indexOf("iframe") >= 0) {
                        l('<iframe id="fancyframe" onload="jQuery.fn.fancybox.showIframe()" name="fancyiframe' + Math.round(Math.random() * 1000) + '" frameborder="0" hspace="0" src="' + s + '"></iframe>', d.frameWidth, d.frameHeight)
                    } else {
                        f.get(s,
                        function(u) {
                            l('<div id="fancyajax">' + u + "</div>", d.frameWidth, d.frameHeight)
                        })
                    }
                }
            }
        }
        function q() {
            if (d.imageScale) {
                var t = f.fn.fancybox.getViewport();
                var v = Math.min(Math.min(t[0] - 36, b.width) / b.width, Math.min(t[1] - 60, b.height) / b.height);
                var u = Math.round(v * b.width);
                var s = Math.round(v * b.height)
            } else {
                var u = b.width;
                var s = b.height
            }
            l('<img alt="" id="fancyimg" src="' + b.src + '" />', u, s)
        }
        function o() {
            if ((d.itemArray.length - 1) > d.itemCurrent) {
                var s = d.itemArray[d.itemCurrent + 1].href;
                if (s.match(a)) {
                    objNext = new Image();
                    objNext.src = s
                }
            }
            if (d.itemCurrent > 0) {
                var s = d.itemArray[d.itemCurrent - 1].href;
                if (s.match(a)) {
                    objNext = new Image();
                    objNext.src = s
                }
            }
        }
        function l(y, t, A) {
            c = true;
            var v = d.padding;
            if (isIE6) {
                f("#fancycontent")[0].style.removeExpression("height");
                f("#fancycontent")[0].style.removeExpression("width")
            }
            if (v > 0) {
                t += v * 2;
                A += v * 2;
                f("#fancycontent").css({
                    top: v + "px",
                    right: v + "px",
                    bottom: v + "px",
                    left: v + "px",
                    width: "auto",
                    height: "auto"
                });
                if (isIE6) {
                    f("#fancycontent")[0].style.setExpression("height", "(this.parentNode.clientHeight - 20)");
                    f("#fancycontent")[0].style.setExpression("width", "(this.parentNode.clientWidth - 20)")
                }
            } else {
                f("#fancycontent").css({
                    top: 0,
                    right: 0,
                    bottom: 0,
                    left: 0,
                    width: "100%",
                    height: "100%"
                })
            }
            if (f("#fancyouter").is(":visible") && t == f("#fancyouter").width() && A == f("#fancyouter").height()) {
                f("#fancycontent").fadeOut(99,
                function() {
                    f("#fancycontent").empty().append(f(y)).fadeIn(99,
                    function() {
                        i()
                    })
                });
                return
            }
            var z = f.fn.fancybox.getViewport();
            var u = (t + 36) > z[0] ? z[2] : (z[2] + Math.round((z[0] - t - 36) / 2));
            var C = (A + 50) > z[1] ? z[3] : (z[3] + Math.round((z[1] - A - 50) / 2));
            var B = {
                left: u,
                top: C,
                width: t + "px",
                height: A + "px"
            };
            if (f("#fancyouter").is(":visible")) {
                f("#fancycontent").fadeOut(99,
                function() {
                    f("#fancycontent").empty();
                    f("#fancyouter").animate(B, d.zoomSpeedChange, d.easingChange,
                    function() {
                        f("#fancycontent").append(f(y)).fadeIn(99,
                        function() {
                            i()
                        })
                    })
                })
            } else {
                if (d.zoomSpeedIn > 0 && d.itemArray[d.itemCurrent].orig !== undefined) {
                    f("#fancycontent").empty().append(f(y));
                    var x = d.itemArray[d.itemCurrent].orig;
                    var s = f.fn.fancybox.getPosition(x);
                    f("#fancyouter").css({
                        left: (s.left - 18) + "px",
                        top: (s.top - 18) + "px",
                        width: f(x).width(),
                        height: f(x).height()
                    });
                    if (d.zoomOpacity) {
                        B.opacity = "show"
                    }
                    f("#fancyouter").animate(B, d.zoomSpeedIn, d.easingIn,
                    function() {
                        i()
                    })
                } else {
                    f("#fancycontent").hide().empty().append(f(y)).show();
                    f("#fancyouter").css(B).fadeIn(99,
                    function() {
                        i()
                    })
                }
            }
        }
        function p() {
            if (d.itemCurrent != 0) {
                f("#fancyleft, #fancyleftico").unbind().bind("click",
                function(s) {
                    s.stopPropagation();
                    d.itemCurrent--;
                    n();
                    return false
                });
                f("#fancyleft").show()
            }
            if (d.itemCurrent != (d.itemArray.length - 1)) {
                f("#fancyright, #fancyrightico").unbind().bind("click",
                function(s) {
                    s.stopPropagation();
                    d.itemCurrent++;
                    n();
                    return false
                });
                f("#fancyright").show()
            }
        }
        function i() {
            p();
            o();
            f(document).keydown(function(s) {
                if (s.keyCode == 27) {
                    f.fn.fancybox.close();
                    f(document).unbind("keydown")
                } else {
                    if (s.keyCode == 37 && d.itemCurrent != 0) {
                        d.itemCurrent--;
                        n();
                        f(document).unbind("keydown")
                    } else {
                        if (s.keyCode == 39 && d.itemCurrent != (d.itemArray.length - 1)) {
                            d.itemCurrent++;
                            n();
                            f(document).unbind("keydown")
                        }
                    }
                }
            });
            if (d.centerOnScroll) {
                f(window).bind("resize scroll", f.fn.fancybox.scrollBox)
            } else {
                f("div#fancyouter").css("position", "absolute")
            }
            if (d.hideOnContentClick) {
                f("#fancywrap").click(f.fn.fancybox.close)
            }
            f("#fancyoverlay").bind("click", f.fn.fancybox.close);
            if (d.itemArray[d.itemCurrent].title !== undefined && d.itemArray[d.itemCurrent].title.length > 0) {
                f("#fancytitle").html(d.itemArray[d.itemCurrent].title);
                f("#fancytitle").fadeIn(133)
            }
            if (d.overlayShow && isIE6) {
                f("embed, object, select", f("#fancycontent")).css("visibility", "visible")
            }
            if (f.isFunction(d.callbackOnShow)) {
                d.callbackOnShow()
            }
            c = false
        }
        return this.unbind("click").click(m)
    };
    f.fn.fancybox.scrollBox = function() {
        var i = f.fn.fancybox.getViewport();
        f("#fancyouter").css("left", ((f("#fancyouter").width() + 36) > i[0] ? i[2] : i[2] + Math.round((i[0] - f("#fancyouter").width() - 36) / 2)));
        f("#fancyouter").css("top", ((f("#fancyouter").height() + 50) > i[1] ? i[3] : i[3] + Math.round((i[1] - f("#fancyouter").height() - 50) / 2)))
    };
    f.fn.fancybox.getNumeric = function(i, j) {
        return parseInt(f.curCSS(i.jquery ? i[0] : i, j, true)) || 0
    };
    f.fn.fancybox.getPosition = function(i) {
        var j = i.offset();
        j.top += f.fn.fancybox.getNumeric(i, "paddingTop");
        j.top += f.fn.fancybox.getNumeric(i, "borderTopWidth");
        j.left += f.fn.fancybox.getNumeric(i, "paddingLeft");
        j.left += f.fn.fancybox.getNumeric(i, "borderLeftWidth");
        return j
    };
    f.fn.fancybox.showIframe = function() {
        f(".fancyloading").hide();
        f("#fancyframe").show()
    };
    f.fn.fancybox.getViewport = function() {
        return [f(window).width(), f(window).height(), f(document).scrollLeft(), f(document).scrollTop()]
    };
    f.fn.fancybox.animateLoading = function() {
        if (!f("#fancyloading").is(":visible")) {
            clearInterval(h);
            return
        }
        g = (g + 1) % 12
    };
    f.fn.fancybox.showLoading = function() {
        clearInterval(h);
        var i = f.fn.fancybox.getViewport();
        f("#fancyloading").css({
            left: ((i[0] - 40) / 2 + i[2]),
            top: ((i[1] - 40) / 2 + i[3])
        }).show();
        f("#fancyloading").bind("click", f.fn.fancybox.close);
        h = setInterval(f.fn.fancybox.animateLoading, 66)
    };
    f.fn.fancybox.close = function() {
        c = true;
        f(b).unbind();
        f("#fancyoverlay").unbind();
        if (d.hideOnContentClick) {
            f("#fancywrap").unbind()
        }
        f(".fancyloading, #fancyleft, #fancyright, #fancytitle").fadeOut(133);
        if (d.centerOnScroll) {
            f(window).unbind("resize scroll")
        }
        __cleanup = function() {
            f("#fancyouter").hide();
            f("#fancyoverlay").fadeOut(133);
            if (d.centerOnScroll) {
                f(window).unbind("resize scroll")
            }
            if (isIE6) {
                f("embed, object, select").css("visibility", "visible")
            }
            if (f.isFunction(d.callbackOnClose)) {
                d.callbackOnClose()
            }
            c = false
        };
        if (f("#fancyouter").is(":visible") !== false) {
            if (d.zoomSpeedOut > 0 && d.itemArray[d.itemCurrent].orig !== undefined) {
                var j = d.itemArray[d.itemCurrent].orig;
                var i = f.fn.fancybox.getPosition(j);
                var k = {
                    left: (i.left - 18) + "px",
                    top: (i.top - 18) + "px",
                    width: f(j).width(),
                    height: f(j).height()
                };
                if (d.zoomOpacity) {
                    k.opacity = "hide"
                }
                f("#fancyouter").stop(false, true).animate(k, d.zoomSpeedOut, d.easingOut, __cleanup)
            } else {
                f("#fancyouter").stop(false, true).fadeOut(99, __cleanup)
            }
        } else {
            __cleanup()
        }
        return false
    };
    f.fn.fancybox.build = function() {
        var i = "";
        i += '<div id="fancyoverlay"></div>';
        i += '<div id="fancywrap">';
        i += '<div class="fancyloading" id="fancyloading"><div></div></div>';
        i += '<div id="fancyouter">';
        i += '<div id="fancyinner">';
        i += '<a href="javascript:;" id="fancyleft"><span class="fancyico" id="fancyleftico"></span></a><a href="javascript:;" id="fancyright"><span class="fancyico" id="fancyrightico"></span></a>';
        i += '<div id="fancycontent"></div>';
        i += "</div>";
        i += '<div id="fancytitle"></div>';
        i += "</div>";
        i += "</div>";
        f(i).appendTo("body");
        if (isIE6) {
            f("#fancyinner").prepend('<iframe class="fancybigIframe" scrolling="no" frameborder="0"></iframe>')
        }
    };
    f.fn.fancybox.defaults = {
        padding: 10,
        imageScale: true,
        zoomOpacity: true,
        zoomSpeedIn: 0,
        zoomSpeedOut: 0,
        zoomSpeedChange: 300,
        easingIn: "swing",
        easingOut: "swing",
        easingChange: "swing",
        frameWidth: 425,
        frameHeight: 355,
        overlayShow: true,
        overlayOpacity: 0.3,
        hideOnContentClick: true,
        centerOnScroll: true,
        itemArray: [],
        callbackOnStart: null,
        callbackOnShow: null,
        callbackOnClose: null
    };
    f(document).ready(function() {
        f.fn.fancybox.build()
    })
})(jQuery);
function liteboxCallback() {
    jQuery(".flickrGallery li a").fancybox({
        zoomSpeedIn: 333,
        zoomSpeedOut: 333,
        zoomSpeedChange: 133,
        easingIn: "easeOutQuart",
        easingOut: "easeInQuart",
        overlayShow: true,
        overlayOpacity: 0.75
    })
} (function(a) {
    a.fn.flickr = function(c) {
        var b = {
            api_key: null,
            type: null,
            photoset_id: null,
            text: null,
            user_id: null,
            group_id: null,
            tags: null,
            tag_mode: "any",
            sort: "relevance",
            thumb_size: "s",
            size: null,
            per_page: 100,
            page: 1,
            attr: "",
            api_url: null,
            params: "",
            api_callback: "?",
            callback: null
        };
        if (c) {
            a.extend(b, c)
        }
        return this.each(function() {
            var e = a('<ul class="clearfix">').appendTo(this);
            var d = a.flickr.format(b);
            a.getJSON(d,
            function(l) {
                if (l.stat != "ok") {
                    for (j in l) {
                        a("<li>").text(j + ": " + l[j]).appendTo(e)
                    }
                } else {
                    if (b.type == "photoset") {
                        l.photos = l.photoset
                    }
                    e.append('<input type="hidden" value="' + l.photos.page + '" />');
                    e.append('<input type="hidden" value="' + l.photos.pages + '" />');
                    e.append('<input type="hidden" value="' + l.photos.perpage + '" />');
                    e.append('<input type="hidden" value="' + l.photos.total + '" />');
                    for (var j = 0; j < l.photos.photo.length; j++) {
                        var f = l.photos.photo[j];
                        var g = "http://farm" + f.farm + ".static.flickr.com/" + f.server + "/" + f.id + "_" + f.secret + "_" + b.thumb_size + ".jpg";
                        var k = "http://farm" + f.farm + ".static.flickr.com/" + f.server + "/" + f.id + "_";
                        switch (b.size) {
                        case "m":
                            k += f.secret + "_m.jpg";
                            break;
                        case "b":
                            k += f.secret + "_b.jpg";
                            break;
                        case "o":
                            if (f.originalsecret && f.originalformat) {
                                k += f.originalsecret + "_o." + f.originalformat
                            } else {
                                k += f.secret + "_b.jpg"
                            }
                            break;
                        default:
                            k += f.secret + ".jpg"
                        }
                        e.append('<li><a class="thumb" rel="flickr" href="' + k + '" ' + b.attr + ' title="' + f.title + '"><img src="' + g + '" alt="' + f.title + '" /></a></li>')
                    }
                    if (b.callback) {
                        b.callback(e)
                    }
                }
            })
        })
    };
    a.flickr = {
        format: function(c) {
            if (c.url) {
                return c.url
            }
            var b = "http://api.flickr.com/services/rest/?format=json&jsoncallback=" + c.api_callback + "&api_key=" + c.api_key;
            switch (c.type) {
            case "photoset":
                b += "&method=flickr.photosets.getPhotos&photoset_id=" + c.photoset_id;
                break;
            case "search":
                b += "&method=flickr.photos.search&sort=" + c.sort;
                if (c.user_id) {
                    b += "&user_id=" + c.user_id
                }
                if (c.group_id) {
                    b += "&group_id=" + c.group_id
                }
                if (c.tags) {
                    b += "&tags=" + c.tags
                }
                if (c.tag_mode) {
                    b += "&tag_mode=" + c.tag_mode
                }
                if (c.text) {
                    b += "&text=" + c.text
                }
                break;
            default:
                b += "&method=flickr.photos.getRecent"
            }
            if (c.size == "o") {
                b += "&extras=original_format"
            }
            b += "&per_page=" + c.per_page + "&page=" + c.page + c.params;
            return b
        }
    }
})(jQuery); (function(a) {
    a.extend({
        jTwitter: function(e, b) {
            var c = "http://twitter.com/status/user_timeline/" + e + ".json?count=1&callback=?";
            var d = {};
            a.getJSON(c,
            function(f) {
                if (typeof b == "function") {
                    b.call(this, f[0].user)
                }
            })
        }
    })
})(jQuery); (function(a) {
    a.fn.getTwitter = function(d) {
        var c = {
            username: ["wordpress"],
            avatar_size: null,
            count: 6,
            loading_text: null,
            query: null
        };
        a.fn.extend({
            linkUrl: function() {
                var e = [];
                var f = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;
                this.each(function() {
                    e.push(this.replace(f, '<a href="$1">$1</a>'))
                });
                return a(e)
            },
            linkUser: function() {
                var e = [];
                var f = /[\@]+([A-Za-z0-9-_]+)/gi;
                this.each(function() {
                    e.push(this.replace(f, '<a href="http://twitter.com/$1">@$1</a>'))
                });
                return a(e)
            },
            linkHash: function() {
                var e = [];
                var f = / [\#]+([A-Za-z0-9-_]+)/gi;
                this.each(function() {
                    e.push(this.replace(f, ' <a href="http://search.twitter.com/search?q=&tag=$1&lang=all&from=' + c.username.join("%2BOR%2B") + '">#$1</a>'))
                });
                return a(e)
            },
            capAwesome: function() {
                var e = [];
                this.each(function() {
                    e.push(this.replace(/(a|A)wesome/gi, "AWESOME"))
                });
                return a(e)
            },
            capEpic: function() {
                var e = [];
                this.each(function() {
                    e.push(this.replace(/(e|E)pic/gi, "EPIC"))
                });
                return a(e)
            },
            makeHeart: function() {
                var e = [];
                this.each(function() {
                    e.push(this.replace(/[&lt;]+[3]/gi, "<tt class='heart'>&#x2665;</tt>"))
                });
                return a(e)
            }
        });
        function b(f) {
            var e = Date.parse(f);
            var g = (arguments.length > 1) ? arguments[1] : new Date();
            var h = parseInt((g.getTime() - e) / 1000);
            if (h < 60) {
                return "less than a minute ago"
            } else {
                if (h < 120) {
                    return "about a minute ago"
                } else {
                    if (h < (45 * 60)) {
                        return (parseInt(h / 60)).toString() + " minutes ago"
                    } else {
                        if (h < (90 * 60)) {
                            return "about an hour ago"
                        } else {
                            if (h < (24 * 60 * 60)) {
                                return "about " + (parseInt(h / 3600)).toString() + " hours ago"
                            } else {
                                if (h < (48 * 60 * 60)) {
                                    return "1 day ago"
                                } else {
                                    return (parseInt(h / 86400)).toString() + " days ago"
                                }
                            }
                        }
                    }
                }
            }
        }
        if (d) {
            a.extend(c, d)
        }
        return this.each(function() {
            var g = a('<ul class="tweet_list">').appendTo(this);
            g.hide();
            var h = a('<p class="preLoader">' + c.loading_text + "</p>");
            if (typeof(c.username) == "string") {
                c.username = [c.username]
            }
            var f = "";
            if (c.query) {
                f += "q=" + c.query
            }
            f += "&q=from:" + c.username.join("%20OR%20from:");
            var e = "http://search.twitter.com/search.json?&" + f + "&rpp=" + c.count + "&callback=?";
            if (c.loading_text) {
                a(this).append(h)
            }
            a.getJSON(e,
            function(i) {
                if (c.loading_text) {
                    h.remove()
                }
                a.each(i.results,
                function(m, n) {
                    var l = '<a class="tweet_avatar" href="http://twitter.com/' + n.from_user + '"><img src="' + n.profile_image_url + '" height="' + c.avatar_size + '" width="' + c.avatar_size + '" alt="' + n.from_user + '\'s avatar" border="0"/></a>';
                    var k = (c.avatar_size ? l: "");
                    var j = '<a class="date" href="http://twitter.com/' + n.from_user + "/statuses/" + n.id + '" title="view tweet on twitter">' + b(n.created_at) + "</a>";
                    var o = '<span class="entry">' + a([n.text]).linkUrl().linkUser().linkHash().makeHeart().capAwesome().capEpic()[0] + j + "</span>";
                    g.append("<li>" + o + "</li>");
                    g.children("li:first").addClass("firstTweet");
                    g.children("li:odd").addClass("even");
                    g.children("li:even").addClass("lastTweet")
                });
                g.animate({
                    opacity: "toggle",
                    height: "toggle"
                },
                500, "easeOutQuart")
            })
        })
    }
})(jQuery);
jQuery.cookie = function(b, j, m) {
    if (typeof j != "undefined") {
        m = m || {};
        if (j === null) {
            j = "";
            m = jQuery.extend({},
            m);
            m.expires = -1
        }
        var e = "";
        if (m.expires && (typeof m.expires == "number" || m.expires.toUTCString)) {
            var f;
            if (typeof m.expires == "number") {
                f = new Date();
                f.setTime(f.getTime() + (m.expires * 24 * 60 * 60 * 1000))
            } else {
                f = m.expires
            }
            e = "; expires=" + f.toUTCString()
        }
        var l = m.path ? "; path=" + (m.path) : "";
        var g = m.domain ? "; domain=" + (m.domain) : "";
        var a = m.secure ? "; secure": "";
        document.cookie = [b, "=", encodeURIComponent(j), e, l, g, a].join("")
    } else {
        var d = null;
        if (document.cookie && document.cookie != "") {
            var k = document.cookie.split(";");
            for (var h = 0; h < k.length; h++) {
                var c = jQuery.trim(k[h]);
                if (c.substring(0, b.length + 1) == (b + "=")) {
                    d = decodeURIComponent(c.substring(b.length + 1));
                    break
                }
            }
        }
        return d
    }
};
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()
        }
    })
};
jQuery.fn.nudge = function(a) {
    a = jQuery.extend({
        amount: 20,
        duration: 300,
        property: "padding",
        direction: "left",
        toCallback: function() {},
        fromCallback: function() {}
    },
    a);
    this.each(function() {
        var h = jQuery(this);
        var e = a;
        var d = e.direction;
        var g = e.property + d.substring(0, 1).toUpperCase() + d.substring(1, d.length);
        var c = h.css(g);
        var f = {};
        f[g] = parseInt(e.amount) + parseInt(c);
        var b = {};
        b[g] = c;
        h.hover(function() {
            h.stop().animate(f, e.duration, "", e.toCallback)
        },
        function() {
            h.stop().animate(b, e.duration, "", e.fromCallback)
        })
    });
    return this
}; (function(a) {
    a.fn.bubble = function(b) {
        a.fn.bubble.defaults = {
            timeout: 0,
            offset: 22
        };
        var c = a.extend({},
        a.fn.bubble.defaults, b);
        return this.each(function() {
            var d = function() {
                var g = a(this).find(".bubble").css("display", "block")[0];
                var i = a(g).height();
                var h = g.offsetHeight;
                var f = h + i;
                a(this).find(".bubble").stop().css({
                    opacity: 0,
                    top: 2 - h
                }).animate({
                    opacity: 1,
                    top: c.offset - h
                },
                250)
            };
            var e = function() {
                var g = this;
                var h = a(".bubble", this).css("display", "block")[0];
                var j = a(h).height();
                var i = h.offsetHeight;
                var f = i + j;
                a(this).find(".bubble").stop().animate({
                    opacity: 0,
                    top: 12 - i
                },
                250, "swing",
                function() {
                    h.hiding = false;
                    a(this).css("display", "none")
                })
            };
            a(this).find(".bubble").hover(function() {
                return false
            },
            function() {
                return true
            });
            a(this).hover(function() {
                var f = this;
                d.apply(this);
                if (c.timeout > 0) {
                    this.tttimeout = setTimeout(function() {
                        e.apply(f)
                    },
                    c.timeout)
                }
            },
            function() {
                clearTimeout(this.tttimeout);
                e.apply(this)
            })
        })
    }
})(jQuery);
function updateCookie(c, b) {
    var a = c.replace(/[#. ]/g, "");
    jQuery.cookie(a, b, {
        path: "/"
    })
}
function fontControl(a, e, d, f) {
    jQuery(a).append('<a href="javascript:void(0);" class="fontSize bubble" title="Increase or decrease text size"></a>');
    var b = "page-font-size";
    var c = jQuery.cookie(b);
    if (c != null) {
        jQuery(e).css("fontSize", parseInt(c))
    }
    jQuery(a + " .fontSize").click(function() {
        curSize = parseInt(jQuery(e).css("fontSize"));
        newSize = curSize + 1;
        if (newSize > f) {
            newSize = d
        }
        if (newSize >= d) {
            jQuery(e).animate({
                fontSize: newSize
            },
            333, "swing")
        }
        updateCookie(b, newSize)
    })
}
function pageWidthControl(a, d, e, g, f) {
    jQuery(a).append('<a href="javascript:void(0);" class="pageWidth bubble" title="switch from fixed to fluid page width"></a>');
    var b = "page-max-width";
    var c = jQuery.cookie(b);
    if (c != null) {
        jQuery(d).css("maxWidth", c)
    }
    jQuery(a + " .pageWidth").click(function() {
        curMaxWidth = jQuery(d).css("maxWidth");
        newMaxWidth = curMaxWidth;
        switch (curMaxWidth) {
        case e:
            newMaxWidth = g;
            break;
        case g:
            newMaxWidth = f;
            break;
        case f:
            newMaxWidth = e;
            break;
        default:
            newMaxWidth = f
        }
        jQuery(d).animate({
            maxWidth: newMaxWidth
        },
        333, "easeOutQuart");
        updateCookie(b, newMaxWidth)
    })
} (function(a) {
    a.fn.dropDown = function(b) {
        a.fn.dropDown.defaults = {
            delay: 0
        };
        var c = a.extend({},
        a.fn.dropDown.defaults, b);
        return this.each(function() {
            a(this).find("ul").css({
                display: "none"
            });
            a(this).find("li").hover(function() {
                a(this).find("ul:first").css({
                    display: "block",
                    opacity: 0,
                    marginLeft: 20
                }).animate({
                    opacity: 1,
                    marginLeft: 0
                },
                150, "swing")
            },
            function() {
                a(this).find("ul:first").animate({
                    opacity: 0,
                    marginLeft: 20
                },
                150, "swing",
                function() {
                    a(this).css({
                        display: "none"
                    })
                })
            })
        })
    }
})(jQuery); (function(b) {
    b.fn.superfish = function(k) {
        var g = b.fn.superfish,
        j = g.c,
        f = b(['<span class="', j.arrowClass, '"> &#187;</span>'].join("")),
        i = function() {
            var c = b(this),
            l = d(c);
            clearTimeout(l.sfTimer);
            c.showSuperfishUl().siblings().hideSuperfishUl()
        },
        e = function() {
            var c = b(this),
            m = d(c),
            l = g.op;
            clearTimeout(m.sfTimer);
            m.sfTimer = setTimeout(function() {
                l.retainPath = (b.inArray(c[0], l.$path) > -1);
                c.hideSuperfishUl();
                if (l.$path.length && c.parents(["li.", l.hoverClass].join("")).length < 1) {
                    i.call(l.$path)
                }
            },
            l.delay)
        },
        d = function(c) {
            var l = c.parents(["ul.", j.menuClass, ":first"].join(""))[0];
            g.op = g.o[l.serial];
            return l
        },
        h = function(c) {
            c.addClass(j.anchorClass).append(f.clone())
        };
        return this.each(function() {
            var c = this.serial = g.o.length;
            var m = b.extend({},
            g.defaults, k);
            m.$path = b("li." + m.pathClass, this).slice(0, m.pathLevels).each(function() {
                b(this).addClass([m.hoverClass, j.bcClass].join(" ")).filter("li:has(ul)").removeClass(m.pathClass)
            });
            g.o[c] = g.op = m;
            b("li:has(ul)", this)[(b.fn.hoverIntent && !m.disableHI) ? "hoverIntent": "hover"](i, e).each(function() {
                if (m.autoArrows) {
                    h(b(">a:first-child", this))
                }
            }).not("." + j.bcClass).hideSuperfishUl();
            var l = b("a", this);
            l.each(function(n) {
                var o = l.eq(n).parents("li");
                l.eq(n).focus(function() {
                    i.call(o)
                }).blur(function() {
                    e.call(o)
                })
            });
            m.onInit.call(this)
        }).each(function() {
            var c = [j.menuClass];
            b(this).addClass(c.join(" "))
        })
    };
    var a = b.fn.superfish;
    a.o = [];
    a.op = {};
    a.c = {
        bcClass: "sf-breadcrumb",
        menuClass: "sf-js-enabled",
        anchorClass: "sf-with-ul",
        arrowClass: "arrow"
    };
    a.defaults = {
        hoverClass: "sfHover",
        pathClass: "overideThisToUse",
        pathLevels: 1,
        delay: 333,
        speed: "normal",
        autoArrows: true,
        disableHI: false,
        onInit: function() {},
        onBeforeShow: function() {},
        onShow: function() {},
        onHide: function() {}
    };
    b.fn.extend({
        hideSuperfishUl: function() {
            var e = a.op,
            d = (e.retainPath === true) ? e.$path: "";
            e.retainPath = false;
            if (isIE) {
                css1 = {
                    marginLeft: 20
                }
            } else {
                css1 = {
                    opacity: 0,
                    marginLeft: 20
                }
            }
            var c = b(["li.", e.hoverClass].join(""), this).add(this).not(d).removeClass(e.hoverClass).find(">ul").animate(css1, 150, "swing",
            function() {
                b(this).css({
                    display: "none"
                })
            });
            e.onHide.call(c);
            return this
        },
        showSuperfishUl: function() {
            var d = a.op,
            c = this.addClass(d.hoverClass).find(">ul:hidden").css("visibility", "visible");
            d.onBeforeShow.call(c);
            if (isIE) {
                css1 = {
                    display: "block",
                    marginLeft: 20
                };
                css2 = {
                    marginLeft: 0
                }
            } else {
                css1 = {
                    display: "block",
                    opacity: 0,
                    marginLeft: 20
                };
                css2 = {
                    opacity: 1,
                    marginLeft: 0
                }
            }
            c.css(css1).animate(css2, 150, "swing",
            function() {
                d.onShow.call(c)
            });
            return this
        }
    })
})(jQuery); (function(a) {
    a.fn.quoteComment = function(b) {
        a.fn.quoteComment.defaults = {
            comment: "li.comment",
            comment_id: ".comment-id",
            author: ".comment-author",
            source: ".comment-body",
            target: "#comment"
        };
        a.fn.appendVal = function(d) {
            return this.each(function() {
                this.value += d
            })
        };
        var c = a.extend({},
        a.fn.quoteComment.defaults, b);
        return this.each(function() {
            a(this).click(function() {
                $c = a(this).parents(c.comment).find(c.source);
                $author = a(this).parents(c.comment).find(c.author);
                $cid = a(this).parents(c.comment).find(c.comment_id).attr("href");
                a(c.target).appendVal('<blockquote><a class="src" href="' + $cid + '"><strong><em>' + $author.html() + ":</em></strong>\n</a>\n " + $c.html() + "</blockquote>");
                a(c.target).focus();
                return false
            })
        })
    }
})(jQuery);
function webshot(b, a) {
    jQuery(b).each(function(c) {
        jQuery("body").append("<div class='" + a + "' id='" + a + c + "'><img src='http://images.websnapr.com/?size=s&amp;url=" + jQuery(this).attr("href") + "' /></div>");
        var d = jQuery("#" + a + c);
        jQuery(this).mouseover(function() {
            d.css({
                opacity: 1,
                display: "none"
            }).fadeIn(333)
        }).mousemove(function(e) {
            d.css({
                left: e.pageX + 15,
                top: e.pageY + 15
            })
        }).mouseout(function() {
            d.fadeOut(333)
        })
    })
} (function(a) {
    a.fn.minitabs = function(b) {
        a.fn.minitabs.defaults = {
            content: ".sections",
            nav: "ul:first",
            effect: "top",
            speed: 333,
            cookies: true
        };
        var c = a.extend({},
        a.fn.minitabs.defaults, b);
        return this.each(function() {
            var e = a(this);
            var h = e.attr("id");
            var d = a("#" + h + " " + c.nav);
            if (c.cookies) {
                var f = h;
                var j = a.cookie(f)
            }
            e.find(c.content + " >div:gt(0)").hide();
            if (c.cookies && (j != null)) {
                d.find("li." + j).addClass("active");
                var g = d.find("li." + j + " a");
                var i = g.attr("href");
                e.find(c.content + " div" + i).show()
            } else {
                d.find("li:last").addClass("active");
                e.find(c.content + " div:first").show()
            }
            d.find("li>a").click(function() {
                if (!a(this).parent("li").hasClass("active")) {
                    d.find("li").removeClass("active");
                    if (c.cookies) {
                        var m = a(this).parent("li").attr("class");
                        a.cookie(f, m, {
                            path: "/"
                        })
                    }
                    a(this).parent("li").addClass("active");
                    a(this).blur();
                    var k = /([_\-\w]+$)/i;
                    var l = a("#" + h + " #" + k.exec(this.href)[1]);
                    if (c.effect == "slide") {
                        e.find(c.content + " >div").slideUp(c.effect)
                    } else {
                        e.find(c.content + " >div").hide()
                    }
                    switch (c.effect) {
                    case "top":
                        if (isIE) {
                            l.css({
                                top:
                                -300
                            }).show().animate({
                                top: 0
                            },
                            c.speed, "easeOutQuart")
                        } else {
                            l.css({
                                opacity: 0,
                                top: -300
                            }).show().animate({
                                opacity: 1,
                                top: 0
                            },
                            c.speed, "easeOutQuart")
                        }
                        break;
                    case "slide":
                        l.slideDown(c.speed);
                        break;
                    case "height":
                        originalHeight = l.height();
                        l.css({
                            opacity: 0,
                            height: 0
                        }).show().animate({
                            opacity: 1,
                            height: originalHeight
                        },
                        c.speed, "easeOutQuart");
                        break
                    }
                    return false
                }
            })
        })
    }
})(jQuery);
jQuery(document).ready(function() {
    if (isIE6) {
        jQuery("#page").append("<div class='crap-browser-warning'>You're using a old and buggy browser. Switch to a <a href='http://www.mozilla.com/firefox/'>normal browser</a> or consider <a href='http://www.microsoft.com/windows/internet-explorer'>upgrading your Internet Explorer</a> to the latest version</div>")
    }
    jQuery("#navigation").superfish({
        autoArrows: true
    });
    fontControl("#pageControls", "body", 10, 18);
    pageWidthControl("#pageControls", ".page-content", "95%", "980px", "1200px");
    webshot("a.websnapr", "webshot");
    jQuery(".post-tabs").minitabs({
        content: ".sections",
        nav: ".tabs",
        effect: "top",
        speed: 333,
        cookies: false
    });
    jQuery(".sidebar-tabs").minitabs({
        content: ".sections",
        nav: ".box-tabs",
        effect: "slide",
        speed: 150
    });
    jQuery("ul.menuList .cat-item").bubble({
        timeout: 6000
    });
    jQuery(".shareThis, .bubble-trigger").bubble({
        offset: 16,
        timeout: 0
    });
    //jQuery(".comment-head").bubble({
    //    timeout: 0
    //});
    jQuery("#pageControls").bubble({
        offset: 30
    });
    jQuery("ul.menuList li a").nudge({
        property: "padding",
        direction: "left",
        amount: 6,
        duration: 166
    });
    jQuery("a.rss").nudge({
        property: "bottom",
        direction: "",
        amount: 14,
        duration: 166
    });
    jQuery("a#show-author-info").click(function() {
        jQuery("#author-info").slideToggle(333)
    });
    jQuery("a.quote").quoteComment({
        comment: "li.comment",
        comment_id: ".comment-id",
        author: ".comment-author",
        source: ".comment-text",
        target: "#comment"
    });
    if (lightbox != 0) {
        jQuery("a[rel='lightbox'], a[href$='.jpg'], a[href$='.jpeg'], a[href$='.gif'], a[href$='.png'], a[href$='.JPG'], a[href$='.JPEG'], a[href$='.GIF'], a[href$='.PNG']").fancybox({
            zoomSpeedIn: 333,
            zoomSpeedOut: 333,
            zoomSpeedChange: 133,
            easingIn: "easeOutQuart",
            easingOut: "easeInQuart",
            overlayShow: true,
            overlayOpacity: 0.75
        })
    }
    if (!isIE) {
        jQuery(".fadeThis").append('<span class="hover"></span>').each(function() {
            var a = jQuery("> span.hover", this).css("opacity", 0);
            jQuery(this).hover(function() {
                a.stop().fadeTo(333, 1)
            },
            function() {
                a.stop().fadeTo(333, 0)
            })
        })
    }
    jQuery("#footer-blocks.withSlider").loopedSlider();
    jQuery("#featured-content.withSlider").loopedSlider({
        autoStart: 10000,
        autoHeight: false
    });
    jQuery("a#goTop").click(function() {
        jQuery("html").animate({
            scrollTop: 0
        },
        "slow")
    });
    jQuery(".clearField").clearField({
        blurClass: "clearFieldBlurred",
        activeClass: "clearFieldActive"
    });
    if (!isIE) {
        jQuery("object").append('<param name="wmode" value="transparent">');
        jQuery("embed").attr("wmode", "transparent");
        jQuery("object,embed").css("display", "none");
        jQuery("object,embed").css("display", "block")
    }
    jQuery("#navigation").attr("role", "navigation");
    jQuery("#primary-content").attr("role", "main");
    jQuery("#sidebar").attr("role", "complementary");
    jQuery("#searchform").attr("role", "search")
});
