﻿/* Padding fix
----------------------------------------------------------------------------- */
$.fn.fixPadding = function() {
    $(this).each(function() {
       if(jQuery.data(this, 'init') !== true) {
           var par = this.parentNode;
           while(par.tagName.toLowerCase()!='div' ) {
               par = par.parentNode;
           }
           par = $(par);
           par.css('text-align', 'left');
           var top = (par.height() - $(this).attr('height')) / 2,
           left = (par.width() - $(this).attr('width')) / 2;
           $(this).css({
                'margin-top': (top > 0) ? top : 'auto', 
                'margin-left':  (left > 0) ? left : 'auto'
           });
           
           jQuery.data(this, 'init', true);
           jQuery.data(this, 'orig', [top, left]);
           
           return $(this);
      }
    });
}

$(document).ready(function() {
    $('img.fixPadding:visible').fixPadding();
});


/* thickbox-3.1.packed.js
----------------------------------------------------------------------------- */
var tb_pathToImage = '/images/loading.gif';
var closeText = (window.getCloseText) ? getCloseText() : 'Close';

eval(function(p, a, c, k, e, r) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function(e) { return r[e] } ]; e = function() { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('$(o).2S(9(){1u(\'a.18, 3n.18, 3i.18\');1w=1p 1t();1w.L=2H});9 1u(b){$(b).s(9(){6 t=X.Q||X.1v||M;6 a=X.u||X.23;6 g=X.1N||P;19(t,a,g);X.2E();H P})}9 19(d,f,g){3m{3(2t o.v.J.2i==="2g"){$("v","11").r({A:"28%",z:"28%"});$("11").r("22","2Z");3(o.1Y("1F")===M){$("v").q("<U 5=\'1F\'></U><4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}n{3(o.1Y("B")===M){$("v").q("<4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}3(1K()){$("#B").1J("2B")}n{$("#B").1J("2z")}3(d===M){d=""}$("v").q("<4 5=\'K\'><1I L=\'"+1w.L+"\' /></4>");$(\'#K\').2y();6 h;3(f.O("?")!==-1){h=f.3l(0,f.O("?"))}n{h=f}6 i=/\\.2s$|\\.2q$|\\.2m$|\\.2l$|\\.2k$/;6 j=h.1C().2h(i);3(j==\'.2s\'||j==\'.2q\'||j==\'.2m\'||j==\'.2l\'||j==\'.2k\'){1D="";1G="";14="";1z="";1x="";R="";1n="";1r=P;3(g){E=$("a[@1N="+g+"]").36();25(D=0;((D<E.1c)&&(R===""));D++){6 k=E[D].u.1C().2h(i);3(!(E[D].u==f)){3(1r){1z=E[D].Q;1x=E[D].u;R="<1e 5=\'1X\'>&1d;&1d;<a u=\'#\'>2T &2R;</a></1e>"}n{1D=E[D].Q;1G=E[D].u;14="<1e 5=\'1U\'>&1d;&1d;<a u=\'#\'>&2O; 2N</a></1e>"}}n{1r=1b;1n="1t "+(D+1)+" 2L "+(E.1c)}}}S=1p 1t();S.1g=9(){S.1g=M;6 a=2x();6 x=a[0]-1M;6 y=a[1]-1M;6 b=S.z;6 c=S.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}13=b+30;1a=c+2G;$("#8").q("<a u=\'\' 5=\'1L\' Q=\'1o\'><1I 5=\'2F\' L=\'"+f+"\' z=\'"+b+"\' A=\'"+c+"\' 23=\'"+d+"\'/></a>"+"<4 5=\'2D\'>"+d+"<4 5=\'2C\'>"+1n+14+R+"</4></4><4 5=\'2A\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4>");$("#Z").s(G);3(!(14==="")){9 12(){3($(o).N("s",12)){$(o).N("s",12)}$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1D,1G,g);H P}$("#1U").s(12)}3(!(R==="")){9 1i(){$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1z,1x,g);H P}$("#1X").s(1i)}o.1h=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}n 3(I==3k){3(!(R=="")){o.1h="";1i()}}n 3(I==3j){3(!(14=="")){o.1h="";12()}}};16();$("#K").C();$("#1L").s(G);$("#8").r({Y:"T"})};S.L=f}n{6 l=f.2r(/^[^\\?]+\\??/,\'\');6 m=2p(l);13=(m[\'z\']*1)+30||3h;1a=(m[\'A\']*1)+3g||3f;W=13-30;V=1a-3e;3(f.O(\'2j\')!=-1){1E=f.1B(\'3d\');$("#15").C();3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4></4><U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\' > </U>")}n{$("#B").N();$("#8").q("<U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\'> </U>")}}n{3($("#8").r("Y")!="T"){3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\'>1l</a> 1k 1j 1s</4></4><4 5=\'F\' J=\'z:"+W+"p;A:"+V+"p\'></4>")}n{$("#B").N();$("#8").q("<4 5=\'F\' 3c=\'3b\' J=\'z:"+W+"p;A:"+V+"p;\'></4>")}}n{$("#F")[0].J.z=W+"p";$("#F")[0].J.A=V+"p";$("#F")[0].3a=0;$("#1H").11(d)}}$("#Z").s(G);3(f.O(\'37\')!=-1){$("#F").q($(\'#\'+m[\'26\']).1T());$("#8").24(9(){$(\'#\'+m[\'26\']).q($("#F").1T())});16();$("#K").C();$("#8").r({Y:"T"})}n 3(f.O(\'2j\')!=-1){16();3($.1q.35){$("#K").C();$("#8").r({Y:"T"})}}n{$("#F").34(f+="&1y="+(1p 33().32()),9(){16();$("#K").C();1u("#F a.18");$("#8").r({Y:"T"})})}}3(!m[\'1A\']){o.21=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}}}}31(e){}}9 1m(){$("#K").C();$("#8").r({Y:"T"})}9 G(){$("#2Y").N("s");$("#Z").N("s");$("#8").2X("2W",9(){$(\'#8,#B,#1F\').2V("24").N().C()});$("#K").C();3(2t o.v.J.2i=="2g"){$("v","11").r({A:"1Z",z:"1Z"});$("11").r("22","")}o.1h="";o.21="";H P}9 16(){$("#8").r({2U:\'-\'+20((13/2),10)+\'p\',z:13+\'p\'});3(!(1V.1q.2Q&&1V.1q.2P<7)){$("#8").r({38:\'-\'+20((1a/2),10)+\'p\'})}}9 2p(a){6 b={};3(!a){H b}6 c=a.1B(/[;&]/);25(6 i=0;i<c.1c;i++){6 d=c[i].1B(\'=\');3(!d||d.1c!=2){39}6 e=2a(d[0]);6 f=2a(d[1]);f=f.2r(/\\+/g,\' \');b[e]=f}H b}9 2x(){6 a=o.2M;6 w=1S.2o||1R.2o||(a&&a.1Q)||o.v.1Q;6 h=1S.1P||1R.1P||(a&&a.2n)||o.v.2n;1O=[w,h];H 1O}9 1K(){6 a=2K.2J.1C();3(a.O(\'2I\')!=-1&&a.O(\'3o\')!=-1){H 1b}}', 62, 211, ('|||if|div|id|var||TB_window|function||||||||||||||else|document|px|append|css|click||href|body||||width|height|TB_overlay|remove|TB_Counter|TB_TempArray|TB_ajaxContent|tb_remove|return|keycode|style|TB_load|src|null|unbind|indexOf|false|title|TB_NextHTML|imgPreloader|block|iframe|ajaxContentH|ajaxContentW|this|display|TB_closeWindowButton||html|goPrev|TB_WIDTH|TB_PrevHTML|TB_iframeContent|tb_position||thickbox|tb_show|TB_HEIGHT|true|length|nbsp|span|Math|onload|onkeydown|goNext|Esc|or|' + closeText + '|tb_showIframe|TB_imageCount|' + closeText + '|new|browser|TB_FoundURL|Key|Image|tb_init|name|imgLoader|TB_NextURL|random|TB_NextCaption|modal|split|toLowerCase|TB_PrevCaption|urlNoQuery|TB_HideSelect|TB_PrevURL|TB_ajaxWindowTitle|img|addClass|tb_detectMacXFF|TB_ImageOff|150|rel|arrayPageSize|innerHeight|clientWidth|self|window|children|TB_prev|jQuery|frameborder|TB_next|getElementById|auto|parseInt|onkeyup|overflow|alt|unload|for|inlineId||100||unescape|1000|round|hspace|TB_closeAjaxWindow|TB_title|undefined|match|maxHeight|TB_iframe|bmp|gif|png|clientHeight|innerWidth|tb_parseQuery|jpeg|replace|jpg|typeof|which|keyCode|event|tb_getPageSize|show|TB_overlayBG|TB_closeWindow|TB_overlayMacFFBGHack|TB_secondLine|TB_caption|blur|TB_Image|60|tb_pathToImage|mac|userAgent|navigator|of|documentElement|Prev|lt|version|msie|gt|ready|Next|marginLeft|trigger|fast|fadeOut|TB_imageOff|hidden||catch|getTime|Date|load|safari|get|TB_inline|marginTop|continue|scrollTop|TB_modal|class|TB_|45|440|40|630|input|188|190|substr|try|area|firefox').split('|'), 0, {}))

