//var sIFR = new 
//function() {
//    var O = this;
//    var E = {
//        ACTIVE: "sIFR-active",
//        REPLACED: "sIFR-replaced",
//        IGNORE: "sIFR-ignore",
//        ALTERNATE: "sIFR-alternate",
//        CLASS: "sIFR-class",
//        LAYOUT: "sIFR-layout",
//        FLASH: "sIFR-flash",
//        FIX_FOCUS: "sIFR-fixfocus",
//        DUMMY: "sIFR-dummy"
//    };
//    E.IGNORE_CLASSES = [E.REPLACED, E.IGNORE, E.ALTERNATE];
//    this.MIN_FONT_SIZE = 6;
//    this.MAX_FONT_SIZE = 126;
//    this.FLASH_PADDING_BOTTOM = 5;
//    this.VERSION = "436";
//    this.isActive = false;
//    this.isEnabled = true;
//    this.fixHover = true;
//    this.autoInitialize = true;
//    this.setPrefetchCookie = true;
//    this.cookiePath = "/";
//    this.domains = [];
//    this.forceWidth = true;
//    this.fitExactly = false;
//    this.forceTextTransform = true;
//    this.useDomLoaded = true;
//    this.useStyleCheck = false;
//    this.hasFlashClassSet = false;
//    this.repaintOnResize = true;
//    this.replacements = [];
//    var L = 0;
//    var R = false;

//    function Y() { }
//    function D(c) {
//        function d(e) {
//            return e.toLocaleUpperCase()
//        }
//        this.normalize = function(e) {
//            return e.replace(/\n|\r|\xA0/g, D.SINGLE_WHITESPACE).replace(/\s+/g, D.SINGLE_WHITESPACE)
//        };
//        this.textTransform = function(e, f) {
//            switch (e) {
//                case "uppercase":
//                    return f.toLocaleUpperCase();
//                case "lowercase":
//                    return f.toLocaleLowerCase();
//                case "capitalize":
//                    return f.replace(/^\w|\s\w/g, d)
//            }
//            return f
//        };
//        this.toHexString = function(e) {
//            if (e.charAt(0) != "#" || e.length != 4 && e.length != 7) {
//                return e
//            }
//            e = e.substring(1);
//            return "0x" + (e.length == 3 ? e.replace(/(.)(.)(.)/, "$1$1$2$2$3$3") : e)
//        };
//        this.toJson = function(g, f) {
//            var e = "";
//            switch (typeof (g)) {
//                case "string":
//                    e = '"' + f(g) + '"';
//                    break;
//                case "number":
//                case "boolean":
//                    e = g.toString();
//                    break;
//                case "object":
//                    e = [];
//                    for (var h in g) {
//                        if (g[h] == Object.prototype[h]) {
//                            continue
//                        }
//                        e.push('"' + h + '":' + this.toJson(g[h]))
//                    }
//                    e = "{" + e.join(",") + "}";
//                    break
//            }
//            return e
//        };
//        this.convertCssArg = function(e) {
//            if (!e) {
//                return {}
//            }
//            if (typeof (e) == "object") {
//                if (e.constructor == Array) {
//                    e = e.join("")
//                } else {
//                    return e
//                }
//            }
//            var l = {};
//            var m = e.split("}");
//            for (var h = 0; h < m.length; h++) {
//                var k = m[h].match(/([^\s{]+)\s*\{(.+)\s*;?\s*/);
//                if (!k || k.length != 3) {
//                    continue
//                }
//                if (!l[k[1]]) {
//                    l[k[1]] = {}
//                }
//                var g = k[2].split(";");
//                for (var f = 0; f < g.length; f++) {
//                    var n = g[f].match(/\s*([^:\s]+)\s*\:\s*([^;]+)/);
//                    if (!n || n.length != 3) {
//                        continue
//                    }
//                    l[k[1]][n[1]] = n[2].replace(/\s+$/, "")
//                }
//            }
//            return l
//        };
//        this.extractFromCss = function(g, f, i, e) {
//            var h = null;
//            if (g && g[f] && g[f][i]) {
//                h = g[f][i];
//                if (e) {
//                    delete g[f][i]
//                }
//            }
//            return h
//        };
//        this.cssToString = function(f) {
//            var g = [];
//            for (var e in f) {
//                var j = f[e];
//                if (j == Object.prototype[e]) {
//                    continue
//                }
//                g.push(e, "{");
//                for (var i in j) {
//                    if (j[i] == Object.prototype[i]) {
//                        continue
//                    }
//                    var h = j[i];
//                    if (D.UNIT_REMOVAL_PROPERTIES[i]) {
//                        h = parseInt(h, 10)
//                    }
//                    g.push(i, ":", h, ";")
//                }
//                g.push("}")
//            }
//            return g.join("")
//        };
//        this.escape = function(e) {
//            return escape(e).replace(/\+/g, "%2B")
//        };
//        this.encodeVars = function(e) {
//            return e.join("&").replace(/%/g, "%25")
//        };
//        this.copyProperties = function(g, f) {
//            for (var e in g) {
//                if (f[e] === undefined) {
//                    f[e] = g[e]
//                }
//            }
//            return f
//        };
//        this.domain = function() {
//            var f = "";
//            try {
//                f = document.domain
//            } catch (g) { }
//            return f
//        };
//        this.domainMatches = function(h, g) {
//            if (g == "*" || g == h) {
//                return true
//            }
//            var f = g.lastIndexOf("*");
//            if (f > -1) {
//                g = g.substr(f + 1);
//                var e = h.lastIndexOf(g);
//                if (e > -1 && (e + g.length) == h.length) {
//                    return true
//                }
//            }
//            return false
//        };
//        this.uriEncode = function(e) {
//            return encodeURI(decodeURIComponent(e))
//        };
//        this.delay = function(f, h, g) {
//            var e = Array.prototype.slice.call(arguments, 3);
//            setTimeout(function() {
//                h.apply(g, e)
//            }, f)
//        }
//    }
//    D.UNIT_REMOVAL_PROPERTIES = {
//        leading: true,
//        "margin-left": true,
//        "margin-right": true,
//        "text-indent": true
//    };
//    D.SINGLE_WHITESPACE = " ";

//    function U(e) {
//        var d = this;

//        function c(g, j, h) {
//            var k = d.getStyleAsInt(g, j, e.ua.ie);
//            if (k == 0) {
//                k = g[h];
//                for (var f = 3; f < arguments.length; f++) {
//                    k -= d.getStyleAsInt(g, arguments[f], true)
//                }
//            }
//            return k
//        }
//        this.getBody = function() {
//            return document.getElementsByTagName("body")[0] || null
//        };
//        this.querySelectorAll = function(f) {
//            return window.parseSelector(f)
//        };
//        this.addClass = function(f, g) {
//            if (g) {
//                g.className = ((g.className || "") == "" ? "" : g.className + " ") + f
//            }
//        };
//        this.removeClass = function(f, g) {
//            if (g) {
//                g.className = g.className.replace(new RegExp("(^|\\s)" + f + "(\\s|$)"), "").replace(/^\s+|(\s)\s+/g, "$1")
//            }
//        };
//        this.hasClass = function(f, g) {
//            return new RegExp("(^|\\s)" + f + "(\\s|$)").test(g.className)
//        };
//        this.hasOneOfClassses = function(h, g) {
//            for (var f = 0; f < h.length; f++) {
//                if (this.hasClass(h[f], g)) {
//                    return true
//                }
//            }
//            return false
//        };
//        this.ancestorHasClass = function(g, f) {
//            g = g.parentNode;
//            while (g && g.nodeType == 1) {
//                if (this.hasClass(f, g)) {
//                    return true
//                }
//                g = g.parentNode
//            }
//            return false
//        };
//        this.create = function(f, g) {
//            var h = document.createElementNS ? document.createElementNS(U.XHTML_NS, f) : document.createElement(f);
//            if (g) {
//                h.className = g
//            }
//            return h
//        };
//        this.getComputedStyle = function(h, i) {
//            var f;
//            if (document.defaultView && document.defaultView.getComputedStyle) {
//                var g = document.defaultView.getComputedStyle(h, null);
//                f = g ? g[i] : null
//            } else {
//                if (h.currentStyle) {
//                    f = h.currentStyle[i]
//                }
//            }
//            return f || ""
//        };
//        this.getStyleAsInt = function(g, i, f) {
//            var h = this.getComputedStyle(g, i);
//            if (f && !/px$/.test(h)) {
//                return 0
//            }
//            return parseInt(h) || 0
//        };
//        this.getWidthFromStyle = function(f) {
//            return c(f, "width", "offsetWidth", "paddingRight", "paddingLeft", "borderRightWidth", "borderLeftWidth")
//        };
//        this.getHeightFromStyle = function(f) {
//            return c(f, "height", "offsetHeight", "paddingTop", "paddingBottom", "borderTopWidth", "borderBottomWidth")
//        };
//        this.getDimensions = function(j) {
//            var h = j.offsetWidth;
//            var f = j.offsetHeight;
//            if (h == 0 || f == 0) {
//                for (var g = 0; g < j.childNodes.length; g++) {
//                    var k = j.childNodes[g];
//                    if (k.nodeType != 1) {
//                        continue
//                    }
//                    h = Math.max(h, k.offsetWidth);
//                    f = Math.max(f, k.offsetHeight)
//                }
//            }
//            return {
//                width: h,
//                height: f
//            }
//        };
//        this.getViewport = function() {
//            return {
//                width: window.innerWidth || document.documentElement.clientWidth || this.getBody().clientWidth,
//                height: window.innerHeight || document.documentElement.clientHeight || this.getBody().clientHeight
//            }
//        };
//        this.blurElement = function(g) {
//            try {
//                g.blur();
//                return
//            } catch (h) { }
//            var f = this.create("input");
//            f.style.width = "0px";
//            f.style.height = "0px";
//            g.parentNode.appendChild(f);
//            f.focus();
//            f.blur();
//            f.parentNode.removeChild(f)
//        }
//    }
//    U.XHTML_NS = "http://www.w3.org/1999/xhtml";

