_global_["@namespace"]("ndm.defaults");ndm.defaults=function(A){return{hasBodyClassLoader:function(){ndm.dom.addLoadEvent(function(){var B=document.getElementsByTagName("body")[0];if(ndm.dom.hasClass(B,"no-js")){B.className=B.className.replace(/no-js/,"");}else{B.className=B.className+" has-js";}},function(){return !document.getElementsByTagName("body")[0].length;
},function(){return true;});},hasRelPopups:function(){ndm.dom.addLoadEvent(function(){ndm.controls.popups.listen();},function(){return true;},function(){return true;});},hasTicker:function(){ndm.dom.addLoadEvent(function(){var B={topStoryElem:"top-story",headlinesElem:"headlines",tickerElem:"ticker",nextButtonElem:"next-story",prevButtonElem:"prev-story",pauseButtonElem:"pause-story",pauseImgActive:"/images/ticker-pause-active.gif",pauseImgDefault:"/images/ticker-pause.gif"};
var C=new ndm.controls.ninbar(B);},function(){return !!(document.getElementById("headlines"));},function(){return true;});},hasListTabs:function(C){var B=C;ndm.dom.addLoadEvent(function(){var D={rootNode:document.getElementById(B),tabClass:"module-item",tabElem:"ol",tabActorClass:"tab",tabActorElem:"li"};
ndm.controls.tabs.Listed(D);},function(){return !!document.getElementById(B);},function(){return true;});},hasScheduler:function(B){var C=B;ndm.dom.addLoadEvent(function(){ndm.dom.scheduler.start(C);},function(){return true;},function(){return true;});},hasStoryTools:function(){ndm.dom.addLoadEvent(function(){var C=ndm.controls.font.Default({textContainerId:"article-body"});
var B=ndm.controls.setPrintLink("story-print");},function(){return !!ndm.dom.getElementsByClassName("story-tools").length;},function(){return true;});},hasFormValidator:function(B){var C=B;ndm.dom.addLoadEvent(function(){var D=document.getElementById(C);D.onsubmit=function(){return ndm.forms.validation.validate(this);
};commentFormInit();},function(){if(typeof commentFormInit==="undefined"){return false;}if(!document.getElementById("comment-form")){return false;}return true;},function(){return true;});},hasFeatureCyclo:function(){ndm.dom.addLoadEvent(function(){var B=new ndm.controls.FeatureCyclo();B.init("fade");
ndm.dom.scheduler.addSchedule(function(){B.loop();});},function(){if(ndm.dom.getElementsByClassName("feature-image").length<=1){return false;}else{if(!document.getElementById("feature-stories")){return false;}else{return true;}}},function(){return true;});},hasStandardCyclo:function(){ndm.dom.addLoadEvent(function(){var F=ndm.dom.getElementsByClassName("cyclo");
var I=null;var G=["-a","-b","-c","-d","-e","-f"];var E={};for(var C=0;C!=F.length;C++){F[C].id="lead-group"+G[C];var H=ndm.dom.getElementsByClassName("cyclo-image",F[C],"img");F[C].style.height=H[0].height+"px";F[C].style.width=H[0].width+"px";F[C].style.backgroundRepeat="no-repeat";for(var B=0;B!=H.length;
B++){H[B].id="lom-lead"+G[C]+B;}ndm.dom.getElementsByClassName("cyclo-previous",F[C],"li")[0].id="lom-prev"+G[C];ndm.dom.getElementsByClassName("cyclo-index",F[C],"li")[0].id="lom-index"+G[C];ndm.dom.getElementsByClassName("cyclo-next",F[C],"li")[0].id="lom-next"+G[C];var D=ndm.dom.getElementsByClassName("cyclo-caption",F[C],"p");
for(var B=0;B!=D.length;B++){D[B].id="lom-caption"+G[C]+B;}E={imageIdPrefix:"lom-lead"+G[C],captionIdPrefix:"lom-caption"+G[C],controlsPrefix:"lom-index"+G[C],backgroundContainerPrefix:"lead-group"+G[C],areaContainerPrefix:"lead-group"+G[C],nextIdPrefix:"lom-next"+G[C],previousIdPrefix:"lom-prev"+G[C]};
I=new ndm.controls.Cyclo(E);I.init("fade");ndm.dom.scheduler.addSchedule(function(){I.loop();});}},function(){if(ndm.dom.getElementsByClassName("cyclo-image").length<=1){return false;}else{return true;}},function(){return true;});}};}();ndm.controls.font.Default=function(B){var A=object(ndm.controls.font.Base);
var C=[];C.push(document.getElementById(B.textContainerId));A.set({elems:C,fSize:1.17});var E=function(){A.increaseSize();return false;};var D=function(){A.decreaseSize();return false;};ndm.dom.getElementsByClassName("size-up")[0].onmousedown=E;ndm.dom.getElementsByClassName("size-down")[0].onmousedown=D;
ndm.dom.getElementsByClassName("size-up")[0].onclick=function(){return false;};ndm.dom.getElementsByClassName("size-down")[0].onclick=function(){return false;};return A;};ndm.controls.FeatureCyclo=function(){this.IMAGE_ID_PREFIX="lom-lead";this.IMAGE_CAPTION_PREFIX="feature-story";this.BACKGROUND_CONTAINER="feature-module-bg";
this.LINK_SRC_PREFIX=null;this.AREA_CONTAINER="feature-module-bg";this.PAUSE_ID=null;this.SINGLE_CAPTION=null;this.BUTTONS_ID="features-buttons";this.NEXT_ID=null;this.PREV_ID=null;this.CONTROLS=null;this.currentImg="";this.imageSwitchTimeout=0;this.hasImageTimer=false;this.currentTimerImage=null;this.CONTENT_BLOCKS=true;
this.BUTTON_OFF_CLASS="nav";this.BUTTON_ON_CLASS="active nav";this.BUTTON_ELEM="li";this.currentTween=null;var G=ndm.dom.getElementsByClassName("feature-image");if(G.length<=1){return false;}var F=document.getElementById(this.BACKGROUND_CONTAINER);if(!F){var C=document.getElementById("feature-stories");
var D=(C.getElementsByTagName("h2"))[0];if(!!D){F=document.createElement("DIV");F.id=this.BACKGROUND_CONTAINER;C.insertBefore(F,D.nextSibling);}}if(!!!document.getElementById(this.BUTTONS_ID)){try{ndm.dom.getElementsByClassName("features-nav")[0].id=this.BUTTONS_ID;}catch(E){}}for(var B=0;B!==G.length;
B++){G[B].id="lom-lead"+B;}this.imagePos=0;this.IMAGE_MAX=G.length;F.style.backgroundImage="url("+G[0].getAttribute("src")+")";var A=ndm.dom.getElementsByClassName(this.BUTTON_OFF_CLASS,document.getElementById(this.BUTTONS_ID));for(B=0;B<A.length;B++){A[B].owner=this;A[B].num=B;A[B].onclick=function(){document.getElementById(this.owner.BUTTONS_ID).className+=" is-waiting";
this.owner.broadcast();if(this.owner.isLocked===true){return false;}var L=this.getAttribute("title");var H=document.getElementById(this.owner.BUTTONS_ID);var I=ndm.dom.getElementsByClassName(this.owner.BUTTON_OFF_CLASS,F);for(var J=0;J<I.length;J++){I[J].className=this.owner.BUTTON_OFF_CLASS;}this.owner.stop(false);
this.owner.jump(this.num,false);var K=this;var M=window.setTimeout(function(){K.owner.start(false);},4000);this.className=this.owner.BUTTON_ON_CLASS;return false;};}};ndm.controls.FeatureCyclo.prototype=new ndm.controls.Cyclo();ndm.controls.FeatureCyclo.constructor=ndm.controls.FeatureCyclo;getHBXPathFromNav=ndm.tracking.hbx.getPathFromNav;
getElementsByClassName = ndm.dom.getElementsByClassName;