jQuery.extend(
    jQuery.expr[':'].hrefMatch = function(a, i, m) {
        var match = m[3].toLowerCase();
        var href = jQuery(a).attr('href');
        return ((match && href) ? (href.toLowerCase().indexOf(match) == 0) : false);
    }
);
function tb_open_new(jThickboxNewLink){
    self.parent.tb_show(null,jThickboxNewLink,null);
    $('#TB_window #TB_title:gt(0)').remove();
}

/* jquery-cookie-1.0.js
----------------------------------------------------------------------------- */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            }
            else date = options.expires;

            expires = '; expires=' + date.toUTCString();
        }
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    }
    else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

/* jQuery-jPager-1.0.js
-----------------------------------------------------------------------------
Author: George Lopez (glopez@solutionset.com)
Usage: $('ul.jPager').jPager({'selector': 'li', 'page': 1, 'pageSize': 10, 'jPaginatorClass': 'jPaginator', 'previous': 'Previous', 'next': 'Next', 'onclick': onclick});
*/
(function($) {
    $.fn.jPager = function(options) {
        var selector = (options && options['selector'] ? options['selector'] : 'li');
        var page = parseInt(options && options['page'] ? options['page'] : '1');
        var pageSize = parseInt(options && options['pageSize'] ? options['pageSize'] : '10');
        var jPaginatorClass = (options && options['jPaginatorClass'] ? options['jPaginatorClass'] : 'jPaginator');
        var previous = (options && options['previous'] ? options['previous'] : 'Previous');
        var next = (options && options['next'] ? options['next'] : 'Next');
        var onclick = (options && options['onclick'] ? options['onclick'] : '');

        var numPages = Math.ceil($(selector, this).length / pageSize);

        // add page attributes
        $(selector, this).each(
          function(index) {
              var page = parseInt(index / pageSize) + 1;
              $(this).attr('page', page);
          }
        );

        showPage(this, selector, page, numPages, jPaginatorClass, previous, next, onclick);
    };

    var showPage = function(pager, selector, page, numPages, jPaginatorClass, previous, next, onclick) {
        if (numPages > 1) {
            $(selector + '[page]', pager).hide();
            $(selector + '[page="' + page + '"]', pager).show();

            var paginator = '';
            if (page > 1) paginator += '<a href="javascript:void(0);" class="prev">&#171; ' + previous + '</a> ';
            for (var i = 1; i <= numPages; i++) {
                if (i > 1) paginator += ' ';
                if (i == page) paginator += '<span>' + i + '</span>';
                else paginator += '<a href="javascript:void(0);" class="page'+( i==numPages ? ' last' : '' )+'">' + i + '</a>';
            }
            if (page < numPages) paginator += ' <a href="javascript:void(0);" class="next">' + next + ' &#187;</a>';

            $('.' + jPaginatorClass).html(paginator);

            $('.' + jPaginatorClass + ' a').click(
                function() {
                    var currentPage = parseInt($(selector + '[page]:visible:first').attr('page'));
                    var page = $(this).text();

                    if (page.indexOf(next) >= 0) page = (currentPage ? (currentPage + 1) : 1);
                    else if (page.indexOf(previous) >= 0) page = (currentPage ? (currentPage - 1) : 1);
                    else page = parseInt(page);

                    if (onclick) onclick(page);

                    showPage(pager, selector, page, numPages, jPaginatorClass, previous, next, onclick);
                }
            );
        }
    };
})(jQuery);

