var trackbackShowText=behaviourL10n.trackbackShowText,trackbackHideText=behaviourL10n.trackbackHideText,errorText=behaviourL10n.searchError,searchText=behaviourL10n.searchPrompt+" ",replyHideMany=behaviourL10n.replyHideMany,replyShowMany=behaviourL10n.replyShowMany,replyHideOne=behaviourL10n.replyHideOne,replyShowOne=behaviourL10n.replyShowOne;depth=behaviourL10n.nestDepth;jQuery(document).ready(function(b){b("input[name=s]").each(function(){b(this).addClass("unfocused");if(b(this).attr("value")===""||b(this).attr("value")===undefined){b(this).attr({value:searchText})}b(this).focus(function(){if(b(this).attr("value")==searchText){b(this).attr({value:""})}b(this).addClass("focused").removeClass("unfocused")});b(this).blur(function(){if(b(this).attr("value")===""||b(this).attr("value")===undefined){b(this).attr({value:searchText})}b(this).removeClass("focused").addClass("unfocused")})});b("form:has(input[name=s])").submit(function(){var c=b(this).find("input[name=s]");if(c.attr("value")===""||c.attr("value")===searchText||c.attr("value")===undefined){b("body").append('<p class="errorMessage">'+errorText+"</p>").children(".errorMessage").css({position:"absolute",top:c.offset().top-(b(this).outerHeight()-c.outerHeight()),left:c.offset().left+(c.width()*0.1)}).animate({top:c.offset().top-(b(this).outerHeight()-c.outerHeight())-20},250,"swing").animate({opacity:0},1000,"swing",function(){b(this).remove()});return false}else{return true}});b("#sidebar .widget_categories .widget-centre > ul > li > ul, #sidebar .widget_pages .widget-centre > ul > li > ul").parent("li").css({position:"relative"}).prepend('<span class="expandToggle active"></span>').children(".expandToggle").click(function(){b(this).toggleClass("active").siblings("ul").slideToggle("fast")}).next("a");b("#sidebar .widget-centre > ul > li:not(.current_page_item,.current-cat) > ul:not(:has(.current_page_item,.current-cat))").hide().siblings(".expandToggle").toggleClass("active");b("#commentForm").submit(function(){var c=false;b(this).find(".vital").each(function(){var d=b(this).attr("value");if(d===undefined||d===""){c=true;b(this).css({borderColor:"#f00"}).fadeOut(250).fadeIn(250)}else{b(this).css({borderColor:"#ccc"})}});if(c){return false}else{return true}});var a=b("#trackbackList").height();if(a>250){b("#trackbackList").css({height:a}).hide().after('<strong class="trackbackToggle"><span class="switch"></span><span class="toggleText">'+trackbackShowText+"</span></strong>").next(".trackbackToggle").click(function(){b(this).toggleClass("active").prev("#trackbackList").slideToggle("500",function(){if(b(this).css("display")==="none"){b(this).next(".trackbackToggle").children(".toggleText").html(trackbackShowText)}else{b(this).next(".trackbackToggle").children(".toggleText").html(trackbackHideText)}})})}b(".with-collapse .depth-"+depth+" ul.children").each(function(){var d=b(this).prev("div.comment-body").find("div.comment-author").children("cite.fn").text(),f=b(this).children("li.comment").length,c,e;if(f==1){c='<span class="switch"></span><span class="toggleText">'+replyShowOne.replace("%name%",'<span class="posterName">'+d+"'s</span>").replace("%count%",f)+"</span>";e='<span class="switch"></span><span class="toggleText">'+replyHideOne.replace("%name%",'<span class="posterName">'+d+"'s</span>").replace("%count%",f)+"</span>"}else{c='<span class="switch"></span><span class="toggleText">'+replyShowMany.replace("%name%",'<span class="posterName">'+d+"'s</span>").replace("%count%",f)+"</span>";e='<span class="switch"></span><span class="toggleText">'+replyHideMany.replace("%name%",'<span class="posterName">'+d+"'s</span>").replace("%count%",f)+"</span>"}b(this).hide().before('<div class="toggle">'+c+"</div>").parent("li").addClass("with-replies").children("div.toggle").click(function(){if(b(this).next("ul.children").css("display")==="none"){b(this).html(e)}else{b(this).html(c)}b(this).toggleClass("active").next("ul.children").slideToggle()})});b("input[type=submit]").addClass("submit");b(".postBody table tr:odd").addClass("alternate");b.each(b.browser,function(c,d){if(c=="msie"&&d===true&&b.browser.version.substr(0,1)==6){b("#commentlist li:first-child").addClass("first-child");b("#commentlist li.bypostauthor > div.comment-body").addClass("bypostauthor");b("body").addClass("ie6")}})});;WPGroHo=jQuery.extend({my_hash:'',data:{},renderers:{},syncProfileData:function(hash,id){if(!WPGroHo.data[hash]){WPGroHo.data[hash]={};a=jQuery('div.grofile-hash-map-'+hash+' span').each(function(){WPGroHo.data[hash][this.className]=jQuery(this).text();});}
WPGroHo.appendProfileData(WPGroHo.data[hash],hash,id);},appendProfileData:function(data,hash,id){for(var key in data){if(jQuery.isFunction(WPGroHo.renderers[key])){return WPGroHo.renderers[key](data[key],hash,id,key);}
jQuery('#'+id).find('h4').after(jQuery('<p class="grav-extra '+key+'" />').html(data[key]));}}},WPGroHo);jQuery(document).ready(function($){Gravatar.profile_cb=function(h,d){WPGroHo.syncProfileData(h,d);};Gravatar.my_hash=WPGroHo.my_hash;Gravatar.init('body','#wpadminbar');});
