NetworkNews=function(a){this.findAppropriateConfig=function(){var b=NetworkNews.defaults.config["default"];b=location.pathname;var c=location.hostname;switch(true){case b.match(NetworkNews.Constants.re["article-path"]):b=NetworkNews.defaults.config.article;break;case b.match(NetworkNews.Constants.re["multimedia-path"]):b=NetworkNews.defaults.config.multimedia;break;case b.match(NetworkNews.Constants.re["hp-path"])&&!c.match(NetworkNews.Constants.re["blog-domain"]):b=NetworkNews.defaults.config.hp;
break;case c.match(NetworkNews.Constants.re["blog-domain"]):b=NetworkNews.defaults.config.blog;break;case b.match(NetworkNews.Constants.re["profile-path"]):b=NetworkNews.defaults.config.profile;break;default:b=NetworkNews.defaults.config["default"]}return b};this.start=function(){this.initFacebook()};this.initFacebook=function(){this.generateFbCrossDomainReciever();FB.init({apiKey:NetworkNews.Constants.FB_API_KEY,cookie:true,xfbml:true})};this.initTwitter=function(){};this.finish=function(){this.finishTwitter();
this.finishFacebook()};this.finishFacebook=function(){FB.XFBML.parse()};this.finishTwitter=function(){if(typeof twttr!="undefined"){twttr.anywhere.config({callbackURL:NetworkNews.Constants.TwitterAnywhereCallbackURL,domain:document.domain});twttr.anywhere(function(b){b(".NN-ww").hovercards();b(".NN-follow-twitter").hovercards({expanded:true,username:function(c){return c.title}})})}this.fetchTwitter()};this.initAllModules=function(){for(var b={},c=0;c<this.config.modules.length;c++)for(var e=this.config.modules[c],
g=0;g<e.widgets.length;g++){var d=e.widgets[g];b={code:"",targets:[],ok:false};if(d.needsHref)if(d.isFbIframe){if(this.orbitId)d.fb.attrs.href=this.getUrl({orbitId:this.orbitId})}else if(d.isNNApi)if(this.orbitId){var j=this.getUrl({orbitId:this.orbitId,service:"article"}),l;for(l in d.tags)if(d.tags[l])d.tags[l].attrs.href=j;if(d.hasTweetBox)d.tags.tweetbox.attrs.defaultContent=this.getTweet()}if(d.needsSection&&this.section){if(d.isNNApi&&typeof d.tags["fb-section-likes"]=="object"){d.tags["fb-section-likes"].attrs.section=
this.section;d.tags["fb-section-likes"].attrs.href=NetworkNews.Constants.ApplicationRoot+"/section/"+this.section+"/timeframe/"+NetworkNews.Constants.SectionFrontTimeframe;d.heading="Articles From "+this.getSectionDisplayName(this.section)}if(d.isNNApi&&typeof d.tags.top=="object")d.tags.top.attrs.href=NetworkNews.Constants.ApplicationRoot+"/section/"+this.section+"/timeframe/"+NetworkNews.Constants.SectionFrontTimeframe}if(!d.needsHref&&!d.needsSection&&d.isNNApi&&typeof d.tags.top=="object")d.tags.top.attrs.href=
this.getUrl({service:"hp"})+"/timeframe/"+NetworkNews.Constants.HomepageTimeframe;if(d.needsTargetId||d.needsTargetTag){if(d.needsTargetTag)b.targets=b.targets.concat(this.getTargets({tag:d.selectors.tags.target}));if(d.needsTargetId)b.targets=b.targets.concat(this.getTargets({id:d.selectors.ids.target}));b.code=this.prepareWidget(d);if(b.code&&b.targets.length){b.ok=true;this.targetedCode=this.targetedCode.concat(b)}}else d.isMultiWidgeted&&this.initMultiWidgets(d)}for(c=0;c<this.targetedCode.length;c++){b=
this.targetedCode[c];b.ok&&this.placeWidget(b.code,b.targets)}};this.renderMyActivity=function(){return""};this.getUrl=function(b){var c=null;b=b||{};if(b.service)switch(b.service){case "article":try{c=NetworkNews.Constants.ApplicationRoot+"/story/www.washingtonpost.com"+getUrlFromId(b.orbitId)}catch(e){}break;case "section":c=NetworkNews.Constants.ApplicationRoot+"/section/"+section;break;case "hp":c=NetworkNews.Constants.ApplicationRoot+"/hp";break;default:c=NetworkNews.Constants.ApplicationRoot+
"/hp"}else if(b.orbitId)try{c="http://www.washingtonpost.com"+getUrlFromId(b.orbitId)}catch(g){}return c};this.getSection=function(){var b=null,c=null;if(typeof thisNode!="undefined"){c=thisNode.split("/");b=c[0];if(b=="opinion")if(typeof commercialNode!="undefined"){c=commercialNode.split("/");b=typeof c[2]!="undefined"?c[2]:c[0]}else b=c[2]}else if(typeof wp_article!="undefined"&&typeof wp_article.section!="undefined")b=wp_article.section;switch(b){case "artsandliving":b="Arts and Living";break;
case "kidspost":b="KidsPost";break;case "livediscussions":b="Live Discussions";break;case "opinion":b="Opinions";break;case "realestate":b="Real Estate";break;case "extras":case "theextras":b="The Extras";break;case null:b="Nation";break;default:b=NetworkNews.ucfirst(b)}return typeof b!="undefined"?b:"Nation"};this.getSectionDisplayName=function(b){switch(b){case "Artsandliving":b="Arts And Living";break;case "Kidspost":b="Kids Post";break;case "Realestate":b="Real Estate";break;case "Livediscussions":b=
"Live Discussions";break;case "Extras":case "Theextras":case "Print":b="This Section"}if(typeof b=="undefined")b="Nation";return b};this.getTweet=function(){var b=document.getElementsByTagName("title").item(0).text;if(b.length>115)b=b.substring(0,112)+"...";return b+": "+location.href};this.prepareWidget=function(b){var c="";typeof b.initWidget=="function"&&b.initWidget();if(b.heading)c+='<span class="NN-widget-heading">'+b.heading+"</span>";if(b.isFbIframe){c+="<fb:"+b.fb.tag+" ";d=b.fb.attrs||{};
for(var e in d)if(d[e])c+=e+'="'+d[e]+'" ';c+="></fb:"+b.fb.tag+">"}else if(b.isFbApi&&b.apiCallback&&this[b.apiCallback])c=this[b.apiCallback](b);else if(b.isNNApi){tags=b.tags||[];for(var g in tags){c+="<"+b.tags[g].tag+" ";var d=b.tags[g].attrs;for(e in d)c+=e+'="'+d[e]+'" ';c+="></"+b.tags[g].tag+">"}}return c};this.isActive=false;this.targetedCode=[];this.init(a)};
NetworkNews.include=function(a){var b=document.getElementsByTagName("head").item(0),c=document.createElement("script");c.setAttribute("language","javascript");c.setAttribute("type","text/javascript");c.setAttribute("src",a);b.appendChild(c);return false};NetworkNews.activateLinks=function(a){return a.replace(/(https?\:\/\/[^\s]+)/gi,"<a href=\"$1\" onClick=\"try{sendDataToOmniture(null, 'event14', {'eVar9':'twitter - related'});}catch(e){}\">$1</a>")};
NetworkNews.omniturizeLinks=function(a){return a.replace(/<a href=/g,"<a onclick=\"try{sendDataToOmniture(null, 'event14', {'eVar9':'facebook - most popular'})}catch(e){}\" href=")};NetworkNews.ucfirst=function(a){return a.replace(/\b([a-z])/,function(b){return b.toUpperCase()})};
NetworkNews.DateHelper={time_ago_in_words_with_parsing:function(a){var b=new Date;b.setTime(Date.parse(a));return this.time_ago_in_words(b)},time_ago_in_words:function(a){return this.distance_of_time_in_words(new Date,a)},distance_of_time_in_words:function(a,b){var c=Math.floor((a-b)/1E3/60);if(c==0)return"less than a minute ago";if(c==1)return"a minute ago";if(c<45)return c+" minutes ago";if(c<90)return"about 1 hour ago";if(c<1440)return"about "+Math.floor(c/60)+" hours ago";if(c<2880)return"1 day ago";
if(c<43200)return Math.floor(c/1440)+" days ago";if(c<86400)return"about 1 month ago";if(c<525960)return Math.floor(c/43200)+" months ago";if(c<1051199)return"about 1 year ago";return"over "+Math.floor(c/525960)+" years ago"}};
NetworkNews.Constants=NetworkNews.Constants||{userPreferences:{on:typeof getCookie=="function"&&(getCookie("nn_pref")===null||getCookie("nn_pref")=="true")?true:false},hasAd:false,Domains:{live:"www.washingtonpost.com",test:"testweb8g.digitalink.com",dev:"localhost.digitalink.com"},applicationRoots:{live:"http://media7.washingtonpost.com/NetworkNews2-war/NetworkNewsServlet",test:"http://media7.washingtonpost.com/NetworkNews2-war/NetworkNewsServlet",dev:"http://media7.washingtonpost.com/NetworkNews2-war/NetworkNewsServlet"},
re:{"article-path":RegExp(/^\/wp-dyn\/content\/(article|blog|discussion)\/.*?\/(AR|BL|DI)/),"multimedia-path":RegExp(/^\/wp-dyn\/content\/(audio|gallery|graphic|panorama|photo|video)\/.*?\/(AU|GA|GR|PA|VI)/),"blog-domain":RegExp(/^(blogs|views|voices).washingtonpost.com$/),"live-domain":RegExp(/^[^\.]+.washingtonpost.com$/),"hp-domain":RegExp(/^\/$/),"hp-path":RegExp(/^(\/wp-srv\/(national|local|national-local)\.html|\/)$/),"profile-path":RegExp(/^\/wp-srv\/network-news\/(index\.html)?$/)},FB_APIKeys:{live:"f26d9bd97784160a1b327c99585ddd35",
test:"83e367a96022b5b71ffeb42dcfadf525",dev:"83e367a96022b5b71ffeb42dcfadf525"},twitterAnywhereApiKeys:{live:"5dRjBTiX9uK0uRUGy6w",test:"5dRjBTiX9uK0uRUGy6w",dev:"PoUnNSPzXcVYKflGP02Hag"},twitterAnywhereCallbackURLs:{live:"http://www.washingtonpost.com/wp-srv/network-news/anywhere-callback.html",test:"http://www.washingtonpost.com/wp-srv/network-news/anywhere-callback.html"},twitterShareWidget:'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url={{URL}}&counturl={{COUNTURL}}&via=washingtonpost&text={{TEXT}}&count=horizontal" style="width:130px; height:20px;"></iframe>',
spriteURL:"http://media3.washingtonpost.com/wp-srv/css/network-news/2/networked-news-sprite.png",Selectors:{ids:{fbCrossDomainReciever:"fb-root"},classes:{tabs:"NN-tabs",adUnit:"NN-ad-unit"},tags:{fbCrossDomainReciever:"body"}},SectionFrontTimeframe:"48",HomepageTimeframe:"48"};NetworkNews.Constants.defaultTweetboxStyles="#tweet-box-container:after{content:'.';display:block;height:0;clear:both;visibility:hidden;}";NetworkNews.Constants.defaultTweetboxStyles+="#tweet-box-container #editor textarea#tweet-box{border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;border:1px solid #111;font:normal 12px/1.25 helvetica, arial, sans-serif;}";
NetworkNews.Constants.defaultTweetboxStyles+="#tweet-box-container #tweet-box-header label.doing, #tweet-box-header span#counter{font:bold 12px/1.5em helvetica, arial, sans-serif;color:#111;}";NetworkNews.Constants.defaultTweetboxStyles+="#tweet-box-container #tweet-box-header label.doing span.twitter-icon{display:inline;display:inline-block;zoom:1;width:16px;height:16px;background:transparent url("+NetworkNews.Constants.spriteURL+") no-repeat 0 -394px;vertical-align:middle;position:relative;top:-2px;margin-right:4px;}";
NetworkNews.Constants.defaultTweetboxStyles+="#tweet-box-container #tweet-box-header span#counter{color:#999;float:right;display:block;margin-right:20px;}";NetworkNews.Constants.defaultTweetboxStyles+="#tweet-box-container #tweet-box-header span#counter.danger{color:#d6152b;}";NetworkNews.Constants.defaultTweetboxStyles+="#tweet-box-container #tweeting-controls{overflow:hidden;}";
NetworkNews.Constants.defaultTweetboxStyles+="#tweet-box-container #tweeting-controls span.btn{background:transparent url("+NetworkNews.Constants.spriteURL+") no-repeat 0 -430px;display:block;float:right;padding:0;border:none !important;position:relative;}";NetworkNews.Constants.defaultTweetboxStyles+="#tweet-box-container #tweeting-controls span.btn button{width:75px;height:25px;color:#fff;-webkit-text-shadow:none;-moz-text-shadow:none;text-shadow:none;font:bold 12px helvetica, arial, sans-serif;cursor:pointer;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;margin:0}";
NetworkNews.Constants.defaultTweetboxStyles+="#tweet-box-container #tweeting-controls span.btn:hover{background-position:-75px -430px;border-color:transparent !important;}";NetworkNews.Constants.defaultTweetboxStyles+="#spinner{position:absolute;right:58px;bottom:7px;float:none;padding:0;margin:0;}";NetworkNews.Constants.FB_API_KEY=String(location.hostname).indexOf(NetworkNews.Constants.Domains.live)==0?NetworkNews.Constants.FB_APIKeys.live:NetworkNews.Constants.FB_APIKeys.test;
NetworkNews.Constants.Domain=String(location.hostname).match(NetworkNews.Constants.re["live-domain"])?NetworkNews.Constants.Domains.live:NetworkNews.Constants.Domains.test;NetworkNews.Constants.ApplicationRoot=String(location.hostname).match(NetworkNews.Constants.re["live-domain"])?NetworkNews.Constants.applicationRoots.live:NetworkNews.Constants.applicationRoots.dev;
if(String(location.hostname).match(NetworkNews.Constants.re["live-domain"])){NetworkNews.Constants.TwitterAnywhereUrl="http://platform.twitter.com/anywhere.js?id="+NetworkNews.Constants.twitterAnywhereApiKeys.live+"&v=1";NetworkNews.Constants.TwitterAnywhereCallbackURL=NetworkNews.Constants.twitterAnywhereCallbackURLs.live}else{NetworkNews.Constants.TwitterAnywhereUrl="http://platform.twitter.com/anywhere.js?id="+NetworkNews.Constants.twitterAnywhereApiKeys.test+"&v=1";NetworkNews.Constants.TwitterAnywhereCallbackURL=
NetworkNews.Constants.twitterAnywhereCallbackURLs.test}NetworkNews.defaults=NetworkNews.defaults||{methods:{init:function(){document.write("<style>.NN-ww {display:none;} #top-box-out-nn{height:29px;border-bottom:1px solid #B1C3D4;} #NN-page #NN-opted-out{display:block;}</style>")}}};
NetworkNews.defaults.widgets={fan:{hp:{initWidget:function(){},isFbIframe:true,isFbApi:false,fb:{tag:"fan",attrs:{width:309,height:800,profile_id:6250307292,stream:1,connections:0,logobar:0}},needsHref:false,needsOtherContentId:false,needsFbUid:false,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-fan-hp","parent-module":"NN-module-hp"},classes:{}}},"right-rail":{initWidget:function(){},isFbIframe:true,isFbApi:false,fb:{tag:"fan",attrs:{width:324,
profile_id:6250307292,stream:1,connections:0,logobar:0,header:"false"}},needsHref:false,needsOtherContentId:false,needsFbUid:false,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-fan-rr","parent-module":"NN-module-rr"},classes:{}}},profile:{initWidget:function(){},isFbIframe:true,isFbApi:false,fb:{tag:"fan",attrs:{width:624,height:800,profile_id:6250307292,stream:1,connections:0,logobar:0}},needsHref:false,needsOtherContentId:false,needsFbUid:false,
needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-fan-profile","parent-module":"NN-module-profile"},classes:{}}}},"social-bar":{"default":{isFbIframe:true,isFbApi:false,fb:{tag:"social-bar",attrs:{}},needsHref:false,needsOtherContentId:false,needsFbUid:false,needsTargetId:false,needsTargetTag:true,dig:{},selectors:{tags:{target:"body"},ids:{},classes:{}}}},share:{"share-icon":{isFbIframe:true,isFbApi:false,fb:{tag:"share-button",attrs:{type:"icon"}},
needsHref:true,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-share-icon"},classes:{}}},"share-box-count":{isFbIframe:true,isFbApi:false,fb:{tag:"share-button",attrs:{type:"box_count"}},needsHref:true,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-share-box-count"},classes:{}}}},like:{"article-box":{isFbIframe:true,isFbApi:false,fb:{tag:"like",attrs:{width:208,height:21,
layout:"button_count",action:"recommend",show_faces:false,max_faces:3}},needsHref:true,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-like-article-box","parent-module":"NN-module-sidebar"},classes:{}}},"article-bar":{isFbIframe:true,isFbApi:false,fb:{tag:"like",attrs:{width:604,height:80,layout:"standard",action:"recommend",show_faces:true,max_faces:12}},needsHref:true,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},
selectors:{tags:{},ids:{target:"NN-widget-like-article-bar","parent-module":"NN-module-footer"},classes:{}},makeWayForTheAd:function(){var a;if(typeof Prototype!="undefined")(a=$(this.selectors.ids.target))&&a.setStyle({width:"389px"});else if(typeof jQuery!="undefined")(a=jQuery("#"+this.selectors.ids.target))&&a.css({width:"389px"});if(this.isFbIframe){this.fb.attrs.width=389;this.fb.attrs.max_faces=8}}},"blog-bar":{isFbIframe:true,isFbApi:false,fb:{tag:"like",attrs:{width:454,height:25,layout:"standard",
action:"recommend",show_faces:false,max_faces:0}},needsHref:false,needsOtherContentId:true,needsUid:false,needsTargetId:false,needsTargetTag:false,isMultiWidgeted:true,dig:{attr:{id:"id",href:"id"}},selectors:{tags:{},ids:{},classes:{target:"NN-widget-like-blog-bar"}}}},"profile-pic":{"default":{isFbIframe:true,isFbApi:false,fb:{tag:"profile-pic",attrs:{width:20,height:20,linked:false}},needsHref:false,needsOtherContentId:false,needsFbUid:true,needsTargetId:false,needsTargetTag:false,isMultiWidgeted:true,
dig:{},selectors:{tags:{},ids:{},classes:{target:"NN-fb-logo"}}}},recommendations:{hp:{isFbIframe:true,isFbApi:false,fb:{tag:"recommendations",attrs:{width:309,height:800,header:"false",site:"washingtonpost.com"}},needsHref:false,needsOtherContentId:false,needsFbUid:false,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-recommendations-hp","parent-module":"NN-module-hp"},classes:{}}},"right-rail":{isFbIframe:true,isFbApi:false,fb:{tag:"recommendations",
attrs:{width:324,height:200,header:"false",site:"washingtonpost.com"}},needsHref:false,needsOtherContentId:false,needsFbUid:false,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-recommendations-rr","parent-module":"NN-module-rr"},classes:{}}},profile:{isFbIframe:true,isFbApi:false,fb:{tag:"recommendations",attrs:{width:624,height:800,header:"false",site:"washingtonpost.com"}},needsHref:false,needsOtherContentId:false,needsFbUid:false,
needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-recommendations-profile","parent-module":"NN-module-profile"},classes:{}}}},activity:{hp:{isFbIframe:true,isFbApi:false,fb:{tag:"activity",attrs:{width:309,height:800,header:"false",site:"washingtonpost.com"}},needsHref:false,needsOtherContentId:false,needsFbUid:false,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-activity-hp",
"parent-module":"NN-module-hp"},classes:{}}},"right-rail":{isFbIframe:true,isFbApi:false,heading:"Your Friends&rsquo; Most Recent Activity",fb:{tag:"activity",attrs:{recommendations:"true",width:324,height:399,header:"false",border_color:"#ffffff",site:"washingtonpost.com"}},needsHref:false,needsOtherContentId:false,needsFbUid:false,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-activity-rr","parent-module":"NN-module-rr"},classes:{}}},
profile:{isFbIframe:true,isFbApi:false,fb:{tag:"activity",attrs:{width:624,height:800,header:"false",site:"washingtonpost.com"}},needsHref:false,needsOtherContentId:false,needsFbUid:false,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-activity-profile","parent-module":"NN-module-profile"},classes:{}}}},myactivity:{hp:{isFbIframe:false,isFbApi:true,apiCallback:"renderMyActivity",needsHref:false,needsOtherContentId:false,needsFbUid:false,
needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-myactivity-hp","parent-module":"NN-module-hp"},classes:{}}},"right-rail":{isFbIframe:false,isFbApi:true,apiCallback:"renderMyActivity",needsHref:false,needsOtherContentId:false,needsFbUid:false,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-myactivity-rr","parent-module":"NN-module-rr"},classes:{}}},profile:{isFbIframe:false,
isFbApi:true,apiCallback:"renderMyActivity",needsHref:false,needsOtherContentId:false,needsFbUid:false,needsTargetId:true,needsTargetTag:false,isMultiWidgeted:false,dig:{},selectors:{tags:{},ids:{target:"NN-widget-myactivity-profile","parent-module":"NN-module-profile"},classes:{}}}},"section-likes":{"right-rail":{isNNApi:true,needsSection:true,needsTargetId:true,tags:{"fb-section-likes":{tag:"div",attrs:{"class":"fb-section-likes",empty:"Unable to load most popular content.",number:7}}},selectors:{ids:{target:"NN-widget-section-likes-rr",
"parent-module":"NN-module-rr"}}},"section-front":{isNNApi:true,needsSection:true,needsTargetId:true,tags:{"fb-section-likes":{tag:"div",attrs:{"class":"fb-section-likes",empty:"Unable to load most popular content.",number:7}}},selectors:{ids:{target:"NN-widget-section-likes-sf","parent-module":"NN-module-sf"}}}},tweets:{hp:{isNNApi:true,hasTweetBox:false,needsHref:false,needsTargetId:true,tags:{top:{tag:"div",attrs:{"class":"twttr-top",empty:"No content to display"}}},selectors:{ids:{target:"NN-widget-tweets-hp",
"parent-module":"NN-module-hp"},classes:{}}},"section-front":{isNNApi:true,hasTweetBox:false,needsHref:false,needsSection:true,needsTargetId:true,tags:{top:{tag:"div",attrs:{"class":"twttr-top",empty:"No content to display"}}},selectors:{ids:{target:"NN-widget-tweets-sf","parent-module":"NN-module-sf"},classes:{}}},"right-rail":{isNNApi:true,hasTweetBox:true,needsHref:true,needsTargetId:true,heading:"Tweets About This Article",tags:{tweets:{tag:"div",attrs:{"class":"twttr-tweets",empty:"No tweets about this article yet, be the first!"}},
tweetbox:{tag:"div",attrs:{"class":"twttr-tweetbox",height:70,width:296,label:"<style type='text/css' media='all'>"+NetworkNews.Constants.defaultTweetboxStyles+"</style><span class='twitter-icon'></span> What's Your Take?"}}},selectors:{tags:{},ids:{target:"NN-widget-tweets-rr","parent-module":"NN-module-rr",tweetbox:"NN-tbox-rr"},classes:{}}},"article-bar":{isNNApi:true,hasTweetBox:true,needsHref:true,needsTargetId:true,tags:{share:{tag:"div",attrs:{"class":"twttr-share"}},tweetbox:{tag:"div",attrs:{"class":"twttr-tweetbox",
height:70,width:296,label:"<style type='text/css' media='all'>"+NetworkNews.Constants.defaultTweetboxStyles+"</style><span class='twitter-icon'></span> Tweet about this:"}}},selectors:{tags:{},ids:{target:"NN-widget-tweet-article-bar","parent-module":"NN-module-footer",tweetbox:"NN-tbox-article-bar"},classes:{}}},"article-box":{isNNApi:true,hasTweetBox:true,needsHref:true,needsTargetId:true,tags:{share:{tag:"div",attrs:{"class":"twttr-share"}},tweetbox:{tag:"div",attrs:{"class":"twttr-tweetbox",height:70,
width:296,label:"<style type='text/css' media='all'>"+NetworkNews.Constants.defaultTweetboxStyles+"</style><span class='twitter-icon'></span> Tweet about this:"}}},selectors:{tags:{},ids:{target:"NN-widget-tweet-article-box","parent-module":"NN-module-article-box",tweetbox:"NN-tbox-article-box"},classes:{}}}}};
NetworkNews.defaults.modules={"article-box":{widgets:[NetworkNews.defaults.widgets.like["article-box"],NetworkNews.defaults.widgets.tweets["article-box"]]},"article-bar":{widgets:[NetworkNews.defaults.widgets.like["article-bar"],NetworkNews.defaults.widgets.tweets["article-bar"]]},"right-rail":{widgets:[NetworkNews.defaults.widgets.activity["right-rail"],NetworkNews.defaults.widgets["section-likes"]["right-rail"],NetworkNews.defaults.widgets.tweets["right-rail"]]},"blog-bar":{widgets:[NetworkNews.defaults.widgets.like["blog-bar"]]},
"profile-pic":{widgets:[NetworkNews.defaults.widgets["profile-pic"]["default"]]},profile:{widgets:[NetworkNews.defaults.widgets.recommendations.profile,NetworkNews.defaults.widgets.activity.profile]},hp:{widgets:[NetworkNews.defaults.widgets.recommendations.hp,NetworkNews.defaults.widgets.activity.hp,NetworkNews.defaults.widgets.tweets.hp]},"section-front":{widgets:[NetworkNews.defaults.widgets["section-likes"]["section-front"],NetworkNews.defaults.widgets.tweets["section-front"]]},"share-icon":{widgets:[NetworkNews.defaults.widgets.share["share-icon"]]},
"social-bar":{widgets:[NetworkNews.defaults.widgets["social-bar"]["default"]]}};
NetworkNews.defaults.config={"default":{modules:[NetworkNews.defaults.modules["profile-pic"],NetworkNews.defaults.modules["article-box"],NetworkNews.defaults.modules["article-bar"],NetworkNews.defaults.modules["right-rail"],NetworkNews.defaults.modules["blog-bar"],NetworkNews.defaults.modules.profile,NetworkNews.defaults.modules.hp,NetworkNews.defaults.modules["section-front"],NetworkNews.defaults.modules["share-icon"]],url_matched:"default"},article:{modules:[NetworkNews.defaults.modules["profile-pic"],
NetworkNews.defaults.modules["article-box"],NetworkNews.defaults.modules["article-bar"],NetworkNews.defaults.modules["right-rail"],NetworkNews.defaults.modules["share-icon"]],url_matched:"article"},multimedia:{modules:[NetworkNews.defaults.modules["profile-pic"],NetworkNews.defaults.modules["article-box"],NetworkNews.defaults.modules["share-icon"]],url_matched:"multimedia"},blog:{modules:[NetworkNews.defaults.modules["profile-pic"],NetworkNews.defaults.modules["blog-bar"],NetworkNews.defaults.modules["right-rail"]],
url_matched:"blog"},profile:{modules:[NetworkNews.defaults.modules["profile-pic"],NetworkNews.defaults.modules.profile],url_matched:"profile"},hp:{modules:[NetworkNews.defaults.modules["profile-pic"],NetworkNews.defaults.modules.hp],url_matched:"hp"},"section-front":{modules:[NetworkNews.defaults.modules["profile-pic"],NetworkNews.defaults.modules["section-front"]],url_matched:"section-front"}};
if(typeof FB=="undefined"||typeof NETWORK_NEWS_ON!="undefined"&&!NETWORK_NEWS_ON||!NetworkNews.Constants.userPreferences.on||typeof Prototype!="undefined"&&Prototype.Browser.IE&&parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5))<=6||typeof jQuery!="undefined"&&jQuery.browser.msie&&parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5))<=6)NetworkNews.prototype=NetworkNews.defaults.methods;else if(typeof Prototype!="undefined"){Ajax.JSONRequest=Class.create(Ajax.Base,
function(){var a=0,b=document.getElementsByTagName("head")[0];return{initialize:function($super,e,g){$super(g);this.options.url=e;this.options.callbackParamName=this.options.callbackParamName||"callback";this.options.callback=this.options.callback||null;this.options.timeout=this.options.timeout||10;this.options.invokeImmediately=!Object.isUndefined(this.options.invokeImmediately)?this.options.invokeImmediately:true;this.options.invokeImmediately&&this.request()},_cleanup:function(){if(this.timeout){clearTimeout(this.timeout);
this.timeout=null}},request:function(){var c=new Ajax.JSONResponse(this),e=this.options.callbackParamName,g=this.options.callback||"_prototypeJSONPCallback_"+a++,d=function(){Object.isFunction(this.options.onComplete)&&this.options.onComplete.call(this,c)}.bind(this);this.options.parameters[e]=g;e=this.options.url+((this.options.url.include("?")?"&":"?")+Object.toQueryString(this.options.parameters));window[g]=function(j){this._cleanup();window[g]=undefined;if(Object.isFunction(this.options.onSuccess)){c.status=
200;c.statusText="OK";c.setResponseContent(j);this.options.onSuccess.call(this,c)}d()}.bind(this);this.transport=new Element("script",{type:"text/javascript",src:e});Object.isFunction(this.options.onCreate)&&this.options.onCreate.call(this,c);b.appendChild(this.transport);this.timeout=setTimeout(function(){this._cleanup();window[g]=Prototype.emptyFunction;if(Object.isFunction(this.options.onFailure)){c.status=504;c.statusText="Gateway Timeout";this.options.onFailure.call(this,c)}d()}.bind(this),this.options.timeout*
1E3)},toString:function(){return"[object Ajax.JSONRequest]"}}}());Ajax.JSONResponse=Class.create({initialize:function(a){this.request=a},request:undefined,status:0,statusText:"",responseJSON:undefined,responseText:undefined,setResponseContent:function(a){this.responseJSON=a;this.responseText=Object.toJSON(a)},getTransport:function(){if(this.request)return this.request.transport},toString:function(){return"[object Ajax.JSONResponse]"}});NetworkNews.prototype={init:function(a){this.config=a||this.findAppropriateConfig();
this.orbitId=typeof wp_article!="undefined"?wp_article.id:null;this.url=this.getUrl({orbitId:this.orbitId});this.section=this.getSection();this.isActive=true;this.initTwitter();var b=this;Event.observe(window,"load",function(){b.start();b.makeHackAdjustments();b.initAdUnits();b.initWidgetTabs();b.initAllModules();b.finish()})},makeHackAdjustments:function(){this.orbitId&&this.orbitId.match(/^(VI)/)&&$$("#NN-module-sidebar .NN-gray-btn.NN-profile span").each(function(a){a.innerHTML="Profile"})},getTargets:function(a){var b=
[];a=a||{};if(a.id){if(a=$(a.id))b[0]=a}else if(a["class"])b=$$(a["class"]);else if(a.tag)b=$$(a.tag);return b},placeWidget:function(a,b){b.each(function(c){c.insert({bottom:a})})},generateFbCrossDomainReciever:function(){var a={code:"",targets:[],ok:false};if(!$(NetworkNews.Constants.Selectors.ids.fbCrossDomainReciever)){a.code='<div id="fb-root"></div>';a.targets=a.targets.concat(this.getTargets({tag:NetworkNews.Constants.Selectors.tags.fbCrossDomainReciever}));if(a.code&&a.targets.length){a.ok=
true;this.targetedCode=this.targetedCode.concat(a)}}},initAdUnits:function(){if(typeof NetworkNews.Constants.hasAd!="undefined"&&NetworkNews.Constants.hasAd){$$("."+NetworkNews.Constants.Selectors.classes.adUnit).each(function(a){a.removeClassName("NN-hide")});this.config.modules.each(function(a){a.widgets.each(function(b){b.makeWayForTheAd&&b.makeWayForTheAd()})})}},initMultiWidgets:function(a){var b=this;$$("."+a.selectors.classes.target).each(function(c){var e={code:"",targets:[],ok:false};if(a.needsOtherContentId){var g=
c.readAttribute(a.dig.attr.id);if(g){if(a.isFbIframe)a.fb.attrs.href=c.readAttribute(a.dig.attr.href);e.code=b.prepareWidget(a);e.targets=b.getTargets({id:g})}}else if(a.needsFbUid)try{if((g=FB.getSession().uid)&&a.isFbIframe)a.fb.attrs.uid=g;e.code=b.prepareWidget(a);e.targets=e.targets.concat(c)}catch(d){}if(e.code&&e.targets.length){e.ok=true;b.targetedCode=b.targetedCode.concat(e)}})},initWidgetTabs:function(){var a=this;$$("."+NetworkNews.Constants.Selectors.classes.tabs).each(function(b){var c=
b.select("li");if(c.size()){b=b.select(".active").size()?b.select(".active")[0]:c[0];c.size()==1&&b.up().addClassName("single-tab");c.each(function(e){e.observe("click",function(g){e.fire("nn-tabs:click");Event.stop(g)});e.observe("nn-tabs:click",function(g){a.activateWidgetTabs(g,c)})});b.fire("nn-tabs:click")}c.each(function(e){e.observe("mouseover",function(){a.fetchSectionLikes(e)})})})},getWidgetTabId:function(a){if(a=a.toString())a=a.replace(/.*\#/,"");return a},activateWidgetTabs:function(a,
b){var c=this,e=Event.findElement(a,"li");b.each(function(g){$(c.getWidgetTabId(g.select("a[href]"))).removeClassName("active").hide();g.removeClassName("active")});e.addClassName("active");$(c.getWidgetTabId(e.select("a[href]"))).show().addClassName("active");c.tabSelectCallback(e)},tabSelectCallback:function(a){var b=this;a=$(a.down("a").readAttribute("href").replace("#",""));if(a.select("div.NN-feed").length!==0)typeof twttr!="undefined"?a.select("div.twttr-tweetbox").each(function(c){c.replace('<div id="NN-tbox-rr"></div>');
twttr.anywhere(function(e){e(".NN-tweets").hovercards();e(".NN-tweet-username").hovercards({username:function(g){return g.title}});e("#NN-tbox-rr").tweetBox({width:parseInt(c.readAttribute("width")),height:parseInt(c.readAttribute("height")),label:c.readAttribute("label"),defaultContent:c.readAttribute("defaultContent"),onTweet:b.tweetBoxPanelCallback})})}):a.select("div.twttr-tweetbox").each(function(c){var e='<div id="NN-tbox-rr"><div id="tweet-box-container" style="padding:10px"><div id="tweet-box-header">';
e+='<label class="doing" style="line-height:25px;float:left;position:relative;z-index:999">'+c.readAttribute("label")+"</label>";e+='<span class="btn"><a href="http://twitter.com/home?status='+c.readAttribute("defaultContent")+'" class="tweeting-button" target="_blank" style="display:inline;display:inline-block;zoom:1;text-align:center;width:75px;height:25px;line-height:25px;">Tweet</a></span>';e+='<div style="clear:both"></div></div></div></div>';c.replace(e)})},fbParseDone:function(){},fetchSectionLikes:function(){var a=
this;$$("div.fb-section-likes").each(function(b){var c=b.readAttribute("href");new Ajax.JSONRequest(c,{method:"get",callback:"wpnn_jsonp",parameters:{format:"json"},onSuccess:function(e){a.populateSectionLikes(b,e.responseJSON)},onFailure:function(e){a.populateAjaxError(b,e.responseJSON)}})})},populateSectionLikes:function(a,b){for(var c=b.likes,e=Math.min(c.length,parseInt(a.readAttribute("number"))),g='<div class="NN-section-likes NN-feed">',d=0;d<e;d++){var j=c[d].likecount==1?"like":"likes",l=
c[d].sharecount==1?"share":"shares",m=c[d].commentcount==1?"comment":"comments";g+='<div class="NN-feed-item">';g+=c[d].thumbnail!=null?'<a class="NN-avatar" href="'+c[d].url+'"><img src="'+c[d].thumbnail+'" width="35" height="35" alt="thumbnail for" /></a>':'<a class="NN-avatar" href="'+c[d].url+'"><img src="http://media3.washingtonpost.com/wp-srv/images/twp-50x50.jpg" width="35" height="35" alt="thumbnail for" /></a>';g+='<p class="NN-headline"><a href="'+c[d].url+'">'+c[d].headline+"</a></p>";
g+='<p class="meta"><span class="NN-likes">'+c[d].likecount+" "+j+", "+c[d].sharecount+" "+l+", "+c[d].commentcount+" "+m+".</span></p>";g+="</div>"}g+="</div>";a.replace(NetworkNews.omniturizeLinks(g))},fetchTwitter:function(){var a=this,b=NetworkNews.Constants.twitterShareWidget.replace("{{COUNTURL}}",a.url);b=b.replace("{{TEXT}}",encodeURIComponent(document.getElementsByTagName("title").item(0).text));$$("div.twttr-tweets, div.twttr-top, div.twttr-share").each(function(c){c=c.readAttribute("href");
new Ajax.JSONRequest(c,{method:"get",callback:"wpnn_jsonp",parameters:{format:"json"},onSuccess:function(e){if(typeof e.responseJSON.totalTweetCount!="undefined"&&e.responseJSON.totalTweetCount==-1)a.populateTweetsBanned();else{$$("div.twttr-tweets").each(function(g){a.populateTweets(g,e.responseJSON)});$$("div.twttr-top").each(function(g){a.populateTweetedArticles(g,e.responseJSON)})}e.responseJSON.bitly&&e.responseJSON.bitly.match("http://")&&$$("div.twttr-tweetbox").each(function(g){var d=g.readAttribute("defaultContent");
g.writeAttribute("defaultContent",d.replace(location.href,e.responseJSON.bitly));b=b.replace("{{URL}}",e.responseJSON.bitly)});e.responseJSON.totalTweetCount>-1&&$$("div.twttr-share").each(function(g){g.replace(b.replace("{{URL}}",a.url))});setTimeout(function(){a.initWidgetTabs();a.fetchSectionLikes()},100)},onFailure:function(e){$$("div.twttr-tweets").each(function(g){a.populateAjaxError(g,e.responseJSON)});$$("div.twttr-share").each(function(g){g.replace(b.replace("{{URL}}",a.url))});setTimeout(function(){a.initWidgetTabs();
a.fetchSectionLikes()},100)}});throw $break;})},populateTweets:function(a,b){var c=b.tweets,e=Math.floor(c.length,20),g='<div class="NN-feed">';if(c.length>0)for(var d=0;d<e;d++){g+='<div class="NN-feed-item">';g+='<a class="NN-avatar" href="http://twitter.com/'+c[d].userid+'/" target="_blank" rel="external noindex nofollow"><img src="'+c[d].profileImageUrl+'" alt="'+c[d].userid+'" width="35" height="35" /></a>';g+='<p class="NN-tweet-text"><a class="NN-tweet-username" title="'+c[d].userid+'" href="http://twitter.com/'+
c[d].userid+'/" rel="external noindex nofollow">'+c[d].userid+"</a>: "+NetworkNews.activateLinks(c[d].text)+"<br/>";g+='<a href="http://twitter.com/'+c[d].userid+"/status/"+c[d].id+'/" class="meta time" title="'+c[d].timestamp+'" target="_blank" rel="external noindex nofollow"></a>';g+="</p>";g+="</div>"}else{g+='<div class="NN-feed-item">';g+='<p class="NN-tweet-text">'+a.readAttribute("empty")+"</p>";g+="</div>"}g+="</div>";a.replace(g);$$(".NN-ww div.NN-feed-item a.time").each(function(j){j.update(NetworkNews.DateHelper.time_ago_in_words_with_parsing(j.readAttribute("title")))})},
populateTweetedArticles:function(a,b){var c=b.tweets,e=Math.floor(c.length,20),g='<div class="NN-feed">';if(c.length>0)for(var d=0;d<e;d++){g+='<div class="NN-feed-item">';g+=c[d].thumbnail!=null?'<a class="NN-avatar" href="'+c[d].url+'"><img src="'+c[d].thumbnail+'" width="35" height="35" alt="thumbnail for" /></a>':'<a class="NN-avatar" href="'+c[d].url+'"><img src="http://media3.washingtonpost.com/wp-srv/images/twp-50x50.jpg" width="35" height="35" alt="thumbnail for" /></a>';g+='<p class="NN-headline"><a href="'+
c[d].url+'">'+c[d].headline+"</a></p>";g+='<p class="meta"><span class="NN-likes">'+c[d].count+" tweets.</span></p>";g+="</div>"}g+='<div class="clear"></div></div>';a.replace(g)},populateAjaxError:function(a){var b='<div class="NN-feed"><div class="NN-error NN-feed-item">';b+='<p class="NN-tweet-text">'+a.readAttribute("empty")+"</p>";b+="</div></div>";a.replace(b)},populateTweetsBanned:function(){$$("a[href=#twitter-activity-rr]").each(function(a){a.up("li").remove()});$$("#twitter-activity-rr, #NN-widget-tweet-article-box, #NN-widget-tweet-article-bar").each(function(a){a.remove()})},
tweetBoxCallback:function(){$$(".NN-twttr-share span.count").each(function(a){a.innerHTML!="?"&&a.update(parseInt(a.innerHTML)+1);(a=a.up("a").next(".NN-tbox-wrap"))&&a.insert('<span class="NN-tbox-confirmation">Your Tweet has been posted.</span>')});setTimeout(function(){$$(".NN-tbox-wrap").each(function(a){var b=a.down(".NN-tbox-confirmation");b&&b.remove();a.hide()})},4E3)},tweetBoxPanelCallback:function(){$$(".NN-twttr-share span.count").each(function(a){a.innerHTML!="?"&&a.update(parseInt(a.innerHTML)+
1)});$("NN-tbox-rr").insert('<span class="NN-tbox-confirmation">Your Tweet has been posted.<span class="disclaimer">(It may take a few minutes to show up here)</span></span>');setTimeout(function(){$$(".NN-tbox-confirmation").invoke("remove")},8E3)},bindTwttrShareBoxes:function(){var a=this;if(typeof twttr!="undefined"){$$(".NN-twttr-share").each(function(b){b.observe("click",function(c){a.showTwttrShareBox(c)})});$$("html")[0].observe("click",function(b){if(Event.element(b).hasClassName("twitter-anywhere-tweet-box"))return false;
else $$(".NN-tbox-wrap").each(function(c){c.hide()})})}else $$(".NN-twttr-share").each(function(b){var c=b.next("div.twttr-tweetbox");b.writeAttribute("href","http://twitter.com/home?status="+c.readAttribute("defaultContent"));b.writeAttribute("target","_blank")})},showTwttrShareBox:function(a){var b=this,c=Event.element(a);$$(".NN-tbox-wrap").invoke("hide");c.up(".NN-ww").select(".twttr-tweetbox").each(function(e){var g=$$(".NN-tbox-wrap").length+1;e.replace('<div class="NN-tbox-wrap" id="tbox-'+
g+'"><span class="NN-tbox-container-arrow"></span><span class="NN-tbox-close"><a href="#">close</a></span><span class="NN-tbox-container"></span></div>');Event.observe($("tbox-"+g).select(".NN-tbox-close a")[0],"click",function(d){Event.element(d).up(".NN-tbox-wrap").hide();Event.stop(d)});typeof twttr!="undefined"&&twttr.anywhere(function(d){d("#tbox-"+g+" .NN-tbox-container").tweetBox({width:parseInt(e.readAttribute("width")),height:parseInt(e.readAttribute("height")),label:e.readAttribute("label"),
defaultContent:e.readAttribute("defaultContent"),onTweet:b.tweetBoxCallback})})});c.up(".NN-ww").down(".NN-tbox-wrap").hide().setStyle({left:Event.pointerX(a)-10+"px",top:Event.pointerY(a)+20+"px",zIndex:2147483647}).show();Event.stop(a)}}}else if(typeof jQuery!="undefined"){(function(a,b){function c(){}function e(h){w=[h]}function g(h,p,q){return h&&h.apply(p.context||p,q)}function d(h){function p(i){!r++&&b(function(){t();u&&(x[k]={s:[i]});C&&(i=C.apply(h,[i]));g(h.success,h,[i,D]);g(E,h,[h,D])},
0)}function q(i){!r++&&b(function(){t();u&&i!=F&&(x[k]=i);g(h.error,h,[h,i]);g(E,h,[h,i])},0)}h=a.extend({},G,h);var E=h.complete,C=h.dataFilter,H=h.callbackParameter,I=h.callback,T=h.cache,u=h.pageCache,J=h.charset,k=h.url,n=h.data,K=h.timeout,v,r=0,t=c;h.abort=function(){!r++&&t()};if(g(h.beforeSend,h,[h])===false||r)return h;k=k||m;n=n?typeof n=="string"?n:a.param(n,h.traditional):m;k+=n?(/\?/.test(k)?"&":"?")+n:m;H&&(k+=(/\?/.test(k)?"&":"?")+escape(H)+"=?");!T&&!u&&(k+=(/\?/.test(k)?"&":"?")+
"_"+(new Date).getTime()+"=");k=k.replace(/=\?(&|$)/,"="+I+"$1");u&&(v=x[k])?v.s?p(v.s[0]):q(v):b(function(i,s,y){if(!r){y=K>0&&b(function(){q(F)},K);t=function(){y&&clearTimeout(y);i[L]=i[z]=i[M]=i[A]=null;o[N](i);s&&o[N](s)};window[I]=e;i=a(O)[0];i.id=P+U++;if(J)i[l]=J;var R=function(B){(i[z]||c)();B=w;w=undefined;B?p(B[0]):q(Q)};if(S.msie){i.event=z;i.htmlFor=i.id;i[L]=function(){i.readyState=="loaded"&&R()}}else{i[A]=i[M]=R;S.opera?(s=a(O)[0]).text="jQuery('#"+i.id+"')[0]."+A+"()":i[j]=j}i.src=
k;o.insertBefore(i,o.firstChild);s&&o.insertBefore(s,o.firstChild)}},0);return h}var j="async",l="charset",m="",Q="error",P="_jqjsp",z="onclick",A="on"+Q,M="onload",L="onreadystatechange",N="removeChild",O="<script/>",D="success",F="timeout",S=a.browser,o=a("head")[0]||document.documentElement,x={},U=0,w,G={callback:P,url:location.href};d.setup=function(h){a.extend(G,h)};a.jsonp=d})(jQuery,setTimeout);NetworkNews.prototype={init:function(a){this.config=a||this.findAppropriateConfig();this.orbitId=
typeof wp_article!="undefined"?wp_article.id:null;this.url=this.getUrl({orbitId:this.orbitId});this.section=this.getSection();this.isActive=true;this.initTwitter();var b=this;jQuery(document).ready(function(){b.start();b.makeHackAdjustments();b.initAdUnits();b.initWidgetTabs();b.initAllModules();b.finish()})},makeHackAdjustments:function(){this.orbitId&&this.orbitId.match(/^VI/)&&jQuery("#NN-module-sidebar .NN-gray-btn.NN-profile span").each(function(a,b){b.innerHTML="Profile"})},getTargets:function(a){var b=
[];a=a||{};if(a.id){if(a=jQuery(document.getElementById(a.id)))b[0]=a}else if(a["class"])b=jQuery("."+a["class"]);else if(a.tag)b=jQuery(a.tag);return b},placeWidget:function(a,b){jQuery(b).each(function(c,e){jQuery(e).append(a)})},generateFbCrossDomainReciever:function(){var a={code:"",targets:[],ok:false};if(!jQuery(NetworkNews.Constants.Selectors.ids.fbCrossDomainReciever)){a.code='<div id="fb-root"></div>';a.targets=a.targets.concat(this.getTargets({tag:NetworkNews.Constants.Selectors.tags.fbCrossDomainReciever}));
if(a.code&&a.targets.length){a.ok=true;this.targetedCode=this.targetedCode.concat(a)}}},initAdUnits:function(){if(typeof NetworkNews.Constants.hasAd!="undefined"&&NetworkNews.Constants.hasAd){jQuery("."+NetworkNews.Constants.Selectors.classes.adUnit).each(function(a,b){jQuery(b).removeClass("NN-hide")});jQuery(this.config.modules).each(function(a,b){jQuery(b.widgets).each(function(c,e){e.makeWayForTheAd&&e.makeWayForTheAd()})})}},initMultiWidgets:function(a){var b=this;jQuery("."+a.selectors.classes.target).each(function(c,
e){var g={code:"",targets:[],ok:false};if(a.needsOtherContentId){var d=jQuery(e).attr(a.dig.attr.id);if(d){if(a.isFbIframe)a.fb.attrs.href=jQuery(e).attr(a.dig.attr.href);g.code=b.prepareWidget(a);g.targets=b.getTargets({id:d})}}else if(a.needsFbUid)try{if((d=FB.getSession().uid)&&a.isFbIframe)a.fb.attrs.uid=d;g.code=b.prepareWidget(a);g.targets=g.targets.concat(e)}catch(j){}if(g.code&&g.targets.length){g.ok=true;b.targetedCode=b.targetedCode.concat(g)}})},initWidgetTabs:function(){var a=this;jQuery("."+
NetworkNews.Constants.Selectors.classes.tabs).each(function(b,c){c=jQuery(c);var e=c.find("li");if(e.size()){var g=c.find(".active");g=g.size()?g[0]:e[0];e.size()==1&&g.parent().addClass("single-tab");e.click(function(d){a.activateWidgetTabs(d,this,e)});jQuery(g).click()}e.hover(function(){a.fetchSectionLikes(jQuery(this))})})},getWidgetTabId:function(a){if(a)a=a.replace(/.*\#/,"");return"#"+a},activateWidgetTabs:function(a,b,c){var e=this;a.preventDefault();c.each(function(g,d){jQuery(e.getWidgetTabId(jQuery(d).find("a").attr("href"))).removeClass("active").hide();
jQuery(d).removeClass("active")});jQuery(b).addClass("active");jQuery(e.getWidgetTabId(jQuery(b).find("a").attr("href"))).show().addClass("active");e.tabSelectCallback(b)},tabSelectCallback:function(a){var b=this;a=jQuery(jQuery(a).find("a").attr("href"));if(a.find("div.NN-feed").length!==0)typeof twttr!="undefined"?a.find("div.twttr-tweetbox").each(function(){$el=jQuery(this);$el.replaceWith('<div id="NN-tbox-rr"></div>');twttr.anywhere(function(c){c(".NN-tweets").hovercards();c(".NN-tweet-username").hovercards({username:function(e){return e.title}});
c("#NN-tbox-rr").tweetBox({width:parseInt($el.attr("width")),height:parseInt($el.attr("height")),label:$el.attr("label"),defaultContent:$el.attr("defaultContent"),onTweet:b.tweetBoxPanelCallback})})}):a.find("div.twttr-tweetbox").each(function(){var c='<div id="NN-tbox-rr"><div id="tweet-box-container" style="padding:10px"><div id="tweet-box-header">';c+='<label class="doing" style="line-height:25px;float:left;position:relative;z-index:999">'+jQuery(this).attr("label")+"</label>";c+='<span class="btn"><a href="http://twitter.com/home?status='+
jQuery(this).attr("defaultContent")+'" class="tweeting-button" target="_blank" style="display:inline;display:inline-block;zoom:1;text-align:center;width:75px;height:25px;line-height:25px;">Tweet</a></span>';c+='<div style="clear:both"></div></div></div></div>';jQuery(this).replaceWith(c)})},fbParseDone:function(){},fetchSectionLikes:function(){var a=this;jQuery("div.fb-section-likes").each(function(){var b=jQuery(this),c=b.attr("href");jQuery.jsonp({url:c,callbackParameter:"callback",callback:"wpnn_jsonp",
success:function(e){a.populateSectionLikes(b,e)},error:function(e){a.populateAjaxError(b,e)}})})},populateSectionLikes:function(a,b){for(var c=b.likes,e=Math.min(c.length,parseInt(a.attr("number"))),g='<div class="NN-section-likes NN-feed">',d=0;d<e;d++){var j=c[d].likecount==1?"like":"likes",l=c[d].sharecount==1?"share":"shares",m=c[d].commentcount==1?"comment":"comments";g+='<div class="NN-feed-item">';g+=c[d].thumbnail!=null?'<a class="NN-avatar" href="'+c[d].url+'"><img src="'+c[d].thumbnail+
'" width="35" height="35" alt="thumbnail for" /></a>':'<a class="NN-avatar" href="'+c[d].url+'"><img src="http://media3.washingtonpost.com/wp-srv/images/twp-50x50.jpg" width="35" height="35" alt="thumbnail for" /></a>';g+='<p class="NN-headline"><a href="'+c[d].url+'">'+c[d].headline+"</a></p>";g+='<p class="meta"><span class="NN-likes">'+c[d].likecount+" "+j+", "+c[d].sharecount+" "+l+", "+c[d].commentcount+" "+m+".</span></p>";g+="</div>"}g+="</div>";a.replaceWith(NetworkNews.omniturizeLinks(g))},
fetchTwitter:function(){var a=this;jQuery("div.twttr-tweets, div.twttr-top, div.twttr-share").each(function(){var b=jQuery(this).attr("href"),c=NetworkNews.Constants.twitterShareWidget.replace("{{COUNTURL}}",a.url);c=c.replace("{{TEXT}}",encodeURIComponent(document.getElementsByTagName("title").item(0).text));jQuery.jsonp({url:b,callbackParameter:"callback",callback:"wpnn_jsonp",success:function(e){if(typeof e.totalTweetCount!="undefined"&&e.totalTweetCount==-1)a.populateTweetsBanned();else{jQuery("div.twttr-tweets").each(function(){a.populateTweets(jQuery(this),
e)});jQuery("div.twttr-top").each(function(){a.populateTweetedArticles(jQuery(this),e)})}e.bitly&&e.bitly.match("http://")&&jQuery("div.twttr-tweetbox").each(function(){var g=jQuery(this).attr("defaultContent");jQuery(this).attr("defaultContent",g.replace(location.href,e.bitly));c=c.replace("{{URL}}",e.bitly)});e.totalTweetCount>-1&&jQuery("div.twttr-share").each(function(){jQuery(this).replaceWith(c.replace("{{URL}}",a.url))});setTimeout(function(){a.initWidgetTabs();a.fetchSectionLikes()},100)},
error:function(e){jQuery("div.twttr-tweets").each(function(){a.PopulateAjaxError(jQuery(this),e)});jQuery("div.twttr-share").each(function(){jQuery(this).replaceWith(c.replace("{{URL}}",a.url))});setTimeout(function(){a.initWidgetTabs();a.fetchSectionLikes()},100)}});return false})},populateTweets:function(a,b){var c=b.tweets,e='<div class="NN-feed">',g=Math.floor(c.length,20);if(c.length>0)for(var d=0;d<g;d++){e+='<div class="NN-feed-item">';e+='<a class="NN-avatar" href="http://twitter.com/'+c[d].userid+
'/" target="_blank" rel="external noindex nofollow"><img src="'+c[d].profileImageUrl+'" alt="'+c[d].userid+'" width="35" height="35" /></a>';e+='<p class="NN-tweet-text"><a class="NN-tweet-username" title="'+c[d].userid+'" href="http://twitter.com/'+c[d].userid+'/" rel="external noindex nofollow">'+c[d].userid+"</a>: "+NetworkNews.activateLinks(c[d].text)+"<br/>";e+='<a href="http://twitter.com/'+c[d].userid+"/status/"+c[d].id+'/" class="meta time" title="'+c[d].timestamp+'" target="_blank" rel="external noindex nofollow"></a>';
e+="</p>";e+="</div>"}else{e+='<div class="NN-feed-item">';e+='<p class="NN-tweet-text">'+jQuery(this).attr("empty")+"</p>";e+="</div>"}e+="</div>";a.replaceWith(e);jQuery(".NN-ww div.NN-feed-item a.time").each(function(){this.innerHTML=NetworkNews.DateHelper.time_ago_in_words_with_parsing(this.getAttribute("title"))})},populateTweetedArticles:function(a,b){var c=b.tweets,e=Math.floor(c.length,20),g='<div class="NN-feed">';if(c.length>0)for(var d=0;d<e;d++){g+='<div class="NN-feed-item">';g+=c[d].thumbnail!=
null?'<a class="NN-avatar" href="'+c[d].url+'"><img src="'+c[d].thumbnail+'" width="35" height="35" alt="thumbnail for" /></a>':'<a class="NN-avatar" href="'+c[d].url+'"><img src="http://media3.washingtonpost.com/wp-srv/images/twp-50x50.jpg" width="35" height="35" alt="thumbnail for" /></a>';g+='<p class="NN-headline"><a href="'+c[d].url+'">'+c[d].headline+"</a></p>";g+='<p class="meta"><span class="NN-likes">'+c[d].count+" tweets.</span></p>";g+="</div>"}g+='<div class="clear"></div></div>';a.replaceWith(g)},
populateAjaxError:function(a){var b='<div class="NN-feed"><div class="NN-error NN-feed-item">';b+='<p class="NN-tweet-text">'+jQuery(this).attr("empty")+"</p>";b+="</div></div>";jQuery(a).replaceWith(b)},populateTweetsBanned:function(){jQuery("a[href=#twitter-activity-rr]").parents("li").remove();jQuery("#twitter-activity-rr, #NN-widget-tweet-article-box, #NN-widget-tweet-article-bar").remove()},tweetBoxCallback:function(){jQuery(".NN-twttr-share span.count").each(function(){jQuery(this).html()!=
"?"&&jQuery(this).html(parseInt(jQuery(this).html())+1);jQuery(this).parents("a").next(".NN-tbox-wrap").append('<span class="NN-tbox-confirmation">Your Tweet has been posted.<span class="disclaimer">(It may take a few minutes to show up here)</span></span>').hide().fadeIn("fast")});setTimeout(function(){jQuery(".NN-tbox-confirmation").fadeOut("fast").remove();jQuery(".NN-tbox-wrap").hide()},4E3)},tweetBoxPanelCallback:function(){jQuery(".NN-twttr-share span.count").each(function(){jQuery(this).html()!=
"?"&&jQuery(this).html(parseInt(jQuery(this).html())+1)});jQuery("#NN-tbox-rr").append('<span class="NN-tbox-confirmation">Your Tweet has been posted.<span class="disclaimer">(It may take a few minutes to show up here)</span></span>').hide().fadeIn("fast");setTimeout(function(){jQuery(".NN-tbox-confirmation").fadeOut("fast").remove()},8E3)},bindTwttrShareBoxes:function(){var a=this;if(typeof twttr!="undefined"){jQuery(".NN-twttr-share").click(function(b){a.showTwttrShareBox(b);return false});jQuery("html").click(function(){if(jQuery(this).is("iframe.twitter-anywhere-tweet-box"))return false;
else jQuery(".NN-tbox-wrap").hide()})}else $(".NN-twttr-share").each(function(){var b=jQuery(this).next("div.twttr-tweetbox");jQuery(this).attr("href","http://twitter.com/home?status="+b.attr("defaultContent"));jQuery(this).attr("target","_blank")})},showTwttrShareBox:function(a){var b=this;jQuery(".NN-tbox-wrap").hide();jQuery(a.target).parents(".NN-ww").find("div.twttr-tweetbox").each(function(){var c=jQuery(".NN-tbox-wrap").length+1,e=jQuery(this);e.replaceWith('<div class="NN-tbox-wrap" id="tbox-'+
c+'"><span class="NN-tbox-container-arrow"></span><span class="NN-tbox-close"><a href="#">close</a></span><span class="NN-tbox-container"></span></div>');jQuery("#tbox-"+c).find(".NN-tbox-close a").bind("click",function(){jQuery(this).parents(".NN-tbox-wrap").hide();return false});typeof twttr!="undefined"&&twttr.anywhere(function(g){g("#tbox-"+c+" .NN-tbox-container").tweetBox({width:parseInt(e.attr("width")),height:parseInt(e.attr("height")),label:e.attr("label"),defaultContent:e.attr("defaultContent"),
onTweet:b.tweetBoxCallback})})});jQuery(a.target).parents(".NN-ww").find(".NN-tbox-wrap").hide().css({left:jQuery(a)[0].pageX-10+"px",top:jQuery(a)[0].pageY+20+"px",zIndex:2147483647}).show();return false}}}else NetworkNews.prototype=NetworkNews.defaults.methods;