/* sifr3-r419.min.js
----------------------------------------------------------------------------- */
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 = "419"; 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 jQuery(f).get() }; 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.quicktime = false; this.opera = /opera/.test(g); this.konqueror = /konqueror/.test(q); 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.webkit && 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.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.50")) && (!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.debug) { throw 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(); 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.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) } 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.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(w, t) { if (!T.supported) { return } if (t) { w = A.copyProperties(w, t) } if (!R) { return J.kwargs.push(w) } if (this.onReplacementStart) { this.onReplacementStart(w) } var AL = w.elements || W.querySelectorAll(w.selector); if (AL.length == 0) { return } var v = M(w.src); var AQ = A.convertCssArg(w.css); var u = B(w.filters); var AM = w.forceSingleLine === true; var AR = w.preventWrap === true && !AM; var p = AM || (w.fitExactly == null ? this.fitExactly : w.fitExactly) === true; var AC = p || (w.forceWidth == null ? this.forceWidth : w.forceWidth) === true; var r = w.ratios || []; var AD = w.pixelFont === true; var q = parseInt(w.tuneHeight) || 0; var y = !!w.onRelease || !!w.onRollOver || !!w.onRollOut; if (p) { A.extractFromCss(AQ, ".sIFR-root", "text-align", true) } var s = A.extractFromCss(AQ, ".sIFR-root", "font-size", true) || "0"; var e = A.extractFromCss(AQ, ".sIFR-root", "background-color", true) || "#FFFFFF"; var n = A.extractFromCss(AQ, ".sIFR-root", "kerning", true) || ""; var AV = A.extractFromCss(AQ, ".sIFR-root", "opacity", true) || "100"; var k = A.extractFromCss(AQ, ".sIFR-root", "cursor", true) || "default"; var AO = parseInt(A.extractFromCss(AQ, ".sIFR-root", "leading")) || 0; var AI = w.gridFitType || (A.extractFromCss(AQ, ".sIFR-root", "text-align") == "right") ? "subpixel" : "pixel"; var h = this.forceTextTransform === false ? "none" : A.extractFromCss(AQ, ".sIFR-root", "text-transform", true) || "none"; s = /^\d+(px)?$/.test(s) ? parseInt(s) : 0; AV = parseFloat(AV) < 1 ? 100 * parseFloat(AV) : AV; var AB = w.modifyCss ? "" : A.cssToString(AQ); var AF = w.wmode || ""; if (!AF) { if (w.transparent) { AF = "transparent" } else { if (w.opaque) { AF = "opaque" } } } if (AF == "transparent") { if (!T.transparencySupport) { AF = "opaque" } else { e = "transparent" } } for (var AU = 0; AU < AL.length; AU++) { var AE = AL[AU]; if (W.hasOneOfClassses(E.IGNORE_CLASSES, AE) || W.ancestorHasClass(AE, E.ALTERNATE)) { continue } var AN = W.getDimensions(AE); var f = AN.height; var c = AN.width; var z = W.getComputedStyle(AE, "display"); if (!f || !c || !z || z == "none") { continue } c = W.getWidthFromStyle(AE); var m, AG; if (!s) { var AK = I(AE); m = Math.min(this.MAX_FONT_SIZE, Math.max(this.MIN_FONT_SIZE, AK.fontSize)); if (AD) { m = Math.max(8, 8 * Math.round(m / 8)) } AG = AK.lines; if (isNaN(AG) || !isFinite(AG) || AG == 0) { AG = 1 } if (AG > 1 && AO) { f += Math.round((AG - 1) * AO) } } else { m = s; AG = 1 } var d = W.create("span", E.ALTERNATE); var AW = AE.cloneNode(true); AE.parentNode.appendChild(AW); for (var AT = 0, AS = AW.childNodes.length; AT < AS; AT++) { d.appendChild(AW.childNodes[AT].cloneNode(true)) } if (w.modifyContent) { w.modifyContent(AW, w.selector) } if (w.modifyCss) { AB = w.modifyCss(AQ, AW, w.selector) } var o = P(AW, h, w.uriEncode); AW.parentNode.removeChild(AW); if (w.modifyContentString) { o.text = w.modifyContentString(o.text, w.selector) } if (o.text == "") { continue } f = Math.round(AG * m); var AJ = Math.round(AG * V(m, r) * m) + this.FLASH_PADDING_BOTTOM + q; var AA = AC ? c : "100%"; var AH = "sIFR_replacement_" + L++; var AP = ["id=" + AH, "content=" + A.escape(o.text), "width=" + c, "height=" + f, "renderheight=" + AJ, "link=" + A.escape(o.primaryLink.href || ""), "target=" + A.escape(o.primaryLink.target || ""), "size=" + m, "css=" + A.escape(AB), "cursor=" + k, "tunewidth=" + (w.tuneWidth || 0), "tuneheight=" + q, "offsetleft=" + (w.offsetLeft || ""), "offsettop=" + (w.offsetTop || ""), "fitexactly=" + p, "preventwrap=" + AR, "forcesingleline=" + AM, "antialiastype=" + (w.antiAliasType || ""), "thickness=" + (w.thickness || ""), "sharpness=" + (w.sharpness || ""), "kerning=" + n, "gridfittype=" + AI, "flashfilters=" + u, "opacity=" + AV, "blendmode=" + (w.blendMode || ""), "selectable=" + (w.selectable == null || AF != "" && !sIFR.ua.macintosh && sIFR.ua.gecko && sIFR.ua.geckoVersion >= sIFR.ua.parseVersion("1.9") ? "true" : w.selectable === true), "fixhover=" + (this.fixHover === true), "events=" + y, "delayrun=" + G.brokenFlashIE.fixFlash, "version=" + this.VERSION]; var x = A.encodeVars(AP); var g = new K(O, AH, AP, AC, { onReplacement: w.onReplacement, onRollOver: w.onRollOver, onRollOut: w.onRollOut, onRelease: w.onRelease }); g.movie = X.create(sIFR, G.brokenFlashIE, AE, T.fixFocus && w.fixFocus, AH, v, AA, AJ, x, AF, e); this.replacements.push(g); this.replacements[AH] = g; if (w.selector) { if (!this.replacements[w.selector]) { this.replacements[w.selector] = [g] } else { this.replacements[w.selector].push(g) } } d.setAttribute("id", AH + "_alternate"); AE.appendChild(d); W.addClass(E.REPLACED, AE) } 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(g) { var h, d; if (!T.ie) { h = W.getStyleAsInt(g, "lineHeight"); d = Math.floor(W.getStyleAsInt(g, "height") / h) } else { if (T.ie) { var h = W.getComputedStyle(g, "fontSize"); if (h.indexOf("px") > 0) { h = parseInt(h) } else { var f = g.innerHTML; g.style.visibility = "visible"; g.style.overflow = "visible"; g.style.position = "static"; g.style.zoom = "normal"; g.style.writingMode = "lr-tb"; g.style.width = g.style.height = "auto"; g.style.maxWidth = g.style.maxHeight = g.style.styleFloat = "none"; var i = g; var c = g.currentStyle.hasLayout; if (c) { g.innerHTML = '<div class="' + E.LAYOUT + '">X<br>X<br>X</div>'; i = g.firstChild } else { g.innerHTML = "X<br>X<br>X" } var e = i.getClientRects(); h = e[1].bottom - e[1].top; h = Math.ceil(h * 0.8); if (c) { g.innerHTML = '<div class="' + E.LAYOUT + '">' + f + "</div>"; i = g.firstChild } else { g.innerHTML = f } e = i.getClientRects(); d = e.length; if (c) { g.innerHTML = f } g.style.visibility = g.style.width = g.style.height = g.style.maxWidth = g.style.maxHeight = g.style.overflow = g.style.styleFloat = g.style.position = g.style.zoom = g.style.writingMode = "" } } } return { fontSize: h, lines: d} } 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 || {}} } };