//    function H(r) {
//        var g = navigator.userAgent.toLowerCase();
//        var q = (navigator.product || "").toLowerCase();
//        var h = navigator.platform.toLowerCase();
//        this.parseVersion = H.parseVersion;
//        this.macintosh = /^mac/.test(h);
//        this.windows = /^win/.test(h);
//        this.linux = /^linux/.test(h);
//        this.quicktime = false;
//        this.opera = /opera/.test(g);
//        this.konqueror = /konqueror/.test(g);
//        this.ie = false/*@cc_on || true@*/
//        ;
//        this.ieSupported = this.ie && !/ppc|smartphone|iemobile|msie\s5\.5/.test(g)/*@cc_on && @_jscript_version >= 5.5@*/
//        ;
//        this.ieWin = this.ie && this.windows/*@cc_on && @_jscript_version >= 5.1@*/
//        ;
//        this.windows = this.windows && (!this.ie || this.ieWin);
//        this.ieMac = this.ie && this.macintosh/*@cc_on && @_jscript_version < 5.1@*/
//        ;
//        this.macintosh = this.macintosh && (!this.ie || this.ieMac);
//        this.safari = /safari/.test(g);
//        this.webkit = !this.konqueror && /applewebkit/.test(g);
//        this.khtml = this.webkit || this.konqueror;
//        this.gecko = !this.khtml && q == "gecko";
//        this.ieVersion = this.ie && /.*msie\s(\d\.\d)/.exec(g) ? this.parseVersion(RegExp.$1) : "0";
//        this.operaVersion = this.opera && /.*opera(\s|\/)(\d+\.\d+)/.exec(g) ? this.parseVersion(RegExp.$2) : "0";
//        this.webkitVersion = this.webkit && /.*applewebkit\/(\d+).*/.exec(g) ? this.parseVersion(RegExp.$1) : "0";
//        this.geckoVersion = this.gecko && /.*rv:\s*([^\)]+)\)\s+gecko/.exec(g) ? this.parseVersion(RegExp.$1) : "0";
//        this.konquerorVersion = this.konqueror && /.*konqueror\/([\d\.]+).*/.exec(g) ? this.parseVersion(RegExp.$1) : "0";
//        this.flashVersion = 0;
//        if (this.ieWin) {
//            var l;
//            var o = false;
//            try {
//                l = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")
//            } catch (m) {
//                try {
//                    l = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
//                    this.flashVersion = this.parseVersion("6");
//                    l.AllowScriptAccess = "always"
//                } catch (m) {
//                    o = this.flashVersion == this.parseVersion("6")
//                }
//                if (!o) {
//                    try {
//                        l = new ActiveXObject("ShockwaveFlash.ShockwaveFlash")
//                    } catch (m) { }
//                }
//            }
//            if (!o && l) {
//                this.flashVersion = this.parseVersion((l.GetVariable("$version") || "").replace(/^\D+(\d+)\D+(\d+)\D+(\d+).*/g, "$1.$2.$3"))
//            }
//        } else {
//            if (navigator.plugins && navigator.plugins["Shockwave Flash"]) {
//                var n = navigator.plugins["Shockwave Flash"].description.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
//                var p = n.replace(/^\D*(\d+\.\d+).*$/, "$1");
//                if (/r/.test(n)) {
//                    p += n.replace(/^.*r(\d*).*$/, ".$1")
//                } else {
//                    if (/d/.test(n)) {
//                        p += ".0"
//                    }
//                }
//                this.flashVersion = this.parseVersion(p);
//                var j = false;
//                for (var k = 0, c = this.flashVersion >= H.MIN_FLASH_VERSION; c && k < navigator.mimeTypes.length; k++) {
//                    var f = navigator.mimeTypes[k];
//                    if (f.type != "application/x-shockwave-flash") {
//                        continue
//                    }
//                    if (f.enabledPlugin) {
//                        j = true;
//                        if (f.enabledPlugin.description.toLowerCase().indexOf("quicktime") > -1) {
//                            c = false;
//                            this.quicktime = true
//                        }
//                    }
//                }
//                if (this.quicktime || !j) {
//                    this.flashVersion = this.parseVersion("0")
//                }
//            }
//        }
//        this.flash = this.flashVersion >= H.MIN_FLASH_VERSION;
//        this.transparencySupport = this.macintosh || this.windows || this.linux && (this.flashVersion >= this.parseVersion("10") && (this.gecko && this.geckoVersion >= this.parseVersion("1.9") || this.opera));
//        this.computedStyleSupport = this.ie || !!document.defaultView.getComputedStyle;
//        this.fixFocus = this.gecko && this.windows;
//        this.nativeDomLoaded = this.gecko || this.webkit && this.webkitVersion >= this.parseVersion("525") || this.konqueror && this.konquerorMajor > this.parseVersion("03") || this.opera;
//        this.mustCheckStyle = this.khtml || this.opera;
//        this.forcePageLoad = this.webkit && this.webkitVersion < this.parseVersion("523");
//        this.properDocument = typeof (document.location) == "object";
//        this.supported = this.flash && this.properDocument && (!this.ie || this.ieSupported) && this.computedStyleSupport && (!this.opera || this.operaVersion >= this.parseVersion("9.61")) && (!this.webkit || this.webkitVersion >= this.parseVersion("412")) && (!this.gecko || this.geckoVersion >= this.parseVersion("1.8.0.12")) && (!this.konqueror)
//    }
//    H.parseVersion = function(c) {
//        return c.replace(/(^|\D)(\d+)(?=\D|$)/g, function(f, e, g) {
//            f = e;
//            for (var d = 4 - g.length; d >= 0; d--) {
//                f += "0"
//            }
//            return f + g
//        })
//    };
//    H.MIN_FLASH_VERSION = H.parseVersion("8");

//    function F(c) {
//        this.fix = c.ua.ieWin && window.location.hash != "";
//        var d;
//        this.cache = function() {
//            d = document.title
//        };

//        function e() {
//            document.title = d
//        }
//        this.restore = function() {
//            if (this.fix) {
//                setTimeout(e, 0)
//            }
//        }
//    }
//    function S(l) {
//        var e = null;

//        function c() {
//            try {
//                if (l.ua.ie || document.readyState != "loaded" && document.readyState != "complete") {
//                    document.documentElement.doScroll("left")
//                }
//            } catch (n) {
//                return setTimeout(c, 10)
//            }
//            i()
//        }
//        function i() {
//            if (l.useStyleCheck) {
//                h()
//            } else {
//                if (!l.ua.mustCheckStyle) {
//                    d(null, true)
//                }
//            }
//        }
//        function h() {
//            e = l.dom.create("div", E.DUMMY);
//            l.dom.getBody().appendChild(e);
//            m()
//        }
//        function m() {
//            if (l.dom.getComputedStyle(e, "marginLeft") == "42px") {
//                g()
//            } else {
//                setTimeout(m, 10)
//            }
//        }
//        function g() {
//            if (e && e.parentNode) {
//                e.parentNode.removeChild(e)
//            }
//            e = null;
//            d(null, true)
//        }
//        function d(n, o) {
//            l.initialize(o);
//            if (n && n.type == "load") {
//                if (document.removeEventListener) {
//                    document.removeEventListener("DOMContentLoaded", d, false)
//                }
//                if (window.removeEventListener) {
//                    window.removeEventListener("load", d, false)
//                }
//            }
//        }
//        function j() {
//            l.prepareClearReferences();
//            if (document.readyState == "interactive") {
//                document.attachEvent("onstop", f);
//                setTimeout(function() {
//                    document.detachEvent("onstop", f)
//                }, 0)
//            }
//        }
//        function f() {
//            document.detachEvent("onstop", f);
//            k()
//        }
//        function k() {
//            l.clearReferences()
//        }
//        this.attach = function() {
//            if (window.addEventListener) {
//                window.addEventListener("load", d, false)
//            } else {
//                window.attachEvent("onload", d)
//            }
//            if (!l.useDomLoaded || l.ua.forcePageLoad || l.ua.ie && window.top != window) {
//                return
//            }
//            if (l.ua.nativeDomLoaded) {
//                document.addEventListener("DOMContentLoaded", i, false)
//            } else {
//                if (l.ua.ie || l.ua.khtml) {
//                    c()
//                }
//            }
//        };
//        this.attachUnload = function() {
//            if (!l.ua.ie) {
//                return
//            }
//            window.attachEvent("onbeforeunload", j);
//            window.attachEvent("onunload", k)
//        }
//    }
//    var Q = "sifrFetch";

//    function N(c) {
//        var e = false;
//        this.fetchMovies = function(f) {
//            if (c.setPrefetchCookie && new RegExp(";?" + Q + "=true;?").test(document.cookie)) {
//                return
//            }
//            try {
//                e = true;
//                d(f)
//            } catch (g) { }
//            if (c.setPrefetchCookie) {
//                document.cookie = Q + "=true;path=" + c.cookiePath
//            }
//        };
//        this.clear = function() {
//            if (!e) {
//                return
//            }
//            try {
//                var f = document.getElementsByTagName("script");
//                for (var g = f.length - 1; g >= 0; g--) {
//                    var h = f[g];
//                    if (h.type == "sifr/prefetch") {
//                        h.parentNode.removeChild(h)
//                    }
//                }
//            } catch (j) { }
//        };

