/* Share button */
var switchTo5x=true;
var cookie=new function(){return{setCookie:function(d,f,h){if(h){var c=new Date();c.setTime(c.getTime()+(h*24*60*60*1000));var a="; expires="+c.toGMTString()}else{var a=""}var b=d+"="+escape(f)+a;var g=document.domain.split(/\./);var e="";if(g.length>1){e="."+g[g.length-2]+"."+g[g.length-1]}b+="; domain="+escape(e)+";path=/";document.cookie=b},getCookie:function(b){var a=document.cookie.match("(^|;) ?"+b+"=([^;]*)(;|$)");if(a){return(unescape(a[2]))}else{return false}},deleteCookie:function(a){var c="/";var d=document.domain.split(/\./);var b="";if(d.length>1){b="."+d[d.length-2]+"."+d[d.length-1]}document.cookie=a+"="+((c)?";path="+c:"")+((b)?";domain="+b:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}}();__stgetPubGA=function(){if(typeof(_gaq)!=="undefined"&&typeof(a)!=="undefined"){if(typeof(_gat)!=="undefined"){var a=_gat._getTrackerByName("~0")._getAccount()}if(typeof(a)!=="undefined"&&a!="UA-XXXXX-X"){_gaq.push(function(){var c=_gat._getTrackerByName();var b=c._getAccount();if(b=="UA-XXXXX-X"){delete b}})}}};if(typeof(stLight)=="undefined"&&typeof(SHARETHIS)=="undefined"){var stRecentServices=false;var betaBlacklist=["computerworld.com","networkworld.com","cio.com","infoworld.com","forbes.com","perezhilton.com","pgestore.com","thepostgame.com"];if(typeof(switchTo5x)=="undefined"){switchTo5x=false;var rNumFor5x=cookie.getCookie("__switchTo5x");if(rNumFor5x==false){var rNumFor5x=1+Math.floor(Math.random()*100);cookie.setCookie("__switchTo5x",rNumFor5x,"300")}var testLimitFor5x=0;if(rNumFor5x<=testLimitFor5x){switchTo5x=true}for(var i=0;i<betaBlacklist.length;i++){if(document.domain.search(betaBlacklist[i])!="-1"){switchTo5x=false;break}}}stLight=new function(){this.publisher=null;this.sessionID_time=(new Date()).getTime().toString();this.sessionID_rand=Number(Math.random().toPrecision(5).toString().substr(2)).toString();this.sessionID=this.sessionID_time+"."+this.sessionID_rand;this.fpc=null;this.counter=0;this.readyRun=false;this.meta={hostname:document.location.host,location:document.location.pathname};this.loadedFromBar=false;this.clickCallBack=false};stLight.onReady=function(){if(stLight.readyRun==true){return false}stLight.processSTQ();stLight.readyRun=true;if(stLight.publisher==null){if(typeof(window.console)!=="undefined"){try{console.log("Please specify a ShareThis Publisher Key \nFor help, contact support@sharethis.com")}catch(a){}}}var b="share4x";if(switchTo5x){b="share5x"}if(stLight.hasButtonOnPage()){if(stLight.loadedFromBar){if(switchTo5x){b="bar_share5x"}else{b="bar_share4x"}}}else{if(stLight.loadedFromBar){b="bar"}}stLight.log("pview",b,"");stWidget.options.sessionID=stLight.sessionID;stWidget.options.fpc=stLight.fpc;stButtons.onReady()};stLight.log=function(d,e,c){var f=(("https:"==document.location.protocol)?"https://l.":"http://l.")+"sharethis.com/log?event=";if(d=="pview"){f=(("https:"==document.location.protocol)?"https://l.":"http://l.")+"sharethis.com/pview?event="}var a=stLight.dbrInfo();if(a==false){a=""}f+=d;f+="&source="+e;if(c!=""){f+="&type="+c}f+="&publisher="+encodeURIComponent(stLight.publisher)+"&hostname="+encodeURIComponent(stLight.meta.hostname)+"&location="+encodeURIComponent(stLight.meta.location)+"&url="+encodeURIComponent(document.location.href)+"&sessionID="+stLight.sessionID+"&fpc="+stLight.fpc+"&ts"+(new Date()).getTime()+"."+stLight.counter+++a;var b=new Image(1,1);b.src=f;b.onload=function(){return};if(d=="pview"){stLight.createSegmentFrame()}};stLight._stFpc=function(){if(!document.domain||document.domain.search(/\.gov/)>0){return false}var g=stLight._stGetFpc("__unam");if(g==false){var c=Math.round(Math.random()*2147483647);c=c.toString(16);var h=(new Date()).getTime();h=h.toString(16);var e="";var a=stLight._stGetD();a=a.split(/\./)[1];if(!a){return false}e=stLight._stdHash(a)+"-"+h+"-"+c+"-1";g=e;stLight._stSetFpc(g)}else{var b=g;var f=b.split(/\-/);if(f.length==4){var d=Number(f[3]);d++;b=f[0]+"-"+f[1]+"-"+f[2]+"-"+d;g=b;stLight._stSetFpc(g)}}return g};stLight._stSetFpc=function(g){var a="__unam";var c=new Date;var j=c.getFullYear();var f=c.getMonth()+9;var h=c.getDate();var d=a+"="+escape(g);if(j){var b=new Date(j,f,h);d+="; expires="+b.toGMTString()}var e=stLight._stGetD();d+="; domain="+escape(e)+";path=/";document.cookie=d};stLight._stGetD=function(){var b=document.domain.split(/\./);var a="";if(b.length>1){a="."+b[b.length-2]+"."+b[b.length-1]}return a};stLight._stGetFpc=function(b){var a=document.cookie.match("(^|;) ?"+b+"=([^;]*)(;|$)");if(a){return(unescape(a[2]))}else{return false}};stLight._stdHash=function(a){var e=0,d=0;for(var c=a.length-1;c>=0;c--){var b=parseInt(a.charCodeAt(c));e=((e<<8)&268435455)+b+(b<<12);if((d=e&161119850)!=0){e=(e^(d>>20))}}return e.toString(16)};stLight._thisScript=null;stLight.getShareThisLightScript=function(){var d=document.getElementsByTagName("script");var c=null;for(var b=0;b<d.length;b++){var a=d[b].src;if(a.search(/.*sharethis.*\/button\/light.*/)>=0){c=d[b]}}return c};stLight.dbrInfo=function(){var a=document.referrer;var d=new RegExp(document.domain,"gi");if(d.test(a)==true){return false}if(a&&a.length>0){var c=/(http:\/\/)(.*?)\/.*/i;var b=/(^.*\?)(.*)/ig;var g="";var f=a.replace(c,"$2");if(f.length>0){g+="&refDomain="+f}else{return false}var e=a.replace(b,"$2");if(e.length>0){g+="&refQuery="+encodeURIComponent(e)}return g}else{return false}};stLight.odjs=function(a,b){this.head=document.getElementsByTagName("head")[0];this.scriptSrc=a;this.script=document.createElement("script");this.script.setAttribute("type","text/javascript");this.script.setAttribute("src",this.scriptSrc);this.script.onload=b;this.script.onreadystatechange=function(){if(this.readyState=="complete"){b()}};this.head.appendChild(this.script)};stLight.createSegmentFrame=function(){try{stLight.segmentframe=document.createElement('<iframe name="stframe" allowTransparency="true" style="body{background:transparent;}" ></iframe>')}catch(b){stLight.segmentframe=document.createElement("iframe")}stLight.segmentframe.id="stSegmentFrame";stLight.segmentframe.name="stSegmentFrame";var c=document.body;var a=(("https:"==document.location.protocol)?"https://seg.":"http://seg.")+"sharethis.com/getSegment.php?purl="+encodeURIComponent(document.location.href)+"&jsref="+encodeURIComponent(document.referrer)+"&rnd="+(new Date()).getTime();stLight.segmentframe.src=a;stLight.segmentframe.frameBorder="0";stLight.segmentframe.scrolling="no";stLight.segmentframe.width="0px";stLight.segmentframe.height="0px";stLight.segmentframe.setAttribute("style","display:none;");c.appendChild(stLight.segmentframe)};stLight.fpc=stLight._stFpc();stLight.options=function(a){if(a&&a.publisher){stLight.publisher=a.publisher}if(a&&a.loadedFromBar){stLight.loadedFromBar=a.loadedFromBar}if(a&&a.clickCallBack&&typeof(a.clickCallBack)=="function"){stLight.clickCallBack=a.clickCallBack}for(var b in a){if(stWidget.options.hasOwnProperty(b)&&a[b]!==null){stWidget.options[b]=a[b]}}};stLight.hasButtonOnPage=function(){var d=document.getElementsByTagName("*");var c=new RegExp(/^st_(.*?)$/);var a=d.length;for(var b=0;b<a;b++){if(typeof(d[b].className)=="string"&&d[b].className!=""){if(d[b].className.match(c)&&d[b].className.match(c).length>=2&&d[b].className.match(c)[1]){return true}}}return false}}var stButtons={};stButtons.smartifyButtons=function(a){if(typeof(a)!="undefined"&&a!="undefined"){stRecentServices=a;for(var b in stRecentServices){stRecentServices[b].processed=false}}stButtons.completeInit()};stButtons.makeButton=function(p){var f=p.service;var z=p.text;if(z==null&&(p.type=="vcount"||p.type=="hcount")){z="Share"}if(f=="fb_like"){f="fblike"}else{if(f=="fblike_fbLong"){f="fblike";p.type="fbLong"}}var g=stWidget.ogurl?stWidget.ogurl:document.location.href;g=p.url?p.url:g;var C=stWidget.ogtitle?stWidget.ogtitle:document.title;C=p.title?p.title:C;var e=(p.thumbnail&&p.thumbnail!=null)?p.thumbnail:stWidget.ogimg;var K=stWidget.desc?stWidget.desc:"";K=stWidget.ogdesc?stWidget.ogdesc:stWidget.desc;K=(p.description&&p.description!=null)?p.description:K;if(/(http|https):\/\//.test(g)==false){g=decodeURIComponent(g);C=decodeURIComponent(C)}if(/(http|https):\/\//.test(g)==false){g=decodeURIComponent(g);C=decodeURIComponent(C)}var P=document.createElement("span");P.setAttribute("style","text-decoration:none;color:#000000;display:inline-block;cursor:pointer;");P.className="stButton";if(p.type=="custom"){p.element.onclick=function(){var Q=document.createElement("form");Q.setAttribute("method","GET");Q.setAttribute("action","http://wd.sharethis.com/api/sharer.php");Q.setAttribute("target","_blank");var R={url:g,title:C,destination:f,publisher:stLight.publisher,fpc:stLight.fpc,sessionID:stLight.sessionID};if(typeof(e)!="undefined"&&e!=null){R.image=e}if(typeof(K)!="undefined"&&K!=null){R.desc=K}R.service=p.service;R.type=p.type;for(var b in R){var a=document.createElement("input");a.setAttribute("type","hidden");a.setAttribute("name",b);a.setAttribute("value",R[b]);Q.appendChild(a)}document.body.appendChild(Q);Q.submit()};return false}if(!((f=="email"||f=="sharethis")||(switchTo5x&&(f=="facebook"||f=="twitter"||f=="gbuzz"||f=="yahoo"||f=="linkedin")))){P.onclick=function(){var R=this.getElementsByTagName("*");for(var Q=0;Q<R.length;Q++){if(R[Q].className=="stBubble_hcount"||R[Q].className=="stBubble_count"){if(!isNaN(R[Q].innerHTML)){R[Q].innerHTML=Number(R[Q].innerHTML)+1}}}if(stWidget.options.tracking){shareLog(f)}var S=document.createElement("form");S.setAttribute("method","GET");S.setAttribute("action","http://wd.sharethis.com/api/sharer.php");S.setAttribute("target","_blank");var T={url:g,title:C,destination:f,publisher:stLight.publisher,fpc:stLight.fpc,sessionID:stLight.sessionID};if(typeof(e)!="undefined"&&e!=null){T.image=e}if(typeof(K)!="undefined"&&K!=null){T.desc=K}T.service=p.service;T.type=p.type;for(var b in T){var a=document.createElement("input");a.setAttribute("type","hidden");a.setAttribute("name",b);a.setAttribute("value",T[b]);S.appendChild(a)}document.body.appendChild(S);S.submit()}}if(f=="fblike"){try{var y=document.createElement('<iframe name="stLframe" scrolling="no" frameBorder="0" allowTransparency="true" style="body{background:transparent;}" ></iframe>')}catch(L){y=document.createElement("iframe");y.allowTransparency="true";y.setAttribute("allowTransparency","true");y.frameBorder="0";y.setAttribute("frameBorder","0");y.scrolling="no";y.setAttribute("scrolling","no")}var O="http://wd.sharethis.com/api/sharer.php?destination=fblike&url="+encodeURIComponent(g);var B="button_count";var h=(navigator.userAgent.indexOf("Safari")!=-1&&navigator.userAgent.indexOf("Chrome")==-1);if(p.type=="vcount"){B="box_count";h?y.setAttribute("style","border:none; overflow:hidden; width:55px; height:65px; position:relative; top:10px;"):y.setAttribute("style","border:none; overflow:hidden; width:55px; height:65px; position:relative; top:12px;");y.width="55px";y.height="65px"}else{if(p.type=="fbLong"){B="standard";y.setAttribute("style","border:none; position:relative;vertical-align:text-top;width:300px; height:29px; ");y.width="300px";y.height="29px"}else{h?y.setAttribute("style","border:none; overflow:hidden; width:90px; height:21px; position:relative; top:7px;"):y.setAttribute("style","border:none; overflow:hidden; width:90px; height:21px; position:relative; top:7px;");y.width="90px";y.height="21px"}}y.src="http://www.facebook.com/plugins/like.php?href="+encodeURIComponent(O)+"&layout="+B+"&show_faces=false&width=90&action=like&colorscheme=light&height=21";return y}if(f=="plusone"){stButtons.loadPlusone=true;var x=document.createElement("div");x.innerHTML="&nbsp;";var q=(navigator.userAgent.indexOf("MSIE 7.0")!=-1);var h=(navigator.userAgent.indexOf("Safari")!=-1&&navigator.userAgent.indexOf("Chrome")==-1);var G="display:inline-block;overflow:hidden;line-height:0px;vertical-align:bottom;";var v="overflow:hidden;zoom:1;display:inline;vertical-align:bottom;";var d=document.createElement("g:plusone");d.setAttribute("href",g);if(p.type=="vcount"){d.setAttribute("size","tall");h?x.setAttribute("style",G+"width:55px; height:63px;"):x.setAttribute("style",G+"width:55px; height:61px;");q&&x.style.setAttribute?x.style.setAttribute("cssText",v+"width:55px; height:61px;",0):null}else{if(p.type=="hcount"){d.setAttribute("size","medium");d.setAttribute("count","true");h?x.setAttribute("style",G+"width:90px; height:26px;"):x.setAttribute("style",G+"width:90px; height:21px;");q&&x.style.setAttribute?x.style.setAttribute("cssText",v+"width:90px; height:21px;",0):null}else{if(p.type=="button"){d.setAttribute("size","medium");d.setAttribute("count","false");h?x.setAttribute("style",G+"width:36px; height:22px;"):x.setAttribute("style",G+"width:36px; height:21px;");q&&x.style.setAttribute?x.style.setAttribute("cssText",v+"width:36px; height:21px;",0):null}else{if(p.type=="large"){d.setAttribute("size","medium");d.setAttribute("count","false");x.setAttribute("style",G+"width:36px; height:32px;");q&&x.style.setAttribute?x.style.setAttribute("cssText",v+"width:36px; height:32px;",0):null}else{d.setAttribute("size","small");d.setAttribute("count","false");x.setAttribute("style",G+"width:36px; height:21px;");q&&x.style.setAttribute?x.style.setAttribute("cssText",v+"width:36px; height:21px;",0):null}}}}x.appendChild(d);d.setAttribute("callback","plusoneCallback");return x}if(p.type=="chicklet"){var D=document.createElement("span");D.className="chicklets "+f;if(z==null){D.innerHTML="&nbsp;"}else{D.appendChild(document.createTextNode(z))}P.appendChild(D);return P}else{if(p.type=="large"){var D=document.createElement("span");D.className="stLarge";var j=("https:"==document.location.protocol)?"https://ws.sharethis.com/images/":"http://w.sharethis.com/images/";D.style.backgroundImage="url('"+j+f+"_32.png')";P.appendChild(D);return P}else{if(p.type=="pcount"||p.type=="stbar"||p.type=="stsmbar"){var u=document.createElement("span");var D=document.createElement("span");if(p.type=="stsmbar"){D.className="stSmBar";var j=("https:"==document.location.protocol)?"https://ws.sharethis.com/images/":"http://w.sharethis.com/images/";D.style.backgroundImage="url('"+j+f+"_16.png')"}else{D.className="stLarge";var j=("https:"==document.location.protocol)?"https://ws.sharethis.com/images/":"http://w.sharethis.com/images/";D.style.backgroundImage="url('"+j+f+"_32.png')"}u.appendChild(D);var n=document.createElement("span");var N=document.createElement("div");if(p.type=="stsmbar"){N.className="stBubbleSmHoriz"}else{N.className="stBubbleSm"}N.setAttribute("id","stBubble_"+p.count);N.style.visibility="hidden";var J=document.createElement("div");J.className="stBubble_count_sm";N.appendChild(J);n.appendChild(N);n.appendChild(u);P.appendChild(n);stButtons.getCount(g,f,J);u.onmouseover=function(){var a=document.getElementById("stBubble_"+p.count);a.style.visibility="visible"};u.onmouseout=function(){var a=document.getElementById("stBubble_"+p.count);a.style.visibility="hidden"};return P}else{if(p.type=="button"||p.type=="vcount"||p.type=="hcount"){var u=document.createElement("span");u.className="stButton_gradient";var A=document.createElement("span");A.className="chicklets "+f;if(z==null){A.innerHTML="&nbsp;"}else{A.appendChild(document.createTextNode(z))}u.appendChild(A);if(f=="twitter"){var H=document.createElement("span");H.className="stTwbutton";H.innerHTML="&nbsp;";u=H}else{if(f=="facebook"){var o=document.createElement("span");o.className="stFb";o.innerHTML="&nbsp;";u=o}}if(p.type=="vcount"){var n=document.createElement("div");var N=document.createElement("div");N.className="stBubble";var J=document.createElement("div");J.className="stBubble_count";N.appendChild(J);n.appendChild(N);n.appendChild(u);P.appendChild(n);stButtons.getCount(g,f,J)}else{if(p.type=="hcount"){var n=document.createElement("span");var F=document.createElement("span");F.className="stButton_gradient stHBubble";var m=document.createElement("span");m.className="stButton_left";m.innerHTML="&nbsp;";var r=document.createElement("span");r.className="stButton_right";r.innerHTML="&nbsp;";var J=document.createElement("span");J.className="stBubble_hcount";F.appendChild(J);n.appendChild(u);var w=document.createElement("span");w.className="stArrow";w.appendChild(F);n.appendChild(w);P.appendChild(n);stButtons.getCount(g,f,J)}else{P.appendChild(u)}}}else{if(p.type=="css"){var u=document.createElement("div");u.className="stCSSButton";if(p.cssType=="cssV"){var t=document.createElement("div");t.className="stCSSVBubble";var E=document.createElement("div");E.className="stCSSVBubble_count";t.appendChild(E);var k=document.createElement("div");k.className="stCSSVArrow";var I=document.createElement("div");I.className="stCSSVArrowBorder";I.appendChild(k);P.appendChild(t);P.appendChild(I);stButtons.getCount(g,f,E)}var c=document.createElement("div");c.className="stCSSSprite "+f;c.innerHTML="&nbsp;";var D=document.createElement("span");D.className="stCSSText";if(z==null){D.innerHTML="&nbsp;"}else{D.appendChild(document.createTextNode(z))}u.appendChild(c);u.appendChild(D);P.appendChild(u);if(p.cssType=="cssH"){var s=document.createElement("div");s.className="stCSSHBubble";var E=document.createElement("div");E.className="stCSSHBubble_count";s.appendChild(E);var M=document.createElement("div");M.className="stCSSHArrow";var l=document.createElement("div");l.className="stCSSHArrowBorder";l.appendChild(M);P.appendChild(l);P.appendChild(s);stButtons.getCount(g,f,E)}}}}}}return P};stButtons.getCount=function(c,a,d){var b=false;if(d&&d!==null){while(d.childNodes.length>=1){try{d.removeChild(d.firstChild)}catch(e){}}}stButtons.cbQueue.push({url:c,service:a,element:d});stButtons.getCountsFromService(c,a,d)};stButtons.processCB=function(b){if(!(b)){return}stButtons.storedCountResponse=b;var a=false;for(var c=0;c<stButtons.cbQueue.length;c++){var e=stButtons.cbQueue[c];if(b.ourl==e.url){var f="";try{if(e.service=="sharethis"){if(stWidget.options.newOrZero=="zero"){f=(b.total>0)?stButtons.human(b.total):"0"}else{f=(b.total>0)?stButtons.human(b.total):"New"}}else{if(e.service=="facebook"&&typeof(b.facebook2)!="undefined"){f=stButtons.human(b.facebook2)}else{if(typeof(b[e.service])!="undefined"){f=(b[e.service]>0)?stButtons.human(b[e.service]):"0"}else{f="0"}}}e.element.innerHTML=f;if(/stHBubble/.test(e.element.parentNode.className)==true){e.element.parentNode.style.display="inline-block"}else{e.element.parentNode.style.display="block"}}catch(d){}a=true}}};stButtons.human=function(a){if(a>=10000){a=a/100;a=Math.round(a);a=a/10;a=a+"K"}return a};stButtons.locateElements=function(c){var D=document.getElementsByTagName("*");var C=[];var F=new RegExp(/st_(.*?)_custom/);var E=new RegExp(/st_(.*?)_vcount/);var A=new RegExp(/st_(.*?)_hcount/);var v=new RegExp(/st_(.*?)_button/);var u=new RegExp(/st_(.*?)_large/);var s=new RegExp(/st_(.*?)_pcount/);var p=new RegExp(/st_(.*?)_stbar/);var n=new RegExp(/st_(.*?)_stsmbar/);var m=new RegExp(/st_(.*?)_css/);var a=new RegExp(/^st_(.*?)$/);var t=D.length;var o=0,g,l,w,b=[],G=false;if(typeof(stRecentServices)!="undefined"&&stRecentServices!="undefined"&&stRecentServices!="false"&&stRecentServices){G=true}for(var r=0;r<t;r++){g="";l=false;w=false;if(typeof(D[r].className)=="string"&&D[r].className!=""){if(D[r].className.match(F)&&D[r].className.match(F).length>=2&&D[r].className.match(F)[1]){if(stButtons.testElem(D[r])==false){w=true;g=D[r].className.match(F)[1];C.push({service:g,element:D[r],url:D[r].getAttribute("st_url"),title:D[r].getAttribute("st_title"),image:(D[r].getAttribute("st_img")!=null)?D[r].getAttribute("st_img"):D[r].getAttribute("st_image"),summary:D[r].getAttribute("st_summary"),text:D[r].getAttribute("displayText"),type:"custom"});D[r].setAttribute("st_processed","yes")}}else{if(D[r].className.match(E)&&D[r].className.match(E).length>=2&&D[r].className.match(E)[1]){if(stButtons.testElem(D[r])==false){w=true;g=D[r].className.match(E)[1];C.push({service:g,element:D[r],url:D[r].getAttribute("st_url"),title:D[r].getAttribute("st_title"),image:(D[r].getAttribute("st_img")!=null)?D[r].getAttribute("st_img"):D[r].getAttribute("st_image"),summary:D[r].getAttribute("st_summary"),text:D[r].getAttribute("displayText"),type:"vcount"});D[r].setAttribute("st_processed","yes")}}else{if(D[r].className.match(A)&&D[r].className.match(A).length>=2&&D[r].className.match(A)[1]){if(stButtons.testElem(D[r])==false){w=true;g=D[r].className.match(A)[1];C.push({service:g,element:D[r],url:D[r].getAttribute("st_url"),title:D[r].getAttribute("st_title"),image:(D[r].getAttribute("st_img")!=null)?D[r].getAttribute("st_img"):D[r].getAttribute("st_image"),summary:D[r].getAttribute("st_summary"),text:D[r].getAttribute("displayText"),type:"hcount"});D[r].setAttribute("st_processed","yes")}}else{if(D[r].className.match(v)&&D[r].className.match(v).length>=2&&D[r].className.match(v)[1]){if(stButtons.testElem(D[r])==false){w=true;g=D[r].className.match(v)[1];C.push({service:g,element:D[r],url:D[r].getAttribute("st_url"),title:D[r].getAttribute("st_title"),image:(D[r].getAttribute("st_img")!=null)?D[r].getAttribute("st_img"):D[r].getAttribute("st_image"),summary:D[r].getAttribute("st_summary"),text:D[r].getAttribute("displayText"),type:"button"});D[r].setAttribute("st_processed","yes")}}else{if(D[r].className.match(u)&&D[r].className.match(u).length>=2&&D[r].className.match(u)[1]){if(stButtons.testElem(D[r])==false){w=true;g=D[r].className.match(u)[1];C.push({service:g,element:D[r],url:D[r].getAttribute("st_url"),title:D[r].getAttribute("st_title"),image:(D[r].getAttribute("st_img")!=null)?D[r].getAttribute("st_img"):D[r].getAttribute("st_image"),summary:D[r].getAttribute("st_summary"),text:D[r].getAttribute("displayText"),type:"large"});D[r].setAttribute("st_processed","yes")}}else{if(D[r].className.match(s)&&D[r].className.match(s).length>=2&&D[r].className.match(s)[1]){if(stButtons.testElem(D[r])==false){w=true;g=D[r].className.match(s)[1];C.push({service:g,element:D[r],url:D[r].getAttribute("st_url"),title:D[r].getAttribute("st_title"),image:(D[r].getAttribute("st_img")!=null)?D[r].getAttribute("st_img"):D[r].getAttribute("st_image"),summary:D[r].getAttribute("st_summary"),text:D[r].getAttribute("displayText"),type:"pcount",count:r});D[r].setAttribute("st_processed","yes")}}else{if(D[r].className.match(p)&&D[r].className.match(p).length>=2&&D[r].className.match(p)[1]){if(stButtons.testElem(D[r])==false){w=true;g=D[r].className.match(p)[1];C.push({service:g,element:D[r],url:D[r].getAttribute("st_url"),title:D[r].getAttribute("st_title"),image:(D[r].getAttribute("st_img")!=null)?D[r].getAttribute("st_img"):D[r].getAttribute("st_image"),summary:D[r].getAttribute("st_summary"),text:D[r].getAttribute("displayText"),type:"stbar",count:r});D[r].setAttribute("st_processed","yes")}}else{if(D[r].className.match(n)&&D[r].className.match(n).length>=2&&D[r].className.match(n)[1]){if(stButtons.testElem(D[r])==false){w=true;g=D[r].className.match(n)[1];C.push({service:g,element:D[r],url:D[r].getAttribute("st_url"),title:D[r].getAttribute("st_title"),image:(D[r].getAttribute("st_img")!=null)?D[r].getAttribute("st_img"):D[r].getAttribute("st_image"),summary:D[r].getAttribute("st_summary"),text:D[r].getAttribute("displayText"),type:"stsmbar",count:r});D[r].setAttribute("st_processed","yes")}}else{if(D[r].className.match(m)&&D[r].className.match(m).length>=2&&D[r].className.match(m)[1]){if(stButtons.testElem(D[r])==false){w=true;g=D[r].className.match(m)[1];var B=D[r].className.split("_");C.push({service:g,element:D[r],url:D[r].getAttribute("st_url"),title:D[r].getAttribute("st_title"),image:(D[r].getAttribute("st_img")!=null)?D[r].getAttribute("st_img"):D[r].getAttribute("st_image"),summary:D[r].getAttribute("st_summary"),text:D[r].getAttribute("displayText"),type:"css",cssType:B[B.length-1]});D[r].setAttribute("st_processed","yes")}}else{if(D[r].className.match(a)&&D[r].className.match(a).length>=2&&D[r].className.match(a)[1]){if(stButtons.testElem(D[r])==false){w=true;g=D[r].className.match(a)[1];C.push({service:g,element:D[r],url:D[r].getAttribute("st_url"),title:D[r].getAttribute("st_title"),image:(D[r].getAttribute("st_img")!=null)?D[r].getAttribute("st_img"):D[r].getAttribute("st_image"),summary:D[r].getAttribute("st_summary"),text:D[r].getAttribute("displayText"),type:"chicklet"});D[r].setAttribute("st_processed","yes")}}}}}}}}}}}if(G){if(w){for(o=0;o<b.length;o++){if(b[o].service==g){b[o].count++;l=true}}if(!l){b.push({service:g,count:1,doNotReplace:false,processed:false})}}}}}if(G){var j=[];for(var f=b.length-1;f>=0;f--){if(b[f].service=="sharethis"||b[f].doNotReplace){b[f].processed=true;continue}else{for(var e in stRecentServices){var h=false;if(!stRecentServices[e].processed){for(var q=0;q<b.length;q++){if(e==b[q].service&&!b[q].processed){h=true;b[q].doNotReplace=true;stRecentServices[e].processed=true;break}}if(h){b[f].processed=true}else{j.push({oldService:b[f].service,newService:e});for(var d=0;d<C.length;d++){if(C[d].service==b[f].service){C[d].service=e;C[d].text=stRecentServices[e].title;C[d].element.setAttribute("displayText",stRecentServices[e].title);C[d].element.className=C[d].element.className.replace(b[f].service,e)}}stRecentServices[e].processed=true;b[f].processed=true;break}}}}}}for(var r=0;r<C.length;r++){stWidget.addEntry(C[r])}};stButtons.odcss=function(a,b){this.head=document.getElementsByTagName("head")[0];this.scriptSrc=a;this.css=document.createElement("link");this.css.setAttribute("rel","stylesheet");this.css.setAttribute("type","text/css");this.css.setAttribute("href",this.scriptSrc);setTimeout(function(){b()},500);this.head.appendChild(this.css)};stButtons.makeButtons=function(){if(typeof(stButtons.button_css_called)=="undefined"){var a=(("https:"==document.location.protocol)?"https://ws.sharethis.com/button/css/buttons-secure.css":"http://w.sharethis.com/button/css/buttons.css");stButtons.odcss(a,function(){});stButtons.button_css_called=true}stButtons.locateElements()};stButtons.getPlusOneFromGoogle=function(){if(stButtons.plusOneLoaded==false){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","https://apis.google.com/js/plusone.js");document.getElementsByTagName("head")[0].appendChild(a);a.onload=function(){gapi.plusone.go();stButtons.plusOneLoaded=true};a.onreadystatechange=function(){if(this.readyState=="complete"){gapi.plusone.go();stButtons.plusOneLoaded=true}}}else{gapi.plusone.go()}};stButtons.addCount=function(a){stButtons.counts.push(a)};stButtons.getCountsFromService=function(c,b,d){if(stButtons.checkQueue(c)==false){var a=a+"-"+stButtons.cbVal;a="stButtons.processCB";stButtons.cbVal++;var e=(("https:"==document.location.protocol)?"https://ws.sharethis.com/api/getCount2.php?cb="+a+"&url=":"http://wd.sharethis.com/api/getCount2.php?cb="+a+"&url=");stLight.odjs(e+encodeURIComponent(c),function(){});stButtons.queue.push(c)}};stButtons.checkQueue=function(a){for(var b=0;b<stButtons.queue.length;b++){if(stButtons.queue[b]==a){return true}}return false};stButtons.testElem=function(b){var a=false;if(b.getAttribute("st_processed")!=null){return true}else{return false}};function Shareable(c){var a={};a.facebook="450";a.twitter="684";a.yahoo="500";a.gbuzz="550";a.linkedin="600";var b={};b.facebook="300";b.twitter="718";b.yahoo="460";b.gbuzz="400";b.linkedin="433";this.idx=-1;this.url=null;this.title=null;this.image=null;this.element=null;this.service=null;this.screen="home";this.summary=null;this.content=null;this.buttonText=null;this.frag=null;this.onhover=true;this.type=null;var d=this;var e=false;this.attachButton=function(f){this.element=f;if((this.onhover==true||this.onhover=="true")&&(this.popup==false||this.popup=="false")&&((!switchTo5x)||(switchTo5x&&(c.service=="sharethis"||c.service=="email")))){f.onmouseover=this.mouseOn;f.onmouseout=this.mouseOut}f.onclick=function(){if(switchTo5x){if(c&&(c.service=="yahoo"||c.service=="buzz"||c.service=="facebook"||c.service=="twitter"||c.service=="gbuzz"||c.service=="linkedin")){if(c.service=="buzz"||c.service=="gbuzz"){oAuthURL="http://rest.sharethis.com/auth/getOAuth.php?provider=buzz&linking=true&pub_key=12be4dda-f838-40e0-b748-f78357a63cc8&access_key=96ba6b476151d07e675125a7cc8ec0ea&redirect_url=http://sharethis.com"}else{oAuthURL="http://sharethis.com/account/linking?provider="+c.service}window.open(oAuthURL,"AccountLinkingWindow","status=1, height="+b[c.service]+", width="+a[c.service]+", resizable=0")}}d.popup()}};this.init=function(){stWidget.merge(this,c);stWidget.shareables.push(this);if(c.element!==null){this.attachButton(c.element)}};return this}var stWidget=new function(){this.shareables=[];this.entries=0;this.widgetOpen=false;this.mouseOnTimer=null;this.mouseOutTimer=null;this.frameReady=false;if(switchTo5x){this.frameUrl=(("https:"==document.location.protocol)?"https://ws.sharethis.com/secure5x/index.html":"http://edge.sharethis.com/share5x/index.e2ffc6314fedd00707a013789e72990d.html")}else{this.frameUrl=(("https:"==document.location.protocol)?"https://ws.sharethis.com/secure/index.html":"http://edge.sharethis.com/share4x/index.75b569a75a17eaa05c9e6a5ce5631fad.html")}this.secure=false;try{this.mainstframe=document.createElement('<iframe name="stLframe" allowTransparency="true" style="body{background:transparent;}" ></iframe>');this.mainstframe.onreadystatechange=function(){if(stWidget.mainstframe.readyState==="complete"){stWidget.frameReady=true}}}catch(a){this.mainstframe=document.createElement("iframe");this.mainstframe.allowTransparency="true";this.mainstframe.setAttribute("allowTransparency","true");this.mainstframe.onload=function(){stWidget.frameReady=true}}this.mainstframe.id="stLframe";this.mainstframe.className="stLframe";this.mainstframe.name="stLframe";this.mainstframe.frameBorder="0";this.mainstframe.scrolling="no";this.mainstframe.width="345px";this.mainstframe.height="450px";this.mainstframe.style.top="0px";this.mainstframe.style.left="0px";this.mainstframe.src="";this.wrapper=document.createElement("div");this.wrapper.id="stwrapper";this.wrapper.className="stwrapper";this.wrapper.style.visibility="hidden";this.wrapper.style.top="-999px";this.wrapper.style.left="-999px";this.closewrapper=document.createElement("div");this.closewrapper.className="stclose";if(switchTo5x){this.mainstframe.width="500px";this.mainstframe.height="430px";this.wrapper.style.top="-999px";this.wrapper.style.left="-999px";this.wrapper.style.width="500px";this.wrapper.style.zIndex=89999999;this.overlay=document.createElement("div");this.overlay.style.height="100%";this.overlay.style.width="100%";this.overlay.style.backgroundColor="#000";this.overlay.style.opacity="0.6";this.overlay.style.filter="Alpha(Opacity=60)";this.overlay.style.position="fixed";if(document.all&&navigator.appVersion.indexOf("MSIE 6.")!=-1){this.overlay.style.position="absolute"}this.overlay.style.display="none";this.overlay.style.left="0";this.overlay.style.top="0";this.overlay.style.zIndex=89999990;this.overlay.setAttribute("id","stOverlay");this.closewrapper.className="stCloseNew2"}this.closewrapper.onclick=function(){stWidget.closeWidget()};this.wrapper.appendChild(this.closewrapper);this.wrapper.appendChild(this.mainstframe);this.ogtitle=null;this.ogdesc=null;this.ogurl=null;this.ogimg=null;this.ogtype=null;this.desc=null;this.initFire=false;this.merge=function(d,c){for(var b in c){if(d.hasOwnProperty(b)&&c[b]!==null){d[b]=c[b]}}};this.oldScroll=0;this.init=function(){if(stWidget.initFire==false){stWidget.initFire=true;window.frames.stLframe.location.replace(stWidget.frameUrl+stWidget.createFrag(null,"init"))}}};stWidget.options=new function(){this.fpc=stLight.fpc;this.sessionID=null;this.publisher=null;this.tracking=true;this.send_services=null;this.exclusive_services=null;this.headerTitle=null;this.headerfg=null;this.headerbg=null;this.offsetLeft=null;this.offsetTop=null;this.onhover=true;this.autoclose=true;this.autoPosition=true;this.embeds=false;this.doneScreen=true;this.minorServices=true;this.excludeServices=null;this.theme=1;this.serviceBarColor=null;this.shareButtonColor=null;this.footerColor=null;this.headerTextColor=null;this.helpTextColor=null;this.mainWidgetColor=null;this.textBoxFontColor=null;this.textRightToLeft=false;this.shorten=true;this.popup=false;this.newOrZero="new";this.publisherGA=null};stWidget.addEntry=function(a){if(!a.element){return false}if(a&&((a.service=="email"||a.service=="sharethis")||(switchTo5x&&(a.service=="facebook"||a.service=="twitter"||a.service=="gbuzz"||a.service=="yahoo"||a.service=="linkedin")))){openWidget=true}else{openWidget=false}if(!openWidget){if(a.type!=="custom"){a.element.appendChild(stButtons.makeButton(a));if(a.service=="plusone"){stButtons.getPlusOneFromGoogle()}}else{if(!(a.type=="custom"&&a.service=="sharethis")){stButtons.makeButton(a)}}return true}else{if(a.type!="custom"){a.element.appendChild(stButtons.makeButton(a));if(a.service=="plusone"){stButtons.getPlusOneFromGoogle()}}else{if(!(a.type=="custom"&&a.service=="sharethis")){stButtons.makeButton(a)}}var b=new Shareable(a);b.idx=stWidget.entries;stWidget.entries++;b.publisher=stLight.publisher;b.sessionID=stLight.sessionID;b.fpc=stLight.fpc;if(a.element.image==null&&stWidget.ogimg!=null){b.image=stWidget.ogimg}if(a.element.summary==null&&stWidget.ogdesc!=null){b.summary=stWidget.ogdesc}else{if(a.element.summary==null&&stWidget.desc!=null){b.summary=stWidget.desc}}b.url=stWidget.ogurl?stWidget.ogurl:document.location.href;b.url=a.url?a.url:b.url;b.title=stWidget.ogtitle?stWidget.ogtitle:document.title;b.title=a.title?a.title:b.title;stWidget.merge(b,stWidget.options);if(typeof(stWidget.options.textRightToLeft)!="undefined"&&stWidget.options.textRightToLeft!="null"&&stWidget.options.textRightToLeft==true){document.getElementById("stwrapper").style.top="auto";document.getElementById("stwrapper").style.left="auto"}b.mouseOn=function(){stWidget.mouseOnTimer=setTimeout(b.popup,500)};b.mouseOut=function(){clearInterval(stWidget.mouseOnTimer)};b.popup=function(){if(stWidget.widgetOpen==false){var d="share4x";if(switchTo5x){d="share5x";try{if(stLight.clickCallBack!=false){stLight.clickCallBack(a.service)}}catch(c){}}if(a.type=="stbar"||a.type=="stsmbar"){d="bar"}stLight.log("widget",d,a.service+"_"+a.type);if(stWidget.options.popup&&!switchTo5x){window.open(stWidget.frameUrl+stWidget.createFrag(b),"newstframe","status=1,toolbar=0,width=345,height=375")}else{if(stWidget.options.popup&&switchTo5x){var e="http://sharethis.com/share?url="+b.url;window.open(e,"newstframe","status=1,toolbar=0,width=820,height=950")}else{window.frames.stLframe.location.replace(stWidget.frameUrl+stWidget.createFrag(b));stWidget.positionWidget(b);if(stWidget.options.embeds==false){stWidget.hideEmbeds()}setTimeout(function(){stWidget.widgetOpen=true;st_showing=true},200)}}}else{if(stWidget.widgetOpen==true&&stWidget.options.onhover==false){}}return false};b.init();return b}};stWidget.createFrag=function(c,b){var f="#light";if(b=="init"){f="#init";if(stWidget.options.tracking&&stWidget.options.publisherGA==null){if(typeof(pageTracker)!="undefined"&&pageTracker!==null){stWidget.options.publisherGA=pageTracker._getAccount()}else{if(stWidget.options.publisherGA==null&&typeof(__stPubGA)!=="undefined"){stWidget.options.publisherGA=__stPubGA}}}for(var e in stWidget.options){if(stWidget.options.hasOwnProperty(e)==true&&stWidget.options[e]!==null&&typeof(stWidget.options[e])!="function"&&typeof(stWidget.options[e])!="object"){var a=stWidget.options[e];try{a=decodeURIComponent(a);a=decodeURIComponent(a)}catch(d){}f=f+"/"+e+"="+encodeURIComponent(a)}}f=f+"/pUrl="+encodeURIComponent(encodeURIComponent(document.location.href))+((document.title!="")?"/title="+encodeURIComponent(encodeURIComponent(document.title)):"")+"/stLight=true"}else{for(var e in c){if(c.hasOwnProperty(e)==true&&c[e]!==null&&typeof(c[e])!="function"&&typeof(c[e])!="object"&&e!=="idx"){f=f+"/"+e+"-=-"+encodeURIComponent(encodeURIComponent(c[e]))}}if(c.service=="email"){f=f+"/page-=-send"}if(switchTo5x){if(c.service=="facebook"){f=f+"/page-=-fbhome"}else{if(c.service=="twitter"){f=f+"/page-=-twhome"}else{if(c.service=="gbuzz"){f=f+"/page-=-gbhome"}else{if(c.service=="yahoo"){f=f+"/page-=-ybhome"}else{if(c.service=="linkedin"){f=f+"/page-=-lihome"}}}}}}}return f};stWidget.positionWidget=function(o){if(!o){return false}if(!switchTo5x){shareel=o.element;var curleft=curtop=0;if(shareel.offsetParent){curleft=shareel.offsetLeft;curtop=shareel.offsetTop;while(shareel=shareel.offsetParent){curleft+=shareel.offsetLeft;curtop+=shareel.offsetTop}}shareel=o.element;var eltop=0;var elleft=0;var topVal=0;var leftVal=0;var elemH=0;var elemW=0;eltop=curtop+shareel.offsetHeight+5;elleft=curleft+5;topVal=(eltop+(stWidget.options.offsetTop?stWidget.options.offsetTop:0));topVal=eval(topVal);elemH=topVal;topVal+="px";leftVal=(elleft+(stWidget.options.offsetLeft?stWidget.options.offsetLeft:0));leftVal=eval(leftVal);elemW=leftVal;leftVal+="px";stWidget.wrapper.style.top=topVal;stWidget.wrapper.style.left=leftVal;if(stWidget.options.autoPosition==true){stWidget.oldScroll=document.body.scrollTop;var pginfo=stWidget.pageSize();var effectiveH=pginfo.height+pginfo.scrY;var effectiveW=pginfo.width+pginfo.scrX;var widgetH=180;var widgetW=355;var needH=widgetH+elemH;var needW=widgetW+elemW;var diffH=needH-effectiveH;var diffW=needW-effectiveW;var newH=elemH-diffH;var newW=elemW-diffW;function getHW(elem){var retH=0;var retW=0;while(elem!=null){retH+=elem.offsetTop;retW+=elem.offsetLeft;elem=elem.offsetParent}return{height:retH,width:retW}}var buttonPos=getHW(shareel);var leftA,rightA,topA,bottomA=false;if(diffH>0){bottomA=false;topA=true;if((buttonPos.height-widgetH)>0){newH=buttonPos.height-widgetH}stWidget.wrapper.style.top=newH+"px"}if(diffW>0){leftA=false;rightA=true;if((buttonPos.width-widgetW)>0){newW=buttonPos.width-widgetW}stWidget.wrapper.style.left=newW+"px"}}if(stWidget.options.autoPosition=="center"){stWidget.wrapper.style.top="15%";stWidget.wrapper.style.left="35%";stWidget.wrapper.style.position="fixed"}}else{document.getElementById("stOverlay").style.display="block";var topVal;if(stWidget.options.autoPosition==true){if(document.all&&navigator.appVersion.indexOf("MSIE 7.")!=-1){stWidget.wrapper.style.left="500px"}else{stWidget.wrapper.style.left="10%"}stWidget.wrapper.style.right="10%";topVal=(document.documentElement.clientHeight-parseFloat(stWidget.wrapper.offsetHeight)/2)/2;if(topVal>20){topVal=20}else{if(topVal<5){topVal=5}}stWidget.wrapper.style.top=topVal+"px";stWidget.wrapper.style.marginLeft="auto";stWidget.wrapper.style.marginRight="auto";stWidget.wrapper.style.textAlign="left";stWidget.wrapper.style.position="fixed";if(document.all&&navigator.appVersion.indexOf("MSIE 6.")!=-1){stWidget.wrapper.style.left="300px";stWidget.wrapper.style.position="absolute"}}if(stWidget.options.autoPosition=="center"){if(document.all&&navigator.appVersion.indexOf("MSIE 7.")!=-1){stWidget.wrapper.style.left="500px"}else{stWidget.wrapper.style.left="10%"}stWidget.wrapper.style.right="10%";stWidget.wrapper.style.marginLeft="auto";stWidget.wrapper.style.marginRight="auto";stWidget.wrapper.style.position="fixed";topVal=(document.documentElement.clientHeight-parseFloat(stWidget.wrapper.offsetHeight)/2)/2;if(topVal>20){topVal=20}else{if(topVal<5){topVal=5}}stWidget.wrapper.style.top=topVal+"px";if(document.all&&navigator.appVersion.indexOf("MSIE 6.")!=-1){stWidget.wrapper.style.position="absolute"}}}stWidget.wrapper.style.visibility="visible";stWidget.mainstframe.style.visibility="visible"},stWidget.hideWidget=function(){if(stWidget.wrapper.style.visibility!=="hidden"){stWidget.wrapper.style.visibility="hidden"}if(stWidget.mainstframe.style.visibility!=="hidden"){stWidget.mainstframe.style.visibility="hidden"}if(switchTo5x){document.getElementById("stOverlay").style.display="none"}};stWidget.pageSize=function(){var e=[0,0,0,0];var b=0;var a=0;var d=0;var c=0;if(typeof(window.pageYOffset)=="number"){b=window.pageXOffset;a=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){b=document.body.scrollLeft;a=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){b=document.documentElement.scrollLeft;a=document.documentElement.scrollTop}}}if(window.innerWidth){d=window.innerWidth;c=window.innerHeight}else{if(document.documentElement.offsetWidth){d=document.documentElement.offsetWidth;c=document.documentElement.offsetHeight}}e={scrX:b,scrY:a,width:d,height:c};return e};stWidget.closeWidget=function(){if(st_showing==false){return false}st_showing=false;stWidget.widgetOpen=false;stWidget.wrapper.style.visibility="hidden";stWidget.mainstframe.style.visibility="hidden";stWidget.showEmbeds();stWidget.sendEvent("screen","home");if(switchTo5x){document.getElementById("stOverlay").style.display="none"}else{stWidget.wrapper.style.top="-999px";stWidget.wrapper.style.left="-999px"}};stWidget.hideEmbeds=function(){var b=document.getElementsByTagName("embed");for(var a=0;a<b.length;a++){b[a].style.visibility="hidden"}};stWidget.showEmbeds=function(){if(stWidget.options.embeds==true){return true}var b=document.getElementsByTagName("embed");for(var a=0;a<b.length;a++){b[a].style.visibility="visible"}};stWidget.sendEvent=function(a,d){var c="#widget/"+a+"="+d;try{window.frames.stLframe.location.replace(stWidget.frameUrl+c)}catch(b){}};stWidget.getOGTags=function(){var b=document.getElementsByTagName("meta");for(var a=0;a<b.length;a++){if(b[a].getAttribute("property")=="og:title"){stWidget.ogtitle=b[a].getAttribute("content")}else{if(b[a].getAttribute("property")=="og:type"){stWidget.ogtype=b[a].getAttribute("content")}else{if(b[a].getAttribute("property")=="og:url"){stWidget.ogurl=b[a].getAttribute("content")}else{if(b[a].getAttribute("property")=="og:image"){stWidget.ogimg=b[a].getAttribute("content")}else{if(b[a].getAttribute("property")=="og:description"){stWidget.ogdesc=b[a].getAttribute("content")}else{if(b[a].getAttribute("name")=="description"||b[a].getAttribute("name")=="Description"){stWidget.desc=b[a].getAttribute("content")}}}}}}}};function shareLog(a){if(typeof(pageTracker)!="undefined"&&pageTracker!==null){pageTracker._trackEvent("ShareThis",a)}else{if(typeof(_gaq)!="undefined"&&_gaq!==null){_gaq.push(["_trackEvent","ShareThis",a])}else{if(stButtons.publisherTracker!==null){stButtons.publisherTracker._trackEvent("ShareThis",a)}else{if(typeof(_gat)!="undefined"&&_gat!==null){if(typeof(stWidget.options.publisherGA)!="undefined"&&stWidget.options.publisherGA!=null){stButtons.publisherTracker=_gat._getTracker(stWidget.options.publisherGA);stButtons.publisherTracker._trackEvent("ShareThis",a)}}}}}}stButtons.completeInit=function(){if(!stButtons.goToInit){stButtons.goToInit=true;stWidget.getOGTags();document.body.appendChild(stWidget.wrapper);if(switchTo5x){document.body.appendChild(stWidget.overlay)}stButtons.makeButtons();stWidget.init()}};plusoneCallback=function(c){if(c.state=="on"){var a="http://wd.sharethis.com/api/sharer.php?destination=plusone&url="+encodeURIComponent(c.href);a+="&publisher="+encodeURIComponent(stLight.publisher);a+="&hostname="+encodeURIComponent(stLight.meta.hostname);a+="&location="+encodeURIComponent(stLight.meta.location);a+="&ts="+(new Date()).getTime();a+="&sessionID="+stLight.sessionID;a+="&fpc="+stLight.fpc;var b=new Image(1,1);b.src=a;b.onload=function(){return}}};stButtons.trackFB=function(){try{if(FB&&FB.Event&&FB.Event.subscribe){FB.Event.subscribe("edge.create",function(b){stButtons.trackShare("fblike_auto",b)});FB.Event.subscribe("edge.remove",function(b){stButtons.trackShare("fbunlike_auto",b)});FB.Event.subscribe("message.send",function(b){stButtons.trackShare("fbsend_auto",b)})}}catch(a){}};stButtons.trackTwitter=function(){try{if(twttr&&twttr.events&&twttr.events.bind){twttr.events.bind("click",function(){stButtons.trackTwitterEvent("click")});twttr.events.bind("tweet",function(){stButtons.trackTwitterEvent("tweet")});twttr.events.bind("retweet",function(){stButtons.trackTwitterEvent("retweet")});twttr.events.bind("favorite",function(){stButtons.trackTwitterEvent("favorite")});twttr.events.bind("follow",function(){stButtons.trackTwitterEvent("follow")})}}catch(a){}};stButtons.trackTwitterEvent=function(a){stButtons.trackShare("twitter_"+a+"_auto")};stButtons.trackShare=function(a,c){if(typeof(c)!=="undefined"||c!==null){var b=c}else{var b=document.location.href}var d="http://wd.sharethis.com/api/sharer.php?destination="+a+"&url="+encodeURIComponent(b);d+="&publisher="+encodeURIComponent(stLight.publisher);d+="&hostname="+encodeURIComponent(stLight.meta.hostname);d+="&location="+encodeURIComponent(stLight.meta.location);d+="&ts="+(new Date()).getTime();d+="&sessionID="+stLight.sessionID;d+="&fpc="+stLight.fpc;var e=new Image(1,1);e.src=d;e.onload=function(){return}};stLight.processSTQ=function(){if(typeof(_stq)!="undefined"){for(var a=0;a<_stq.length;a++){var b=_stq[a];stLight.options(b)}}else{return false}};stLight.onDomContentLoaded=function(){stLight.onReady()};stLight.messageReceiver=function(a){if(a&&(a.origin=="http://edge.sharethis.com"||a.origin=="https://ws.sharethis.com")){var b=a.data;b=b.split("|");if(b[0]=="ShareThis"&&b.length>2){stLight.callSubscribers(b[1],b[2])}}};stLight.subscribe=function(b,a){if(b=="click"){stLight.clickSubscribers.push(a)}};stLight.callSubscribers=function(c,a){if(c=="click"){for(var b=0;b<stLight.clickSubscribers.length;b++){stLight.clickSubscribers[b]("click",a)}}};stButtons.onReady=function(){stButtons.trackFB();stButtons.trackTwitter();var g=document.getElementsByTagName("*");var b=[];var c=new RegExp(/sharethis_smartbuttons/);var a=false;for(var j=0;j<g.length;j++){if(typeof(g[j].className)=="string"&&g[j].className!=""){if(g[j].className.match(c)){a=true;break}}}if(a){var f=document.getElementsByTagName("head")[0];var d=["return=json","cb=stButtons.smartifyButtons"];d=d.join("&");var e=(("https:"==document.location.protocol)?"https://ws.":"http://wd.")+"sharethis.com/api/getRecentServices.php?"+d;var h=document.createElement("script");h.setAttribute("type","text/javascript");h.setAttribute("src",e);f.appendChild(h);setTimeout("stButtons.completeInit()",2000)}else{stButtons.completeInit()}};stLight.domReady=function(){stLight.onReady();__stgetPubGA();if(typeof(__stPubGA)!=="undefined"&&stLight.readyRun==true&&stWidget.frameReady==true){stWidget.sendEvent("publisherGA",__stPubGA)}};stButtons.goToInit=false;stButtons.widget=false;stButtons.widgetArray=[];stButtons.queue=[];stButtons.cbQueue=[];stButtons.cbVal=0;stButtons.queuePos=0;stButtons.counts=[];st_showing=false;stButtons.urlElements=[];stButtons.publisherTracker=null;stButtons.plusOneLoaded=false;stButtons.locateElements();stButtons.makeButtons();stLight.clickSubscribers=[];if(window.document.readyState=="completed"){stLight.domReady()}else{if(typeof(window.addEventListener)!="undefined"){window.addEventListener("load",stLight.domReady,false)}else{if(typeof(document.addEventListener)!="undefined"){document.addEventListener("load",stLight.domReady,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",stLight.domReady)}}}}if(typeof(window.addEventListener)!="undefined"){window.addEventListener("click",function(){stWidget.closeWidget()},false)}else{if(typeof(document.addEventListener)!="undefined"){document.addEventListener("click",function(){stWidget.closeWidget()},false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onclick",function(){stWidget.closeWidget()})}}}if(typeof(__st_loadLate)=="undefined"){if(typeof(window.addEventListener)!="undefined"){window.addEventListener("DOMContentLoaded",stLight.onDomContentLoaded,false)}else{if(typeof(document.addEventListener)!="undefined"){document.addEventListener("DOMContentLoaded",stLight.onDomContentLoaded,false)}}}if(typeof(__st_loadLate)=="undefined"){if(typeof(window.addEventListener)!="undefined"){window.addEventListener("message",stLight.messageReceiver,false)}else{if(typeof(document.addEventListener)!="undefined"){document.addEventListener("message",stLight.messageReceiver,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onmessage",stLight.messageReceiver)}}}}if(document.readyState=="complete"&&stLight.readyRun==false){stLight.domReady()};
stLight.options({publisher:'948ae115-5e28-4d9b-8998-2880b327e9e6'});

/* google analytics */
 var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-23438219-1']);
  _gaq.push(['_setDomainName', '.worldevangelicals.org']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

/* Google tracking outbound links 
function recordOutboundLink(link, category, action) {
    _gat._getTrackerByName()._trackEvent(category, action);
    setTimeout('document.location = "' + link.href + '"', 100);
}
*/

function searchSubmit(){
	var query = document.getElementById('q').value;
	location.href="/search/index.htm?keyword="+query;
}

function validate_required(field,alerttxt)
{
with (field)
  {
  if (value==null||value=="")
    {
    alert(alerttxt);return false;
    }
  else
    {
    return true;
    }
  }
}

function validate_contact_form(thisform)
{
	with (thisform)
	  {
	  if (validate_required(name,"Name must be filled out!")==false)
	  {name.focus();return false;}
	  if (validate_required(email,"Email must be filled out!")==false)
	  {email.focus();return false;}
	  if (validate_email(email,"Not a valid e-mail address!")==false)
		{email.focus();return false;}
	  if (validate_required(subject,"Subject must be filled out!")==false)
	  {subject.focus();return false;}
	  if (validate_required(content,"Content must be filled out!")==false)
	  {content.focus();return false;}
	  if (validate_required(captcha,"Code must be filled out!")==false)
	  {captcha.focus();return false;}
	  }
}

/* Newsletter Sign up */
function newsletterSignUp(){
	var emailAddress = document.getElementById('emailAddress').value;
	document.location = "/newsletter/signup.htm?email="+escape(emailAddress);
} 

function newsletterLiSignUp(){
	var emailAddress = document.getElementById('emailAddress').value;
	document.location = "/newsletter/signup_li.htm?email="+escape(emailAddress);
}

function validate_email(field,alerttxt)
{
with (field)
  {
  apos=value.indexOf("@");
  dotpos=value.lastIndexOf(".");
  if (apos<1||dotpos-apos<2)
    {alert(alerttxt);return false;}
  else {return true;}
  }
}

function validate_form(thisform)
{
with (thisform)
  {
  if (validate_email(email,"Not a valid e-mail address!")==false)
    {email.focus();return false;}
  }
}


  WebFontConfig = {
    google: { families: [ 'Tinos::latin' ] }
  };
  (function() {
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
      '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);
  })();
