var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}DISQUS.api=(function(){var a={};a.getChannel=function(c){var b=DISQUS.frames["reply_"+(c||0)];return b||null};a.getCommentBox=function(b){return new DISQUS.api.CommentBox(b)};a.ensureLoggedIn=function(e,c,b){var d;b=b||{};if(DISQUS.jsonData.request.is_authenticated){e()}else{switch(c){case"disqus":d=new DISQUS.api.DisqusLoginBox();break;case"twitter":d=new DISQUS.api.TwitterLoginBox();break;case"yahoo":d=new DISQUS.api.YahooLoginBox();break;case"openid":d=new DISQUS.api.OpenIDLoginBox();break;case"facebook":d=new DISQUS.api.FacebookLoginBox();break;default:d=new DISQUS.api.LoginBox(b);d.title=DISQUS.strings.get("Before we post this, who are you?")}d.onClose=function(){if(DISQUS.jsonData.request.is_authenticated){e()}else{if(typeof b.onFailure=="function"){b.onFailure()}}};d.show()}};return a}());DISQUS.api.CommentBox=function(a){this.parentId=a;this.channel=DISQUS.api.getChannel(a)};DISQUS.api.CommentBox.prototype.validate=function(a){this.channel.validate([this.parentId],a)};DISQUS.api.LoginBox=function(b){var a=this;a.events=b;a.tabs={};a.enabledTab=null;DISQUS.addJob(function(){return !!DISQUS.strings},function(){a.title=DISQUS.strings.get("Login or Register")})};DISQUS.api.LoginBox.prototype.show=function(){var a=this;var c=DISQUS.renderBlock("loginPopup",DISQUS.states);var b={onClose:a.onClose,onReady:function(){a.onContentReady()}};DISQUS.popup.popModal(c,this.title,null,null,"dsq-login-box",b)};DISQUS.api.LoginBox.prototype.onContentReady=function(){var a=this;var b=this.tabs;var c=DISQUS.ui;if(DISQUS.jsonData.forum.allow_anon_post){b.guest=new c.LoginBoxTab(this,"dsq-login-tab-guest",new c.GuestLoginContent(a.events.onGuest))}if(DISQUS.jsonData.context.forum_facebook_key){b.facebook=new c.LoginBoxTab(this,"dsq-login-tab-facebook",new c.ExternalLoginContent(this,"facebook"))}b.disqus=new c.LoginBoxTab(this,"dsq-login-tab-disqus",(DISQUS.states.useLoginWindow?new c.ExternalLoginContent(this,"disqus"):new c.DisqusLoginContent("dsq-login-disqus")));b.twitter=new c.LoginBoxTab(this,"dsq-login-tab-twitter",new c.ExternalLoginContent(this,"twitter"));b.yahoo=new c.LoginBoxTab(this,"dsq-login-tab-yahoo",new c.ExternalLoginContent(this,"yahoo"));b.openid=new c.LoginBoxTab(this,"dsq-login-tab-openid",new c.OpenIdLoginContent(this));if(b.guest){b.guest.enable()}else{b.disqus.enable()}};DISQUS.api.DisqusLoginBox=function(){};DISQUS.api.DisqusLoginBox.prototype=new DISQUS.api.LoginBox();DISQUS.api.DisqusLoginBox.prototype.show=function(){var d=this;var a='<div id="dsq-login-iframe-wrapper" style="height:320px;"></div>';if(!DISQUS.states.useLoginWindow){DISQUS.popup.popModal(a,this.title,null,true,"dsq-popup-login",{onReady:function(){d.content=new DISQUS.ui.DisqusLoginContent("dsq-login-iframe-wrapper");d.content.show()},onClose:this.onClose})}else{var e=DISQUS.nodes.getIframeDefaults();e.is_popup=true;var b=window.open(DISQUS.getResourceURL(DISQUS.jsonData.urls.embed_login,e,true),"_blank","height=420,width=400");if(window.focus){b.focus()}var c=setInterval(function(){if(b.closed){clearInterval(c);DISQUS.reload(function(){d.onClose()})}},500)}};DISQUS.api.TwitterLoginBox=function(){};DISQUS.api.TwitterLoginBox.prototype=new DISQUS.api.LoginBox();DISQUS.api.TwitterLoginBox.prototype.show=function(){var c,b,a=this;var d="location=0,status=0,width=800,height=400";c=window.open(DISQUS.jsonData.urls.twitter_connect,"twitterWindow",d);b=setInterval(function(){if(c.closed){clearInterval(b);DISQUS.reload(function(){a.onClose()})}},500)};DISQUS.api.YahooLoginBox=function(){};DISQUS.api.YahooLoginBox.prototype=new DISQUS.api.LoginBox();DISQUS.api.YahooLoginBox.prototype.show=function(){var c,b,a=this;var d="location=0,status=0,width=800,height=400";c=window.open(DISQUS.jsonData.urls.yahoo_connect,"yahooWindow",d);b=setInterval(function(){if(c.closed){clearInterval(b);DISQUS.reload(function(){a.onClose()})}},500)};DISQUS.api.OpenIDLoginBox=function(){this.title=DISQUS.strings.get("Sign in using OpenID")};DISQUS.api.OpenIDLoginBox.prototype=new DISQUS.api.LoginBox();DISQUS.api.OpenIDLoginBox.prototype.show=function(){var a=this;var b={onReady:function(){a.content=new DISQUS.ui.OpenIdLoginContent()},onClose:this.onClose};DISQUS.popup.popModal(DISQUS.renderBlock("openidForm"),this.title,null,null,true,b)};(function(){var c=false;var b=function(){};b.prototype={init:function(d,e){FB.init(d,e,{fetchSignedPublicSessionData:true})},login:function(e,d){FB.Connect.requireSession(function(){FB.Connect.get_status().waitUntilReady(function(f){switch(f){case FB.ConnectState.connected:e();break;case FB.ConnectState.appNotAuthorized:case FB.ConnectState.userNotLoggedIn:d()}})},true)},getSignedPublicSessionData:function(d){FB.Connect.getSignedPublicSessionData(d)},streamPublish:function(d,e){FB.Connect.streamPublish(d,e)},streamShare:function(d,e,f){FB.Connect.streamPublish(d,e,function(g,h){if(typeof f==="function"){f(g)}})}};var a=function(){this.session=null};a.prototype={init:function(d,e){FB.init({apiKey:d,channelUrl:e,status:true,cookie:true})},login:function(f,e){var d=this;FB.login(function(g){if(g.session){d.session=g.session;f()}else{d.session=null;e()}})},getSignedPublicSessionData:function(d){FB.api({method:"auth.getSignedPublicSessionData",session_key:self.session},d)},streamPublish:function(d,e,f){FB.ui({method:"stream.publish",message:d,attachment:e},function(g,h){if(typeof f==="function"){f(g,h)}})},streamShare:function(d,e,f){FB.ui({method:"stream.share",u:e.href},function(g){if(typeof f==="function"){f(g.post_id)}})}};DISQUS.api.FacebookLoginBox=function(){if(!this.isReady()){this.load()}};DISQUS.api.FacebookLoginBox.prototype=new DISQUS.api.LoginBox();DISQUS.api.FacebookLoginBox.prototype.load=function(){var f;if(c){return}c=true;if(window.DISQUS&&DISQUS.nodes&&DISQUS.nodes.container){var e=["fb-root","FB_HiddenContainer"];DISQUS.lang.forEach(e,function(g){if(DISQUS.nodes.get("#"+g)){return}f=document.createElement("div");f.id=g;if(g=="FB_HiddenContainer"){f.style.position="absolute";f.style.top="-10000px";f.style.left="-10000px";f.style.width="0px";f.style.height="0px"}DISQUS.nodes.get("body")[0].appendChild(f)})}function d(){return window.FB&&FB.init}if(window.FB){if(FB.dynData&&!FB.init){DISQUS.require("http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php")}else{}}else{DISQUS.require("http://connect.facebook.net/en_US/all.js")}DISQUS.addJob(d,function(){if(FB.getLoginStatus){DISQUS.FB=new a()}else{if(FB.ensureInit){DISQUS.FB=new b()}else{if(console){console.log("Unknown FB library.")}}}var g=DISQUS.jsonData.context.forum_facebook_key;if(DISQUS.config.facebook_key){g=DISQUS.config.facebook_key}DISQUS.FB.init(g,window.facebookXdReceiverPath||null)})};DISQUS.api.FacebookLoginBox.prototype.isReady=function(){return DISQUS.FB};DISQUS.api.FacebookLoginBox.prototype.show=function(){var d=this;function e(){return DISQUS.FB}if(!e()){DISQUS.addJob(e,d.show);return}DISQUS.addJob(e,function(){DISQUS.FB.login(function(){DISQUS.FB.getSignedPublicSessionData(function(j){var l={onSuccess:function(){DISQUS.reload(function(){d.onClose()})}};var h=DISQUS.jsonData.forum.url;if(DISQUS.config.facebook_forum){h=DISQUS.config.facebook_forum}var g=DISQUS.nodes.get("#dsq-facebook-iframe");if(!g){g=document.createElement("div");g.id="dsq-facebook-iframe";g.style.display="none";var f=DISQUS.nodes.get("body")[0];f.appendChild(g)}var k=new DISQUS.AuthFrame(g,{onReady:function(){k.authenticateFacebook(j,h,l)}});k.init()})},function(){d.onClose()})})}})();DISQUS.modules.api=true;var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}DISQUS.dtpl={version:"0.2",author:"Anton Kovalyov <anton@disqus.com>"};DISQUS.dtpl.actions=(function(){var a={},e={},c={};function b(h,j){if(DISQUS.jsonData.forum.revert_new_login_flow){DISQUS.popup.popModal(DISQUS.strings.get(h),DISQUS.strings.get("Oops..."))}else{if(j){j+="-label";var g=DISQUS.nodes.get("#"+j);DISQUS.nodes.addClass(g,"dsq-error");g.innerHTML=DISQUS.strings.get(h)}else{alert(DISQUS.strings.get(h))}}}getFormFields=function(h){function g(j){return DISQUS.nodes.get("#"+j+(h?"-"+h:""))}return{name:g("dsq-field-name"),email:g("dsq-field-email"),website:g("dsq-field-website"),username:g("dsq-field-username"),password:g("dsq-field-password"),subscribe:g("dsq-subscribe-on-post")}};DISQUS.dtpl.getFormFields=getFormFields;validateFields=function(k){var j=/^[a-z0-9\-\_\+]+(\.[a-z0-9\-\_\+]+)*\@(([a-z0-9\-\_\+]+(\.[a-z0-9\-\_\+]+)*)+\.[a-z]{2,}|([0-9]+\.){3}[0-9]+)$/i;var g=typeof k==="object"?k:getFormFields(k);var h={name:DISQUS.strings.get("Name"),email:DISQUS.strings.get("Email"),website:DISQUS.strings.get("Website")+" ("+DISQUS.strings.get("Optional")+")"};if(DISQUS.jsonData.request.is_authenticated){return true}if(g.name.value==h.name||g.name.value.length<=1){b("Please enter a name to comment.",g.name.id);return false}if(!j.test(g.email.value)){b("Please enter a valid email to comment.",g.email.id);return false}if(g.website.value==h.website){g.website.value=""}if(g.website.value!==""&&g.website.value.indexOf(".")==-1){b("Please check your website URL (this field is optional).",g.website.id);return false}return true};DISQUS.dtpl.validateFields=validateFields;function d(h,l,g){var k=(typeof h!="undefined")?DISQUS.jsonData.posts[h]:false;var m={def_email:DISQUS.config.def_email,def_name:DISQUS.config.def_name};if(l){for(var j in l){if(l.hasOwnProperty(j)){m[j]=l[j]}}}if(k){m.parent_post=h}if(DISQUS.config.per_page){m.per_page=DISQUS.config.per_page}if(DISQUS.config.frame_theme){m.theme=DISQUS.config.frame_theme}if(DISQUS.jsonData.request.is_authenticated){g["class"]+="-authenticated"}return DISQUS.nodes.createIframe(DISQUS.jsonData.urls.reply,m,g)}e["share.toggle"]=function(l,g,h){var k=h?"-"+h:"";var j=DISQUS.nodes.get("#dsq-sharing-"+g+k);if(DISQUS.nodes.hasClass(l,"dsq-share-toggled")){DISQUS.nodes.removeClass(l,"dsq-share-toggled")}else{DISQUS.nodes.addClass(l,"dsq-share-toggled")}j.checked=!j.checked};e["private.setLoadingButton"]=function(j,g){var h=g?"-"+g:"";var m;var k;var l;if(j){l=document.createElement("src");l.src=DISQUS.jsonData.settings.media_url+"/images/loading-lite.gif";k=document.createElement("button");k.id=j.id+"-loading";k.className=j.className+" dsq-post-loading";k.appendChild(l);k.appendChild(document.createTextNode(" "+DISQUS.strings.get("Just a moment...")));j.style.display="none";j.parentNode.appendChild(k);m=DISQUS.nodes.get("#dsq-cancel-button"+h);if(m){m.style.display="none"}DISQUS.cache.buttonsToRestore.push(j)}else{DISQUS.lang.forEach(DISQUS.cache.buttonsToRestore,function(n){n.style.display="inline";DISQUS.nodes.remove(DISQUS.nodes.get("#"+n.id+"-loading"))})}};e["comments.validate"]=function(h){var g=DISQUS.api.getCommentBox(h);g.validate({onSuccess:function(j){DISQUS.api.ensureLoggedIn(function(){a.fire("comments.send",h)},null,{onGuest:function(){a.fire("comments.send",h,null,{fields:getFormFields(null)})}})},onFailure:function(j){DISQUS.popup.popModal(j.message,DISQUS.strings.get("Error"));a.fire("private.setLoadingButton")}})};e["auth.updateEmail"]=function(j,h){var g=DISQUS.dtpl.getFormFields(j);g.email.value=h};e["auth.disqus"]=function(h,g){DISQUS.api.ensureLoggedIn(function(){DISQUS.redraw()},"disqus")};e["auth.twitter"]=function(){DISQUS.api.ensureLoggedIn(function(){DISQUS.redraw()},"twitter")};e["auth.yahoo"]=function(){DISQUS.api.ensureLoggedIn(function(){DISQUS.redraw()},"yahoo")};e["auth.openid"]=function(){DISQUS.api.ensureLoggedIn(function(){DISQUS.redraw()},"openid")};e["auth.facebook"]=function(){DISQUS.api.ensureLoggedIn(function(){DISQUS.redraw()},"facebook")};e["comments.insert"]=function(o,h,q){var n={};DISQUS.redraw();var m=DISQUS.nodes.get("#dsq-comments");var g=document.createElement("div");n.comment=DISQUS.jsonData.posts[h];n.comment.id=h;n.comment.author=DISQUS.jsonData.users[n.comment.user_key];if(n.comment.parent_post_id){n.comment.parent=DISQUS.jsonData.posts[n.comment.parent_post_id];n.comment.parent.author=DISQUS.jsonData.users[n.comment.parent.user_key];var l=DISQUS.nodes.get("#dsq-comment-"+n.comment.parent_post_id);DISQUS.nodes.addClass(l,"dsq-comment-is-parent");var p=n.comment.parent;do{p.num_replies+=1;p=DISQUS.jsonData.posts[p.parent_post_id]}while(p!==undefined)}n.comment.stripped=function(r){var s=n.comment.message.replace(/<.*?>/g,"");if(s.length>r){return s.substring(0,r)}return null};g.innerHTML=DISQUS.renderBlock("comment",n);if(o===-1){m.appendChild(g)}else{if(!o){m.insertBefore(g,m.firstChild)}else{if(DISQUS.nodes.get("dsq-comment-"+o)){var j="#dsq-append-post-"+o;var k=DISQUS.nodes.get(j);k=k.nextSibling;while(k){if(!k||k.nodeType==1){break}k=k.nextSibling}if(!k){k=DISQUS.nodes.get(j)}k.parentNode.insertBefore(g,k)}}}};e["comments.blacklist"]=function(m,j){var g=[];var l=DISQUS.jsonData.posts[m];var h=DISQUS.jsonData.users[l.user_key];var k={"dsq-blacklist-username":5,"dsq-blacklist-email":1,"dsq-blacklist-ip":2};if(j){DISQUS.lang.forEach(k,function(o,p){var n=DISQUS.nodes.get("#"+p);if(n&&n.checked){g.push(o)}});if(g.length<1){alert(DISQUS.strings.get("Please select something to add to the blacklist."));return}DISQUS.popup.close(null,true);DISQUS.lang.forEach(g,function(o){var n=DISQUS.jsonData.urls.embed_block;DISQUS.request.get(n,{post_id:m,type:o},true)})}else{DISQUS.popup.close(null,true);DISQUS.popup.popModal(DISQUS.renderBlock("blacklistPopup",{comment:l,user:h}),DISQUS.strings.get("Add to Blacklist"))}};e["comments.outline"]=function(g){var h=DISQUS.nodes.get("#dsq-comment-"+g);h.className+=" dsq-comment-outline";setTimeout(function(){h.className=h.className.replace("dsq-comment-outline","")},3000)};e["comments.permalink"]=function(g){DISQUS.popup.popModal(DISQUS.renderBlock("permalinkPopup",{postId:g}),DISQUS.strings.get("Link to this comment"),g)};e["comments.send"]=function(h,l,j){var n;var g;var m;j=j||{};function k(o){var q="#dsq-sharing-"+o+(h?"-"+h:"");var p=DISQUS.nodes.get(q);return(p!==null&&p.checked===true)?"1":"0"}g=j.fields||getFormFields(h);n=j.frame||DISQUS.api.getChannel(h);m=[];if(DISQUS.dtpl.validateFields(g)){if(!DISQUS.jsonData.request.is_authenticated){m.push(g.name.value,g.email.value,g.website.value);if(j.authChoice=="login"||j.authChoice=="register"){m.push({auth_choice:authChoice,username:g.username.value,password:g.password.value,email:g.email.value})}else{m.push(null)}m.push(null,g.subscribe.checked?2:0)}else{m.push(null,null,null,null,{tw:k("twitter"),fb:k("facebook"),tr:k("tumblr"),wp:k("wordpress"),mt:k("movabletype"),tp:k("typepad"),yh:k("yahoo")})}n.post.apply(n,m);if(l){a.fire("private.setLoadingButton",l,h)}if(j.force){DISQUS.cookies.create("skipped_auth",true)}}};e["comments.send.onSuccess"]=function(k,m){var l=DISQUS.jsonData.posts;var n=DISQUS.jsonData.users;var g;var j=k.message.post_meta.user_key;var h;l[k.message.id]=k.message.post_meta;if(!n[j]){n[j]=k.message.user_meta}if(typeof disqus_insert_wrt_sort=="undefined"){g=DISQUS.jsonData.forum.reply_position?-1:null}else{g=DISQUS.jsonData.request.sort==2?null:-1}if(k.message.post_meta.approved){a.fire("comments.insert",k.message.post_meta.parent_post_id||g,k.message.id,k.message.post_meta.message)}if(m){a.fire("comments.reply",m)}DISQUS.popup.close(null,true);if(k.message.post_meta.approved){a.fire("thread.incrementCommentsCount");a.fire("comments.outline",k.message.id)}else{DISQUS.popup.popModal(DISQUS.renderBlock("unnaprovedCommentMessage",{mustVerify:DISQUS.jsonData.request.missing_perm=="verify"}),DISQUS.strings.get("Comment awaiting approval"),k.message.id,true,"dsq-popup-unapproved")}if(k.message.fb_callback&&k.message.fb_callback[0]){h=new DISQUS.api.FacebookLoginBox();DISQUS.addJob(h.isReady,function(){DISQUS.FB.streamPublish("",k.message.fb_callback[1])})}a.fire("private.setLoadingButton")};e["comments.send.onFailure"]=function(g){DISQUS.popup.popModal(g.message,DISQUS.strings.get("Error"));a.fire("private.setLoadingButton")};e["comments.edit.send"]=function(j,g){var h=DISQUS.nodes.get("#dsq-edit-textarea-"+j).value;a.fire("private.setLoadingButton",g,j);DISQUS.frames["edit_"+j].edit(j,h)};e["comments.edit.onSuccess"]=function(g,k){var j=DISQUS.nodes.get("#dsq-comment-message-"+k),h=DISQUS.jsonData.posts[k];DISQUS.lang.extend(h,g.message);j.innerHTML=DISQUS.renderBlock("commentMessage",{comment:h,cls:"dsq-comment-message"});a.fire("comments.edit.show",k);a.fire("private.setLoadingButton")};e["comments.edit.onFailure"]=function(g,h){DISQUS.popup.popModal(DISQUS.strings.get("Sorry, there was an error editing this comment."),DISQUS.strings.get("Edit Error"));a.fire("private.setLoadingButton")};e["comments.spam"]=function(g){DISQUS.popup.close(null,true);DISQUS.request.get(DISQUS.jsonData.urls.report_spam,{post_id:g},true)};e["comments.like"]=function(j,k,h){var g=DISQUS.jsonData.urls.embed_vote;if(DISQUS.jsonData.request.is_authenticated||DISQUS.jsonData.forum.allow_anon_votes){DISQUS.nodes.get("#dsq-like-"+k).innerHTML='<img src="'+DISQUS.jsonData.settings.media_url+'/images/loading-small.gif"/>';DISQUS.request.get(g,{post_id:k,vote:1},true)}else{a.fire("auth.disqus",DISQUS.strings.get("To like please login"))}};e["comments.like.onSuccess"]=function(k,j){var h=DISQUS.nodes.get("#dsq-like-pts-"+k);var g=DISQUS.jsonData.posts[k].user_voted;if(!g){successText=j+DISQUS.strings.pluralize(j," person"," people")}else{successText=" and "+(j-1||1)+" more"}if(h){h.innerHTML=successText}DISQUS.nodes.get("#dsq-like-"+k).innerHTML=DISQUS.strings.get("You liked this.")+"&nbsp;&nbsp;"};e["comments.report"]=function(j,h){var g=DISQUS.jsonData.urls.embed_report;if(h){DISQUS.request.post(g,{post_id:j});DISQUS.popup.popModal(DISQUS.strings.get("Thank you. This comment has been flagged for moderator attention."),DISQUS.strings.get("Successfully flagged"));DISQUS.nodes.remove(DISQUS.nodes.get("#dsq-post-report-"+j))}else{DISQUS.popup.popModal(DISQUS.renderBlock("reportConfirmation",{id:j}),DISQUS.strings.get("Are you sure you would like to report this comment to a moderator?"),j)}};e["comments.reply"]=function(m,j){var g,h,l,k;g=DISQUS.nodes.get("#dsq-append-post-"+m);if(!DISQUS.cache.toggledReplies[m]){if(DISQUS.nodes.get("#dsq-reply-post-"+m)){g.style.display="block"}else{l=DISQUS.jsonData.posts[m];l.id=m;l.author=DISQUS.jsonData.users[l.user_key];g.innerHTML=DISQUS.renderBlock("postbox",{comment:l});h=DISQUS.nodes.get("#dsq-textarea-wrapper-"+m);if(!DISQUS.frames["reply_"+m]){k=new DISQUS.ReplyFrame(h,m);k.init(function(){a.fire("thread.useFallbackIframe",m)});k.setState(m,l.depth);DISQUS.frames["reply_"+m]=k}}g.className="dsq-append-post";DISQUS.nodes.get("#dsq-comment-footer-reply-"+m).className="dsq-comment-footer-reply-active"}else{g.style.display="none";g.className="";DISQUS.nodes.get("#dsq-comment-footer-reply-"+m).className="dsq-comment-footer-reply"}DISQUS.cache.toggledReplies[m]=!DISQUS.cache.toggledReplies[m];if(DISQUS.dtpl.actions.registered("comments.replyToggled")){a.fire("comments.replyToggled",{postId:m,opened:DISQUS.cache.toggledReplies[i]})}};e["comments.moderate.options"]=function(h){var g=DISQUS.jsonData.posts[h];g.author=DISQUS.jsonData.users[g.user_key];if(!DISQUS.jsonData.request.is_moderator){return}DISQUS.popup.popModal(DISQUS.renderBlock("moderateOptionsPopup",{comment:g}),DISQUS.strings.get("Moderate Options"),h)};e["comments.delete"]=function(g){DISQUS.popup.close(null,true);DISQUS.request.get(DISQUS.jsonData.urls.embed_kill,{post_id:g,kill:1},true)};e["comments.restore"]=function(g){DISQUS.request.get(DISQUS.jsonData.urls.embed_kill,{post_id:g,kill:0},true)};e["cookies.onFailure"]=function(g){if(DISQUS.browser.ie){DISQUS.states.useLoginWindow=true}else{if(DISQUS.browser.gecko&&!DISQUS.browser.opera){var k=DISQUS.jsonData.request.is_authenticated;var l=DISQUS.jsonData.request.is_remote;var h=g?"-"+g:"";var j,m;if(!DISQUS.browser.gecko||(k&&!l)){return}DISQUS.states.loginDisabled=true;m=document.createElement("div");m.innerHTML=DISQUS.renderBlock("cookieFailure");j=DISQUS.nodes.get("#dsq-form-area"+h);j.parentNode.insertBefore(m,j)}}};e["user.remoteAccountSettings"]=function(){var g=DISQUS.nodes.createIframe(DISQUS.jsonData.urls.remote_settings,{},{id:"dsq-popup-account-settings"});DISQUS.popup.popModal(g.outerHTML,DISQUS.strings.get("Account Settings"))};e["user.validateAuth"]=function(k,o,l){var g=DISQUS.dtpl.getFormFields(o);var m=DISQUS.frames["reply_"+(o?o:0)];var j=g.email?g.email.value:"";var n=g.username?g.username.value:"";var h=g.password?g.password.value:"";a.fire("private.setLoadingButton",k,o);m.validateAuth(l,j,n,h)};e["user.validateAuth.onSuccess"]=function(g,j,h){a.fire("comments.send",h,null,{force:true,authChoice:j})};e["user.validateAuth.onFailure"]=function(h,l,k){var j=h.message;var g=["email","username","password"];if(l=="register"){DISQUS.lang.forEach(g,function(m){var o,n;o="#dsq-"+m+"-errors";if(k){o+="-"+k}n=DISQUS.nodes.get(o);if(j[m]){n.innerHTML=j[m]}else{n.innerHTML=""}})}else{if(l=="login"){DISQUS.nodes.get("#dsq-lightbox-errors"+(k?"-"+k:"")).innerHTML="<p>We could not log you in. Please verify your login.</p>"}}a.fire("private.setLoadingButton")};e["auth.switchTo"]=function(j,g,l){var h,o,n,k,m;m='<img src="'+DISQUS.jsonData.settings.media_url+'/images/embed/disqus-profile.png" alt="'+DISQUS.strings.get("Disqus Profile")+'"/>';if(DISQUS.jsonData.forum.allow_anon_post){n=DISQUS.strings.get("Optional")+": "}else{n=DISQUS.strings.get("Reguired")+": "}if(j=="login"){h="popupLogin";n+=DISQUS.strings.interpolate(DISQUS.strings.get("Login to your %(disqusprofile)s"),{disqusprofile:m})}else{h="popupRegister";n+=DISQUS.strings.interpolate(DISQUS.strings.get("Register a %(disqusprofile)s"),{disqusprofile:m})}o={postId:g,data:DISQUS.dtpl.getFormFields(k),suggested:""};DISQUS.popup.popLightbox(DISQUS.renderBlock(h,o),n,g)};e["profile.show"]=function(g,h){return DISQUS.popup.popProfile(g,h)};e["profile.edit"]=function(){var g=new DISQUS.ui.ProfileEditModal();g.show()};e["thread.initialize"]=function(){var g=DISQUS.nodes.get("#dsq-textarea-wrapper");if(DISQUS.jsonData.thread.closed||!g){return}DISQUS.frames.reply_0=new DISQUS.ReplyFrame(g);DISQUS.frames.reply_0.init(function(){a.fire("thread.useFallbackIframe")});if(DISQUS.jsonData.realtime_enabled&&a.registered("realtime.initialize")){a.fire("realtime.initialize")}};e["thread.useFallbackIframe"]=function(m){var j,g,h,o;var n="dsq-post-add-iframe",l="dsq-reply-frame",p=false,k=DISQUS.config.frame_theme||"default";if(m){n+="-"+m;l+="-"+m;o=DISQUS.nodes.get("#dsq-form-area-"+m)}else{o=DISQUS.nodes.get("#dsq-form-area")}o.innerHTML="";if(!k){k="default"}h={theme:k};j={id:n,name:l,"class":"dsq-post-reply"};g=d(m,h,j);DISQUS.lang.forEach(o.childNodes,function(q){if(q.nodeName=="IFRAME"){if(q.id==n){q.style.display="block";p=true}else{q.style.display="none"}}});if(p){return}o.appendChild(g);if(g){}};e["thread.incrementCommentsCount"]=function(){var h=DISQUS.nodes.get("#dsq-num-posts");var j=DISQUS.nodes.get("#dsq-total-posts");if(h){var g=h.innerHTML.split("-");if(g.length==1){h.innerHTML=parseInt(g[0],10)+1}else{h.innerHTML=g[0]+"-"+(parseInt(g[1],10)+1)}}if(j){j.innerHTML=parseInt(j.innerHTML,10)+1}};e["thread.paginate"]=function(j,h,g){var k;k={slug:DISQUS.jsonData.thread.slug,p:j};if(typeof g=="undefined"){g=DISQUS.config.page.per_page}if(DISQUS.config.page.sort){k.sort=DISQUS.config.page.sort}if(typeof g!="undefined"){k.per_page=g}DISQUS.nodes.get("#dsq-pagination").innerHTML='<img src="'+DISQUS.jsonData.settings.media_url+'/images/loading-small.gif"/>';if(h){h.style.display="none"}DISQUS.request.get(DISQUS.jsonData.urls.embed_thread,k,true)};e["thread.update"]=function(){var n=DISQUS.nodes.get("#dsq-comments");var j=DISQUS.nodes.get("#dsq-num-posts");var h=DISQUS.nodes.get("#dsq-pagination");var o;var l=DISQUS.jsonData.thread.num_posts;var m;function k(){if(j){return parseInt(j.innerHTML,10)}return 0}function g(p){if(j){j.innerHTML=p}}if(DISQUS.jsonData.thread.pagination_type=="num"){n.innerHTML=DISQUS.renderBlock("comments");if(DISQUS.jsonData.thread.total_posts>l){m=DISQUS.jsonData.thread.offset_posts;g((m+1)+"-"+(m+l))}else{g(l)}}else{if(DISQUS.jsonData.thread.pagination_type=="append"){if(DISQUS.jsonData.request.page==1){n.innerHTML=DISQUS.renderBlock("comments");g(l)}else{o=document.createElement("div");o.id="dsq-comments-"+DISQUS.jsonData.request.page;o.innerHTML=DISQUS.renderBlock("comments");n.appendChild(o);g(k()+l)}}}h.innerHTML=DISQUS.renderBlock("pagination");DISQUS.callback(DISQUS.config.callbacks.onPaginate)};e["thread.sort"]=function(g){var h;h={slug:DISQUS.jsonData.thread.slug,sort:g,p:(DISQUS.jsonData.thread.pagination_type=="num"?DISQUS.jsonData.request.page:1)};DISQUS.nodes.get("#dsq-comments").innerHTML='<img src="'+DISQUS.jsonData.settings.media_url+'/images/loading.gif"/>';DISQUS.request.get(DISQUS.jsonData.urls.embed_thread,h,true)};e["thread.subscribe"]=function(h){var g=DISQUS.jsonData.urls.embed_subscribe;if(DISQUS.jsonData.request.is_authenticated||h){if(h){DISQUS.popup.close(null,true)}DISQUS.request.get(g,{status:1,slug:DISQUS.jsonData.thread.slug,email:h||""},true)}else{if(!h){DISQUS.popup.popModal(DISQUS.renderBlock("subscribeForm"),DISQUS.strings.get("New comments will be sent to your email inbox!"))}}};e["thread.vote"]=function(h){function g(m,l){if(DISQUS.nodes.hasClass(m,"dsq-toggled")){h=0;DISQUS.nodes.removeClass(m,"dsq-toggled");DISQUS.nodes.removeClass(l,"dsq-toggled")}else{DISQUS.nodes.addClass(m,"dsq-toggled");DISQUS.nodes.removeClass(l,"dsq-toggled")}}if(DISQUS.jsonData.request.is_authenticated||DISQUS.jsonData.forum.allow_anon_votes){var k=DISQUS.nodes.get("#dsq-like-thread-button");var j=DISQUS.nodes.get("#dsq-dislike-thread-button");if(h>0){g(k,j)}else{g(j,k)}DISQUS.request.get(DISQUS.jsonData.urls.embed_thread_vote,{thread_id:DISQUS.jsonData.thread.id,vote:h},true)}else{a.fire("auth.disqus",DISQUS.strings.get("To like please login"))}};e["thread.vote.onSuccess"]=function(l,k){DISQUS.jsonData.thread.user_vote=l;DISQUS.jsonData.thread.likes=k;if(DISQUS.jsonData.request.is_authenticated){var m=DISQUS.jsonData.request.username;if(l==1){var j={};j[m]={username:m,avatar:DISQUS.jsonData.urls.request_user_avatar,url:DISQUS.jsonData.urls.request_user_profile,name:DISQUS.jsonData.request.display_username};DISQUS.jsonData.thread.voters=DISQUS.lang.extend(j,DISQUS.jsonData.thread.voters)}else{delete DISQUS.jsonData.thread.voters[m]}}var h=DISQUS.nodes.get("#dsq-content");var g=DISQUS.nodes.get("ul.dsq-like-faces",h)[0];g.innerHTML=DISQUS.renderBlock("likeActivity");DISQUS.ui.applyTooltips(g)};e["thread.unsubscribe"]=function(){var g=DISQUS.jsonData.urls.embed_subscribe;if(DISQUS.jsonData.request.is_authenticated){DISQUS.request.get(g,{status:0,slug:DISQUS.jsonData.thread.slug},true)}};e["thread.help"]=function(){if(!DISQUS.jsonData.request.is_moderator){return}DISQUS.popup.popModal(DISQUS.renderBlock("moderatorHelpPopup"),DISQUS.strings.get("Help"))};e["thread.settings"]=function(){if(!DISQUS.jsonData.request.is_moderator){return}DISQUS.popup.popModal(DISQUS.renderBlock("threadSettingsPopup"),DISQUS.strings.get("Moderator Settings"))};e["thread.moderatorActions"]=function(){if(!DISQUS.jsonData.request.is_moderator){return}DISQUS.popup.popModal(DISQUS.renderBlock("moderatorActionsPopup"),DISQUS.strings.get("Moderate Options"))};e["thread.toggleClosed"]=function(){var g=DISQUS.jsonData.urls.toggle_thread_closed;DISQUS.request.post(g,{thread:DISQUS.jsonData.thread.id});setTimeout(function(){window.location.reload()},500)};e["thread.toggleKilled"]=function(){var g=DISQUS.jsonData.urls.toggle_thread_killed;DISQUS.request.post(g,{thread:DISQUS.jsonData.thread.id});setTimeout(function(){window.location.reload()},500)};e["thread.updateDaysAlive"]=function(){var h=DISQUS.jsonData.urls.update_days_alive;var g=DISQUS.nodes.get("#dsq-thread-settings-status");DISQUS.request.post(h,{days:DISQUS.nodes.get("#dsq-thread-days-alive").value,thread:DISQUS.jsonData.thread.id});g.innerHTML=DISQUS.strings.get("Saved!");setTimeout(function(){g.innerHTML=""},1000)};e["thread.updateModerateAll"]=function(){var h=DISQUS.jsonData.urls.update_moderate_all;var g=DISQUS.nodes.get("#dsq-thread-settings-status");DISQUS.request.post(h,{value:DISQUS.nodes.get("#dsq-thread-moderate-all").checked?1:0,thread:DISQUS.jsonData.thread.id});g.innerHTML=DISQUS.strings.get("Saved!");setTimeout(function(){g.innerHTML=""},1000)};e["realtime.initialize"]=function(){var g=DISQUS.nodes.get("#dsq-realtime-toggle");if(DISQUS.states.realtime){return}DISQUS.states.realtime=true;DISQUS.cache.realtime.last_checked=DISQUS.jsonData.request.timestamp;g.onclick=function(){if(!DISQUS.cache.realtime.interval){a.fire("realtime.enable")}else{a.fire("realtime.disable")}return false};if(!DISQUS.jsonData.forum.streaming_realtime){a.fire("realtime.updateCount")}if(DISQUS.jsonData.thread.realtime_rate===0||DISQUS.jsonData.realtime_paused){a.fire("realtime.disable")}else{a.fire("realtime.enable")}};e["realtime.enable"]=function(){var g=DISQUS.nodes.get("#dsq-realtime-toggle");var h=DISQUS.nodes.get("#dsq-realtime-status");var j=setInterval(function(){var k=DISQUS.cache.realtime,l=DISQUS.jsonData.urls.realtime;l+="?timestamp="+k.last_checked+"&thread_id="+DISQUS.jsonData.thread.id+"&f="+DISQUS.jsonData.forum.url+"&";if(!k.ongoing_request&&DISQUS.jsonData.realtime_enabled){if(k.prev_script&&k.prev_script.parentNode){DISQUS.nodes.remove(k.prev_script)}k.ongoing_request=true;k.prev_script=DISQUS.request.get(l,undefined,true)}},DISQUS.jsonData.context.realtime_speed);DISQUS.cache.realtime.interval=j;h.innerHTML=DISQUS.strings.get("enabled");g.innerHTML="("+DISQUS.strings.get("Pause")+")"};e["realtime.disable"]=function(){var g=DISQUS.nodes.get("#dsq-realtime-toggle");var h=DISQUS.nodes.get("#dsq-realtime-status");var j=DISQUS.cache.realtime.interval;if(j){clearInterval(j);DISQUS.cache.realtime.interval=null}h.innerHTML=DISQUS.strings.get("paused");g.innerHTML="("+DISQUS.strings.get("Resume")+")"};e["realtime.updateCount"]=function(){var g=DISQUS.nodes.get("#dsq-content");var j=DISQUS.nodes.get("div.dsq-realtime-alert",g);var h=DISQUS.cache.realtime.newPosts.length;DISQUS.lang.forEach(j,function(l){l.style.display=h?"block":"none";l.innerHTML=h+" new "+DISQUS.strings.pluralize(h,"comment","comments")+DISQUS.strings.pluralize(h," was"," were")+" just posted. ";var k=document.createElement("A");k.href="#";DISQUS.events.add(k,"click",function(m){m.preventDefault();return a.fire("realtime.show")});k.innerHTML=DISQUS.strings.get("Show");l.appendChild(k)})};e["realtime.insertNewPosts"]=function(){var g=null;if(DISQUS.nodes.get("#dsq-sort-select").value=="oldest"){g=-1}DISQUS.lang.forEach(DISQUS.cache.realtime.newPosts,function(h){a.fire("comments.insert",g,h,DISQUS.jsonData.posts[h].message);a.fire("thread.incrementCommentsCount");a.fire("comments.outline",h)});DISQUS.cache.realtime.newPosts=[]};e["realtime.show"]=function(){a.fire("realtime.insertNewPosts");a.fire("realtime.updateCount")};e["realtime.update"]=function(j,h,k){var g=DISQUS.cache.realtime;g.ongoing_request=null;g.last_checked=j;if(k){DISQUS.lang.forEach(k,function(l,m){if(!DISQUS.jsonData.users[m]){DISQUS.jsonData.users[m]=l}})}if(h){DISQUS.lang.forEach(h,function(l,m){if(!DISQUS.jsonData.posts[m]){DISQUS.jsonData.posts[m]=l;g.newPosts.push(m)}});if(DISQUS.jsonData.forum.streaming_realtime){a.fire("realtime.insertNewPosts")}else{a.fire("realtime.updateCount")}}};function f(h,j){try{return h.apply({},j)}catch(g){if(typeof console!="undefined"&&console.log){console.log(g)}return false}}a.register=function(g,h){c[g]=h;return h};a.remove=function(g){if(c[g]){delete c[g];return true}return false};a.fire=function(){var g=arguments[0],k=[],j=true;if(!a.registered(g)){throw"Action "+g+" not found"}k=[];for(var h=1;h<arguments.length;h++){k.push(arguments[h])}if(a.registered(g,true)){j=f(c[g],k)}if(a.hasDefault(g)&&j){f(e[g],k)}return false};a.registered=function(g,h){return !!c[g]||(h?false:a.hasDefault(g))};a.hasDefault=function(g){return !!e[g]};return a}());DISQUS.modules.dtpl=true;var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}DISQUS.FragmentPacket=function(a,f,d,c,b){var e=this;this.reader=a;this.writer=f;this.writer_url=d;this.is_child=c||false;this.receiveCallback=b;this._lastHash=null;this._accumMsg="";this._lastSeqno=0;this.MAX_DATA_LEN=1024;this.WAIT_TIME=10;this.READY=1;this.WRITING=2;this.FIN=4;this.ACK=8};DISQUS.FragmentPacket.prototype.createListener=function(){var a=this;var b=function(){try{a.recv()}catch(c){if(!DISQUS.browser.ie){throw (c)}}};return window.setInterval(b,10)};DISQUS.FragmentPacket.prototype.log=function(a){};DISQUS.FragmentPacket.prototype.recv=function(){var d;if(/MSIE/.test(navigator.userAgent)){d=this.reader.name}else{var b=this.reader.location.href.indexOf("#");if(b==-1){return null}d=this.reader.location.href.substring(b+1)}var a=parseInt(d.substring(0,4),10);var e=parseInt(d.substring(4,24),10);var c=d.substring(24);if(this._lastHash!==d){this._lastHash=d;this.log("recv: "+d);this.log(" flags: "+a);this.log(" seqno: "+e+" len: "+d.substring(4,24).length+" ("+d.substring(4,24)+")");this.log(" data: "+c+" len: "+c.length);this._lastSeqno=e;if(a&this.WRITING){this._accumMsg+=c;this.sendFlag(this.ACK,e);if(a&this.FIN){this.log("recv finished: "+decodeURIComponent(this._accumMsg));this.receiveCallback(decodeURIComponent(this._accumMsg));this._accumMsg="";this.sendFlag(this.READY|this.ACK,this._lastSeqno)}}}return{flags:a,seqno:e,data:c}};DISQUS.FragmentPacket.prototype.sendRawPacket=function(a){if(/MSIE/.test(navigator.userAgent)){this.writer.name=a}else{this.writer.location.href=this.writer_url+"#"+a}};DISQUS.FragmentPacket.prototype.sendFlag=function(a,b){this.sendRawPacket(this._zerofill(a,4)+this._zerofill(b,20))};DISQUS.FragmentPacket.prototype.send=function(a){this._send(0,encodeURIComponent(a))};DISQUS.FragmentPacket.prototype._send=function(h,g){var c=this;var a=this.recv();if(h===0){if(!(a.flags&this.READY)){this.log("client is not ready, waiting...");window.setTimeout(function(){c._send(h,g)},this.WAIT_TIME);return false}}else{if(!((a.flags&this.ACK)&&(a.seqno===this._lastSeqno))){this.log("waiting for ack from client...");window.setTimeout(function(){c._send(h,g)},this.WAIT_TIME);return false}else{this.log("received ack: "+this._lastSeqno+" "+a.seqno)}}var b=this.WRITING;var f=Math.ceil(g.length/this.MAX_DATA_LEN);this.log("num_packets: "+f);if(f===h){this.log("message successfully sent!");this.sendFlag(this.READY|this.ACK,this._lastSeqno);return true}this._lastSeqno++;if(h==f-1){b|=this.FIN}var d=g.substring(h*this.MAX_DATA_LEN,(h+1)*this.MAX_DATA_LEN);var e=this._zerofill(b,4)+this._zerofill(this._lastSeqno,20)+d;this.log("sending raw packet: "+e);this.sendRawPacket(e);return this._send(h+1,g)};DISQUS.FragmentPacket.prototype._zerofill=function(b,d){var a=b.toString();var e=a.length;for(var c=0;c<d-e;c++){a="0"+a}return a};DISQUS.modules.FragmentPacket=true;var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}DISQUS.JsonRpc=(function(){var self={};var ids={};function objectToJSON(obj){var json="";var results=[];var specialChars;specialChars={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"};if(obj===undefined||obj===null){return"null"}switch(obj.constructor){case Object:for(var property in obj){if(obj.hasOwnProperty(property)){results.push(objectToJSON(property)+": "+objectToJSON(obj[property]))}}json="{"+results.join(", ")+"}";break;case Array:for(var i=0;i<obj.length;i++){results.push(objectToJSON(obj[i]))}json="["+results.join(", ")+"]";break;case Number:case Boolean:json=obj.toString();break;case String:json=obj.replace(/[\x00-\x1f\\]/g,function(match){var ch=specialChars[match];return ch?ch:"\\u00"+match.charCodeAt().toPaddedString(2,16)});json='"'+json.replace(/"/g,'\\"')+'"';break;default:json="null"}return json}self.createHandler=function(send_func,registered_funcs){var handler=function(message){try{var rpc=eval("("+message+")")}catch(e){alert("bad JSON: "+message);return}if(rpc.method){if(!registered_funcs[rpc.method]){return}var retval=registered_funcs[rpc.method].apply(null,rpc.params||[]);if(rpc.id){var response={result:retval,error:null,id:rpc.id};send_func(objectToJSON(response))}}else{if(rpc.result){if(!ids[rpc.id]){return}ids[rpc.id](rpc.result);delete ids[rpc.id]}}};return handler};self.execute=function(send_func,method,params,response_callback){response_callback=response_callback||null;var id=(response_callback)?(new Date()).getTime():null;var request={method:method,params:params,id:id};send_func(objectToJSON(request));if(id){ids[id]=response_callback}};return self}());DISQUS.modules.JsonRpc=true;var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}DISQUS.NewFrames=function(a){this.url=a};DISQUS.NewFrames.prototype.init=function(a){var b=this;try{this.messenger=new DISQUS.ParentMessenger(this.url,DISQUS.jsonData.integration.receiver_url,this.container,this.receive_callback,this.onready_callback)}catch(c){if(typeof a=="function"){a()}}if(typeof a=="function"){var d=window.setInterval(function(){if(typeof b.messenger=="undefined"){window.clearInterval(d);return}if(b.messenger._ready){window.clearInterval(d)}else{if(b.messenger._error){window.clearInterval(d);a()}}},10)}};DISQUS.NewFrames.prototype.execute=function(d,a,c){var b=this;if(typeof b.messenger=="undefined"){return false}DISQUS.JsonRpc.execute(function(e){b.messenger.sendMessage(e)},d,a||[],c);return true};DISQUS.TweetFrame=function(b,e){var c=this;function a(f){c.messenger.sendMessage(f)}c.receive_callback=DISQUS.JsonRpc.createHandler(a,{"tweetbox.onSuccess":function(){e.onSuccess()}});c.container=b;c.onready_callback=e.onReady;var d=DISQUS.nodes.getBasicStyles();params={f:DISQUS.jsonData.forum.url,t:DISQUS.jsonData.thread.slug,ifrs:DISQUS.config.iframe_css,to_redirect:window.location,cbp:DISQUS.config.callback_params,ff:d.fontFamily,fc:d.fontColor,ac:d.anchorColor,default_text:DISQUS.config.def_text};c.url=DISQUS.getResourceURL(DISQUS.jsonData.urls.tweetbox_frame,params,true)};DISQUS.TweetFrame.prototype=new DISQUS.NewFrames(DISQUS.TweetFrame.url);DISQUS.AuthFrame=function(b,f,e){var c=this;function a(g){c.messenger.sendMessage(g)}c.callbacks={"auth.disqus.onSuccess":function(){if(!DISQUS.states.loginDisabled){DISQUS.reload(f.onComplete)}else{DISQUS.popup.close(null,true)}}};c.receive_callback=DISQUS.JsonRpc.createHandler(a,c.callbacks);c.container=b;c.onready_callback=f.onReady;var d=DISQUS.nodes.getBasicStyles();params={f:DISQUS.jsonData.forum.url,t:DISQUS.jsonData.thread.slug,ifrs:DISQUS.config.iframe_css,to_redirect:window.location,cbp:DISQUS.config.callback_params,ff:d.fontFamily,fc:d.fontColor,ac:d.anchorColor,default_text:DISQUS.config.def_text};c.url=DISQUS.getResourceURL(DISQUS.jsonData.urls.embed_login,params,true)};DISQUS.AuthFrame.prototype=new DISQUS.NewFrames(DISQUS.AuthFrame.url);DISQUS.ReplyFrame=function(b,d){var c=this;var f;var e;function a(g){c.messenger.sendMessage(g)}f={"validateComment.onSuccess":"comments.validate.onSuccess","validateComment.onFailure":"comments.validate.onFailure","postComment.onSuccess":"comments.send.onSuccess","postComment.onFailure":"comments.send.onFailure","editComment.onSuccess":"comments.edit.onSuccess","editComment.onFailure":"comments.edit.onFailure","getUserByEmail.onSuccess":"user.getByEmail.onSuccess","validateAuth.onSuccess":"user.validateAuth.onSuccess","validateAuth.onFailure":"user.validateAuth.onFailure",cookieFailure:"cookies.onFailure"};c.callbacks={reload:function(){window.location.reload()}};DISQUS.lang.forEach(f,function(j,h,g){c.callbacks[h]=DISQUS.lang.partial(DISQUS.dtpl.actions.fire,j,undefined,d)});c.receive_callback=DISQUS.JsonRpc.createHandler(a,c.callbacks);c.container=b;c.parent_post_id=d;e={f:DISQUS.jsonData.forum.url,t:DISQUS.jsonData.thread.slug,ff:DISQUS.nodes.getBasicStyles().fontFamily,default_text:DISQUS.config.def_text,ifrs:DISQUS.config.iframe_css};if(d){e.parent_post=d}c.url=DISQUS.getResourceURL(DISQUS.jsonData.urls.reply,e,true)};DISQUS.ReplyFrame.prototype=new DISQUS.NewFrames(DISQUS.ReplyFrame.url);(function(){function a(b){return function(){this.execute(b,Array.prototype.slice.call(arguments))}}DISQUS.TweetFrame.prototype.setContent=a("setContent");DISQUS.AuthFrame.prototype.focus=a("focus");DISQUS.AuthFrame.prototype.authenticateFacebook=function(d,b,c){this.callbacks["authenticateFacebook.onSuccess"]=c.onSuccess;this.execute("authenticateFacebook",[d,b])};DISQUS.ReplyFrame.prototype.validate=function(c,b){b=b||{};if(b.onSuccess){this.callbacks["validateComment.onSuccess"]=b.onSuccess}if(b.onFailure){this.callbacks["validateComment.onFailure"]=b.onFailure}this.execute("validateComment",c)};DISQUS.ReplyFrame.prototype.post=a("postComment");DISQUS.ReplyFrame.prototype.edit=a("editComment");DISQUS.ReplyFrame.prototype.setState=a("setState");DISQUS.ReplyFrame.prototype.getUserByEmail=a("getUserByEmail");DISQUS.ReplyFrame.prototype.validateAuth=a("validateAuth")}());DISQUS.modules.NewFrames=true;var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}DISQUS.ParentMessenger=function(e,h,a,b,d){if(!DISQUS.ParentMessenger.isSupported()){throw new Error("unsupported.")}if(!h&&navigator.userAgent.indexOf("Gecko")>=0&&parseFloat(navigator.userAgent.slice(navigator.userAgent.indexOf("rv:")+3,navigator.userAgent.indexOf("rv:")+6))<1.9){throw new Error("unsupported.")}if(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent)){if(document.domain==window.location.hostname){h=""}}var f=this;this.childUrl=e;this.receiverUrl=h;this.container=a||document.body;this.packetHandler=null;this._ready=false;this._error=false;var g=function(){f.receiver=document.createElement("iframe");f.receiver.src=h;f.receiver.id="receiver_"+(new Date()).getTime();f.receiver.name=f.receiver.id;f.receiver.frameBorder="0";f.receiver.frameSpacing="0";f.receiver.style.borderStyle="none";var j=function(){var l=document.getElementById(f.receiver.id).contentWindow;try{l.document.body.innerHTML=""}catch(m){f._error=true}l.document.body.style.padding="0px";l.document.body.style.margin="0px";var n=l.document.createElement("iframe");n.id="child";n.name="child";n.src=f.childUrl;n.frameBorder="0";n.frameSpacing="0";n.style.borderStyle="none";n.style.width="100%";n.style.height="100%";l.document.body.appendChild(n);f.child=l.document.getElementById("child").contentWindow;f.receiver=l;f.packetHandler=new DISQUS.FragmentPacket(f.receiver,f.child,f.childUrl,false,b);f._listener=f.packetHandler.createListener();f.packetHandler.sendFlag(f.packetHandler.READY,0);f._ready=true};f.receiver.onreadystatechange=function(){if(this.readyState=="complete"){j();if(typeof d==="function"){d()}}};f.receiver.onload=j;if(DISQUS.browser.ie6){if(f.container.clientWidth===0){var k=function(){if(f.container.clientWidth>0){DISQUS.dtpl.actions.fire("thread.fixIframesIE",f.container.id)}else{window.setTimeout(k,100)}};k();f._once=false;f.receiver.onresize=function(){if(!f._once){DISQUS.dtpl.actions.fire("thread.fixIframesIE",f.container.id)}f._once=true}}}f.container.appendChild(f.receiver)};var c=function(){var j=function(){f.packetHandler.send();f._ready=true;if(typeof d==="function"){d()}};var m=DISQUS.PostMessagePacket._get_unique_id();var l="child_"+m;DISQUS.ParentMessenger["_receiver_onload_"+l]=j;var k=document.createElement("iframe");k.src=e;k.id=l;k.name=l;k.style.borderStyle="none";k.frameBorder="0";k.frameSpacing="0";k.setAttribute("onload","DISQUS.ParentMessenger._receiver_onload_"+l+"();");f.container.appendChild(k);f.receiver=document.getElementById(l).contentWindow;f.packetHandler=new DISQUS.PostMessagePacket(f.receiver,b,m,l);f._listener=f.packetHandler.createListener()};if(typeof window.postMessage=="function"){c()}else{g()}};DISQUS.ParentMessenger.prototype.sendMessage=function(b){var a=this;if(!this._ready){window.setTimeout(function(){a.sendMessage(b)},10);return}this.packetHandler.send(b);return true};DISQUS.ParentMessenger.isSupported=function(){if(navigator.userAgent.indexOf("Safari")>=0&&parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("Version/")+8),10)==3){return false}else{if(window.opera&&!navigator.userAgent.match(/Version\/10\.[0-9]+[^b]/)){return false}}return true};DISQUS.modules.ParentMessenger=true;var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}DISQUS.PostMessagePacket=function(c,a,e,d){var b=this;this.receiver=c;this.receiveCallback=a;this.id=e;this.receiverId=d};DISQUS.PostMessagePacket.prototype.createListener=function(){var a=this;var b=function(d){if(!a.id){a.id=d.data;return}var f=d.data.split(";")[0];if(f!==a.id){return}var c=d.data.substring(d.data.indexOf(";")+1);a.receiveCallback(c)};if(/MSIE/.test(navigator.userAgent)&&typeof window.attachEvent=="function"){window.attachEvent("onmessage",b)}else{if(typeof window.addEventListener=="function"){window.addEventListener("message",b,false)}else{throw new Error("No method found to create event listener for DISQUS.PostMessagePacket.")}}};DISQUS.PostMessagePacket.prototype.send=function(d){var a=false;try{if(typeof this.receiver.id=="undefined"||typeof this.receiver.postMessage=="undefined"){a=true}}catch(c){}if(a&&typeof this.receiverId!="undefined"){this.receiver=document.getElementById(this.receiverId).contentWindow}var b;if(!d){b=this.id}else{b=this.id+";"+d}this.receiver.postMessage(b,"*")};DISQUS.PostMessagePacket._last_unique_id=null;DISQUS.PostMessagePacket._get_unique_id=function(){var a=(new Date()).getTime();if(a==DISQUS.PostMessagePacket._last_unique_id){a++}DISQUS.PostMessagePacket._last_unique_id=a;return a.toString()};DISQUS.modules.PostMessagePacket=true;var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}DISQUS.sandbox=(function(){var a={};var e;var d={};var b;function f(){var k,j=DISQUS.jsonData;k={DISQUS:null,browser:DISQUS.browser,context:j.context,config:DISQUS.config,comments:[],comment:null,forum:j.forum,integration:j.integration,lang:{forEach:DISQUS.lang.forEach,interpolate:DISQUS.strings.interpolate,contains:DISQUS.lang.contains,pluralize:DISQUS.strings.pluralize,extend:DISQUS.lang.extend},loginOptions:[{name:"disqus",button_url:j.settings.media_url+"/images/themes/narcissus/login-disqus.gif",enabled:!j.forum.disqus_auth_disabled,action:"auth.disqus"},{name:"facebook",button_url:j.settings.media_url+"/images/themes/narcissus/login-facebook.gif",enabled:j.context.use_fb_connect,action:"auth.facebook"},{name:"twitter",button_url:j.settings.media_url+"/images/themes/narcissus/login-twitter.gif",enabled:j.context.use_twitter_signin,action:"auth.twitter"},{name:"openid",button_url:j.settings.media_url+"/images/themes/narcissus/login-openid.gif",enabled:j.context.use_openid,action:"auth.openid"},{name:"yahoo",button_url:j.settings.media_url+"/images/themes/narcissus/login-yahoo.png",enabled:j.context.use_yahoo,action:"auth.yahoo"}],request:j.request,reactions:j.reactions,settings:j.settings,session:j.session,states:DISQUS.states,sorting:[{value:"hot",label:DISQUS.strings.get("Popular now"),selected:j.request.sort==4},{value:"best",label:DISQUS.strings.get("Best rating"),selected:j.request.sort==3},{value:"newest",label:DISQUS.strings.get("Newest first"),selected:j.request.sort==2},{value:"oldest",label:DISQUS.strings.get("Oldest first"),selected:j.request.sort==1}],trans:DISQUS.strings.get,thread:j.thread,urls:j.urls};k.context.realtime_enabled=j.realtime_enabled;k.context.has_more_reactions=j.has_more_reactions;k.context.getUserServices=DISQUS.user.getUserServices;if(DISQUS.config.trackback_url&&DISQUS.config.trackbacks){k.context.trackback_url=DISQUS.config.trackback_url;k.context.trackbacks=DISQUS.config.trackbacks}else{k.context.trackback_url=j.settings.disqus_url+"/forums/"+j.forum.url+"/"+j.thread.slug+"/trackback/";k.context.trackbacks=j.trackbacks}k.context.sharing=[];DISQUS.lang.forEach(k.request.sharing,function(n,m,l){if(k.request.is_remote&&k.request.remote_domain!=m){return}n.key=m;n.checked=(n.auto===true||k.request.remote_domain==m);k.context.sharing.push(n)});k.request.display_sharing_options=j.request.is_authenticated;if(j.request.is_remote){if(!j.request.sharing.hasOwnProperty(j.request.remote_domain)){k.request.display_sharing_options=false}}if(k.reactions&&k.reactions.length>0){for(b=0;b<k.reactions.length;b++){var h=k.reactions[b].get_service_name;if(h=="trackback"||h=="pingback"){k.reactions[b].service_icon="rss"}else{k.reactions[b].service_icon=h.replace(" ","")}}if(k.reactions.retweets&&k.reactions.retweets.length===0){k.reactions.retweets=null}}else{k.reactions=null}DISQUS.lang.forEach(j.mediaembed,function(n,m,l){n.thumbnailURL=j.settings.media_url+"/images/mediaembed-thumbnail.png";switch(n.type){case 1:if(n.metadata.thumbnail){n.thumbnailURL=j.settings.uploads_url+"/"+n.metadata.thumbnail+"/cached75.jpg"}break;case 2:case 4:if(n.metadata.thumbnail){n.thumbnailURL=n.metadata.thumbnail}}if(!j.posts[n.post].media){j.posts[n.post].media=[]}j.posts[n.post].media.push(n)});var g=0;DISQUS.lang.forEach(j.ordered_posts,function(p,m,l){var o=j.posts[p];o.isFirst=false;o.isLast=false;o.id=p;o.author=j.users[o.user_key];o.even=(g%2)===0;if(o.parent_post_id&&j.posts[o.parent_post_id]){o.parent=j.posts[o.parent_post_id];o.parent.author=j.users[o.parent.user_key]}o.stripped=function(q){var r=o.message.replace(/<.*?>/g,"");if(r.length>q){return r.substring(0,q)}return null};var n;if(g===0){o.isFirst=true}else{n=k.comments[g-1];if(n.depth<o.depth){o.isFirst=true}else{if(n.depth>o.depth){n.isLast=true}}}k.comments.push(o);g++});if(g>0){k.comments[g-1].isLast=true}k.thread.page_numbers=[];for(b=(k.request.page-2);b<(k.request.page+2);b++){if(b>0&&b<=k.thread.num_pages){k.thread.page_numbers.push(b)}}if(k.thread.page_numbers[0]==2){k.thread.page_numbers.unshift(1)}if(k.thread.page_numbers[k.thread.page_numbers.length-1]==k.thread.num_pages-1){k.thread.page_numbers.push(k.thread.num_pages)}return k}function c(){var g={};DISQUS.lang.forEach(d,function(j,h){if(typeof j!="undefined"){DISQUS.lang.extend(g,j)}});return g}a.wrap=function(g,j,k){var h;if(typeof e=="undefined"){e=f()}if(k){d[g]=k}h=j(e,c());if(d[g]){d[g]=undefined}return h};a.invalidateGlobals=function(){e=undefined};return a}());DISQUS.modules.sandbox=true;var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}(function(c){var d=function(f,e){e=c.lang.extend({},d.defaults,e===undefined?{}:e);this.element=f;this.options=e;this.content=null;this.returnTo=null;this.enabled=true;this.init()};function b(f){if(f.title){f.setAttribute("original-title",f.title);f.removeAttribute("title")}}d.prototype={init:function(){var f=this;var j=this.element;var g=this.options;if(g.trigger==="click"){var e;var k;var h=function(){f.enter();c.events.remove(j,"click",e);setTimeout(function(){k=c.events.add(document,"click",l)},0)};e=c.events.add(j,"click",h);var l=function(n){n=n||window.event;var m=n.target||n.srcElement;if(!c.nodes.closest(m,".dsq-tooltip-outer")){f.hide();c.events.remove(document,"click",k);e=c.events.add(j,"click",h)}}}else{if(g.trigger){c.events.add(j,"mouseout",function(){f.leave()});c.events.add(j,"mouseover",function(){f.enter()})}}},show:function(){var l=this.getTitle();if(l&&this.enabled){var f=this.outer();var g=c.nodes.get(".dsq-tooltip-inner",f)[0];var k;if(this.options.contentId){k="big";this.content=c.nodes.get("#"+this.options.contentId);this.returnTo=this.content.parentNode;g.appendChild(this.content);this.content.style.display="block"}else{k="small";g.childNodes[0][this.options.html?"innerHTML":(typeof g.innerText!=="string"?"textContent":"innerText")]=l}f.className="";c.nodes.addClass(f,"dsq-tooltip-outer");c.nodes.addClass(f,"dsq-tooltip-"+k);f.style.visibility="hidden";f.style.top="0";f.style.left="0";f.style.display="block";var j=document.getElementsByTagName("body")[0];j.appendChild(f);var o=c.nodes.getPosition(this.element);pos={left:o[0],top:o[1]};pos=c.lang.extend({},pos,{width:this.element.offsetWidth,height:this.element.offsetHeight});var e=g.offsetWidth,h=g.offsetHeight;var n=(typeof this.options.gravity=="function")?this.options.gravity.call(this.element):this.options.gravity;var m=c.nodes.get(".dsq-tooltip-notch",f)[0];if(this.options.noclip){if((n=="s"||n=="n")&&(pos.left+pos.width/2-e/2)<0){n="w"}}m.style.height=null;m.style.width=null;if(c.browser.ie6){m.style.display="none"}switch(n){case"n":c.nodes.addClass(f,"dsq-tooltip-north");f.style.top=pos.top+pos.height+"px";f.style.left=(pos.left+pos.width/2-e/2)+"px";m.style.width=e+"px";m.style.backgroundPosition="top center";break;case"s":c.nodes.addClass(f,"dsq-tooltip-south");f.style.top=pos.top-h+"px";f.style.left=(pos.left+pos.width/2-e/2)+"px";m.style.top=h+"px";m.style.width=e+"px";m.style.backgroundPosition="bottom center";break;case"e":c.nodes.addClass(f,"dsq-tooltip-east");f.style.top=(pos.top+pos.height/2-h/2)+"px";f.style.left=pos.left-e+"px";m.style.height=h+"px";m.style.backgroundPosition="right center";break;case"w":c.nodes.addClass(f,"dsq-tooltip-west");f.style.top=(pos.top+pos.height/2-h/2)+"px";f.style.left=pos.left+pos.width+"px";m.style.height=h+"px";m.style.backgroundPosition="left center";break}if(this.options.fade){}else{f.style.visibility="visible";f.style.opacity=this.options.opacity}}},hide:function(){if(this.options.fade){}else{if(this.content){this.content.style.display="none";this.returnTo.appendChild(this.content)}this.outer().style.visibility="hidden"}},getTitle:function(){var h,f=this.element,g=this.options;b(f);if(typeof g.title=="string"){h=f.getAttribute(g.title=="title"?"original-title":g.title)}else{if(typeof g.title=="function"){h=g.title.call(f)}}h=(""+h).replace(/(^\s*|\s*$)/,"");return h||g.fallback},outer:function(){if(!this._outer){this._outer=document.createElement("div");var e=this._outer;e.className="dsq-tooltip";e.style.position="absolute";e.style.zIndex="9999";e.innerHTML='<div class="dsq-tooltip-notch"></div><div class="dsq-tooltip-inner"><span></span></div>'}return this._outer},validate:function(){if(!this.$element[0].parentNode){this.hide()}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled},leave:function(){if(this.hoverState==="out"){return}this.hoverState="out";if(this.options.delayOut===0){this.hide()}else{setTimeout(function(){if(this.hoverState=="out"){this.hide()}},this.options.delayOut)}},enter:function(){if(this.hoverState==="in"){return}this.hoverState="in";if(this.options.delayIn===0){this.show()}else{setTimeout(function(){if(this.hoverState=="in"){this.show()}},this.options.delayIn)}}};d.defaults={delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,opacity:0.8,title:"title",trigger:"hover",contentId:null,noclip:false};var a=function(f,e){c.Tooltip.call(this,f,e)};a.prototype=c.lang.extend({},d.prototype);a.prototype.show=function(){var e=this;c.Tooltip.prototype.show.call(this);var f=function(h){h=h||window.event;var g=h.target||h.srcElement;if(!c.nodes.closest(g,".dsq-tooltip-outer")){e.hide();c.events.remove(document,"click",documentListener)}};documentListener=c.events.add(document,"click",f)};c.Tooltip=d;c.ManualTooltip=a})(DISQUS);DISQUS.modules.tooltip=true;var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}DISQUS.ui=(function(){var a={};a.ContentBase=function(b){this.container=DISQUS.nodes.get("#"+b)};a.ContentBase.prototype={show:function(){this.container.style.display="block";var b=DISQUS.nodes.get("input",this.container);if(b.length){b[0].focus()}},hide:function(){this.container.style.display="none"}};a.GuestLoginContent=function(b){a.ContentBase.call(this,"dsq-login-guest");function d(g){var j,f="";if(g){j=g.split("@")[0].split(".");for(var h=0;h<j.length;h++){f+=j[h].charAt(0).toUpperCase()+j[h].slice(1)+" "}return DISQUS.lang.trim(f)}}DISQUS.events.add(DISQUS.nodes.get("#dsq-field-email"),"keyup",function(g){var h=g.target||g.srcElement;var f=d(h.value);if(f){DISQUS.nodes.get("#dsq-field-name").value=f}});addUrl=DISQUS.nodes.get("a",DISQUS.nodes.get(".dsq-login-add-url")[0])[0];DISQUS.events.add(addUrl,"click",function(f){addUrl.parentNode.parentNode.style.display="none";DISQUS.nodes.get("#dsq-optional-field-website").style.display="block";f.preventDefault()});var e=DISQUS.nodes.get("#dsq-login-guest");var c=DISQUS.nodes.get("button",e)[0];DISQUS.events.add(c,"click",function(){if(DISQUS.dtpl.validateFields()){b();DISQUS.popup.close(null,true)}})};DISQUS.lang.extend(a.GuestLoginContent.prototype,a.ContentBase.prototype);a.DisqusLoginContent=function(b){var c=this;a.ContentBase.call(c,b);c.iframeReady=false;c.focusOnReady=false;a.ContentBase.call(c,b);c.iframe=new DISQUS.AuthFrame(c.container,{onReady:function(){c.onIframeReady()},onComplete:function(){DISQUS.popup.close(null,true)}});c.iframe.init(function(){var e={};var d={id:"dsq-popup-login","class":"dsq-post-login"};if(DISQUS.config.frame_theme){e.theme=DISQUS.config.frame_theme}c.container.appendChild(DISQUS.nodes.createIframe(DISQUS.jsonData.urls.embed_login,e,d))})};DISQUS.lang.extend(a.DisqusLoginContent.prototype,a.ContentBase.prototype,{onIframeReady:function(){this.iframeReady=true;if(this.focusOnReady){this.iframe.focus()}},show:function(){a.ContentBase.prototype.show.call(this);if(!this.iframeReady){this.focusOnReady=true}else{this.iframe.focus()}}});a.ExternalLoginContent=function(c,d){a.ContentBase.call(this,"dsq-login-"+d);var b=this;launcher=DISQUS.nodes.get(".dsq-external-launcher",this.container)[0];DISQUS.events.add(launcher,"click",function(){var e={onFailure:function(){DISQUS.nodes.get(".dsq-remote-authentication",b.container)[0].style.display="none";DISQUS.nodes.get(".dsq-connect-msg",b.container)[0].style.display="block"}};DISQUS.nodes.get(".dsq-connect-msg",b.container)[0].style.display="none";DISQUS.nodes.get(".dsq-remote-authentication",b.container)[0].style.display="block";DISQUS.api.ensureLoggedIn(function(){DISQUS.popup.close(null,true)},d,e)})};DISQUS.lang.extend(a.ExternalLoginContent.prototype,a.ContentBase.prototype);a.OpenIdLoginContent=function(c){a.ContentBase.call(this,"dsq-login-openid");var b=DISQUS.nodes.get("#dsq-openid-submit-button");DISQUS.events.add(b,"click",function(){var e=this;var h,d;var j="location=0,status=0,width=800,height=500";var f=DISQUS.jsonData.urls.openid_connect;var g=DISQUS.nodes.get("#dsq-openid-url").value;if(/^\s*$/.test(g)){return}f=DISQUS.getResourceURL(f,{url:g,username:DISQUS.nodes.get("#dsq-openid-username").value});h=window.open(f,"openidWindow",j);d=setInterval(function(){if(h.closed){clearInterval(d);DISQUS.reload(function(){DISQUS.popup.close(null,true)})}},500)})};DISQUS.lang.extend(a.OpenIdLoginContent.prototype,a.ContentBase.prototype);a.iFrameContent=function(b,c){a.ContentBase.call(this,b);this.url=c;this.iframe=null};DISQUS.lang.extend(a.iFrameContent.prototype,a.ContentBase.prototype,{show:function(){var b=this;if(!this.iframe){this.iframe=DISQUS.nodes.createIframe(this.url,{},{style:"display:none",frameBorder:"0",frameSpacing:"0",height:"100%",width:"100%"});DISQUS.events.add(this.iframe,"load",function(){b.spinner.style.display="none";b.iframe.style.display="block"});this.spinner=document.createElement("img");this.spinner.src=DISQUS.jsonData.settings.media_url+"/images/dsq-loader.gif";this.container.appendChild(this.spinner);this.container.appendChild(this.iframe)}a.ContentBase.prototype.show.call(this)}});a.LoginBoxTab=function(e,d,f){var b=this;b.parent=e;b.tabNode=DISQUS.nodes.get("#"+d);b.content=f;var c=DISQUS.nodes.get("a",b.tabNode)[0];DISQUS.events.add(c,"click",function(g){b.enable();g.preventDefault();return false})};a.LoginBoxTab.prototype={enable:function(){if(this.parent.enabledTab){this.parent.enabledTab.disable()}DISQUS.nodes.addClass(this.tabNode,"dsq-active");this.content.show();this.parent.enabledTab=this},disable:function(){DISQUS.nodes.removeClass(this.tabNode,"dsq-active");this.content.hide()}};a.ProfileEditModal=function(){var b=this;b.tabs={};b.enabledTab=null};a.ProfileEditModal.prototype.show=function(){var b=this;var d=DISQUS.renderBlock("loginPopup");var c={onClose:b.onClose,onReady:function(){b.onContentReady()}};DISQUS.popup.popModal(DISQUS.renderBlock("profileEdit"),DISQUS.strings.get("Edit your profile"),null,null,null,c)};a.ProfileEditModal.prototype.onContentReady=function(){var b=this.tabs;var e=DISQUS.ui;var d=DISQUS.jsonData.settings;var c=encodeURIComponent(DISQUS.config.page.url);b.edit=new e.LoginBoxTab(this,"dsq-tab-profile-edit",new e.iFrameContent("dsq-profile-edit",d.disqus_url+"/embed/profile/info?thread_url="+c));b.avatar=new e.LoginBoxTab(this,"dsq-tab-profile-avatar",new e.iFrameContent("dsq-profile-avatar",d.disqus_url+"/embed/profile/avatar?thread_url="+c));b.services=new e.LoginBoxTab(this,"dsq-tab-profile-services",new e.iFrameContent("dsq-profile-services",d.disqus_url+"/embed/profile/connections?thread_url="+c));b.notifications=new e.LoginBoxTab(this,"dsq-tab-profile-notifications",new e.iFrameContent("dsq-profile-notifications",d.disqus_url+"/embed/account/notifications?&thread_url="+c));b.account=new e.LoginBoxTab(this,"dsq-tab-profile-account",new e.iFrameContent("dsq-profile-account",d.disqus_url+"/embed/account?&thread_url="+c));b.edit.enable()};a.applyTooltips=function(b){if(typeof b==="undefined"){b=DISQUS.nodes.get("#disqus_thread")}var c=DISQUS.nodes.get(".dsq-tt",b);DISQUS.lang.forEach(c,function(f,d){var e=new DISQUS.Tooltip(f,{gravity:"s",trigger:"hover",opacity:0.96})})};return a})();DISQUS.modules.ui=true;var DISQUS;if(typeof DISQUS=="undefined"){throw"Can't find DISQUS"}DISQUS.cookies=(function(){var a={};a.create=function(b,c){document.cookie=b+"="+c+"; path=/"};a.read=function(b){var f=b+"=";var d,e=document.cookie.split(";");for(var c=0;c<e.length;c++){d=e[c];while(d.charAt(0)==" "){d=d.substring(1,d.length)}if(d.indexOf(f)===0){return d.substring(f.length,d.length)}}return null};a.erase=function(c){var b=new Date();b.setTime(b.getTime()+(-1*24*60*60*1000));document.cookie=c+"=;expires="+b.toGMTString()+"; path=/"};return a}());DISQUS.events=(function(){var a={};var c={ready:false,timer:null,queue:[]};function b(){if(c.ready){return}if(document&&document.getElementsByTagName&&document.getElementById&&document.body){clearInterval(c.timer);c.timer=null;for(var d=0;d<c.queue.length;d++){c.queue[d]()}c.queue=[];c.ready=true}}a.add=function(e,d,g){var f=g;if(e.addEventListener){e.addEventListener(d,f,false)}else{if(e.attachEvent){f=function(){var h=window.event;h.preventDefault=function(){h.returnValue=false};return g(h)};e.attachEvent("on"+d,f)}else{throw"Event registration not supported"}}return f};a.remove=function(e,d,f){if(e.removeEventListener){e.removeEventListener(d,f,false)}else{if(e.detachEvent){e.detachEvent("on"+d,f)}}};a.execOnReady=function(d){if(c.ready){d();return}if(c.timer){c.queue.push(d)}else{a.add(window,"load",b);c.queue.push(d);c.timer=setInterval(b,13)}};return a}());DISQUS.tasks=(function(){var a={};var b=[];a.add=function(c){b.push(c)};a.executeNext=function(){var c=b.pop();if(c){c()}};a.executeAll=function(){DISQUS.lang.forEach(b,function(c){c()})};a.clear=function(){b=[]};return a}());DISQUS.user=(function(){var a={};a.getUserServices=function(c){var b=["blog","twitter","facebook","tumblr"];var d=[];DISQUS.lang.forEach(b,function(e,h,g){var f;if(c[e]){f=({blog:function(j){return j},twitter:function(j){return j},facebook:function(j){return j},tumblr:function(j){return"http://"+j+".tumblr.com"}})[e](c[e]);d.push({name:e.toLowerCase(),display_name:e,url:f})}});return d};return a}());DISQUS.nodes=(function(){var m={};var l;function b(o){return new RegExp("(^|\\s)"+o+"(\\s|$)")}function k(p,u,q){var v;var s;var t;var o;t=b(u);o=[];p=p||"*";q=q||m.body;u=u.replace(/\-/g,"\\-");v=(p=="*"&&q.all)?q.all:q.getElementsByTagName(p);for(var r=0;r<v.length;r++){s=v[r];if(t.test(s.className)){o.push(s)}}return o}function j(p){var o=[];for(var q=p.length;q>=0;q--){if(q in p){o[q]=p[q]}}return o}m.container=document.getElementById("dsq-content");m.body=document.body||document.getElementsByTagName("body")[0];m.head=document.getElementsByTagName("head")[0]||document.getElementById("disqus_thread");m.addCssRule=function(o,u,q){q=q||0;var t=DISQUS.cache.inlineStylesheet;if(!t){throw new ReferenceError("An element for inline styles was not created")}if(t.insertRule){var p=o+" { "+u+" }";if(q==-1){q=t.cssRules.length}t.insertRule(p,q)}else{if(t.addRule){var s=o.split(",");for(var r=0;r<s.length;r++){t.addRule(s[r],u,q)}}}};m.extractId=function(p){var q=p.id.split("-");if(q.length<=1){return 0}else{var o=parseInt(q[q.length-1],10);return !isNaN(o)?o:null}};m.get=function(q,o){if(q.slice(0,1)=="#"){return document.getElementById(q.slice(1))}else{if(q.indexOf(".")!=-1){return k(q.slice(0,q.indexOf(".")),q.slice(q.indexOf(".")+1),o)}}var p=(o||document).getElementsByTagName(q);return j(p)};m.is=function(o,p){if(o.nodeType!==1){return false}else{if(p.slice(0,1)=="#"){return o.id==p.slice(1)}else{if(p.indexOf(".")!=-1){return b(p.slice(1)).test(o.className)}else{return o.tagName.toLowerCase().indexOf(p)!=-1}}}return false};m.closest=function(q,p){var o=q.parentNode;while(o){if(m.is(o,p)){return o}o=o.parentNode}return null};m.createIframe=function(p,t,o){var q;var s;var r;r=m.getIframeDefaults();if(t){DISQUS.lang.forEach(t,function(v,u){r[u]=v})}s={marginwidth:0,marginheight:0,hspace:0,vspace:0,frameborder:0,allowtransparency:"true",src:DISQUS.getResourceURL(p,r,true)};if(o){DISQUS.lang.forEach(o,function(v,u){s[u]=v})}q=document.createElement("iframe");DISQUS.lang.forEach(s,function(v,u){q.setAttribute(u,v)});return q};m.getIframeDefaults=function(){var o=m.getBasicStyles();return{f:DISQUS.jsonData.forum.url,t:DISQUS.jsonData.thread.slug,ifrs:DISQUS.config.iframe_css,to_redirect:window.location,cbp:DISQUS.config.callback_params,ff:o.fontFamily,fc:o.fontColor,ac:o.anchorColor,default_text:DISQUS.config.def_text}};m.getPosition=function(o){var q=0;var p=0;if(o.offsetParent){do{q+=o.offsetLeft;p+=o.offsetTop;o=o.offsetParent}while(o)}return[q,p]};m.getStyle=function(o,q){var p;if(o.currentStyle){p=o.currentStyle[q]}else{if(window.getComputedStyle){p=document.defaultView.getComputedStyle(o,null).getPropertyValue(q)}}if(p=="transparent"||p===""){return m.getStyle(o.parentNode,q)}else{return p}};m.getBasicStyles=function(){var p;var o;if(l){return l}l={fontColor:null,fontFamily:null,anchorColor:null};o=m.get("#"+DISQUS.config.container_id);p=m.get("a")[0];l.fontColor=m.getStyle(o,"color");if(DISQUS.browser.ie||DISQUS.browser.opera){l.fontFamily=m.getStyle(o,"fontFamily")}else{l.fontFamily=m.getStyle(o,"font-family")}l.fontFamily=l.fontFamily.replace(/['"]/g,"");if(p){l.anchorColor=m.getStyle(p,"color")}return l};m.hasClass=function(p,o){return b(o).test(p.className)};var d=/[\n\t]/g,n=/\s+/,g=/\r/g,c=/href|src|style/,h=/(button|input)/i,f=/(button|input|object|select|textarea)/i,e=/^(a|area)$/i,a=/radio|checkbox/;m.addClass=function(q,r){var t=(r||"").split(n);if(!q.className){q.className=r}else{var p=" "+q.className+" ",s=q.className;for(var u=0,o=t.length;u<o;u++){if(p.indexOf(" "+t[u]+" ")<0){s+=" "+t[u]}}q.className=DISQUS.lang.trim(s)}};m.removeClass=function(q,r){var s=(r||"").split(n);if(r){var p=(" "+q.className+" ").replace(d," ");for(var t=0,o=s.length;t<o;t++){p=p.replace(" "+s[t]+" "," ")}q.className=DISQUS.lang.trim(p)}else{q.className=""}return this};m.toggleClass=function(o,p){if(m.hasClass(o,p)){m.removeClass(o,p)}else{m.addClass(o,p)}};m.remove=function(o){if(!o){return}m.removeChildren(o);if(typeof o.outerHTML!="undefined"){o.outerHTML=""}else{if(o.parentNode){o.parentNode.removeChild(o)}}o=null};m.removeChildren=function(p){var o,r;if(!p){return}o=p.childNodes;var q=o.length-1;while(q>=0){r=o[q];if(r.hasChildNodes()){m.removeChildren(r)}if(typeof r.outerHTML!="undefined"){r.outerHTML=""}else{p.removeChild(r)}r=null;q-=1}};m.toHTML=function(p){var o,q;q=document.createElement("div");q.appendChild(p);o=q.innerHTML;q=null;return o};return m}());DISQUS.request=(function(){var a={};a.get=function(e,f,d,b){var c=document.createElement("script");c.src=DISQUS.getResourceURL(e,f,d);c.charset="UTF-8";(b||DISQUS.nodes.container).appendChild(c);return c};a.post=function(c,f,h){var b;var e;var g;var d;b=document.createElement("div");g="dsq-temp-iframe"+(new Date()).getTime();e=document.createElement("form");e.method="POST";e.action=c;if(!h){e.target=g}d=document.createElement("iframe");d.style.display="none";d.name=g;d.id=g;b.appendChild(d);DISQUS.lang.forEach(f,function(m,l,k){var j=document.createElement("input");j.name=l;j.type="hidden";j.value=m;e.appendChild(j)});DISQUS.nodes.body.appendChild(b);DISQUS.nodes.body.appendChild(e);e.submit()};return a}());DISQUS.strings=(function(){var a={};var c;var b;b=DISQUS.jsonData;c={profile_url:b.urls.request_user_profile,disqus_url:b.settings.disqus_url,media_url:b.settings.media_url,request_username:b.request.username,request_display_username:b.request.display_username,forum_name:b.forum.name};a.translations={};a.get=function(e){var d=a.translations[e];return(d?d:e)};a.interpolate=function(e,f){var d=[f||{},c];function g(j){for(var h=0;h<d.length;h++){if(d[h][j]!==undefined){return String(d[h][j])}}throw"Key "+j+"not found in context"}return e.replace(/%\(\w+\)s/g,function(h){return g(h.slice(2,-2))})};a.pluralize=function(e,f,d){return(e!=1)?d||"s":f||""};return a}());DISQUS.strings.Builder=function(){this.value=DISQUS.browser.ie?[]:""};DISQUS.strings.Builder.prototype.put=function(a){if(DISQUS.browser.ie){this.value.push(a)}else{this.value+=a}};DISQUS.strings.Builder.prototype.compile=function(){if(DISQUS.browser.ie){this.value=this.value.join("")}return this.value};DISQUS.popup=(function(){var a={};var h={};var e=[];var c=[];var d=null;var b=null;function g(l,k,m,j,n){l.className="dsq-popup dsq-popup-"+m+" "+(j||"");h={element:l,id:k,type:m,linkClicked:false};if(DISQUS.browser.ie6||DISQUS.browser.ie7){DISQUS.events.execOnReady(function(){DISQUS.nodes.body.appendChild(l);h.element.style.display="block";a.adjustPosition();if(n.onReady){n.onReady()}})}else{DISQUS.nodes.body.appendChild(l);h.element.style.display="block";a.adjustPosition();if(n.onReady){n.onReady()}}}function f(j,l){var k=j.target||j.srcElement;return !!DISQUS.nodes.closest(k,"#"+l)}a.adjustPosition=function(){if(!h){return false}var k=h.element;var j=DISQUS.window.getSize();var m=(j[0]-k.offsetWidth)/2;var l=(j[1]-k.offsetHeight)/2;if(DISQUS.browser.ie6){l=DISQUS.window.getScrollPosition()[1]}k.style.left=m+"px";k.style.top=l+"px";return true};a.close=function(n,o){var l=h.element;var m="dsq-avatar-"+h.id;var k;if(!l){return}if(o||!f(n,l.id)){if(d){DISQUS.events.remove(document,"mouseup",d);d=null}k=DISQUS.nodes.get("#dsq-overlay");if(k){DISQUS.nodes.remove(k)}try{DISQUS.nodes.remove(l)}catch(j){l.parentNode.removeChild(l)}if(b){b()}h={}}if(!o&&f(n,m)){h.linkClicked=true}};a.rawModal=function(j){a.close(null,true);var k=document.createElement("div");k.id="dsq-popup-message";k.innerHTML=j;g(k,undefined,"message","dsq-popup-raw",{});DISQUS.events.add(document,"mouseup",a.close);return k};a.popModal=function(r,q,k,m,l,p){if(typeof p==="undefined"){p={}}var j=document.createElement("div");var n;var o;q=q||"";m=m||true;j.id="dsq-popup-message";b=p.onClose;if(k){j.id+="-"+k}a.close(null,true);j.innerHTML=DISQUS.renderBlock("popup",{popupHeader:q,popupBody:r,popupClass:""});g(j,k,"message",l,p);if(m){d=DISQUS.events.add(document,"mouseup",a.close)}return j};a.updateProfile=function(o){var l;var q;var n;var p;var m;var j;var r;function k(w,t,v,s){var u=document.createElement("span");var x=DISQUS.strings.interpolate(DISQUS.strings.pluralize(t,v,s),{num:t});u.className="dsq-profile-stat-"+w;u.innerHTML="<big>"+x+"</big>";return DISQUS.nodes.toHTML(u)}if(DISQUS.cache.popupStatusCache[o]){n=DISQUS.nodes.get("#dsq-profile-status-"+o);n.innerHTML=DISQUS.cache.popupStatusCache[o];n.style.display="block"}l=DISQUS.cache.popupProfileCache[o];if(l){q={comments:k("comments",l.comments_count,DISQUS.strings.get("%(num)s comment"),DISQUS.strings.get("%(num)s comments")),likes:k("likes",l.likes_count,DISQUS.strings.get("%(num)s liked"),DISQUS.strings.get("%(num)s liked")),points:k("points",l.points,DISQUS.strings.get("%(num)s point"),DISQUS.strings.get("%(num)s points"))};p=DISQUS.nodes.get("#dsq-popup-profile-user-stats-"+o);p.innerHTML=q.points;if(DISQUS.jsonData.users[o].registered){p.innerHTML=q.comments+q.likes+p.innerHTML}j="";DISQUS.lang.forEach(l.active_sites,function(u,t,s){j+='<li><a href="'+u.url+'"> <img src="'+u.favicon+'" width="16px" height="16px"/></a><a href="'+u.url+'">'+u.name+"</a></li>"});m=DISQUS.nodes.get("#dsq-popup-profile-active-sites-"+o);if(j!==""){m.innerHTML=j}else{m.innerHTML=DISQUS.strings.get("This site.")}r="";DISQUS.lang.forEach(l.moderated_sites,function(u,t,s){r+='<li><a href="'+u.url+'"> <img src="'+u.favicon+'" width="16px" height="16px"/></a><a href="'+u.url+'">'+u.name+"</a></li>"});if(r!==""){DISQUS.nodes.get("#dsq-popup-profile-moderated-"+o).innerHTML=r}else{DISQUS.nodes.get("#dsq-popup-profile-moderated-wrapper-"+o).innerHTML=""}}a.adjustPosition()};a.popProfile=function(m,j){var u;var v;var q;var r;var s;var o;var t;v=DISQUS.strings.get;u=DISQUS.jsonData.posts[m];if(u){if(u.has_been_anonymized){DISQUS.popup.popModal(v("This message was anonymized by its previous owner"),v("Anonymized"),m);return}j=DISQUS.jsonData.posts[m].user_key}q=DISQUS.jsonData.users[j];var l=DISQUS.jsonData.settings.disqus_url+(!q||q.registered?"/embed/":"/embed/guest/")+j;var p=DISQUS.nodes.createIframe(l,{},{width:"100%",height:"100%",scrolling:"no"});var k=DISQUS.popup.rawModal('<div class="dsq-border" style="width:570px; height:525px;"></div>');var n=DISQUS.nodes.get("div.dsq-border",k)[0];n.appendChild(p)};a.popLightbox=function(k,l,m){var j=document.createElement("div");j.id="dsq-overlay";j.className="dsq-overlay";DISQUS.nodes.body.appendChild(j);a.popModal(k,l,m,false,"dsq-lightbox")};return a}());DISQUS.window=(function(){var a={};a.getSize=function(){var c=-1;var b=-1;if(typeof window.innerWidth=="number"){c=window.innerWidth;b=window.innerHeight}else{if(document.documentElement){c=document.documentElement.clientWidth||document.body.clientWidth;b=document.documentElement.clientHeight||document.body.clientHeight}}return[c,b]};a.getScrollPosition=function(){var b,c;if(document.documentElement&&(document.documentElement.scrollTop||document.documentElement.scrollWidth)){c=document.documentElement.scrollTop||document.body.scrollTop}else{if(document.body.scrollTop&&document.body.scrollWidth){b=document.body.scrollWidth;c=document.body.scrollTop}}return[b,c]};return a}());DISQUS.hacks=(function(){var a={};a.ie={fixIframes:function(f){var b=DISQUS.nodes.get("#"+DISQUS.config.container_id);var e=b.getElementsByTagName("iframe");var c=(f?DISQUS.nodes.get("#"+f):DISQUS.nodes.container);if(c){for(var d=0;d<e.length;d++){e[d].style.width=c.offsetWidth}}}};return a}());DISQUS.modules.utils=true;