/* nonfauxcolumns.min.js
----------------------------------------------------------------------------- */
function NonFauxColumns() { this._init() } NonFauxColumns.version = "2.0"; NonFauxColumns._instances = []; NonFauxColumns._textSizeReferenceElement = null; NonFauxColumns._textSizeReferenceHeight = -1; NonFauxColumns.prototype = { _init: function() { this._boxes = []; this._areHeightsEqualized = false; this._areWidthsEqualized = false; NonFauxColumns._instances.push(this); if (NonFauxColumns._textSizeReferenceElement == null) { NonFauxColumns._textSizeReferenceElement = document.createElement("div"); NonFauxColumns._textSizeReferenceElement.id = "NonFauxColumns-TextResizeReferenceElement"; NonFauxColumns._textSizeReferenceElement.appendChild(document.createTextNode("|")); NonFauxColumns._textSizeReferenceElement.style.position = "absolute"; NonFauxColumns._textSizeReferenceElement.style.visibility = "hidden"; document.body.appendChild(NonFauxColumns._textSizeReferenceElement); NonFauxColumns._textSizeReferenceHeight = NonFauxColumns._textSizeReferenceElement.offsetHeight; setInterval(NonFauxColumns._checkTextResize, 50) } }, addBox: function(A) { this._boxes.push(A) }, equalizeHeights: function() { var A = -1; for (var B = 0; B < this._boxes.length; B++) { this._boxes[B].style.height = "auto"; if (this._boxes[B].offsetHeight > A) { A = this._boxes[B].offsetHeight } } for (var B = 0; B < this._boxes.length; B++) { this._boxes[B].style.height = A + "px"; if (this._boxes[B].offsetHeight > A) { this._boxes[B].style.height = A - (this._boxes[B].offsetHeight - A) + "px" } } this._areHeightsEqualized = true }, equalizeWidths: function() { var B = -1; for (var A = 0; A < this._boxes.length; A++) { this._boxes[A].style.width = "auto"; if (this._boxes[A].offsetWidth > B) { B = this._boxes[A].offsetWidth } } for (var A = 0; A < this._boxes.length; A++) { this._boxes[A].style.width = B + "px"; if (this._boxes[A].offsetWidth > B) { this._boxes[A].style.width = B - (this._boxes[A].offsetWidth - B) + "px" } } this._areWidthsEqualized = true } }; NonFauxColumns._checkTextResize = function() { if (NonFauxColumns._textSizeReferenceElement.offsetHeight != NonFauxColumns._textSizeReferenceHeight) { NonFauxColumns._autoEqualize(); NonFauxColumns._textSizeReferenceHeight = NonFauxColumns._textSizeReferenceElement.offsetHeight } }; NonFauxColumns._autoEqualize = function() { for (var A = 0; A < NonFauxColumns._instances.length; A++) { if (NonFauxColumns._instances[A]._areHeightsEqualized) { NonFauxColumns._instances[A].equalizeHeights() } if (NonFauxColumns._instances[A]._areWidthsEqualized) { NonFauxColumns._instances[A].equalizeWidths() } } }; if (window.addEventListener) { window.addEventListener("resize", NonFauxColumns._autoEqualize, false) } else { if (window.attachEvent) { window.attachEvent("onresize", NonFauxColumns._autoEqualize) } else { window.onresize = NonFauxColumns._autoEqualize } };