//        function d(f) {
//            for (var g = 0; g < f.length; g++) {
//                document.write('<script defer type="sifr/prefetch" src="' + f[g].src + '"><\/script>')
//            }
//        }
//    }
//    function b(e) {
//        var g = e.ua.ie;
//        var f = g && e.ua.flashVersion < e.ua.parseVersion("9.0.115");
//        var d = {};
//        var c = {};
//        this.fixFlash = f;
//        this.register = function(h) {
//            if (!g) {
//                return
//            }
//            var i = h.getAttribute("id");
//            this.cleanup(i, false);
//            c[i] = h;
//            delete d[i];
//            if (f) {
//                window[i] = h
//            }
//        };
//        this.reset = function() {
//            if (!g) {
//                return false
//            }
//            for (var j = 0; j < e.replacements.length; j++) {
//                var h = e.replacements[j];
//                var k = c[h.id];
//                if (!d[h.id] && (!k.parentNode || k.parentNode.nodeType == 11)) {
//                    h.resetMovie();
//                    d[h.id] = true
//                }
//            }
//            return true
//        };
//        this.cleanup = function(l, h) {
//            var i = c[l];
//            if (!i) {
//                return
//            }
//            for (var k in i) {
//                if (typeof (i[k]) == "function") {
//                    i[k] = null
//                }
//            }
//            c[l] = null;
//            if (f) {
//                window[l] = null
//            }
//            if (i.parentNode) {
//                if (h && i.parentNode.nodeType == 1) {
//                    var j = document.createElement("div");
//                    j.style.width = i.offsetWidth + "px";
//                    j.style.height = i.offsetHeight + "px";
//                    i.parentNode.replaceChild(j, i)
//                } else {
//                    i.parentNode.removeChild(i)
//                }
//            }
//        };
//        this.prepareClearReferences = function() {
//            if (!f) {
//                return
//            }
//            __flash_unloadHandler = function() { };
//            __flash_savedUnloadHandler = function() { }
//        };
//        this.clearReferences = function() {
//            if (f) {
//                var j = document.getElementsByTagName("object");
//                for (var h = j.length - 1; h >= 0; h--) {
//                    c[j[h].getAttribute("id")] = j[h]
//                }
//            }
//            for (var k in c) {
//                if (Object.prototype[k] != c[k]) {
//                    this.cleanup(k, true)
//                }
//            }
//        }
//    }
//    function K(d, g, f, c, e) {
//        this.sIFR = d;
//        this.id = g;
//        this.vars = f;
//        this.movie = null;
//        this.__forceWidth = c;
//        this.__events = e;
//        this.__resizing = 0
//    }
//    K.prototype = {
//        getFlashElement: function() {
//            return document.getElementById(this.id)
//        },
//        getAlternate: function() {
//            return document.getElementById(this.id + "_alternate")
//        },
//        getAncestor: function() {
//            var c = this.getFlashElement().parentNode;
//            return !this.sIFR.dom.hasClass(E.FIX_FOCUS, c) ? c : c.parentNode
//        },
//        available: function() {
//            var c = this.getFlashElement();
//            return c && c.parentNode
//        },
//        call: function(c) {
//            var d = this.getFlashElement();
//            if (!d[c]) {
//                return false
//            }
//            return Function.prototype.apply.call(d[c], d, Array.prototype.slice.call(arguments, 1))
//        },
//        attempt: function() {
//            if (!this.available()) {
//                return false
//            }
//            try {
//                this.call.apply(this, arguments)
//            } catch (c) {
//                if (this.sIFR.debug) {
//                    throw c
//                }
//                return false
//            }
//            return true
//        },
//        updateVars: function(c, e) {
//            for (var d = 0; d < this.vars.length; d++) {
//                if (this.vars[d].split("=")[0] == c) {
//                    this.vars[d] = c + "=" + e;
//                    break
//                }
//            }
//            var f = this.sIFR.util.encodeVars(this.vars);
//            this.movie.injectVars(this.getFlashElement(), f);
//            this.movie.injectVars(this.movie.html, f)
//        },
//        storeSize: function(c, d) {
//            this.movie.setSize(c, d);
//            this.updateVars(c, d)
//        },
//        fireEvent: function(c) {
//            if (this.available() && this.__events[c]) {
//                this.sIFR.util.delay(0, this.__events[c], this, this)
//            }
//        },
//        resizeFlashElement: function(c, d, e) {
//            if (!this.available()) {
//                return
//            }
//            this.__resizing++;
//            var f = this.getFlashElement();
//            f.setAttribute("height", c);
//            this.getAncestor().style.minHeight = "";
//            this.updateVars("renderheight", c);
//            this.storeSize("height", c);
//            if (d !== null) {
//                f.setAttribute("width", d);
//                this.movie.setSize("width", d)
//            }
//            if (this.__events.onReplacement) {
//                this.sIFR.util.delay(0, this.__events.onReplacement, this, this);
//                delete this.__events.onReplacement
//            }
//            if (e) {
//                this.sIFR.util.delay(0, function() {
//                    this.attempt("scaleMovie");
//                    this.__resizing--
//                }, this)
//            } else {
//                this.__resizing--
//            }
//        },
//        blurFlashElement: function() {
//            if (this.available()) {
//                this.sIFR.dom.blurElement(this.getFlashElement())
//            }
//        },
//        resetMovie: function() {
//            this.sIFR.util.delay(0, this.movie.reset, this.movie, this.getFlashElement(), this.getAlternate())
//        },
//        resizeAfterScale: function() {
//            if (this.available() && this.__resizing == 0) {
//                this.sIFR.util.delay(0, this.resize, this)
//            }
//        },
//        resize: function() {
//            if (!this.available()) {
//                return
//            }
//            this.__resizing++;
//            var g = this.getFlashElement();
//            var f = g.offsetWidth;
//            if (f == 0) {
//                return
//            }
//            var e = g.getAttribute("width");
//            var l = g.getAttribute("height");
//            var m = this.getAncestor();
//            var o = this.sIFR.dom.getHeightFromStyle(m);
//            g.style.width = "1px";
//            g.style.height = "1px";
//            m.style.minHeight = o + "px";
//            var c = this.getAlternate().childNodes;
//            var n = [];
//            for (var k = 0; k < c.length; k++) {
//                var h = c[k].cloneNode(true);
//                n.push(h);
//                m.appendChild(h)
//            }
//            var d = this.sIFR.dom.getWidthFromStyle(m);
//            for (var k = 0; k < n.length; k++) {
//                m.removeChild(n[k])
//            }
//            g.style.width = g.style.height = m.style.minHeight = "";
//            g.setAttribute("width", this.__forceWidth ? d : e);
//            g.setAttribute("height", l);
//            if (sIFR.ua.ie) {
//                g.style.display = "none";
//                var j = g.offsetHeight;
//                g.style.display = ""
//            }
//            if (d != f) {
//                if (this.__forceWidth) {
//                    this.storeSize("width", d)
//                }
//                this.attempt("resize", d)
//            }
//            this.__resizing--
//        },
//        replaceText: function(g, j) {
//            var d = this.sIFR.util.escape(g);
//            if (!this.attempt("replaceText", d)) {
//                return false
//            }
//            this.updateVars("content", d);
//            var f = this.getAlternate();
//            if (j) {
//                while (f.firstChild) {
//                    f.removeChild(f.firstChild)
//                }
//                for (var c = 0; c < j.length; c++) {
//                    f.appendChild(j[c])
//                }
//            } else {
//                try {
//                    f.innerHTML = g
//                } catch (h) { }
//            }
//            return true
//        },
//        changeCSS: function(c) {
//            c = this.sIFR.util.escape(this.sIFR.util.cssToString(this.sIFR.util.convertCssArg(c)));
//            this.updateVars("css", c);
//            return this.attempt("changeCSS", c)
//        },
//        remove: function() {
//            if (this.movie && this.available()) {
//                this.movie.remove(this.getFlashElement(), this.id)
//            }
//        }
//    };
//    var X = new 
//    function() {
//        this.create = function(p, n, j, i, f, e, g, o, l, h, m) {
//            var k = p.ua.ie ? d : c;
//            return new k(p, n, j, i, f, e, g, o, ["flashvars", l, "wmode", h, "bgcolor", m, "allowScriptAccess", "always", "quality", "best"])
//        };

//        function c(s, q, l, h, f, e, g, r, n) {
//            var m = s.dom.create("object", E.FLASH);
//            var p = ["type", "application/x-shockwave-flash", "id", f, "name", f, "data", e, "width", g, "height", r];
//            for (var o = 0; o < p.length; o += 2) {
//                m.setAttribute(p[o], p[o + 1])
//            }
//            var j = m;
//            if (h) {
//                j = W.create("div", E.FIX_FOCUS);
//                j.appendChild(m)
//            }
//            for (var o = 0; o < n.length; o += 2) {
//                if (n[o] == "name") {
//                    continue
//                }
//                var k = W.create("param");
//                k.setAttribute("name", n[o]);
//                k.setAttribute("value", n[o + 1]);
//                m.appendChild(k)
//            }
//            l.style.minHeight = r + "px";
//            while (l.firstChild) {
//                l.removeChild(l.firstChild)
//            }
//            l.appendChild(j);
//            this.html = j.cloneNode(true)
//        }
//        c.prototype = {
//            reset: function(e, f) {
//                e.parentNode.replaceChild(this.html.cloneNode(true), e)
//            },
//            remove: function(e, f) {
//                e.parentNode.removeChild(e)
//            },
//            setSize: function(e, f) {
//                this.html.setAttribute(e, f)
//            },
//            injectVars: function(e, g) {
//                var h = e.getElementsByTagName("param");
//                for (var f = 0; f < h.length; f++) {
//                    if (h[f].getAttribute("name") == "flashvars") {
//                        h[f].setAttribute("value", g);
//                        break
//                    }
//                }
//            }
//        };

