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('

'+errorText+"

").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('').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(''+trackbackShowText+"").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=''+replyShowOne.replace("%name%",''+d+"'s").replace("%count%",f)+"";e=''+replyHideOne.replace("%name%",''+d+"'s").replace("%count%",f)+""}else{c=''+replyShowMany.replace("%name%",''+d+"'s").replace("%count%",f)+"";e=''+replyHideMany.replace("%name%",''+d+"'s").replace("%count%",f)+""}b(this).hide().before('
'+c+"
").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")}})});