/* Global Nav Shadows
----------------------------------------------------------------------------- */
(function($){
	var dropShadowZindex = 1;  //z-index counter

	$.fn.dropShadow = function(options)
	{
		// Default options
		var opt = $.extend({
			left: 1,
			top: 3,
			blur: 2,
			opacity: .5,
			color: "#000000",
			swap: false
			}, options);
		var jShadows = $([]);  //empty jQuery collection
		
		// Loop through original elements
		this.not(".dropShadow").each(function()
		{
			var jthis = $(this),
			shadows = [],
			blur = (opt.blur <= 0) ? 0 : opt.blur,
			opacity = (blur == 0) ? opt.opacity : opt.opacity / (blur * 8),
			zOriginal = (opt.swap) ? dropShadowZindex : dropShadowZindex + 1,
			zShadow = (opt.swap) ? dropShadowZindex + 1 : dropShadowZindex;
			
			jthis
				.css("zIndex", zOriginal);
			if (jthis.css("position") != "absolute") {
				jthis.css({
					position: "relative",
					zoom: 1 //for IE layout
				});
			}

			// Create first shadow layer
			var bgColor = jthis.css("backgroundColor");
			if (bgColor == "rgba(0, 0, 0, 0)") { bgColor = "transparent" };  //Safari
			if (bgColor != "transparent" || jthis.css("backgroundImage") != "none" ) {		
				shadows[0] = $("<div></div>")
					.css("background", opt.color);								
			}
			else {
				shadows[0] = jthis
					.clone()
					.removeAttr("name")
					.removeAttr("shadowId")
					.css("color", opt.color);
			}
			shadows[0]
				.addClass("dropShadow")
				.css({
					height: jthis.outerHeight() - 33,
					left: blur,
					opacity: opacity,
					position: "absolute",
					top: blur,
					width: jthis.outerWidth(),
					zIndex: zShadow
				});
				
			// Create other shadow layers
			var layers = (8 * blur) + 1;
			for (i = 1; i < layers; i++) {
				shadows[i] = shadows[0].clone();
			}

			// Position layers
			var i = 1;			
			var j = blur;
			while (j > 0) {
				shadows[i].css({left: j * 2, top: 0});           //top
				shadows[i + 1].css({left: j * 4, top: j * 2});   //right
				shadows[i + 2].css({left: j * 2, top: j * 4});   //bottom
				shadows[i + 3].css({left: 0, top: j * 2});       //left
				shadows[i + 4].css({left: j * 3, top: j});       //top-right
				shadows[i + 5].css({left: j * 3, top: j * 3});   //bottom-right
				shadows[i + 6].css({left: j, top: j * 3});       //bottom-left
				shadows[i + 7].css({left: j, top: j});           //top-left
				i += 8;
				j--;
			}

			// Create container
			var divShadow = $("<div></div>")
				.addClass("dropShadow")
				.css({
					left: jthis.position().left + opt.left - blur,
					marginTop: jthis.css("marginTop"),
					marginRight: jthis.css("marginRight"),
					marginBottom: jthis.css("marginBottom"),
					marginLeft: jthis.css("marginLeft"),
					position: "absolute",
					top: jthis.position().top + opt.top - blur,
					zIndex: zShadow
				});

			// Add layers to container	
			for (i = 0; i < layers; i++) {
				divShadow.append(shadows[i]);
			}
			
			// Add container to DOM
			jthis.after(divShadow);
			
			// Increment z-index counter
			dropShadowZindex += 2;

		});  //end each
		
		return this.pushStack(jShadows);
	};

	$(function()  
	{
		// Suppress printing of shadows
		var noPrint = "<style type='text/css' media='print'>";
		noPrint += ".dropShadow{visibility:hidden;}</style>";
		$("head").append(noPrint);
	});

})(jQuery);

