-
Notifications
You must be signed in to change notification settings - Fork 0
/
mt-colourful-minified.js
1 lines (1 loc) · 21.3 KB
/
mt-colourful-minified.js
1
function conditional_block(e,t){var n=document.getElementById(t),i=document.getElementById(t+"_else");if(e){if(n){var o=n.getAttribute("mt:display_style");!o&&i&&(o=i.getAttribute("mt:display_style")),o||(o=""),n.style.display=o,DOM.removeClassName(n,"hidden")}i&&(i.style.display="none",DOM.addClassName(i,"hidden"))}else if(n&&(n.style.display="none",DOM.addClassName(n,"hidden")),i){var o=i.getAttribute("mt:display_style");!o&&n&&(o=i.getAttribute("mt:display_style")),o||(o=""),i.style.display=o,DOM.removeClassName(i,"hidden")}}function mtScore(entry_id){var span=DOM.getElement("scoring-id-"+entry_id);if(!span)return!1;if(DOM.hasClassName(span,"scoring-pending"))return!1;if(DOM.hasClassName(span,"scoring-scored"))return!1;if(!DOM.hasClassName(span,"scoring-scorable"))return!1;var xh=mtGetXmlHttp();if(!xh)return!1;DOM.addClassName(span,"scoring-pending");var url="http://www.blogs.com/cgi-bin/mt/mt-cp.cgi";return xh.open("POST",url,!0),xh.onreadystatechange=function(){4==xh.readyState&&(xh.status&&200!=xh.status||eval(xh.responseText))},xh.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xh.send("__mode=vote&blog_id=9&f=scored,count&jsonp=mtScore_cb&id="+entry_id),!1}function mtUpdateScores(){var u=mtGetUser();if(!u)return!1;for(var entry_ids="",scores=DOM.getElementsByClassName("scoring"),i=0;i<scores.length;i++){var id=scores[i].id;id=id.replace(/^scoring-id-/,""),""!=entry_ids&&(entry_ids+=","),entry_ids+=id}if(""==entry_ids)return!1;var xh=mtGetXmlHttp();if(!xh)return!1;var url="http://www.blogs.com/cgi-bin/mt/mt-cp.cgi";return xh.open("POST",url,!0),xh.onreadystatechange=function(){4==xh.readyState&&(xh.status&&200!=xh.status||eval(xh.responseText))},xh.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xh.send("__mode=score&blog_id=9&f=scored,count&jsonp=mtScore_cb&id="+entry_ids),!1}function mtScore_cb(e){var t=mtGetUser();if(e.error){for(var n=DOM.getElementsByClassName("scoring-pending"),i=0;i<n.length;i++)DOM.removeCLassName(n[i],"scoring-pending");return void alert(e.error)}for(var o in e){var a=DOM.getElement("scoring-id-"+o);a&&(DOM.removeClassName(a,"scoring-pending"),DOM.removeClassName(a,"scoring-scorable"),e[o].scored?DOM.addClassName(a,"scoring-scored"):t&&t.is_authenticated&&DOM.addClassName(a,"scoring-scorable"));var r=DOM.getElement("scoring-score-"+o);r&&(r.innerHTML=e[o].count?e[o].count:0);var s=DOM.getElement("scoring-score-label-"+o);if(s)switch(e[o].count){case 1:s.innerHTML="Vote";break;default:s.innerHTML="Votes"}}}function insert_score(e,t,n,i,o){conditional_block(e[t]&&e[t].scored,n),(i||o)&&(e[t]&&e[t].sum?(i&&(i.innerHTML=e[t].sum),o&&(o.innerHTML=e[t].sum)):(i&&(i.innerHTML="0"),o&&(o.innerHTML="0")))}function favorite_cb(e){for(var t in e){document.getElementById("scored_"+t+"_score"),document.getElementById("scored_"+t+"_else_score");conditional_block(e[t]&&e[t].scored,"scored_"+t)}for(var n in favorite_cb_callbacks)favorite_cb_callbacks[n](e)}function anchor(e,t,n,i){var o=document.getElementById(e);if(o){var a,r=o.parentNode;a=i?function(e){favorite(e,t,i)}:function(n){favorite(n,t,e)};var s=document.createElement("a");s.href="javascript:void(0);",n&&(s.className=n),attachEvent(s,"click",a),s.appendChild(o),r.appendChild(s)}}function attachEvent(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!0):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n)}function detachEvent(e,t,n){e&&(e.removeEventListener?e.removeEventListener(t,n,!0):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null)}function favorite(evt,entry_id,score_span){var xh=mtGetXmlHttp();if(!xh)return!1;evt=evt||event;var src=evt.target||evt.srcElement;src&&detachEvent(src,"click",arguments.callee);var url="http://www.blogs.com/cgi-bin/mt/mt-cp.cgi";xh.open("POST",url,!0),xh.onreadystatechange=function(){4==xh.readyState&&(xh.status&&200!=xh.status||eval(xh.responseText))},xh.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xh.send("__mode=vote&blog_id=9&f=scored,sum&jsonp=favorite_cb&id="+entry_id);var span=document.getElementById(score_span);span&&(span.innerHTML='<img src="http://www.blogs.com/mt-static/images/indicator.white.gif" height="10" width="10" alt="favoriting..." />')}function script_follow(id){var u=mtGetUser();if(u&&u.name){var xh=mtGetXmlHttp();if(!xh)return!1;xh.open("POST","http://www.blogs.com/cgi-bin/mt/mt-cp.cgi",!0),xh.onreadystatechange=function(){4==xh.readyState&&(xh.status&&200!=xh.status||eval(xh.responseText))},xh.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xh.send("__mode=follow&id="+id+"&magic_token="+u.sid+"&jsonp=follow"),DOM.addClassName("following_"+id+"_else","hidden");var span=document.getElementById("following-status");span&&(span.innerHTML='<img src="http://www.blogs.com/mt-static/images/indicator.white.gif" height="10" width="10" alt="Following..." />')}}function script_leave(id){var u=mtGetUser();if(u&&u.name){var xh=mtGetXmlHttp();if(!xh)return!1;xh.open("POST","http://www.blogs.com/cgi-bin/mt/mt-cp.cgi",!0),xh.onreadystatechange=function(){4==xh.readyState&&(xh.status&&200!=xh.status||eval(xh.responseText))},xh.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xh.send("__mode=leave&id="+id+"&magic_token="+u.sid+"&jsonp=leave"),DOM.addClassName("following_"+id,"hidden");var span=document.getElementById("following-status");span&&(span.innerHTML='<img src="http://www.blogs.com/mt-static/images/indicator.white.gif" height="10" width="10" alt="Leaving..." />')}}function follow(e){conditional_block(!0,"following_"+e.id);var t=document.getElementById("following-status");t&&(t.innerHTML="")}function leave(e){conditional_block(!1,"following_"+e.id);var t=document.getElementById("following-status");t&&(t.innerHTML="")}function getCommenterName(){var e=mtGetUser();return e&&e.name?e.name:""}function trimString(e){return e=this!=window?this:e,e.replace(/^\s+/g,"").replace(/\s+$/g,"")}function switchTabs(e,t){var n=document.location.hash;n&&(n=n.replace(/^#/,"")),void 0===t&&n?t=n:void 0!==t&&(t=t.href.match(/#(.*)/)[1]);for(var i,o,a=DOM.getElement(e),r=a.getElementsByTagName("*"),s=0,m=r.length;m>s;s++)if(r[s].href&&r[s].href.match(/#.*/)){o=r[s].href.match(/#(.*)/)[1];var i=DOM.getElement(o);if(void 0===i)continue;t&&(o==t?(DOM.addClassName(r[s],"active"),DOM.removeClassName(i,"hidden")):(DOM.removeClassName(r[s],"active"),DOM.addClassName(i,"hidden")))}}function defaultInputFocus(e){try{e=Event.prep(e)}catch(t){}var n=e.target;n.value==n.getAttribute("mt:default")&&(n.value="",DOM.removeClassName(n,"input-default"))}function defaultInputBlur(e){try{e=Event.prep(e)}catch(t){}var n=e.target;""==n.value&&(n.value=n.getAttribute("mt:default"),DOM.addClassName(n,"input-default"))}function setupInputDefault(){for(var e=document.getElementsByTagName("INPUT"),t=0,n=e.length;n>t;t++)if(e[t].getAttribute){var i=e[t].getAttribute("mt:default");i&&(""==e[t].value&&(DOM.addClassName(e[t],"input-default"),e[t].value=i),DOM.addEventListener(e[t],"focus",defaultInputFocus),DOM.addEventListener(e[t],"focusin",defaultInputFocus),DOM.addEventListener(e[t],"blur",defaultInputBlur))}}function mtHide(e){var t="string"==typeof e?document.getElementById(e):e;t&&(t.style.display="none")}function mtShow(e){var t="string"==typeof e?document.getElementById(e):e;t&&(t.style.display="block")}function mtAttachEvent(e,t){var n="on"+e,i=window[n];"function"!=typeof i?window[n]=t:window[n]=function(e){return i(e),t(e)}}function mtFireEvent(e,t){var n=window["on"+e];return"function"==typeof n?n(t):void 0}function mtRelativeDate(e,t){var n,i=new Date,o=e,a=Math.floor((i.getTime()-o.getTime())/1e3);if(60>a)n="moments ago";else if(86400>=a){var r=Math.floor(a/3600),s=Math.floor(a%3600/60);n=1==r?"1 hour ago":r>1?"2 hours ago".replace(/2/,r):1==s?"1 minute ago":"2 minutes ago".replace(/2/,s)}else if(604800>=a){var m=Math.floor(a/86400),r=Math.floor(a%86400/3600);n=1==m?"1 day ago":m>1?"2 days ago".replace(/2/,m):1==r?"1 hour ago":"2 hours ago".replace(/2/,r)}return n?n:t}function mtEditLink(e,t){var n=mtGetUser();if(n&&e&&t&&n.id==t){var i='<a href="mt.cgi?__mode=view&_type=entry&id='+e+'">Edit</a>';document.write(i)}}function mtCommentFormOnFocus(){mtShowCaptcha()}function mtShowCaptcha(){var e=mtGetUser();if(!(e&&e.is_authenticated||mtCaptchaVisible)){var t=document.getElementById("comments-open-captcha");t&&(t.innerHTML="",mtCaptchaVisible=!0)}}function mtSetUser(e){e&&(user=e,mtSaveUser(),mtFireEvent("usersignin"))}function mtEscapeJS(e){return e=e.replace(/'/g,"'")}function mtUnescapeJS(e){return e=e.replace(/'/g,"'")}function mtBakeUserCookie(e){var t="";return e.name&&(t+="name:'"+mtEscapeJS(e.name)+"';"),e.url&&(t+="url:'"+mtEscapeJS(e.url)+"';"),e.email&&(t+="email:'"+mtEscapeJS(e.email)+"';"),e.auth_type&&(t+="auth_type:'"+e.auth_type+"';"),e.is_authenticated&&(t+="is_authenticated:'1';"),e.profile&&(t+="profile:'"+mtEscapeJS(e.profile)+"';"),e.userpic&&(t+="userpic:'"+mtEscapeJS(e.userpic)+"';"),e.sid&&(t+="sid:'"+mtEscapeJS(e.sid)+"';"),t+="is_trusted:'"+(e.is_trusted?"1":"0")+"';",t+="is_author:'"+(e.is_author?"1":"0")+"';",t+="is_banned:'"+(e.is_banned?"1":"0")+"';",t+="can_post:'"+(e.can_post?"1":"0")+"';",t+="can_comment:'"+(e.can_comment?"1":"0")+"';",t=t.replace(/;$/,"")}function mtUnbakeUserCookie(e){if(e){for(var t,n={};t=e.match(/^((name|url|email|auth_type|is_authenticated|profile|userpic|sid|is_trusted|is_author|is_banned|can_post|can_comment):'([^']+?)';?)/);)e=e.substring(t[1].length),t[2].match(/^(is|can)_/)?n[t[2]]="1"==t[3]?!0:!1:n[t[2]]=mtUnescapeJS(t[3]);return n.is_authenticated?n.is_anonymous=!1:(n.is_anonymous=!0,n.can_post=!1,n.is_author=!1,n.is_banned=!1,n.is_trusted=!1),n}}function mtGetUser(){if(!user){var e=mtGetCookie(mtCookieName);if(!e)return;user=mtUnbakeUserCookie(e),user||(user={},user.is_anonymous=!0,user.can_post=!1,user.is_author=!1,user.is_banned=!1,user.is_trusted=!1)}return user}function mtFetchUser(e){if(e||(e="mtSetUser"),"mtSetUser"==e&&mtGetUser()){var t=document.URL;t=t.replace(/#.+$/,""),t+="#comments-open",location.href=t}else{mtFetchedUser=!0;var n=document.createElement("script"),i=(new Date).getTime();n.src="http://www.blogs.com/cgi-bin/mt/mt-comments.cgi?__mode=session_js&blog_id=9&jsonp="+e+"&ts="+i,document.getElementsByTagName("head")[0].appendChild(n)}}function mtRememberMeOnClick(e){return e.checked||mtClearUser(e.form),!0}function mtCommentOnSubmit(e){if(!mtRequestSubmitted){mtRequestSubmitted=!0,e.armor&&(e.armor.value="f92d478ebe2e224f7636f1567e3424d9e1e7551b"),e.bakecookie&&e.bakecookie.checked&&mtSaveUser(e),e.preview_button&&(e.preview_button.disabled=!0),e.post&&(e.post.disabled=!0);var t=mtGetUser();return!is_preview&&t&&t.is_authenticated?(mtFetchedUser=!1,mtFetchUser("mtCommentSessionVerify"),!1):!0}return!1}function mtCommentSessionVerify(e){var t=mtGetUser(),n=document.comments_form;t&&e&&e.sid&&t.sid==e.sid?n.submit():(alert("Your session has expired. Please sign in again to comment."),mtClearUser(),mtFireEvent("usersignin"),mtShow("comments-form"),mtHide("comments-open-footer"))}function mtUserOnLoad(){var e=mtGetUser();if(document.getElementById("comments-form")){e&&e.is_authenticated?(mtShow("comments-form"),mtHide("comments-open-data"),mtCaptchaVisible&&mtHide("comments-open-captcha")):mtHide("comments-form"),e&&e.is_banned&&mtHide("comments-form"),is_preview?mtShowCaptcha():mtShowGreeting();var t=document.comments_form;t&&(e&&e.is_anonymous?(e.email&&(t.email.value=e.email),e.name&&(t.author.value=e.name),e.url&&(t.url.value=e.url),t.bakecookie&&(t.bakecookie.checked=e.name||e.email)):e&&e.sid&&t.sid&&(t.sid.value=e.sid),t.post.disabled&&(t.post.disabled=!1),t.preview_button&&t.preview_button.disabled&&(t.preview_button.disabled=!1),mtRequestSubmitted=!1)}}function mtEntryOnLoad(){mtFireEvent("usersignin")}function mtEntryOnUnload(){if(mtRequestSubmitted){var e=document.comments_form;e&&(e.post&&e.post.disabled&&(e.post.disabled=!1),e.preview_button&&e.preview_button.disabled&&(e.preview_button.disabled=!1)),mtRequestSubmitted=!1}return!0}function mtSignIn(){var e=document.URL;e=e.replace(/#.+/,"");var t="http://www.blogs.com/cgi-bin/mt/mt-cp.cgi?__mode=login&blog_id=9";if(is_preview)if(document.comments_form){var n=document.comments_form.entry_id.value;t+="&entry_id="+n}else t+="&return_url=http%3A%2F%2Fwww.blogs.com%2F";else t+="&return_url="+encodeURIComponent(e);mtClearUser(),location.href=t}function mtSignInOnClick(e){var t;return e&&(t=document.getElementById(e),t||(t=document.getElementById("comment-form-external-auth"))),t&&(t.innerHTML='Signing in... <span class="status-indicator"> </span>'),mtClearUser(),mtFetchUser("mtSetUserOrLogin"),!1}function mtSetUserOrLogin(e){e&&e.is_authenticated?mtSetUser(e):mtSignIn()}function mtSignOut(e){mtClearUser();var t=document.URL;t=t.replace(/#.+/,"");var n="http://www.blogs.com/cgi-bin/mt/mt-cp.cgi?__mode=logout&static=0";if(is_preview)if(document.comments_form){var e=document.comments_form.entry_id.value;n+="&entry_id="+e}else n+="&return_url=http%3A%2F%2Fwww.blogs.com%2F";else n+="&return_url="+encodeURIComponent(t);location.href=n}function mtSignOutOnClick(){return mtSignOut(),!1}function mtShowGreeting(){var e=!0,t=document.comments_form;if(t){var n=document.getElementById("comment-greeting");if(n||(n=document.getElementById("comment-form-external-auth")),n){var i,o=t.entry_id;o&&(i=o.value);var a,r=mtGetUser();if(r&&r.is_authenticated)if(r.is_banned)a='You do not have permission to comment on this blog. (<a href="javascript:void(0);" onclick="return mtSignOutOnClick();">sign out</a>)';else{var s;r.is_author?(s='<a href="http://www.blogs.com/cgi-bin/mt/mt-cp.cgi?__mode=edit&return_to='+encodeURIComponent(document.URL)+"&blog_id=9",s+='">'+r.name+"</a>"):s=r.url?'<a href="'+r.url+'">'+r.name+"</a>":r.name,a='Thanks for signing in, __NAME__. (<a href="javascript:void(0)" onclick="return mtSignOutOnClick();">sign out</a>)',a=a.replace(/__NAME__/,s)}else a=e?'<a href="javascript:void(0)" onclick="return mtSignInOnClick(\'comment-greeting\')">Sign in</a> to comment.':'<a href="javascript:void(0)" onclick="return mtSignInOnClick(\'comment-greeting\')">Sign in</a> to comment, or comment anonymously.';n.innerHTML=a}}}function mtReplyCommentOnClick(e,t){mtShow("comment-form-reply");var n=document.getElementById("comment-reply"),i=document.getElementById("comment-reply-label"),o=document.getElementById("comment-text"),a='Replying to <a href="#comment-__PARENT__" onclick="location.href=this.href; return false">comment from __AUTHOR__</a>';a=a.replace(/__PARENT__/,e),a=a.replace(/__AUTHOR__/,t),i.innerHTML=a,n.value=e,n.checked=!0;try{o.focus()}catch(r){}mtSetCommentParentID()}function mtSetCommentParentID(){var e=document.getElementById("comment-reply"),t=document.getElementById("comment-parent-id");if(e&&t){var n=0;1==e.checked&&(n=e.value),t.value=n}}function mtSaveUser(e){if(!is_preview){var t=mtGetUser();if(!e||t&&!t.is_anonymous||(t||(t={},t.is_authenticated=!1,t.can_comment=!0,t.is_author=!1,t.is_banned=!1,t.is_anonymous=!0,t.is_trusted=!1),void 0!=e.author&&(t.name=e.author.value),void 0!=e.email&&(t.email=e.email.value),void 0!=e.url&&(t.url=e.url.value)),t){var n=1e3*mtCookieTimeout;t.is_anonymous&&e&&e.bakecookie&&e.bakecookie.checked&&(n=31536e6);var i=new Date;mtFixDate(i),i.setTime(i.getTime()+n);var o=mtBakeUserCookie(t);mtSetCookie(mtCookieName,o,i,mtCookiePath,mtCookieDomain,"https:"==location.protocol)}}}function mtClearUser(){user=null,mtDeleteCookie(mtCookieName,mtCookiePath,mtCookieDomain,"https:"==location.protocol)}function mtSetCookie(e,t,n,i,o,a){o&&o.match(/^\.?localhost$/)&&(o=null);var r=e+"="+escape(t)+(n?"; expires="+n.toGMTString():"")+(i?"; path="+i:"")+(o?"; domain="+o:"")+(a?"; secure":"");document.cookie=r}function mtGetCookie(e){var t=e+"=",n=document.cookie,i=n.indexOf(t);if(-1==i)return"";var o=n.indexOf(";",i+t.length);return-1==o&&(o=n.length),unescape(n.substring(i+t.length,o))}function mtDeleteCookie(e,t,n,i){mtGetCookie(e)&&(n&&n.match(/^\.?localhost$/)&&(n=null),document.cookie=e+"="+(t?"; path="+t:"")+(n?"; domain="+n:"")+(i?"; secure":"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT")}function mtFixDate(e){var t=new Date(0).getTime();t>0&&e.setTime(e.getTime()-t)}function mtGetXmlHttp(){return window.XMLHttpRequest||(window.XMLHttpRequest=function(){for(var e=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],t=0;t<e.length;t++)try{return new ActiveXObject(e[t])}catch(n){}return void 0}),window.XMLHttpRequest?new XMLHttpRequest:void 0}function mtInit(){arguments.callee.done||(arguments.callee.done=!0,window._timer&&clearInterval(window._timer),window.onload&&window.onload!==window.mtInit&&(window.onload(),window.onload=function(){}))}function field_focus_reset(e,t){return e.value!=t?!1:(e.value="",void(e.style.color="#333"))}var favorite_cb_callbacks=[];if(req=null,defined=function(e){return void 0!==e},!window.Event)try{window.Event={}}catch(e){}Event.prep=function(e){return e=e||window.event,defined(e.stop)||(e.stop=this.stop),defined(e.target)||(e.target=e.srcElement),defined(e.relatedTarget)||(e.relatedTarget="mouseover"==event.type||"mouseenter"==event.type?e.fromElement:e.toElement),e},window.DOM||(DOM={getElement:function(e){return"string"==typeof e||"number"==typeof e?document.getElementById(e):e},addEventListener:function(e,t,n,i){try{e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}catch(e){}},getClassNames:function(e){return e&&e.className?e.className.split(/\s+/g):[]},hasClassName:function(e,t){if(e=DOM.getElement(e),!e||!e.className)return!1;for(var n=DOM.getClassNames(e),i=0;i<n.length;i++)if(n[i]==t)return!0;return!1},addClassName:function(e,t){if(e=DOM.getElement(e),!e||!t)return!1;for(var n=DOM.getClassNames(e),i=0;i<n.length;i++)if(n[i]==t)return!0;return n.push(t),e.className=n.join(" "),!1},removeClassName:function(e,t){var n=!1;if(e=DOM.getElement(e),!e||!e.className||!t)return n;var i=e.className&&e.className.length?e.className.split(/\s+/g):[],o=[];if(t instanceof RegExp)for(var a=0;a<i.length;a++)t.test(i[a])?n=!0:o.push(i[a]);else for(var a=0;a<i.length;a++)i[a]!=t?o.push(i[a]):n=!0;return n&&(e.className=o.join(" ")),n},getElementsByTagAndClassName:function(e,t,n){n=DOM.getElement(n),n||(n=document);for(var i=n.getElementsByTagName(e),o=[],a=0;a<i.length;a++){var r=i[a];r&&DOM.hasClassName(r,t)&&(o[o.length]=r)}return o},getElementsByClassName:function(e,t){return DOM.getElementsByTagAndClassName("*",e,t)}});var mtCookieName="mt_blog9_user",mtCookieDomain=".blogs.com",mtCookiePath="/",mtCookieTimeout=14400,mtCaptchaVisible=!1,is_preview,user,mtFetchedUser=!1,mtRequestSubmitted=!1;mtAttachEvent("usersignin",mtUserOnLoad),document.addEventListener&&document.addEventListener("DOMContentLoaded",mtInit,!1),/WebKit/i.test(navigator.userAgent)&&(_timer=setInterval(function(){/loaded|complete/.test(document.readyState)&&mtInit()},10)),window.onload=mtInit;var clearCookie=window.location.hash&&window.location.hash.match(/^#_log(in|out)/)?!0:!1;clearCookie?(mtClearUser(),"in"==RegExp.$1&&mtFetchUser()):is_preview&&!user&&mtFetchUser();var body_id,li_string;$(document).ready(function(){($("body").attr("id")||"home"!=$("body").attr("id"))&&(li_string="ul#nav li#link-"+$("body").attr("id"),body_id=$("body").attr("id"),$(li_string).children("a").addClass("open"),$(li_string).children("ul").css("display","block"),$(li_string).children("ul").css("z-index","1")),$("body").attr("class")&&(sub_li_string="ul#nav li ul li#link-"+$("body").attr("class"),body_class=$("body").attr("class"),$(sub_li_string).children("a").addClass("active-cat"));var e=$("#leaderboard-ads").css("margin-top");$("ul#nav li").mouseover(function(){"ul#nav li#"+$(this).attr("id")!=li_string&&($(this).children("ul").css("display","block"),li_string&&$(li_string).children("a").removeClass("open"))}),$("ul#nav li:not(.non-vertical-link)").mouseover(function(){"7px"==e&&$("#leaderboard-ads").css("margin","32px 0 0 0")}),$("ul#nav li").mouseout(function(){"ul#nav li#"+$(this).attr("id")!=li_string&&($(this).children("ul").css("display","none"),li_string&&$(li_string).children("a").addClass("open"))}),$("ul#nav li ul.sub-nav").mouseover(function(){"ul#nav li#"+$(this).parent().attr("id")!=li_string?($(this).parent().children("a").addClass("open"),$(this).css("display","block"),li_string&&$(li_string).children("a").removeClass("open")):$(this).parent().children("a").addClass("open")}),$("ul.sub-nav").mouseout(function(){"ul#nav li#"+$(this).parent().attr("id")!=li_string&&($(this).parent().children("a").removeClass("open"),$(this).css("display","none"),li_string&&$(li_string).children("a").addClass("open"))}),$("ul#nav li.non-vertical-link").mouseover(function(){$(li_string).children("ul").css("display","none")}),$("ul#nav li.non-vertical-link").mouseout(function(){$(li_string).children("ul").css("display","block")}),$("a#what-hide").click(function(){$("#what-box").hide()});var t=0;$(".top10-nav .next").click(function(){t-=10,bgPosition="0px "+t+"px",$(".top10-status").css({backgroundPosition:bgPosition})}),$(".top10-nav .previous").click(function(){t+=10,bgPosition="0px "+t+"px",$(".top10-status").css({backgroundPosition:bgPosition})}),$(".top10-items").jCarouselLite({btnNext:".top10-nav .next",btnPrev:".top10-nav .previous",visible:2,scroll:2,speed:500}),$("form#search-form").submit(function(){var e=$("form#search-form input.text-input").val();e=e.replace(/ +/g,"+");var e=encodeURIComponent(e);e=e.replace(/(%2B)/g,"+");var t="http://www.blogs.com/search/"+e;return window.location=t,!1}),$(".rss-img, .share-img").hover(function(){$(this).css("cursor","pointer")},function(){$(this).css("cursor","default")})});