//        function d(p, n, j, h, f, e, g, o, k) {
//            this.dom = p.dom;
//            this.broken = n;
//            this.html = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="' + f + '" width="' + g + '" height="' + o + '" class="' + E.FLASH + '"><param name="movie" value="' + e + '"></param></object>';
//            var m = "";
//            for (var l = 0; l < k.length; l += 2) {
//                m += '<param name="' + k[l] + '" value="' + k[l + 1] + '"></param>'
//            }
//            this.html = this.html.replace(/(<\/object>)/, m + "$1");
//            j.style.minHeight = o + "px";
//            j.innerHTML = this.html;
//            this.broken.register(j.firstChild)
//        }
//        d.prototype = {
//            reset: function(f, g) {
//                g = g.cloneNode(true);
//                var e = f.parentNode;
//                e.innerHTML = this.html;
//                this.broken.register(e.firstChild);
//                e.appendChild(g)
//            },
//            remove: function(e, f) {
//                this.broken.cleanup(f)
//            },
//            setSize: function(e, f) {
//                this.html = this.html.replace(e == "height" ? /(height)="\d+"/ : /(width)="\d+"/, '$1="' + f + '"')
//            },
//            injectVars: function(e, f) {
//                if (e != this.html) {
//                    return
//                }
//                this.html = this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/, "$1" + f)
//            }
//        }
//    };
//    this.errors = new Y(O);
//    var A = this.util = new D(O);
//    var W = this.dom = new U(O);
//    var T = this.ua = new H(O);
//    var G = {
//        fragmentIdentifier: new F(O),
//        pageLoad: new S(O),
//        prefetch: new N(O),
//        brokenFlashIE: new b(O)
//    };
//    this.__resetBrokenMovies = G.brokenFlashIE.reset;
//    var J = {
//        kwargs: [],
//        replaceAll: function(d) {
//            for (var c = 0; c < this.kwargs.length; c++) {
//                O.replace(this.kwargs[c])
//            }
//            if (!d) {
//                this.kwargs = []
//            }
//        }
//    };
//    this.activate = function() {
//        if (!T.supported || !this.isEnabled || this.isActive || !C() || a()) {
//            return
//        }
//        G.prefetch.fetchMovies(arguments);
//        this.isActive = true;
//        this.setFlashClass();
//        G.fragmentIdentifier.cache();
//        G.pageLoad.attachUnload();
//        if (!this.autoInitialize) {
//            return
//        }
//        G.pageLoad.attach()
//    };
//    this.setFlashClass = function() {
//        if (this.hasFlashClassSet) {
//            return
//        }
//        W.addClass(E.ACTIVE, W.getBody() || document.documentElement);
//        this.hasFlashClassSet = true
//    };
//    this.removeFlashClass = function() {
//        if (!this.hasFlashClassSet) {
//            return
//        }
//        W.removeClass(E.ACTIVE, W.getBody());
//        W.removeClass(E.ACTIVE, document.documentElement);
//        this.hasFlashClassSet = false
//    };
//    this.initialize = function(c) {
//        if (!this.isActive || !this.isEnabled) {
//            return
//        }
//        if (R) {
//            if (!c) {
//                J.replaceAll(false)
//            }
//            return
//        }
//        R = true;
//        J.replaceAll(c);
//        if (O.repaintOnResize) {
//            if (window.addEventListener) {
//                window.addEventListener("resize", Z, false)
//            } else {
//                window.attachEvent("onresize", Z)
//            }
//        }
//        G.prefetch.clear()
//    };
//    this.replace = function(x, u) {
//        if (!T.supported) {
//            return
//        }
//        if (u) {
//            x = A.copyProperties(x, u)
//        }
//        if (!R) {
//            return J.kwargs.push(x)
//        }
//        if (this.onReplacementStart) {
//            this.onReplacementStart(x)
//        }
//        var AM = x.elements || W.querySelectorAll(x.selector);
//        if (AM.length == 0) {
//            return
//        }
//        var w = M(x.src);
//        var AR = A.convertCssArg(x.css);
//        var v = B(x.filters);
//        var AN = x.forceSingleLine === true;
//        var AS = x.preventWrap === true && !AN;
//        var q = AN || (x.fitExactly == null ? this.fitExactly : x.fitExactly) === true;
//        var AD = q || (x.forceWidth == null ? this.forceWidth : x.forceWidth) === true;
//        var s = x.ratios || [];
//        var AE = x.pixelFont === true;
//        var r = parseInt(x.tuneHeight) || 0;
//        var z = !!x.onRelease || !!x.onRollOver || !!x.onRollOut;
//        if (q) {
//            A.extractFromCss(AR, ".sIFR-root", "text-align", true)
//        }
//        var t = A.extractFromCss(AR, ".sIFR-root", "font-size", true) || "0";
//        var e = A.extractFromCss(AR, ".sIFR-root", "background-color", true) || "#FFFFFF";
//        var o = A.extractFromCss(AR, ".sIFR-root", "kerning", true) || "";
//        var AW = A.extractFromCss(AR, ".sIFR-root", "opacity", true) || "100";
//        var k = A.extractFromCss(AR, ".sIFR-root", "cursor", true) || "default";
//        var AP = parseInt(A.extractFromCss(AR, ".sIFR-root", "leading")) || 0;
//        var AJ = x.gridFitType || (A.extractFromCss(AR, ".sIFR-root", "text-align") == "right") ? "subpixel" : "pixel";
//        var h = this.forceTextTransform === false ? "none" : A.extractFromCss(AR, ".sIFR-root", "text-transform", true) || "none";
//        t = /^\d+(px)?$/.test(t) ? parseInt(t) : 0;
//        AW = parseFloat(AW) < 1 ? 100 * parseFloat(AW) : AW;
//        var AC = x.modifyCss ? "" : A.cssToString(AR);
//        var AG = x.wmode || "";
//        if (!AG) {
//            if (x.transparent) {
//                AG = "transparent"
//            } else {
//                if (x.opaque) {
//                    AG = "opaque"
//                }
//            }
//        }
//        if (AG == "transparent") {
//            if (!T.transparencySupport) {
//                AG = "opaque"
//            } else {
//                e = "transparent"
//            }
//        } else {
//            if (e == "transparent") {
//                e = "#FFFFFF"
//            }
//        }
//        for (var AV = 0; AV < AM.length; AV++) {
//            var AF = AM[AV];
//            if (W.hasOneOfClassses(E.IGNORE_CLASSES, AF) || W.ancestorHasClass(AF, E.ALTERNATE)) {
//                continue
//            }
//            var AO = W.getDimensions(AF);
//            var f = AO.height;
//            var c = AO.width;
//            var AA = W.getComputedStyle(AF, "display");
//            if (!f || !c || !AA || AA == "none") {
//                continue
//            }
//            c = W.getWidthFromStyle(AF);
//            var n, AH;
//            if (!t) {
//                var AL = I(AF);
//                n = Math.min(this.MAX_FONT_SIZE, Math.max(this.MIN_FONT_SIZE, AL.fontSize));
//                if (AE) {
//                    n = Math.max(8, 8 * Math.round(n / 8))
//                }
//                AH = AL.lines
//            } else {
//                n = t;
//                AH = 1
//            }
//            var d = W.create("span", E.ALTERNATE);
//            var AX = AF.cloneNode(true);
//            AF.parentNode.appendChild(AX);
//            for (var AU = 0, AT = AX.childNodes.length; AU < AT; AU++) {
//                var m = AX.childNodes[AU];
//                if (!/^(style|script)$/i.test(m.nodeName)) {
//                    d.appendChild(m.cloneNode(true))
//                }
//            }
//            if (x.modifyContent) {
//                x.modifyContent(AX, x.selector)
//            }
//            if (x.modifyCss) {
//                AC = x.modifyCss(AR, AX, x.selector)
//            }
//            var p = P(AX, h, x.uriEncode);
//            AX.parentNode.removeChild(AX);
//            if (x.modifyContentString) {
//                p.text = x.modifyContentString(p.text, x.selector)
//            }
//            if (p.text == "") {
//                continue
//            }
//            var AK = Math.round(AH * V(n, s) * n) + this.FLASH_PADDING_BOTTOM + r;
//            if (AH > 1 && AP) {
//                AK += Math.round((AH - 1) * AP)
//            }
//            var AB = AD ? c : "100%";
//            var AI = "sIFR_replacement_" + L++;
//            var AQ = ["id=" + AI, "content=" + A.escape(p.text), "width=" + c, "renderheight=" + AK, "link=" + A.escape(p.primaryLink.href || ""), "target=" + A.escape(p.primaryLink.target || ""), "size=" + n, "css=" + A.escape(AC), "cursor=" + k, "tunewidth=" + (x.tuneWidth || 0), "tuneheight=" + r, "offsetleft=" + (x.offsetLeft || ""), "offsettop=" + (x.offsetTop || ""), "fitexactly=" + q, "preventwrap=" + AS, "forcesingleline=" + AN, "antialiastype=" + (x.antiAliasType || ""), "thickness=" + (x.thickness || ""), "sharpness=" + (x.sharpness || ""), "kerning=" + o, "gridfittype=" + AJ, "flashfilters=" + v, "opacity=" + AW, "blendmode=" + (x.blendMode || ""), "selectable=" + (x.selectable == null || AG != "" && !sIFR.ua.macintosh && sIFR.ua.gecko && sIFR.ua.geckoVersion >= sIFR.ua.parseVersion("1.9") ? "true" : x.selectable === true), "fixhover=" + (this.fixHover === true), "events=" + z, "delayrun=" + G.brokenFlashIE.fixFlash, "version=" + this.VERSION];
//            var y = A.encodeVars(AQ);
//            var g = new K(O, AI, AQ, AD, {
//                onReplacement: x.onReplacement,
//                onRollOver: x.onRollOver,
//                onRollOut: x.onRollOut,
//                onRelease: x.onRelease
//            });
//            g.movie = X.create(sIFR, G.brokenFlashIE, AF, T.fixFocus && x.fixFocus, AI, w, AB, AK, y, AG, e);
//            this.replacements.push(g);
//            this.replacements[AI] = g;
//            if (x.selector) {
//                if (!this.replacements[x.selector]) {
//                    this.replacements[x.selector] = [g]
//                } else {
//                    this.replacements[x.selector].push(g)
//                }
//            }
//            d.setAttribute("id", AI + "_alternate");
//            AF.appendChild(d);
//            W.addClass(E.REPLACED, AF)
//        }
//        G.fragmentIdentifier.restore()
//    };
//    this.getReplacementByFlashElement = function(d) {
//        for (var c = 0; c < O.replacements.length; c++) {
//            if (O.replacements[c].id == d.getAttribute("id")) {
//                return O.replacements[c]
//            }
//        }
//    };
//    this.redraw = function() {
//        for (var c = 0; c < O.replacements.length; c++) {
//            O.replacements[c].resetMovie()
//        }
//    };
//    this.prepareClearReferences = function() {
//        G.brokenFlashIE.prepareClearReferences()
//    };
//    this.clearReferences = function() {
//        G.brokenFlashIE.clearReferences();
//        G = null;
//        J = null;
//        delete O.replacements
//    };

//    function C() {
//        if (O.domains.length == 0) {
//            return true
//        }
//        var d = A.domain();
//        for (var c = 0; c < O.domains.length; c++) {
//            if (A.domainMatches(d, O.domains[c])) {
//                return true
//            }
//        }
//        return false
//    }
//    function a() {
//        if (document.location.protocol == "file:") {
//            if (O.debug) {
//                O.errors.fire("isFile")
//            }
//            return true
//        }
//        return false
//    }
//    function M(c) {
//        if (T.ie && c.charAt(0) == "/") {
//            c = window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/, "$1$2$3") + c
//        }
//        return c
//    }
//    function V(d, e) {
//        for (var c = 0; c < e.length; c += 2) {
//            if (d <= e[c]) {
//                return e[c + 1]
//            }
//        }
//        return e[e.length - 1] || 1
//    }
//    function B(g) {
//        var e = [];
//        for (var d in g) {
//            if (g[d] == Object.prototype[d]) {
//                continue
//            }
//            var c = g[d];
//            d = [d.replace(/filter/i, "") + "Filter"];
//            for (var f in c) {
//                if (c[f] == Object.prototype[f]) {
//                    continue
//                }
//                d.push(f + ":" + A.escape(A.toJson(c[f], A.toHexString)))
//            }
//            e.push(d.join(","))
//        }
//        return A.escape(e.join(";"))
//    }
//    function Z(d) {
//        var e = Z.viewport;
//        var c = W.getViewport();
//        if (e && c.width == e.width && c.height == e.height) {
//            return
//        }
//        Z.viewport = c;
//        if (O.replacements.length == 0) {
//            return
//        }
//        if (Z.timer) {
//            clearTimeout(Z.timer)
//        }
//        Z.timer = setTimeout(function() {
//            delete Z.timer;
//            for (var f = 0; f < O.replacements.length; f++) {
//                O.replacements[f].resize()
//            }
//        }, 200)
//    }
//    function I(f) {
//        var g = W.getComputedStyle(f, "fontSize");
//        var d = g.indexOf("px") == -1;
//        var e = f.innerHTML;
//        if (d) {
//            f.innerHTML = "X"
//        }
//        f.style.paddingTop = f.style.paddingBottom = f.style.borderTopWidth = f.style.borderBottomWidth = "0px";
//        f.style.lineHeight = "2em";
//        f.style.display = "block";
//        g = d ? f.offsetHeight / 2 : parseInt(g, 10);
//        if (d) {
//            f.innerHTML = e
//        }
//        var c = Math.round(f.offsetHeight / (2 * g));
//        f.style.paddingTop = f.style.paddingBottom = f.style.borderTopWidth = f.style.borderBottomWidth = f.style.lineHeight = f.style.display = "";
//        if (isNaN(c) || !isFinite(c) || c == 0) {
//            c = 1
//        }
//        return {
//            fontSize: g,
//            lines: c
//        }
//    }
//    function P(c, g, s) {
//        s = s || A.uriEncode;
//        var q = [],
//            m = [];
//        var k = null;
//        var e = c.childNodes;
//        var o = false,
//            p = false;
//        var j = 0;
//        while (j < e.length) {
//            var f = e[j];
//            if (f.nodeType == 3) {
//                var t = A.textTransform(g, A.normalize(f.nodeValue)).replace(/</g, "&lt;");
//                if (o && p) {
//                    t = t.replace(/^\s+/, "")
//                }
//                m.push(t);
//                o = /\s$/.test(t);
//                p = false
//            }
//            if (f.nodeType == 1 && !/^(style|script)$/i.test(f.nodeName)) {
//                var h = [];
//                var r = f.nodeName.toLowerCase();
//                var n = f.className || "";
//                if (/\s+/.test(n)) {
//                    if (n.indexOf(E.CLASS) > -1) {
//                        n = n.match("(\\s|^)" + E.CLASS + "-([^\\s$]*)(\\s|$)")[2]
//                    } else {
//                        n = n.match(/^([^\s]+)/)[1]
//                    }
//                }
//                if (n != "") {
//                    h.push('class="' + n + '"')
//                }
//                if (r == "a") {
//                    var d = s(f.getAttribute("href") || "");
//                    var l = f.getAttribute("target") || "";
//                    h.push('href="' + d + '"', 'target="' + l + '"');
//                    if (!k) {
//                        k = {
//                            href: d,
//                            target: l
//                        }
//                    }
//                }
//                m.push("<" + r + (h.length > 0 ? " " : "") + h.join(" ") + ">");
//                p = true;
//                if (f.hasChildNodes()) {
//                    q.push(j);
//                    j = 0;
//                    e = f.childNodes;
//                    continue
//                } else {
//                    if (!/^(br|img)$/i.test(f.nodeName)) {
//                        m.push("</", f.nodeName.toLowerCase(), ">")
//                    }
//                }
//            }
//            if (q.length > 0 && !f.nextSibling) {
//                do {
//                    j = q.pop();
//                    e = f.parentNode.parentNode.childNodes;
//                    f = e[j];
//                    if (f) {
//                        m.push("</", f.nodeName.toLowerCase(), ">")
//                    }
//                } while (j == e.length - 1 && q.length > 0)
//            }
//            j++
//        }
//        return {
//            text: m.join("").replace(/^\s+|\s+$|\s*(<br>)\s*/g, "$1"),
//            primaryLink: k || {}
//        }
//    }
//};