/* Transparent PNGs
----------------------------------------------------------------------------- */
if (jQuery.browser.msie && jQuery.browser.version < 7) {
    jQuery(document).ready(function() {
        jQuery("img.tPNG").each(function() {
            this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "')";
            this.src = "/images/spacer.gif";
        });
    });
}

/* Equal Heights
----------------------------------------------------------------------------- */
$.fn.equalHeights = function(config) {
	var currentTallest = 0;
	if(typeof(config) != 'undefined' && config.paired===true) {
	    for(var i=0; i<$(this).length; i = i + 2) {
	        var ele = $(this).eq(i),
	        next = ele.next();
		    currentTallest = ele.height() > next.height() ? ele.height() : next.height();
		    ele.css('height', currentTallest);
		    next.css('height', currentTallest);
	    }
	} else {
	    $(this).each(function(i){
		    if ($(this).height() > currentTallest) { currentTallest = $(this).height(); }
	    });
	    $(this).css('height', currentTallest);
	}
	return this;
};

/* Top level navigation
----------------------------------------------------------------------------- */
jQuery(document).ready(function( ) {
    //jQuery("#menu > ul > li > ul > li:last-child").addClass('last');
    jQuery("#menu > ul > li  ul").each(function(index) {
        var num = $(this).parent().find('ul').length;

        if(num > 1) {
            $(this).addClass('multiple');
            $(this).parent().parent().addClass('fixing');
            $(this).parent().width(213*num);
        } 
    });
    $('#menu li.fixing').each(function() {
        $(this).find('ul').find('li:first').addClass('first');
        $(this).find('ul:last').addClass('last');
        $(this).find('ul').equalHeights();
    });
    $('#menu li.fixing').removeClass('fixing');
    $('#menu > ul').append('<li class="faux"><a style="text-indent: -9999px" href="javascript:void(0);">Faux</a></li>');
    $('#menu ul li.last').removeClass('last');
    jQuery("#menu > ul > li:not(.faux)").hover(
        function() {
            jQuery(this).addClass('hover');
            
            if(!jQuery.data(this, 'init') && !/msie|MSIE 6/.test(navigator.userAgent) ) {
               $('div', this).dropShadow();
               if($('div', this).length == 0){
                   $('ul', this).dropShadow();
               }
               jQuery.data(this, 'init', true);
            }
            var prev = jQuery.data(this, 'prev');
            if(!prev) {
               prev = jQuery.data(this, 'prev', jQuery(this).prev());
            }
            prev.addClass('hoverFix');
        },
        function() {
            jQuery(this).removeClass('hover');
            jQuery.data(this, 'prev').removeClass('hoverFix');
        }
    );
});

