1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title></title>
<script>document.domain = 'disqus.com';</script>
<style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;line-height:inherit}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal}form legend{display:none}blockquote:before,blockquote:after,q:before,q:after{content:""}blockquote,q{quotes:"" ""}ol,ul{list-style:none}hr{display:none;visibility:hidden}:focus{outline:0}html{margin:0;padding:0;height:100%}body{font-size:13px;height:100%;background-color:transparent;margin:0;padding:0}div#comment,textarea{font-size:13px;background:transparent}div#comment.placeholder,textarea.placeholder{color:#666}span.disqus{font-family:Trebuchet MS,Trebuchet,Verdana,Arial,sans-serif;font-size:90%;text-transform:uppercase;font-weight:bold}form{margin:0;padding:0}a.forgot-password{margin-left:15px;font-size:95%;-moz-opacity:.8;opacity:.80;filter:alpha(opacity=80)}.form-text-label{font-weight:bold}.input-block{float:left}.input-block label{display:block}label img{margin-bottom:-1px;margin-left:3px}input{margin:0;padding:0}input.form-text{padding:2px;margin-right:10px;margin-bottom:7px;font-size:100%;display:block}input.placeholder{-moz-opacity:.6;opacity:.60;filter:alpha(opacity=60)}input.submit{margin-right:5px}input#custom-submit{border:0;display:none;cursor:pointer}.submit-footer{margin:10px 0 0 0;clear:left}label span.error{color:#c03000;font-weight:bold}ul.errorlist{margin:0;padding:0}ul.errorlist li{font-size:90%;color:#c03000;list-style:none}#post-choices{padding:5px 0;width:99%}#post-choices input{vertical-align:top}#post-choices label{vertical-align:baseline;margin-right:12px}#post-choices span.help{margin-left:10px;font-size:.85em}#post-choices span.help a{cursor:help;text-decoration:none;border-style:dotted;border-width:0 0 1px 0}.login-register-copy{margin:5px 0 20px 0;font-size:14px;color:#333}.login-register-copy span.copy{background-color:#e8f0f7;border:1px solid #cdd6dd;-moz-border-radius:5px;-webkit-border-radius:5px;-webkit-border-radius:5px;padding:5px}.form-login-register{font-size:14px}.form-login-register input{font-size:16px}.form-login-register .form-field{margin-bottom:10px}.form-login-register .form-text-label{color:#333;display:block;margin-bottom:3px;-moz-opacity:.8;opacity:.80;filter:alpha(opacity=80)}.login-register-toggle{display:block;margin-top:20px}.login-register-toggle span{border-width:0 0 1px 0;border-style:dotted;cursor:pointer;color:#333}.overlay{display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:5000;background-color:#000;-moz-opacity:.8;opacity:.80;filter:alpha(opacity=80)}.overlay[id]{position:fixed}.lightbox{display:block;position:fixed;background-color:#fff;color:#333;z-index:9999;padding:10px;-moz-border-radius:5px;-webkit-border-radius:5px;-webkit-border-radius:5px}.lightbox a{color:#333}.lightbox .lightbox-status{margin-bottom:10px;padding:4px}.lightbox .lightbox-status .lightbox-status-text{vertical-align:bottom}.lightbox .lightbox-status .lightbox-status-text strong{vertical-align:bottom}.lightbox .lightbox-status .lightbox-avatar{width:24px;height:24px;margin-right:5px;vertical-align:middle}.lightbox span.dsq-badge{font-size:10px;margin-right:10px}span.dsq-badge{font-family:Optima,Lucida Grande,Lucida Sans,Helvetica,Arial,sans-serif;padding:2px 4px;-moz-border-radius:0 5px 0 5px;-webkit-border-top-right-radius:5px;-webkit-border-bottom-left-radius:5px;vertical-align:middle}span.dsq-badge.dsq-badge-verified{background-color:#92c72a;border:1px solid #6ca300;color:#fff}span.dsq-badge.dsq-badge-registered{background-color:#fffe98;border:1px solid #eae800;color:#000}span.badge-facebook,span.badge-twitter{padding:2px;color:#fff}span.badge-facebook{background-color:#46639d}span.badge-twitter{background-color:#31ceff}.dsq-popup .dsq-profile-services span.dsq-profile-badge.dsq-badge-guest{background-color:#ddd;border:1px solid #ccc}.lightbox .lightbox-form,.lightbox .lightbox-learnmore{margin:10px;padding:10px;background-color:#e8f0f7;border:1px solid #cdd6dd;-moz-border-radius:5px;-webkit-border-radius:5px;-webkit-border-radius:5px}.lightbox .lightbox-copy{margin-bottom:10px;padding-bottom:5px;border-bottom:1px solid #cdd6dd}.lightbox .lightbox-copy a.why{cursor:help;white-space:nowrap;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted}.lightbox .lightbox-learnmore ul{padding:0 15px}.lightbox .lightbox-learnmore ul li{list-style:none inside url('../../images/tick.png');margin:5px 0}.lightbox .lightbox-fields{width:200px;margin:0 auto}.lightbox .lightbox-field input.text{font-size:110%;padding:2px;width:100%}.lightbox .lightbox-field label.text{margin:0 0 3px 0;display:block;font-size:95%;-moz-opacity:.8;opacity:.80;filter:alpha(opacity=80)}.lightbox .error{color:#c03000;font-weight:bold}.lightbox .ok{color:#92c72a;font-weight:bold}.lightbox .lightbox-field{margin-bottom:8px}.lightbox a.lightbox-email-block{display:block;-moz-opacity:.8;opacity:.80;filter:alpha(opacity=80);font-size:90%;text-align:right;color:inherit;text-decoration:none;position:relative}.lightbox .lightbox-email-block .lightbox-email-change{font-style:italic;font-weight:bold;display:none}.lightbox a.lightbox-email-block:hover .lightbox-email-change{background-color:#e8f0f7;display:inline;position:absolute;top:0;left:0}.lightbox .lightbox-email-field{font-size:90%}.lightbox .lightbox-submit{text-align:center}.lightbox .lightbox-submit input.button{font-size:100%}.lightbox .lightbox-footer{text-align:center;-moz-opacity:.8;opacity:.80;filter:alpha(opacity=80)}#choose-subscription{-moz-opacity:.8;opacity:.80;filter:alpha(opacity=80);border:0;margin:10px 0 0 0;padding-left:5px;background:transparent url(../../images/small-tick.png) no-repeat 0 2px}#choose-subscription.no-subscribe{background:transparent url(../../images/small-off.png) no-repeat 0 2px}#choose-subscription:hover{-moz-opacity:1.0;opacity:1.0;filter:alpha(opacity=100)}button{position:relative;border:0;padding:0;cursor:pointer;overflow:visible}button::-moz-focus-inner{border:0}button span{position:relative;display:block;white-space:nowrap}@media screen and (-webkit-min-device-pixel-ratio:0){button span{margin-top:-1px}}button.button{padding:0 8px 0 0;font-size:13px;text-align:center;background:transparent url('../../images/v3/btn/button-large.gif') no-repeat right -104px}button.button span{padding:9px 0 0 8px;height:23px;background:transparent url('../../images/v3/btn/button-large.gif') no-repeat left top;color:#333;font-family:Arial,Helvetica,Calibri,sans-serif;font-weight:bold;text-shadow:0 1px 0 #fff}button.button img{vertical-align:middle;position:relative;top:-2px}button.button:hover{background-position:right -156px}button.button:hover span{background-position:0 -52px}button.button.small{padding:0 5px 0 0;font-size:11px;background:transparent url('../../images/v3/btn/button-small.gif') no-repeat right -84px}button.button.small span{float:none;padding:5px 0 0 6px;height:17px;width:auto;background:transparent url('../../images/v3/btn/button-small.gif') no-repeat left top;font-weight:normal}button.button.small:hover{background-position:right -126px}button.button.small:hover span{background-position:0 -42px}#remote-settings form div{margin-bottom:20px}#remote-settings label{display:block}#remote-settings ul{margin:0;padding:0;margin-bottom:20px}#remote-settings h3{font-size:14px;margin:0;margin-bottom:15px}#remote-settings li{list-style:none;margin:0;margin-bottom:3px}textarea{margin:0;padding:2px 0;font-size:13px;width:99%;height:120px}.form-info{margin-top:10px;width:190px}.form-block{position:relative}span.tooltip{position:absolute;display:block;margin:0 0 0 3px}span.tooltip .tt-arrow{color:#5b87a5;font-size:14px;vertical-align:middle}span.tooltip .tt-message{background-color:#5b87a5;color:#fff;margin:0 0 0 -3px;padding:5px;-moz-border-radius:3px;-webkit-border-radius:3px;vertical-align:middle}#form-block-username{display:none}#form-block-password{display:none}.dsq-post-avatar{width:24px;height:24px;margin-bottom:-6px;border:0}#dsq-post-retweet{margin:0 3px 0 5px;vertical-align:text-bottom;-webkit-vertical-align:baseline}@media screen and (-webkit-min-device-pixel-ratio:0){#dsq-post-retweet{vertical-align:baseline}}#dsq-label-retweet{font-size:90%;vertical-align:text-bottom}#dsq-label-retweet a{color:inherit}div#loader{text-align:right;padding:3px 1px}div#loader span{background-color:#f00;color:#fff;padding:2px 3px;-webkit-border-radius:2px;-moz-border-radius:3px;border-radius:3px}span.mention{color:inherit;opacity:.9;filter:alpha(opacity=90);background-image:url(../../images/themes/houdini/backgrounds-sprite.png);background-repeat:repeat-x;border-width:1px;border-style:solid;border-color:rgba(0,0,0,.15);border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding-top:0;padding-right:4px;padding-bottom:0;padding-left:4px;text-shadow:0 1px 0 rgba(255,255,255,.9);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.9);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.9)}
</style>
<style type="text/css">
html, body, form, textarea { outline: 0; margin: 0; padding: 0; height: 99%; width: 100%; }
textarea { border: 0; }
div#comment {
overflow-y: auto; /* default has scrollbars*/
word-wrap: break-word; /* Firefox hack */
}
</style>
<script src="reply_data/lib.js"></script>
<script>
function whenVisible(a,d){(function(){a.height()!==0?d():setTimeout(arguments.callee,250)})()}function createCookie(a,d,b){if(b){var f=new Date;f.setTime(f.getTime()+b*864E5);b="; expires="+f.toGMTString()}else b="";document.cookie=a+"="+d+b+"; path=/"}function readCookie(a){a+="=";for(var d=document.cookie.split(";"),b=0;b<d.length;b++){for(var f=d[b];f.charAt(0)==" ";)f=f.substring(1,f.length);if(f.indexOf(a)===0)return f.substring(a.length,f.length)}return null}
function getCommentText(){var a,d=$("div#comment").first();d.trigger("mention.text",[d.get(0),function(b){a=b}]);return a}function hasAttr(a,d){if(!a)return!1;if(a.hasAttribute)return a.hasAttribute(d);else if(a.attributes)return!!a.attributes[d];return!1}
(function(a){a.parseQuery=function(d){var b={query:window.location.search||""},f={};typeof d==="string"&&(d={query:d});a.extend(b,a.parseQuery,d);b.query=b.query.replace(/^\?/,"");a.each(b.query.split(b.separator),function(a,h){var c=h.split("="),i=b.decode(c.shift(),null).toString(),c=b.decode(c?c.join("="):null,i);b.array_keys.test(i)?(f[i]=f[i]||[],f[i].push(c)):f[i]=c});return f};a.parseQuery.decode=a.parseQuery.default_decode=function(a){return decodeURIComponent((a||"").replace("+"," "))};a.parseQuery.array_keys=
{test:function(){return!1}};a.parseQuery.separator="&"})(jQuery);
DISQUS.extend(DISQUS.host,{setupCommentBox:function(a){function d(){if(DISQUS.host.browser.gecko){var c=document.getElementById("comment");c&&setTimeout(function(){c.contentEditable=!1;c.contentEditable=!0},0)}}var b={},f=function(){var c=!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?$("textarea").val():getCommentText();return!(!c||/^\s*$/.test(c)||a.placeholder&&a.placeholder==c)};a.cdn&&function(){function c(){window.$.ajax=g.contentWindow.jQuery.ajax;$.each(b,function(c,
a){$.ajax(a)});b=null}var b=[],g;window.$._ajax=window.$.ajax;$.ajax=function(j){g||(g=$("<iframe>").attr("id","ajax-tunnel").attr("src",a.urls.tunnel).load(c).appendTo("head")[0]);b.push(j)}}();var m=function(c,h,g){if(f()){var j;!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?(j=$("textarea"),c.message=j.val()):(j=$("div#comment"),j.first().trigger("mention.text",[j.get(0),function(a){c.message=a}]));if(b.parentPost)c.parent_post_id=b.parentPost;if(b.depth||b.depth===0)c.parent_post_depth=
b.depth;$.ajax({type:"POST",dataType:"json",url:a.urls.create,data:c,success:function(c){!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?j.val(a.placeholder):j.html(a.placeholder);j.addClass("placeholder");setTimeout(function(){h(c)},0)},error:function(c){var a;try{a=$.parseJSON(c.response||c.responseText)}catch(b){a={message:"System Error",code:"system-error",succeeded:!1}}setTimeout(function(){g("system-error",a)},0)}})}else g("invalid-comment",{message:"Please enter a comment to post.",
code:"invalid-comment",succeeded:!1})},h=null,h=DISQUS.net.rpc({local:a.urls.helper,swf:a.urls.swf,hash:!a.debug,onReady:function(){createCookie("testCookie","1");readCookie("testCookie")||h.cookieFailure();h.isReady=!0;d()}},{local:{show:function(){d()},post:function(c,a,g,b){$.extend(c,a);m(c,g,b)},postAsGuest:function(c,a,g,b,h,f,d){c={author_name:c,author_email:a,subscribe:b?2:0};$.extend(c,h);if(g)c.author_url=g;m(c,f,d)},validate:f,setState:function(c,a,g,h){b.parentPost=c;b.depth=a;DISQUS.host.forum_id=
g;DISQUS.host.thread_id=h;DISQUS.host.parentPost=c||""},focus:function(){(DISQUS.host.browser.mobile?$("textarea"):$("div#comment")).first().focus()},setupResize:function(){var c=!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?"textarea":"div#comment",a=$(c);whenVisible(a.parent(),function(){c=="textarea"?a.autoResizeTextarea({extraSpace:20,limit:1E3,onResize:function(){return function(a){commentBoxRpc.resizeFrame(a,DISQUS.host.parentPost)}}}):c=="div#comment"&&a.autoResize({paddingBottom:20,
onResize:function(){return function(a){commentBoxRpc.resizeFrame(a,DISQUS.host.parentPost)}}})})},setData:function(a){DISQUS.extend(DISQUS.host,a)},selectUser:function(a){$("div#comment").first().trigger("mention.resolve",[a])}},remote:{cookieFailure:{},resizeFrame:{},onFocus:{},onBlur:{},onUploadAdd:{},onUploadRemove:{},onSuggest:{},onSuggestMove:{},onSuggestSelect:{},onSuggestClear:{}}});(!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?$("textarea"):$("div#comment")).live("focus",
function(){h.onFocus()}).live("blur",function(){h.onBlur()});return h},browser:{ie:/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent),mobile:/(iPhone|Android|iPod|iPad|webOS|Mobile Safari|Windows Phone)/i.test(navigator.userAgent),gecko:~navigator.userAgent.indexOf("Gecko/"),webkit:~navigator.userAgent.indexOf("AppleWebKit/")}});
(function(a){a.fn.autoResize=function(d){var b=a.extend({onResize:function(){},cssOverride:{},paddingBottom:25},d);return this.filter("div#comment").each(function(){function f(){var f=d.html(),g={position:"absoute",left:-9999,width:d.width()},f=a('<div id="dsq-autoResize" />').insertBefore("div#comment").css(g).html(f),g=f.height();f.remove();g!=c&&(g>h&&(c=g-b.paddingBottom,b.onResize()(g+b.paddingBottom)),g<h&&b.onResize()(h))}a(this).css("overflow","hidden");var d=a(this),h=58,c=h;d.keydown(f).keyup(f).change(f).bind("paste",
f);f()})}})(jQuery);
(function(a){a.fn.autoResizeTextarea=function(d){var b=a.extend({onResize:function(){},animate:!0,animateDuration:150,animateCallback:function(){},extraSpace:20,limit:1E3,cssOverride:{}},d);return this.filter("textarea").each(function(){a(this).height(a("body").height()-b.extraSpace);var f=a(this).css({resize:"none",overflow:"hidden"}),d=f.height(),h=function(){var c={};a.each(["height","width","lineHeight","textDecoration","letterSpacing"],function(a,h){c[h]=b.cssOverride[h]?b.cssOverride[h]:f.css(h)});
return f.clone().removeAttr("id").removeAttr("name").css({position:"absolute",top:0,left:-9999}).css(c).attr("tabIndex","-1").insertAfter(f)}(),c=null,i=function(){h.height(0).val(f.val()).scrollTop(h[0].scrollHeight);var a=Math.max(h[0].scrollHeight,d)+parseInt(b.extraSpace,10),j=f.add(h);c!==a&&(c=a,a>=b.limit?f.css("overflow",""):(b.animate&&f.css("display")==="block"?j.stop().animate({height:a},b.animateDuration,b.animateCallback):j.height(a),commentBoxRpc.isReady&&b.onResize()(a)))};i();f.keydown(i).keyup(i).change(i).bind("paste",
i).css("overflow","hidden")})}})(jQuery);
(function(a){a.fn.captureLinks=function(d){function b(a){var a=a.match(f.linkRe),b=[];if(a&&a.length)for(var c=a.length-1;c>=0;--c)f.imageRe.test(a[c])&&b.push(a[c]);f.callback(b)}var f=a.extend({linkRe:/\bhttp:\/\/.*?(?=\s|$)/g,imageRe:/\.jpg|\.gif|\.png|\.jpeg$/,callback:function(){}},d);return this.filter(!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?"textarea":"div#comment").each(function(f,h){h=a(this);h.keyup(function(a){switch(a.keyCode){case 32:case 8:case 13:case 10:!DISQUS.switches||!DISQUS.switches.mentions||
DISQUS.host.browser.mobile?b(h.val()):b(getCommentText())}}).bind("paste",function(){setTimeout(function(){!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?b(h.val()):b(getCommentText())},250)})})}})(jQuery);
(function(a){function d(a,c){this.key=["disqus.mentions",a,c].join(".");this.store=DISQUS.storage;if(DISQUS.storage.disabled)this.store=function(){var a={};return{get:function(c){return a[c]},set:function(c,b){a[c]=b}}}()}d.prototype.all=function(){return this.store.get(this.key)||{}};d.prototype.add=function(a){var c=this.all();c[a.username]=a;this.store.set(this.key,c)};d.prototype.hasKey=function(a){return this.all().hasOwnProperty(a)};d.prototype.has=function(a){var c=this.all();if(this.hasKey(a.username)&&
(c=c[a.username],a.username==c.username&&a.display_name==c.display_name&&a.remote==c.remote))return!0;return!1};d.prototype.remove=function(a){if(a){var c=this.all();c.hasOwnProperty(a.username)&&delete c[a.username];this.store.set(this.key,c)}};for(var b="h1 h2 h3 h4 h5 h6 p pre blockquote address ul ol dir menu li dl div center form hr br".split(" "),f={},m=0;m<b.length;m++)f[b[m]]=!0;a.fn.mention=function(b){var c=new d(options.forum,options.thread),i=a.extend({maxNames:4,maxSuggestions:6,searchThrottle:200,
onSuggest:function(){},onSuggestMove:function(){},onSuggestSelect:function(){},onSuggestClear:function(){}},b);return(!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?this.filter("textarea"):this.filter("div#comment")).each(function(b,d){function h(){if(k&&k.length){var a=RegExp(k.join(" ").replace(/[^\w\s]/,""),"i"),p=[],b=DISQUS.host.users;if(k.length===1&&k[0]==="")return DISQUS.each(b,function(a,e){if(!c.hasKey(e)&&p.length<i.maxSuggestions)q[e]="username",a.identifier=
e,p.push(a)}),p;DISQUS.each(b,function(b,e){if(!c.hasKey(e))if(a.test(b.display_name))q[e]="display_name",b.identifier=e,p.push(b);else if(a.test(b.username))q[e]="username",b.identifier=e,p.push(b)});return p.slice(0,i.maxSuggestions)}}function m(){var a=h(),b=[],t={};if(k&&k.length&&k.length==1&&(k.length!=1||k[0].length)){for(var o=!1,e=k[0],f,g=a.length-1;g>=0;--g)if(f=a[g],e==f.display_name.toLowerCase()){o=!0;break}!o&&!c.hasKey(["remote.disqus",e].join("."))&&(o={avatar:DISQUS.host.media_url+
"/images/noavatar32.png",display_name:e,disqus_username:e,remote_domain:"",remote_domain_name:"",twitter:"http://disqus.com/"+e,type:"disqus",username:["remote.disqus",e].join("."),identifier:["remote.disqus",e].join(".")},b.push(o),q[o.username]="disqus_username")}if(k&&k.length&&k.length==1&&(k.length!=1||k[0].length)){o=!1;e=k[0];for(g=a.length-1;g>=0;--g)if(f=a[g],"twitter"==f.remote_domain_name.toLowerCase()&&e==f.display_name.toLowerCase()){o=!0;break}!o&&!c.hasKey(["remote.twitter",e].join("."))&&
(o={avatar:DISQUS.host.media_url+"/images/noavatar32.png",display_name:"@"+e,twitter_username:e,remote_domain:2,remote_domain_name:"twitter",twitter:"http://twitter.com/"+e,type:"twitter",username:["remote.twitter",e].join("."),identifier:["remote.twitter",e].join(".")},b.push(o),q[o.username]="twitter_username")}if(a){t.sections=["in this conversation","elsewhere"];a.length&&(t["in this conversation"]=a);if(b.length)t.elsewhere=b;return t}}function n(a){var b=String.fromCharCode(160);return a.replace(RegExp(b,
"gi")," ")}function l(a,b){for(;a&&a!=r;){if(/mention/.test(a.className)&&hasAttr(a,"data-dsq-remote")&&hasAttr(a,"data-dsq-username"))return!0;if(b)break;a=a.parentElement}return!1}function w(a){var b=a.getAttribute("data-dsq-username"),a=a.getAttribute("data-dsq-remote");return a=="twitter"?"@"+b.split(".")[2]+":twitter":a=="disqus"?"@"+b.split(".")[2]+":disqus":"@"+b+":disqus"}function u(){k=s=v=void 0;i.onSuggestClear()()}function x(a,b){a&&a.nodeType&&(a=[a]);for(var c=[],g=0,e;g<a.length;++g)if(e=
a[g])switch(e.nodeType){case 1:if(b&&l(e)){c=c.concat(document.createTextNode(w(e)));break}c=c.concat(x(e.childNodes,b));break;case 3:/^\n\s+/.test(e.nodeValue)||c.push(e)}return c}function y(a){if(document.all){var b=document.selection.createRange();b.pasteHTML(a);b.collapse(!1);a=b.select()}else a=document.execCommand("insertHTML",!1,a);return a}function D(){var a,b;if(window.getSelection)return a=window.getSelection(),a.anchorNode;else if(document.selection.createRange){for(b=document.selection.createRange().duplicate();b.moveStart("character",
-1E3)==-1E3;);b=b.text;var c,g,e,f,d;for(f=0;f<r.get(0).childNodes.length;++f){c=r.get(0).childNodes[f];g=x(c);for(d=0;d<g.length;++d)if(c=g[d],e=n(c.nodeValue),b.indexOf(e)>-1)a=c,b=b.replace(e,"");else if(e.indexOf(b)>-1)return c}return a}}function z(){var a=D(),b=a?a.nodeValue:"",c,g;if(b&&!l(a)){if(window.getSelection){if((g=window.getSelection())&&g.anchorOffset)c=g.anchorOffset}else if(a&&document.selection.createRange){c=document.selection.createRange();g=n(a.nodeValue);for(var e=c.duplicate(),
e=e.parentElement(),f=0;c.moveStart("character",-1)!==0&&++f;){if(g.indexOf(n(c.text))===0||e!=c.parentElement())break;e=c.duplicate();e=e.parentElement()}c=f}c=isNaN(c)?0:c;g=n(b.slice(0,c).split("").reverse().join(""));g=g.indexOf("@");if(g>-1)if(v=a,s=c-g,a=n(b.slice(s-1,c)).match(E))return a[0].slice(1).split(" ");else if(g===0)return[""]}}function A(a){var b=document.getElementsByTagName("span"),g,f,e,d;for(d=0;d<b.length;++d)if(g=b[d],hasAttr(g,"data-dsq-username")&&hasAttr(g,"data-dsq-remote")&&
g.getAttribute("data-dsq-username")==a.username&&g.getAttribute("data-dsq-remote")==a.remote)window.getSelection?(g=b[d].previousSibling,(f=b[d])&&f.parentNode&&f.parentNode.removeChild(f),f=window.getSelection(),e=document.createRange(),g&&(e.setStart(g,g.length),e.setEnd(g,g.length)),f.addRange(e)):(g=b[d])&&g.parentNode&&g.parentNode.removeChild(g);c.remove(a);u();y(" ")}function B(){var a=document.getElementsByTagName("span"),b=c.all(),g={};DISQUS.each(a,function(a){if(l(a,!0)){var b=a.getAttribute("data-dsq-username"),
f=a.getAttribute("data-dsq-remote"),d;if(l(a)){for(var a=x(a),p="",j=0;j<a.length;++j)try{d=n(a[j].nodeValue),/^\s+$/.test(d)||(p+=d)}catch(h){}d=p}else d=void 0;b={username:b,remote:f,display_name:d};g[b.username]=b;c.has(b)||A(b)}});DISQUS.each(b,function(a){g.hasOwnProperty(a.username)||A(a)})}function C(a,b,g){if(!g){for(var g=b[q[b.identifier]].toLowerCase(),f=s,e=0,d=n(v.nodeValue.slice(s)).toLowerCase();e<d.length&&d[e]==g[e];)++f,++e;var d=v,g=s-1,j;if(window.getSelection)j=window.getSelection(),
j.removeAllRanges(),e=document.createRange(),e.setStart(d,g),e.setEnd(d,f),j.addRange(e);else if(document.selection.createRange){e=document.selection.createRange();d=n(d.nodeValue);if(e.parentElement().nodeName.toLowerCase()=="body"){r.get(0).focus();for(e=document.selection.createRange();e.moveStart("character",-1E3)==-1E3;);for(;e.moveEnd("character",1E3)==1E3;);j=n(e.text).indexOf(d);j>0&&e.moveStart("character",j+2);e.collapse()}for(;e.moveStart("character",-1)===-1&&d.indexOf(n(e.text))!==0;);
for(;e.moveEnd("character",1)===1&&d!==n(e.text););e.moveStart("character",g);e.moveEnd("character",-1*(f-g-e.text.length));e.select()}}b.remote=b.remote||"";c.add({username:b.identifier||b.username,remote:b.type?b.type:"",display_name:b.display_name,user:b});b=b.type=="twitter"?'<span data-dsq-username="'+["remote.twitter",b.twitter_username].join(".")+'" data-dsq-remote="twitter" class="mention"><span></span>'+b.display_name+"</span> ":b.type=="disqus"?'<span data-dsq-username="'+["remote.disqus",
b.disqus_username].join(".")+'" data-dsq-remote="disqus" class="mention"><span></span>'+b.display_name+"</span> ":'<span data-dsq-username="'+(b.identifier||b.username)+'" data-dsq-remote="" class="mention"><span></span>'+b.display_name+"</span> ";y(b);u(a)}var r=a(d),q={},E=RegExp("@\\w+\\s?(?:\\w+\\s?){0,"+(i.maxNames-2)+"}(?:\\w+)?$"),v,s,k,F=function(){var a=null,b=null;return function(){r.get(0);b?(clearTimeout(a),a=setTimeout(function(){clearInterval(b);clearTimeout(a);b=a=null},2*
i.searchThrottle)):b=setInterval(function(){try{k=z()}catch(a){return}i.onSuggest()(m())},i.searchThrottle)}}();r.keydown(function(a){if(k)switch(a.keyCode){case 9:i.onSuggestSelect()();case 10:case 13:case 38:case 40:a.preventDefault(),a.stopPropagation()}}).keyup(function(a){a.preventDefault();a.stopPropagation();B(a);switch(a.keyCode){case 50:a.shiftKey&&(u(),k=z());break;case 10:case 13:i.onSuggestSelect()();break;case 27:u(a);break;case 38:i.onSuggestMove()("up");break;case 40:i.onSuggestMove()("down");
break;default:F(a)}}).bind("mention.test",function(a,b){"show"==b?(k=[""],i.onSuggest()(m())):"select"==b&&C({},{avatar:DISQUS.host.media_url+"/images/noavatar32.png",display_name:"test_user",disqus_username:"test_user",remote_domain:"",remote_domain_name:"",twitter:"http://disqus.com/test_user",type:"disqus",username:"remote.disqus.test_user",identifier:"remote.disqus.test_user"},!0)}).bind("mention.resolve",C).bind("mention.text",function(a,b,c){function g(a,b){for(var c="",e=0;e<a.length;++e){var d=
a[e],h=d.nodeName.toLowerCase();if(d.nodeType==1)c+=l(d)?w(d):e==a.length-1?g(d.childNodes,!0):!b&&f.hasOwnProperty(h)?g(d.childNodes,!0)+"\n":g(d.childNodes);else if(d.nodeType==3&&(!DISQUS.host.browser.gecko||!(e===0&&/^\n$/.test(d.nodeValue))))c+=d.nodeValue}return c}var e,a="",d=0;try{e=Array.prototype.slice.call(b.childNodes)}catch(j){e=[];for(var h=0;h<b.childNodes.length;++h)e.push(b.childNodes[h])}if(DISQUS.host.browser.webkit&&e.length&&e[0].nodeType==3){b=!1;for(h=0;h<e.length;++h)if(d=
h,e[h].nodeType==3)a+=e[h].nodeValue;else if(e[h].nodeType==1&&!f.hasOwnProperty(e[h].nodeName.toLowerCase()))a+=l(e[h])?w(e[h]):g(e[h].childNodes);else{b=!0;break}d&&b&&(a+="\n"+g(e.slice(d)))}else a+=g(e);return c?c(a):a});B();(function(){var a;for(a=c.all().length-1;a>=0;--a);})()})}})(jQuery);
jQuery.fn.commentbox=function(a){var d="thread:"+a.thread,b=a.placeholder.replace(/</g,"<").replace(/>/g,">")||"",a={},a=null;DISQUS.storage.disabled||(a=DISQUS.json.parse(DISQUS.storage.get("disqus.drafts")||"{}"),a=a[d]);!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?a&&a!=b?this.val(a):(this.val(b),this.addClass("placeholder")):a&&a!=b?this.html(a):(this.html(b),this.addClass("placeholder"));var f=this;$(window).unload(function(){if(!DISQUS.storage.disabled){var a=
DISQUS.json.parse(DISQUS.storage.get("disqus.drafts")||"{}");a[d]=!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?$(f).val():$(f).html();try{DISQUS.storage.set("disqus.drafts",DISQUS.json.stringify(a))}catch(b){}}});this.focus(function(){var a=$(this);if(!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile)a.val()==b&&a.val("").removeClass("placeholder");else if(a.html()==b){if(/Firefox/.test(navigator.userAgent)){var c=navigator.userAgent.match(/Firefox\/([\w\.]+)/)[1];
a.html(parseInt(c[0],10)<4?" ":"")}else a.html("");a.removeClass("placeholder")}});this.blur(function(){var a=$(this),c;!DISQUS.switches||!DISQUS.switches.mentions||DISQUS.host.browser.mobile?(c=a.val(),(!c||/^\s*$/.test(c)||b==c)&&a.val(b).addClass("placeholder")):(c=a.html(),(!c||/^\s*$/.test(c)||/^<br\s?\/?>$/.test(c)||/^ $/.test(c)||b==c)&&a.html(b).addClass("placeholder"))});var m=this;whenVisible(m.parent(),function(){DISQUS.host.browser.ie&&$(document.body).focus(function(a){m.focus(a)});
m.get(0).style.height="100%"});var h,c,i;h=function(a){var b="disqus.media."+DISQUS.host.forum_id+"."+DISQUS.host.thread_id+"."+DISQUS.host.parentPost,b=!DISQUS.storage.disabled&&DISQUS.storage.get(b)||[],d=!1,f={Image:1,Youtube:2,Seesmic:3,Flickr:4,ImageUpload:5},h,l;for(h=a.length-1;h>=0;--h){d=!1;for(l=b.length-1;l>=0;--l)if(a[h]==b[l].location){d=!0;break}d||(c(a[h]),b.push({location:a[h]}))}for(h=b.length-1;h>=0;--h){d=!1;for(l=a.length-1;l>=0;--l)if(b[h].type!=f.Image||b[h].location==a[l]){d=
!0;break}!d&&b[h].type!=f.ImageUpload&&i(b[h])}};c=function(a){$.ajax({type:"POST",dataType:"json",async:!1,url:options.urls.media_add,data:{link:a,id:DISQUS.host.parentPost,json:!0},success:function(a){commentBoxRpc.onUploadAdd(a)},error:function(){}})};i=function(a){$.ajax({type:"POST",dataType:"json",async:!1,url:options.urls.media_remove,data:{media:DISQUS.json.stringify(a),id:DISQUS.host.parentPost,json:!0},success:function(a){commentBoxRpc.onUploadRemove(a)},error:function(){}})};DISQUS.switches&&
DISQUS.switches.upload_media&&this.captureLinks({callback:function(a){h(a)}});DISQUS.switches&&DISQUS.switches.mentions&&(DISQUS.host.browser.mobile||whenVisible($("div#comment").parent(),function(){$("div#comment").mention({onSuggest:function(){return function(a){commentBoxRpc.onSuggest(a,DISQUS.host.parentPost)}},onSuggestMove:function(){return function(a){commentBoxRpc.onSuggestMove(a,DISQUS.host.parentPost)}},onSuggestSelect:function(){return function(){commentBoxRpc.onSuggestSelect(DISQUS.host.parentPost)}},
onSuggestClear:function(){return function(){commentBoxRpc.onSuggestClear(DISQUS.host.parentPost)}}})}));return this};
</script>
<script>
var args = $.parseQuery(window.location.href.replace(/^.*#/, ''));
$(function () {
var body = document.getElementsByTagName('body')[0];
// Custom css rules
// Splitting with ; to prevent possible
// color:white;x:expression(alert(1)) XSS attacks
function getValue(key) {
return args[key].split(';')[0];
}
if (args.ff)
body.style.fontFamily = getValue('ff');
if (args.fc)
body.style.color = getValue('fc');
if (args.bg)
body.style.backgroundColor = getValue('bg');
if (args.d)
body.style.direction = getValue('d');
});
var options = {
placeholder: args.p,
forum: args.f,
thread: args.t,
cdn: true,
debug: false,
urls: {
swf: "http://mediacdn.disqus.com/1317948585/xdm.swf",
helper: "http://mediacdn.disqus.com/1317948585/html/xdm.html",
tunnel: "http://_FORUM_.disqus.com/tunnel.html",
create: "http://_FORUM_.disqus.com/thread/_THREAD_/post_create/",
edit: "http://_FORUM_.disqus.com/thread/_THREAD_/edit_post/",
media_add: "http://_FORUM_.disqus.com/thread/_THREAD_/async_media_upload/",
media_remove: "http://_FORUM_.disqus.com/thread/_THREAD_/async_media_remove/"
}
};
// Since we no longer render the template and forum names via
// the server, need to string replace them client-side
$.each(options.urls, function(key, url) {
options.urls[key] = url.
replace(/_FORUM_/, args.f).
replace(/_THREAD_/, args.t);
});
// load relevant switch
// have to massage data from string to bool
DISQUS.switches = {
upload_media: args.upload_media === "true",
mentions: args.mentions === "true"
};
// grab a handle to the easyXDM rpc object
var commentBoxRpc = DISQUS.host.setupCommentBox(options);
$(function () {
var elem;
if (DISQUS.switches.mentions && !DISQUS.host.browser.mobile) {
elem = $('div#comment');
} else {
$('div#comment').remove();
$('body').append('<form><textarea></textarea></form>');
elem = $('textarea');
}
elem.get(0).style.fontFamily = args.ff;
elem.commentbox(options);
});
</script>
</head>
<body style="font-family: sans-serif; direction: ltr;">
<div class="placeholder" style="font-family: sans-serif; height: 100%; overflow: hidden;" id="comment" role="textarea" aria-multiline="true" contenteditable="true">Type your comment here.</div>
</body></html>
|