var parseSelector = (function() {
    var c = /\s*,\s*/;
    var d = /\s*([\s>+~(),]|^|$)\s*/g;
    var f = /([\s>+~,]|[^(]\+|^)([#.:@])/g;
    var m = /(^|\))[^\s>+~]/g;
    var e = /(\)|^)/;
    var g = /[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;

    function k(u, w) {
        w = w || document.documentElement;
        var t = u.split(c),
            o = [];
        for (var r = 0; r < t.length; r++) {
            var y = [w],
                p = l(t[r]);
            for (var s = 0; s < p.length; ) {
                var v = p[s++],
                    x = p[s++],
                    q = "";
                if (p[s] == "(") {
                    while (p[s++] != ")" && s < p.length) {
                        q += p[s]
                    }
                    q = q.slice(0, -1)
                }
                y = j(y, v, x, q)
            }
            o = o.concat(y)
        }
        return o
    }
    function l(p) {
        var o = p.replace(d, "$1").replace(f, "$1*$2").replace(m, a);
        return o.match(g) || []
    }
    function a(o) {
        return o.replace(e, "$1 ")
    }
    function j(r, p, o, q) {
        return (k.selectors[p]) ? k.selectors[p](r, o, q) : []
    }
    var n = {
        toArray: function(p) {
            var q = [];
            for (var o = 0; o < p.length; o++) {
                q.push(p[o])
            }
            return q
        }
    };
    var b = {
        isTag: function(o, p) {
            return (p == "*") || (p.toLowerCase() == o.nodeName.toLowerCase())
        },
        previousSiblingElement: function(o) {
            do {
                o = o.previousSibling
            } while (o && o.nodeType != 1);
            return o
        },
        nextSiblingElement: function(o) {
            do {
                o = o.nextSibling
            } while (o && o.nodeType != 1);
            return o
        },
        hasClass: function(p, o) {
            return (o.className || "").match("(^|\\s)" + p + "(\\s|$)")
        },
        getByTag: function(p, o) {
            return o.getElementsByTagName(p)
        }
    };
    var h = {
        "#": function(q, o) {
            for (var p = 0; p < q.length; p++) {
                if (q[p].getAttribute("id") == o) {
                    return [q[p]]
                }
            }
            return []
        },
        " ": function(q, o) {
            var r = [];
            for (var p = 0; p < q.length; p++) {
                r = r.concat(n.toArray(b.getByTag(o, q[p])))
            }
            return r
        },
        ">": function(t, q) {
            var u = [];
            for (var r = 0, p; r < t.length; r++) {
                p = t[r];
                for (var s = 0, o; s < p.childNodes.length; s++) {
                    o = p.childNodes[s];
                    if (o.nodeType == 1 && b.isTag(o, q)) {
                        u.push(o)
                    }
                }
            }
            return u
        },
        ".": function(r, p) {
            var s = [];
            for (var q = 0, o; q < r.length; q++) {
                o = r[q];
                if (b.hasClass([p], o)) {
                    s.push(o)
                }
            }
            return s
        },
        ":": function(q, o, p) {
            return (k.pseudoClasses[o]) ? k.pseudoClasses[o](q, p) : []
        }
    };
    k.selectors = h;
    k.pseudoClasses = {};
    k.util = n;
    k.dom = b;
    return k
})();
var pax = {
    src: "/assets/flash/pax.swf"
};


/* sIFR stuff */

/*sIFR.activate(pax);

sIFR.replace(pax, {
selector: "h1.homeHeading",
css: ".sIFR-root { color: #000000; text-transform:uppercase;font-weight:bold; } .sIFR-root strong { color: #8d3b8e;}",
wmode: "transparent"
});

sIFR.replace(pax, {
selector: "h1",
css: ".sIFR-root { color: #8d3b8e; text-transform:uppercase;font-weight:bold; }",
wmode: "transparent",
ratios: [7, 1.32, 8, 1.31, 12, 1.27, 20, 1.22, 28, 1.19, 30, 1.17, 31, 1.18, 45, 1.17, 61, 1.16, 62, 1.15, 65, 1.16, 66, 1.15, 67, 1.16, 109, 1.15, 110, 1.14, 116, 1.15, 118, 1.14, 122, 1.15, 1.14]
});
*/




var tb_pathToImage = "/assets/img/common/loadingAnimation.gif"; /*!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
$(document).ready(function() {
    tb_init("a.thickbox, area.thickbox, input.thickbox");
    imgLoader = new Image();
    imgLoader.src = tb_pathToImage
});

function tb_init(a) {
    $(a).click(function() {
        var c = $(this).parent().next(".thickboxExtras").children(".longCaption").html() || this.title || this.name || null;
        var b = this.href || this.alt;
        var d = this.rel || false;
        var h = $(this).parent().next(".thickboxExtras").children(".title").html() || null;
        var f = $(this).parent().next(".thickboxExtras").children(".credit").html() || null;
        var e = $(this).parent().next(".thickboxExtras").children(".hiRes").html() || null;
        tb_show(c, b, d, h, f, e);
        this.blur();
        return false
    })
}
function tb_show(n, b, j, m, l, d) {
    try {
        if (typeof document.body.style.maxHeight === "undefined") {
            $("body", "html").css({
                height: "100%",
                width: "100%"
            });
            $("html").css("overflow", "hidden");
            if (document.getElementById("TB_HideSelect") === null) {
                $("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
                $("#TB_overlay").click(tb_remove)
            }
        } else {
            if (document.getElementById("TB_overlay") === null) {
                $("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
                $("#TB_overlay").click(tb_remove)
            }
        }
        if (tb_detectMacXFF()) {
            $("#TB_overlay").addClass("TB_overlayMacFFBGHack")
        } else {
            $("#TB_overlay").addClass("TB_overlayBG")
        }
        if (n === null) {
            n = ""
        }
        if (m === null) {
            m = ""
        }
        if (l === null) {
            l = ""
        }
        if (d === null) {
            d = ""
        }
        if (j === false) {
            j = ""
        }
        $("body").append("<div id='TB_load'><img src='" + imgLoader.src + "' /></div>");
        $("#TB_load").show();
        var c;
        if (b.indexOf("?") !== -1) {
            c = b.substr(0, b.indexOf("?"))
        } else {
            c = b
        }
        var h = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
        var o = c.toLowerCase().match(h);
        if (o == ".jpg" || o == ".jpeg" || o == ".png" || o == ".gif" || o == ".bmp") {
            TB_PrevCaption = "";
            TB_PrevURL = "";
            TB_PrevHTML = "";
            TB_PrevExtraTitle = "";
            TB_PrevExtraCredit = "";
            TB_PrevExtraHiRes = "";
            TB_NextCaption = "";
            TB_NextURL = "";
            TB_NextHTML = "";
            TB_NextExtraTitle = "";
            TB_NextExtraCredit = "";
            TB_NextExtraHiRes = "";
            TB_imageCount = "";
            TB_FoundURL = false;
            if (j) {
                TB_TempArray = $("a[rel=" + j + "]").get();
                for (TB_Counter = 0;
                ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
                    var g = TB_TempArray[TB_Counter].href.toLowerCase().match(h);
                    if (!(TB_TempArray[TB_Counter].href == b)) {
                        if (TB_FoundURL) {
                            TB_NextCaption = $(TB_TempArray[TB_Counter]).parent().next(".thickboxExtras").children(".longCaption").html() || TB_TempArray[TB_Counter].title || null;
                            TB_NextURL = TB_TempArray[TB_Counter].href;
                            TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";
                            TB_NextExtraTitle = $(TB_TempArray[TB_Counter]).parent().next(".thickboxExtras").children(".title").html() || null;
                            TB_NextExtraCredit = $(TB_TempArray[TB_Counter]).parent().next(".thickboxExtras").children(".credit").html() || null;
                            TB_NextExtraHiRes = $(TB_TempArray[TB_Counter]).parent().next(".thickboxExtras").children(".hiRes").html() || null
                        } else {
                            TB_PrevCaption = $(TB_TempArray[TB_Counter]).parent().next(".thickboxExtras").children(".longCaption").html() || TB_TempArray[TB_Counter].title;
                            TB_PrevURL = TB_TempArray[TB_Counter].href;
                            TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";
                            TB_PrevExtraTitle = $(TB_TempArray[TB_Counter]).parent().next(".thickboxExtras").children(".title").html() || null;
                            TB_PrevExtraCredit = $(TB_TempArray[TB_Counter]).parent().next(".thickboxExtras").children(".credit").html() || null;
                            TB_PrevExtraHiRes = $(TB_TempArray[TB_Counter]).parent().next(".thickboxExtras").children(".hiRes").html() || null
                        }
                    } else {
                        TB_FoundURL = true;
                        TB_imageCount = "Image " + (TB_Counter + 1) + " of " + (TB_TempArray.length)
                    }
                }
            }
            imgPreloader = new Image();
            imgPreloader.onload = function() {
                imgPreloader.onload = null;
                var p = tb_getPageSize();
                var v = p[0] - 150;
                var t = p[1] - 150;
                var s = imgPreloader.width;
                var q = imgPreloader.height;
                if (s > v) {
                    q = q * (v / s);
                    s = v;
                    if (q > t) {
                        s = s * (t / q);
                        q = t
                    }
                } else {
                    if (q > t) {
                        s = s * (t / q);
                        q = t;
                        if (s > v) {
                            q = q * (v / s);
                            s = v
                        }
                    }
                }
                TB_WIDTH = s + 244;
                TB_HEIGHT = q + 83;
                var e = "";
                var w = "";
                if (l) {
                    e = "<div id='TB_credit'>" + l + "</div>"
                }
                if (d) {
                    w = "<div id='TB_hiRes'>" + d + "</div>"
                }
                $("#TB_window").append("<div id='TB_imageCol'><h3 class='title'><span>" + j + " </span>" + m + "</h3><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' class='TB_closeWindowButton' title='Close'>close</a></div><a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='" + b + "' width='" + s + "' height='" + q + "' alt='" + n + "'/></a></div><div id='TB_infoCol'>" + e + w + "<div id='TB_caption'>" + n + "<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div></div>");
                $(".TB_closeWindowButton").click(tb_remove);
                if (!(TB_PrevHTML === "")) {
                    function r() {
                        if ($(document).unbind("click", r)) {
                            $(document).unbind("click", r)
                        }
                        $("#TB_window").remove();
                        $("body").append("<div id='TB_window'></div>");
                        tb_show(TB_PrevCaption, TB_PrevURL, j, TB_PrevExtraTitle, TB_PrevExtraCredit, TB_PrevExtraHiRes);
                        return false
                    }
                    $("#TB_prev").click(r)
                }
                if (!(TB_NextHTML === "")) {
                    function u() {
                        $("#TB_window").remove();
                        $("body").append("<div id='TB_window'></div>");
                        tb_show(TB_NextCaption, TB_NextURL, j, TB_NextExtraTitle, TB_NextExtraCredit, TB_NextExtraHiRes);
                        return false
                    }
                    $("#TB_next").click(u)
                }
                document.onkeydown = function(x) {
                    if (x == null) {
                        keycode = event.keyCode
                    } else {
                        keycode = x.which
                    }
                    if (keycode == 27) {
                        tb_remove()
                    } else {
                        if (keycode == 190) {
                            if (!(TB_NextHTML == "")) {
                                document.onkeydown = "";
                                u()
                            }
                        } else {
                            if (keycode == 188) {
                                if (!(TB_PrevHTML == "")) {
                                    document.onkeydown = "";
                                    r()
                                }
                            }
                        }
                    }
                };
                tb_position();
                $("#TB_load").remove();
                $("#TB_ImageOff").click(tb_remove);
                $("#TB_window").css({
                    display: "block"
                })
            };
            imgPreloader.src = b
        } else {
            var a = b.replace(/^[^\?]+\??/, "");
            var f = tb_parseQuery(a);
            TB_WIDTH = (f.width * 1) + 30 || 630;
            TB_HEIGHT = (f.height * 1) + 40 || 440;
            ajaxContentW = TB_WIDTH - 30;
            ajaxContentH = TB_HEIGHT - 45;
            if (b.indexOf("TB_iframe") != -1) {
                urlNoQuery = b.split("TB_");
                $("#TB_iframeContent").remove();
                if (f.modal != "true") {
                    $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>" + n + "</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' class='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='" + urlNoQuery[0] + "' id='TB_iframeContent' name='TB_iframeContent" + Math.round(Math.random() * 1000) + "' onload='tb_showIframe()' style='width:" + (ajaxContentW + 29) + "px;height:" + (ajaxContentH + 17) + "px;' > </iframe>")
                } else {
                    $("#TB_overlay").unbind();
                    $("#TB_window").append("<iframe frameborder='0' hspace='0' src='" + urlNoQuery[0] + "' id='TB_iframeContent' name='TB_iframeContent" + Math.round(Math.random() * 1000) + "' onload='tb_showIframe()' style='width:" + (ajaxContentW + 29) + "px;height:" + (ajaxContentH + 17) + "px;'> </iframe>")
                }
            } else {
                if ($("#TB_window").css("display") != "block") {
                    if (f.modal != "true") {
                        $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>" + n + "</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' class='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:" + ajaxContentW + "px;height:" + ajaxContentH + "px'></div>")
                    } else {
                        $("#TB_overlay").unbind();
                        $("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:" + ajaxContentW + "px;height:" + ajaxContentH + "px;'></div>")
                    }
                } else {
                    $("#TB_ajaxContent")[0].style.width = ajaxContentW + "px";
                    $("#TB_ajaxContent")[0].style.height = ajaxContentH + "px";
                    $("#TB_ajaxContent")[0].scrollTop = 0;
                    $("#TB_ajaxWindowTitle").html(n)
                }
            }
            $(".TB_closeWindowButton").click(tb_remove);
            if (b.indexOf("TB_inline") != -1) {
                $("#TB_ajaxContent").append($("#" + f.inlineId).children());
                $("#TB_window").unload(function() {
                    $("#" + f.inlineId).append($("#TB_ajaxContent").children())
                });
                tb_position();
                $("#TB_load").remove();
                $("#TB_window").css({
                    display: "block"
                })
            } else {
                if (b.indexOf("TB_iframe") != -1) {
                    tb_position();
                    if ($.browser.safari) {
                        $("#TB_load").remove();
                        $("#TB_window").css({
                            display: "block"
                        })
                    }
                } else {
                    $("#TB_ajaxContent").load(b += "&random=" + (new Date().getTime()), function() {
                        tb_position();
                        $("#TB_load").remove();
                        tb_init("#TB_ajaxContent a.thickbox");
                        $("#TB_window").css({
                            display: "block"
                        })
                    })
                }
            }
        }
        if (!f.modal) {
            document.onkeyup = function(p) {
                if (p == null) {
                    keycode = event.keyCode
                } else {
                    keycode = p.which
                }
                if (keycode == 27) {
                    tb_remove()
                }
            }
        }
    } catch (k) { }
}
function tb_showIframe() {
    $("#TB_load").remove();
    $("#TB_window").css({
        display: "block"
    })
}
function tb_remove() {
    $("#TB_imageOff").unbind("click");
    $("#TB_closeWindowButton").unbind("click");
    $("#TB_window").fadeOut("fast", function() {
        $("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()
    });
    $("#TB_load").remove();
    if (typeof document.body.style.maxHeight == "undefined") {
        $("body", "html").css({
            height: "auto",
            width: "auto"
        });
        $("html").css("overflow", "")
    }
    document.onkeydown = "";
    document.onkeyup = "";
    return false
}
function tb_position() {
    $("#TB_window").css({
        marginLeft: "-" + parseInt((TB_WIDTH / 2), 10) + "px",
        width: TB_WIDTH + "px"
    })
}
function tb_parseQuery(d) {
    var e = {};
    if (!d) {
        return e
    }
    var a = d.split(/[;&]/);
    for (var c = 0; c < a.length; c++) {
        var g = a[c].split("=");
        if (!g || g.length != 2) {
            continue
        }
        var b = unescape(g[0]);
        var f = unescape(g[1]);
        f = f.replace(/\+/g, " ");
        e[b] = f
    }
    return e
}
function tb_getPageSize() {
    var c = document.documentElement;
    var a = window.innerWidth || self.innerWidth || (c && c.clientWidth) || document.body.clientWidth;
    var b = window.innerHeight || self.innerHeight || (c && c.clientHeight) || document.body.clientHeight;
    arrayPageSize = [a, b];
    return arrayPageSize
}
function tb_detectMacXFF() {
    var a = navigator.userAgent.toLowerCase();
    if (a.indexOf("mac") != -1 && a.indexOf("firefox") != -1) {
        return true
    }
}
Array.prototype.indexOf = function(d, f) {
    for (var e = (f || 0); e < this.length; e++) {
        if (this[e] == d) {
            return e
        }
    }
};
jQuery.fn.sSelect = function(b) {
    return this.each(function() {
        var K = {
            defaultText: "Please select"
        };
        var H = jQuery.extend(K, b);
        var P = jQuery(this);
        var J = jQuery('<div class="selectedTxt"></div>');
        var a = jQuery('<ul class="newList"></ul>');
        var D = jQuery('<div class="newListSelected" tabindex="0"></div>');
        var B = -1;
        var Q = -1;
        var G = [];
        var z = false;
        D.insertAfter(P);
        J.prependTo(D);
        a.appendTo(D);
        P.hide();
        if (P.children("optgroup").length == 0) {
            P.children().each(function(c) {
                var d = jQuery(this).text();
                G.push(d.charAt(0).toLowerCase());
                if (jQuery(this).attr("selected") == true) {
                    H.defaultText = d;
                    Q = c
                }
                jQuery("<li>" + d + "</li>").appendTo(a)
            });
            var y = a.children()
        } else {
            P.children("optgroup").each(function(e) {
                var d = jQuery(this).attr("label");
                var c = jQuery('<li class="newListOptionTitle">' + d + "</li>");
                c.appendTo(a);
                var f = jQuery("<ul></ul>");
                f.appendTo(c);
                jQuery(this).children().each(function() {
                    ++B;
                    var g = jQuery(this).text();
                    G.push(g.charAt(0).toLowerCase());
                    if (jQuery(this).attr("selected") == true) {
                        H.defaultText = g;
                        Q = B
                    }
                    jQuery("<li>" + g + "</li>").appendTo(f)
                })
            });
            var y = a.find("ul li")
        }
        if (Q != -1) {
            M(Q)
        } else {
            J.text(H.defaultText)
        }
        var x = y.length;

        function F() {
            var e = D.offset().top;
            var d = D.height() + 3;
            var f = jQuery(document).height();
            var c = a.height() + 3;
            if (e + c >= f) {
                a.css("top", "-" + c + "px")
            } else {
                a.css("top", d + "px")
            }
        }
        F();
        jQuery(window).resize(function() {
            F()
        });

        function C() {
            D.css("position", "relative")
        }
        function R() {
            D.css("position", "static")
        }
        J.click(function() {
            if (a.is(":visible")) {
                a.hide();
                R();
                return false
            }
            D.focus();
            a.slideDown("fast");
            C();
            document.onkeydown = function(d) {
                if (d == null) {
                    var c = event.keyCode
                } else {
                    var c = d.which
                }
                if (c == 13 || c == 27) {
                    a.hide();
                    R();
                    return false
                }
            }
        });
        D.blur(function() {
            a.hide();
            R()
        });
        J.hover(function() {
            jQuery(this).addClass("newListSelHover")
        }, function() {
            jQuery(this).removeClass("newListSelHover")
        });
        y.hover(function() {
            jQuery(this).addClass("newListHover")
        }, function() {
            jQuery(this).removeClass("newListHover")
        });
        y.click(function() {
            Q = y.index(this);
            y.removeClass("hiLite");
            jQuery(this).addClass("hiLite");
            var c = jQuery(this).text();
            L(c);
            a.hide();
            D.css("position", "static")
        });

        function L(c) {
            P.val(c);
            J.text(c)
        }
        function E(c) {
            c.onkeydown = function(d) {
                if (d == null) {
                    var e = event.keyCode
                } else {
                    var e = d.which;
                    if (e != 9) {
                        d.preventDefault()
                    }
                }
                switch (e) {
                    case 40:
                    case 39:
                        A();
                        return false;
                        break;
                    case 38:
                    case 37:
                        I();
                        return false;
                        break;
                    case 33:
                    case 36:
                        N();
                        return false;
                        break;
                    case 34:
                    case 35:
                        O();
                        return false;
                        break
                }
                keyPressed = String.fromCharCode(e).toLowerCase();
                var f = G.indexOf(keyPressed);
                if (typeof f != "undefined") {
                    ++Q;
                    Q = G.indexOf(keyPressed, Q);
                    if (Q == -1 || Q == null || z != keyPressed) {
                        Q = G.indexOf(keyPressed)
                    }
                    M(Q);
                    z = keyPressed
                }
            }
        }
        function A() {
            if (Q < (x - 1)) {
                ++Q;
                M(Q)
            }
        }
        function I() {
            if (Q > 0) {
                --Q;
                M(Q)
            }
        }
        function N() {
            Q = 0;
            M(Q)
        }
        function O(c) {
            Q = x - 1;
            M(Q)
        }
        function M(c) {
            y.removeClass("hiLite");
            y.eq(c).addClass("hiLite");
            var d = y.eq(c).text();
            L(d)
        }
        D.focus(function() {
            E(this)
        });
        D.click(function() {
            E(this)
        })
    })
};
(function(e) {
    var b = {},
        l, n, p, k = e.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent),
        a = false;
    e.tooltip = {
        blocked: false,
        defaults: {
            delay: 200,
            fade: false,
            showURL: true,
            extraClass: "",
            top: 15,
            left: 15,
            id: "tooltip"
        },
        block: function() {
            e.tooltip.blocked = !e.tooltip.blocked
        }
    };
    e.fn.extend({
        tooltip: function(q) {
            q = e.extend({}, e.tooltip.defaults, q);
            h(q);
            return this.each(function() {
                e.data(this, "tooltip", q);
                this.tOpacity = b.parent.css("opacity");
                this.tooltipText = this.title;
                e(this).removeAttr("title");
                this.alt = ""
            }).mouseover(m).mouseout(f).click(f)
        },
        fixPNG: k ?
        function() {
            return this.each(function() {
                var q = e(this).css("backgroundImage");
                if (q.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
                    q = RegExp.$1;
                    e(this).css({
                        backgroundImage: "none",
                        filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + q + "')"
                    }).each(function() {
                        var r = e(this).css("position");
                        if (r != "absolute" && r != "relative") {
                            e(this).css("position", "relative")
                        }
                    })
                }
            })
        } : function() {
            return this
        },
        unfixPNG: k ?
        function() {
            return this.each(function() {
                e(this).css({
                    filter: "",
                    backgroundImage: ""
                })
            })
        } : function() {
            return this
        },
        hideWhenEmpty: function() {
            return this.each(function() {
                e(this)[e(this).html() ? "show" : "hide"]()
            })
        },
        url: function() {
            return this.attr("href") || this.attr("src")
        }
    });

    function h(q) {
        if (b.parent) {
            return
        }
        b.parent = e('<div id="' + q.id + '"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();
        if (e.fn.bgiframe) {
            b.parent.bgiframe()
        }
        b.title = e("h3", b.parent);
        b.body = e("div.body", b.parent);
        b.url = e("div.url", b.parent)
    }
    function c(q) {
        return e.data(q, "tooltip")
    }
    function g(q) {
        if (c(this).delay) {
            p = setTimeout(o, c(this).delay)
        } else {
            o()
        }
        a = !!c(this).track;
        e(document.body).bind("mousemove", d);
        d(q)
    }
    function m() {
        if (e.tooltip.blocked || this == l || (!this.tooltipText && !c(this).bodyHandler)) {
            return
        }
        l = this;
        n = this.tooltipText;
        if (c(this).bodyHandler) {
            b.title.hide();
            var t = c(this).bodyHandler.call(this);
            if (t.nodeType || t.jquery) {
                b.body.empty().append(t)
            } else {
                b.body.html(t)
            }
            b.body.show()
        } else {
            if (c(this).showBody) {
                var s = n.split(c(this).showBody);
                b.title.html(s.shift()).show();
                b.body.empty();
                for (var r = 0, q;
                (q = s[r]); r++) {
                    if (r > 0) {
                        b.body.append("<br/>")
                    }
                    b.body.append(q)
                }
                b.body.hideWhenEmpty()
            } else {
                b.title.html(n).show();
                b.body.hide()
            }
        }
        if (c(this).showURL && e(this).url()) {
            b.url.html(e(this).url().replace("http://", "")).show()
        } else {
            b.url.hide()
        }
        b.parent.addClass(c(this).extraClass);
        if (c(this).fixPNG) {
            b.parent.fixPNG()
        }
        g.apply(this, arguments)
    }
    function o() {
        p = null;
        if ((!k || !e.fn.bgiframe) && c(l).fade) {
            if (b.parent.is(":animated")) {
                b.parent.stop().show().fadeTo(c(l).fade, l.tOpacity)
            } else {
                b.parent.is(":visible") ? b.parent.fadeTo(c(l).fade, l.tOpacity) : b.parent.fadeIn(c(l).fade)
            }
        } else {
            b.parent.show()
        }
        d()
    }
    function d(t) {
        if (e.tooltip.blocked) {
            return
        }
        if (t && t.target.tagName == "OPTION") {
            return
        }
        if (!a && b.parent.is(":visible")) {
            e(document.body).unbind("mousemove", d)
        }
        if (l == null) {
            e(document.body).unbind("mousemove", d);
            return
        }
        b.parent.removeClass("viewport-right").removeClass("viewport-bottom");
        var w = b.parent[0].offsetLeft;
        var u = b.parent[0].offsetTop;
        if (t) {
            w = t.pageX + c(l).left;
            u = t.pageY + c(l).top;
            var r = "auto";
            if (c(l).positionLeft) {
                r = e(window).width() - w;
                w = "auto"
            }
            b.parent.css({
                left: w,
                right: r,
                top: u
            })
        }
        var q = j(),
            s = b.parent[0];
        if (q.x + q.cx < s.offsetLeft + s.offsetWidth) {
            w -= s.offsetWidth + 20 + c(l).left;
            b.parent.css({
                left: w + "px"
            }).addClass("viewport-right")
        }
        if (q.y + q.cy < s.offsetTop + s.offsetHeight) {
            u -= s.offsetHeight + 20 + c(l).top;
            b.parent.css({
                top: u + "px"
            }).addClass("viewport-bottom")
        }
    }
    function j() {
        return {
            x: e(window).scrollLeft(),
            y: e(window).scrollTop(),
            cx: e(window).width(),
            cy: e(window).height()
        }
    }
    function f(s) {
        if (e.tooltip.blocked) {
            return
        }
        if (p) {
            clearTimeout(p)
        }
        l = null;
        var r = c(this);

        function q() {
            b.parent.removeClass(r.extraClass).hide().css("opacity", "")
        }
        if ((!k || !e.fn.bgiframe) && r.fade) {
            if (b.parent.is(":animated")) {
                b.parent.stop().fadeTo(r.fade, 0, q)
            } else {
                b.parent.stop().fadeOut(r.fade, q)
            }
        } else {
            q()
        }
        if (c(this).fixPNG) {
            b.parent.unfixPNG()
        }
    }
})(jQuery);
var dateFormat = function() {
    var a = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
        b = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
        d = /[^-+\dA-Z]/g,
        c = function(f, e) {
            f = String(f);
            e = e || 2;
            while (f.length < e) {
                f = "0" + f
            }
            return f
        };
    return function(j, w, r) {
        var g = dateFormat;
        if (arguments.length == 1 && Object.prototype.toString.call(j) == "[object String]" && !/\d/.test(j)) {
            w = j;
            j = undefined
        }
        j = j ? new Date(j) : new Date;
        if (isNaN(j)) {
            throw SyntaxError("invalid date")
        }
        w = String(g.masks[w] || w || g.masks["default"]);
        if (w.slice(0, 4) == "UTC:") {
            w = w.slice(4);
            r = true
        }
        var u = r ? "getUTC" : "get",
            n = j[u + "Date"](),
            e = j[u + "Day"](),
            k = j[u + "Month"](),
            q = j[u + "FullYear"](),
            t = j[u + "Hours"](),
            l = j[u + "Minutes"](),
            v = j[u + "Seconds"](),
            p = j[u + "Milliseconds"](),
            f = r ? 0 : j.getTimezoneOffset(),
            h = {
                d: n,
                dd: c(n),
                ddd: g.i18n.dayNames[e],
                dddd: g.i18n.dayNames[e + 7],
                m: k + 1,
                mm: c(k + 1),
                mmm: g.i18n.monthNames[k],
                mmmm: g.i18n.monthNames[k + 12],
                yy: String(q).slice(2),
                yyyy: q,
                h: t % 12 || 12,
                hh: c(t % 12 || 12),
                H: t,
                HH: c(t),
                M: l,
                MM: c(l),
                s: v,
                ss: c(v),
                l: c(p, 3),
                L: c(p > 99 ? Math.round(p / 10) : p),
                t: t < 12 ? "a" : "p",
                tt: t < 12 ? "am" : "pm",
                T: t < 12 ? "A" : "P",
                TT: t < 12 ? "AM" : "PM",
                Z: r ? "UTC" : (String(j).match(b) || [""]).pop().replace(d, ""),
                o: (f > 0 ? "-" : "+") + c(Math.floor(Math.abs(f) / 60) * 100 + Math.abs(f) % 60, 4),
                S: ["th", "st", "nd", "rd"][n % 10 > 3 ? 0 : (n % 100 - n % 10 != 10) * n % 10]
            };
        return w.replace(a, function(m) {
            return m in h ? h[m] : m.slice(1, m.length - 1)
        })
    }
} ();
dateFormat.masks = {
    "default": "ddd mmm dd yyyy HH:MM:ss",
    shortDate: "m/d/yy",
    mediumDate: "mmm d, yyyy",
    longDate: "mmmm d, yyyy",
    fullDate: "dddd, mmmm d, yyyy",
    shortTime: "h:MM TT",
    mediumTime: "h:MM:ss TT",
    longTime: "h:MM:ss TT Z",
    isoDate: "yyyy-mm-dd",
    isoTime: "HH:MM:ss",
    isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
    isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};
dateFormat.i18n = {
    dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
    monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
};
Date.prototype.format = function(a, b) {
    return dateFormat(this, a, b)
};
$(document).ready(function() {
    setupColumns();
    setupSearchForm();
    $("#primaryNav li").hover(function() {
        $(this).addClass("hover");
        $("ul:first", this).css("left", "-4px")
    }, function() {
        $(this).removeClass("hover");
        $("ul:first", this).css("left", "-9999px")
    });
    $("#btnStayTunedCommit").click(function() {
        var e = $("#iptStayTunedEmailAddress").val();
        jRex = new RegExp('^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.[\.]{1,})+([a-zA-Z0-9]{2,4})+$');
        if (jRex.test(e)) {
            var d = "http://" + window.location.hostname + "/account/StayTuned.aspx?email=" + e;
            window.location = d;
        }
        return false;
    });
    $("#monthSelect select").sSelect();
    $("#sessionInfo div.item:last").addClass("last");
    $.each($.browser, function(d, e) {
        if (d == "mozilla" && $.browser.version.substr(0, 5) == "1.8.1") {
            $("body").addClass("ffx2")
        }
    });
    var a = window.location.pathname;
    $("#sideNav a[href='" + a + "']").parent().addClass("current");

    if ($('#quickButtons.packagebuttons').length) {
        $("#sideNav").hide();
        $("#quickButtons a[href='" + a + "']").removeClass("formButton").addClass("ticked").append("<img src='/assets/img/btn/button-tick-selected.png'>");
    }

    $("#tellAFriendModal").parent().next().next().insertAfter("#wrapper");
    $("#tellAFriendModal").parent().insertAfter("#wrapper");
    $("#thumbnailGallery li").click(function() {
        $(this).find(".thickbox").triggerHandler("click")
    });
    $("#faqs a.toggle").toggle(function() {
        $(this).next().show();
        $(this).text("hide")
    }, function() {
        $(this).next().hide();
        $(this).text("show")
    });
    hideOldProductions();
    if ($("body").hasClass("productionDetails")) {
        $(".chooseYourSeatButton").appendTo("#optionA-ButtonContainer").show();
        $(".bestAvailableSeatButton").appendTo("#optionB-ButtonContainer").show()
    }
    var b = false;
    $(".performanceCalendar:not(.seriesCal) li:not(.day)").hide().parent().before("<h5>Show calendar</h5>");
    $(".performanceCalendar:not(.seriesCal) h5").click(function() {
        if (!b) {
            $(".performanceCalendar h5").next().find("li:not(.day)").show().closest("div").addClass("open").children("h5").text("Hide calendar");
            b = true
        } else {
            $(".performanceCalendar h5").next().find("li:not(.day)").hide().closest("div").removeClass("open").children("h5").text("Show calendar");
            b = false
        }
    });
    $(".monthGroup .production").each(function(d) {
        if ($(this).parent("#homeEvents").length > 0 && d > 3) {
            $(this).find(".performance_more").hide();
            $(this).find("h3.title").css("cursor", "pointer").append("<span>show more</span>").toggle(function() {
                $(this).children("span").text("show less").addClass("open");
                $(this).closest(".production").find(".performance_more").show()
            }, function() {
                $(this).children("span").text("show more").removeClass("open");
                $(this).closest(".production").find(".performance_more").hide()
            }).hover(function() {
                $(this).children("span").css("text-decoration", "underline")
            }, function() {
                $(this).children("span").css("text-decoration", "none")
            })
        } else {
            if ($(this).parent("#homeEvents").length > 0 && d <= 3) {
                $(this).find(".full_description").hide();
                $(this).find(".description").append("<p class='showMoreLink'><span>show more</span></p>")
            } else {
                if ($(this).find(".full_description").length > 0) {
                    $(this).find(".full_description").hide();
                    $(this).find("h3.title").css("cursor", "pointer").append("<span>show more</span>").toggle(function() {
                        $(this).children("span").text("show less").addClass("open");
                        $(this).closest(".production").find(".full_description").show()
                    }, function() {
                        $(this).children("span").text("show more").removeClass("open");
                        $(this).closest(".production").find(".full_description").hide()
                    }).hover(function() {
                        $(this).children("span").css("text-decoration", "underline")
                    }, function() {
                        $(this).children("span").css("text-decoration", "none")
                    })
                }
            }
        }
    });
    $(".showMoreLink span").toggle(function() {
        $(this).text("show less").addClass("open");
        $(this).closest(".production").find(".full_description").show()
    }, function() {
        $(this).text("show more").removeClass("open");
        $(this).closest(".production").find(".full_description").hide()
    }).hover(function() {
        $(this).css("text-decoration", "underline").css("cursor", "pointer")
    }, function() {
        $(this).css("text-decoration", "none")
    });
    var c = $("#monthSelect select option:eq(0)").val();
    $(".monthGroup").not("#" + c).not("#homeEvents").hide();
    $(".monthGroup .production:first-child").addClass("first");
    $("#monthSelect .newList li").click(function() {
        selectText = $(this).text();
        selectVal = $("#monthSelect select option:contains(" + selectText + ")").val();
        $(".monthGroup:visible").hide();
        $("#" + selectVal).show()
    });
    $(".performance_dates li.performance, .performanceCalendar li.performance").tooltip({
        track: true,
        delay: 0,
        showURL: false,
        fade: 250,
        top: -30,
        right: 5
    });
    $("#more .btn-more a").toggle(function() {
        $(this).addClass("opened").parent().siblings("div").show()
    }, function() {
        $(this).removeClass("opened").parent().siblings("div").hide()
    }).parent().siblings("div").hide();
    $("p.moreInfo a").toggle(function() {
        $(this).html("&#8249; less info").parent().siblings(".long_copy").show()
    }, function() {
        $(this).html("more info &#8250;").parent().siblings(".long_copy").hide()
    });
    $(".formBtn, .performanceCalendar h5").hoverClass("hover")
});
$.fn.hoverClass = function(a) {
    return this.each(function() {
        $(this).hover(function() {
            $(this).addClass(a)
        }, function() {
            $(this).removeClass(a)
        })
    })
};

function setupColumns() {
    var d = jQuery.trim($("#sideNav").text());
    var c = jQuery.trim($("#contentSide").text());
    var b = $("#divUDPTicketing").length;
    var a = $("body");
    if (!a.hasClass("syos")) {
        if (!d && !c) {
            a.addClass("cols_1")
        } else {
            if (d && !c) {
                a.addClass("cols_2a")
            } else {
                if (!d && c && b === 0) {
                    a.addClass("cols_2b")
                } else {
                    a.addClass("cols_3")
                }
            }
        }
    }
}
function setupSearchForm() {
    var b = document.getElementById("siteSearchInput");
    var a = document.getElementById("siteSearchInput").defaultValue;
    $(b).focus(function() {
        b.value = "";
        $(this).addClass("focus")
    });
    $(b).blur(function() {
        if (b.value == a || b.value == "") {
            b.value = a
        }
        $(this).removeClass("focus")
    });
    $(b).keyup(function(c) {
        l_search_value = document.getElementById("siteSearchInput").value;
        if (c.keyCode === 13 && l_search_value != "" && l_search_value != a) {
            location.href = "/search.aspx?q=" + l_search_value
        }
    });
    $("#siteSearchButton").click(function() {
        l_search_value = document.getElementById("siteSearchInput").value;
        if (l_search_value != "" && l_search_value != a) {
            location.href = "/search.aspx?q=" + l_search_value
        }
        return false
    })
}
function flashBeginFade() {
    $("#stripLeft").fadeIn("slow")
}
function JSDisplayCart() {
    top.location = "/cart/cart.aspx"
}
function JSDisplayVideoLightbox() {
    tb_show("", "#TB_inline?height=600&width=900&inlineId=videoPlayer&modal=true", "", "", "", "")
}
function callThickBox(b) {
    if ($("body").hasClass("productionDetails")) {
        var a = $("#calInfo .when strong").html();
        $("#ticketTypeSelectionProductionDetails .last").html(a)
    }
    if (b) {
        tb_show("", b, "", "", "", "")
    }
}
function hideOldProductions() {
    var c = new Date();
    var f = c.getFullYear();
    var b = c.getMonth();
    var d = c.getDate();
    var e = "0";
    if (b < 10) {
        b = e + b
    }
    if (d < 10) {
        d = e + d
    }
    var a = f + b + d;
    $("div.production[rel]").each(function(g) {
        var h = $(this).attr("rel");
        if (h < a) {
            $(this).parent().remove()
        }
    })
}
function getQueryVariable(d) {
    var e = window.location.search.substring(1);
    var f = e.split("&");
    for (var a, b = 0, c = f.length; b < c; b++) {
        a = f[b].split("=");
        if (a[0] == d) {
            return a[1]
        }
    }
}
var cartTimeExpiration = 15;
var cartExpirationCheckTimer;
var cartCookieName = "SSOCartExpirationTimer";

function GetCookie(g) {
    var f = document.cookie.split(";");
    var b = "";
    var d = "";
    var e = "";
    var c = false;
    for (i = 0; i < f.length; i++) {
        var a = unescape(f[i]);
        b = a.split("&")[0].split("=");
        d = b[0].replace(/^\s+|\s+$/g, "");
        if (d == g) {
            return a;
            break
        }
        b = null;
        d = ""
    }
    if (!c) {
        return null
    }
}
function SetCookie(b, c, d) {
    var a = new Date();
    a.setTime(a.getTime() + d);
    document.cookie = b + "=" + escape(c) + ((a == null) ? "" : ";expires=" + a) + ";path=/"
}
function RemoveCookie(a) {
    var b = new Date();
    document.cookie = a + "=;expires=" + b.toGMTString() + ";;"
}
function GetCartExpirateTimeFromCookie(b) {
    if (!b) {
        return null
    }
    var a = b.split("&");
    if (a.length > 0) {
        if (a[0].split("=").length > 0) {
            return a[0].split("=")[1]
        }
    }
    return null
}
function GetCartTimerSessionKeyFromCookie(b) {
    var a = b.split("&");
    if (a.length > 0) {
        if (a[0].split("=").length > 0) {
            return a[0].split("=")[1]
        }
    }
    return null
}
function SetTimerCookie(a) {
    var b = GetCookie(cartCookieName);
    if (b != null) { } else {
        $.get("/GetUtcNow.aspx", {
            MinuteOffset: cartTimeExpiration
        }, function(c) {
            SetCookie(cartCookieName, c, cartTimeExpiration * 60 * 1000)
        })
    }
}
function GetCartTimer() {
    var a = GetCartExpirateTimeFromCookie(GetCookie(cartCookieName));
    if (a == null || a == "") {
        return null
    }
    var b = new Date(a + " GMT");
    return b
}
function initTimer() {
    var a = GetCartTimer();
    if (a == null) {
        $("#divTicketTimer_updatePanelHeader").css("display", "none");
        return false
    } else {
        $("#divTicketTimer_updatePanelHeader").css("display", "block");
        RunTimer(a)
    }
    return true
}
function RunTimer(a) {
    cartExpirationCheckTimer = null;
    clearTimeout(cartExpirationCheckTimer);
    if (a != null) {
        if (a > new Date()) {
            $("#divTicketTimer_Ticking").css("display", "block");
            $("#divTicketTimer_Expired").css("display", "none");
            $("#spanTicketTimerMinutes").text(Math.round((a - (new Date())) / 60000 + 0.4));
            cartExpirationCheckTimer = setTimeout("RunTimer(GetCartTimer())", 1000)
        } else {
            $("#divTicketTimer_Ticking").css("display", "none");
            $("#divTicketTimer_Expired").css("display", "block");
            $("#spanTicketTimerMinutes").text("");
            RemoveCookie(cartCookieName)
        }
    } else {
        $("#lblTicketHoldTime").text("&nbsp;").closest("li").hide();
        $("#divTicketTimer_Ticking").css("display", "none");
        $("#divTicketTimer_Expired").css("display", "none");
        $("#spanTicketTimerMinutes").text("")
    }
};