/* Clearfields
----------------------------------------------------------------------------- */
jQuery(document).ready(function() {
    jQuery('.clear').focus(function() {
        if (this.value == this.defaultValue) this.value = '';
    });
    jQuery('.clear').blur(function() {
        if (this.value == "") this.value = this.defaultValue;
    });
});

/* Utility functions
----------------------------------------------------------------------------- */
function openWin(url, name, features) {
    if (!url) url = location.href;
    if (!name) name = 'window';
    if (!features) features = 'width=800,height=600,resizeable=1,scrollbars=1';
    
    var win = window.open(url, name, features);
    if (win.focus) win.focus();
}

/* Featured Customers
----------------------------------------------------------------------------- */
$(document).ready(
    function() {



        //begin globalization hack

        var currentLanguage = $.cookie('website#lang');
        var showing;
        var customers;
        var of;


        switch (currentLanguage) {


            case "ru":

                showing = "Показать ";
                of = " из ";
                customers = " клиентов";

                break;

            case "es":

                showing = "Mostrando ";
                of = " de ";
                customers = " clientes";

                break;

            default:

                showing = "Showing ";
                of = " of ";
                customers = " customers";

                break;

        }


        // end globalization hack

        $('#featured-customers .customer:even').css({ 'marginRight': "4px" });
        //$('#home_customers .customer:even').css({'marginRight': '15px'});

        // Check if on the homepage
        if (!$('#home_customers').length > 0 && $('#featured-customers .logos .customer').length > 6) {

            $('#featured-customers .logos .customer:gt(5)').css({ 'display': 'none' });

            if (!$('#featured-customers .logos .customer:last').is(':hidden')) {
                $('#featured-customers #next').addClass('disabled');
            }

            $('#featured-customers #next').click(function() {
                if ($(this).hasClass('disabled')) {
                    return false;
                }
                var index = $('#featured-customers .logos .customer').index($('#featured-customers .logos .customer:not(:hidden):last'));
                $('#featured-customers .logos .customer:not(:hidden):lt(6)').css({ 'display': 'none' });
                $('#featured-customers .logos .customer:eq(' + index + ')').nextAll('.customer:lt(6)').css({ 'display': 'block' });

                $('img.fixPadding:visible').fixPadding();

                if (!$('#featured-customers .logos .customer:last').is(':hidden')) {
                    $(this).addClass('disabled');
                }
                if ($('#featured-customers .logos .customer:first').is(':hidden')) {
                    $('#featured-customers #prev').removeClass('disabled');
                }
                return false;
            });
            $('#featured-customers #prev').click(function() {
                if ($(this).hasClass('disabled')) {
                    return false;
                }
                var index = $('#featured-customers .logos .customer').index($('#featured-customers .logos .customer:not(:hidden):first'));
                $('#featured-customers .logos .customer:not(:hidden):lt(6)').css({ 'display': 'none' });
                $('#featured-customers .logos .customer:eq(' + index + ')').prevAll('.customer:lt(6)').css({ 'display': 'block' });

                $('img.fixPadding:visible').fixPadding();

                if (!$('#featured-customers .logos .customer:first').is(':hidden')) {
                    $(this).addClass('disabled');
                }
                if ($('#featured-customers .logos .customer:last').is(':hidden')) {
                    $('#featured-customers #next').removeClass('disabled');
                }
                return false;
            });


            if ($('#featured-customers #counter').length > 0) {
                $('#featured-customers #next, #featured-customers #prev').click(function() {
                    var index = $('#featured-customers .logos .customer').index($('#featured-customers .logos .customer:not(:hidden):first'));
                    index = index + 1;
                    $('#featured-customers #counter').html(
                        showing +
                        index + '-' +
                        ($('#featured-customers .logos .customer:visible').length + index - 1) +
                        of + $('#featured-customers .logos .customer').length +
                        customers
                   );
                });
            }

        } else {
            $('#featured-customers #prev, #featured-customers #next').hide();
        }

        $('#featured-customers #counter').html(
            showing + '1-' +
            ($('#featured-customers .logos .customer:visible').length) +
            of + $('#featured-customers .logos .customer').length +
            customers
        );

        var rndCustomer = Math.floor(Math.random() * $('#featured-customers .logos .customer:visible').length);
        var featuredCustomer = $('#featured-customers .logos .customer:eq(' + rndCustomer + ')');
        featuredCustomer.addClass('active');
        $('#featured-customers .featured .success').html(featuredCustomer.find('.success').html());

        $('#featured-customers .logos .logo, #featured-customers .logos .customer').click(
            function() {
                var featuredCustomer = $(this).hasClass('customer') ? $(this) : $(this).parent();
                $('#featured-customers .featured .success').fadeOut('fast', function() {
                    $(this).html(featuredCustomer.find('.success').html());
                    $('#featured-customers .logos .active').removeClass('active');
                    featuredCustomer.addClass('active');
                    $(this).fadeIn('fast');
                });
            }
        );

        if ($('#featured-customers').parent().hasClass('expandable') && !$('#featured-customers').hasClass('show')) {
            $('#featured-customers').slideUp('fast', function() {
                $(this).addClass('hide');
            });
        }

    }
);