/* json */
if (!this.JSON) {
    JSON = function () {
        function f(n) { 
            return n < 10 ? '0' + n : n;
        }
        Date.prototype.toJSON = function () {

            return this.getUTCFullYear()   + '-' +
                 f(this.getUTCMonth() + 1) + '-' +
                 f(this.getUTCDate())      + 'T' +
                 f(this.getUTCHours())     + ':' +
                 f(this.getUTCMinutes())   + ':' +
                 f(this.getUTCSeconds())   + 'Z';
        };
        var m = {    // table of character substitutions
            '\b': '\\b',
            '\t': '\\t',
            '\n': '\\n',
            '\f': '\\f',
            '\r': '\\r',
            '"' : '\\"',
            '\\': '\\\\'
        };
        function stringify(value, whitelist) {
            var a,          // The array holding the partial texts.
                i,          // The loop counter.
                k,          // The member key.
                l,          // Length.
                r = /["\x00-\x1f\x7f-\x9f]/g,
                v;          // The member value.
            switch (typeof value) {
            case 'string':

                return r.test(value) ?
                    '"' + value.replace(r, function (a) {
                        var c = m[a];
                        if (c) {
                            return c;
                        }
                        c = a.charCodeAt();
                        return '\\u00' + Math.floor(c / 16).toString(16) +
                                                   (c % 16).toString(16);
                    }) + '"' :
                    '"' + value + '"';

            case 'number':
                return isFinite(value) ? String(value) : 'null';
            case 'boolean':
            case 'null':
                return String(value);
            case 'object':
                if (!value) {
                    return 'null';
                }
                if (typeof value.toJSON === 'function') {
                    return stringify(value.toJSON());
                }
                a = [];
                if (typeof value.length === 'number' &&
                        !(value.propertyIsEnumerable('length'))) {

                    l = value.length;
                    for (i = 0; i < l; i += 1) {
                        a.push(stringify(value[i], whitelist) || 'null');
                    }
                    return '[' + a.join(',') + ']';
                }
                if (whitelist) {

                    l = whitelist.length;
                    for (i = 0; i < l; i += 1) {
                        k = whitelist[i];
                        if (typeof k === 'string') {
                            v = stringify(value[k], whitelist);
                            if (v) {
                                a.push(stringify(k) + ':' + v);
                            }
                        }
                    }
                } else {
                    for (k in value) {
                        if (typeof k === 'string') {
                            v = stringify(value[k], whitelist);
                            if (v) {
                                a.push(stringify(k) + ':' + v);
                            }
                        }
                    }
                }
                return '{' + a.join(',') + '}';
            }
        }

        return {
            stringify: stringify,
            parse: function (text, filter) {
                var j;
                function walk(k, v) {
                    var i, n;
                    if (v && typeof v === 'object') {
                        for (i in v) {
                            if (Object.prototype.hasOwnProperty.apply(v, [i])) {
                                n = walk(i, v[i]);
                                if (n !== undefined) {
                                    v[i] = n;
                                } else {
                                    delete v[i];
                                }
                            }
                        }
                    }
                    return filter(k, v);
                }
                if (/^[\],:{}\s]*$/.test(text.replace(/\\./g, '@').
replace(/"[^"\\\n\r]*"|true|false|null|-?d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
                    j = eval('(' + text + ')');
                    return typeof filter === 'function' ? walk('', j) : j;
                }
                throw new SyntaxError('parseJSON');
            }
        };
    }();
}