/* Right Sash
----------------------------------------------------------------------------- */
$('#right').ready(
    function() {
        var index = $('#right .register-module').length > 0 ? 2 : 1;
        $('#right .highlight:eq('+ index +')').addClass('grey');
    }
);

/* Expandables
----------------------------------------------------------------------------- */
$(document).ready(
    function() {
      $('.expandable a.handle, .expandable h3').click(
        function() {
          var toExpand = (this.tagName.toLowerCase()=='h3') ? $(this).next() : $(this).parent().next(),
          link = (this.tagName.toLowerCase()=='h3') ? $(this).find('a') : $(this);
          if(toExpand.hasClass('hide')) {
            toExpand.removeClass('hide');
            toExpand.css('display','none');
            toExpand.slideDown('normal',function() {
              link.addClass('expanded');
              $(this).addClass('show');
              $(this).find('img.fixPadding').fixPadding();
            });

          } else {
            toExpand.removeClass('show');
            toExpand.slideUp('normal',function() {
              $(this).addClass('hide');
              link.removeClass('expanded');
            });
          }
          return false;
        }
      );
    }
);

    $(document).ready(
    function () {
        $('.expandableUp a.handle, .expandableUp h4').click(
        function () {
            var toExpand = (this.tagName.toLowerCase() == 'h4') ? $(this).next() : $(this).parent().next(),
          link = (this.tagName.toLowerCase() == 'h4') ? $(this).find('a') : $(this);
            if (toExpand.hasClass('hide')) {
                toExpand.removeClass('hide');
                toExpand.css('display', 'none');
                toExpand.slideDown('normal', function () {
                    link.addClass('expanded');
                    $(this).addClass('show');
                    $(this).find('img.fixPadding').fixPadding();
                });

            } else {
                toExpand.removeClass('show');
                toExpand.slideDown('normal', function () {
                    $(this).addClass('hide');
                    link.removeClass('expanded');
                });
            }
            return false;
        }
      );
    }
);


//    $(document).ready(
//    function () {
//        $('.expandableUp a.handle, .expandableUp h4').click(
//        function () {
//            var toExpand = (this.tagName.toLowerCase() == 'h4') ? $(this).next() : $(this).parent().next(),
//          link = (this.tagName.toLowerCase() == 'h4') ? $(this).find('a') : $(this);
//            if (toExpand.hasClass('hide')) {
//                toExpand.removeClass('hide');
//                toExpand.css('display', 'none');
//                toExpand.slideDown('normal', function () {
//                    link.addClass('expanded');
//                    $(this).addClass('show');
//                    $(this).find('img.fixPadding').fixPadding();
//                });

//            } else {
//                toExpand.removeClass('show');
//                toExpand.slideDown('normal', function () {
//                    $(this).addClass('hide');
//                    link.removeClass('expanded');
//                });
//            }
//            return false;
//        }
//      );
//    }
//);

//    jQuery(document).ready(function () {
//        $('.accordion .head').click(function () {
//            $(this).next().toggle('slow');
//            return false;
//        }).next().hide();
    //    });


//$(document).ready(function() {
//  $('#slidebottom a.handle').click(function() {
//    $(this).next().slideToggle();
//  });
//});

