google.setOnLoadCallback(function(){$("a[href^='http:']:not([href*='"+window.location.host+"'])").each(function(){$(this).attr("target","_blank")});$('A[rel="external"]').click(function(){window.open($(this).attr("href"));return false});$('A[rel="external nofollow"]').click(function(){window.open($(this).attr("href"));return false});var d=$(".scroll-pane");jQuery.easing.def="easeOutQuad";$(function(){$("a.nav").bind("click",function(){var k=$(this).attr("rel");$.scrollTo(k,2000,{easing:"easeOutQuad"});return false});$("a.b_top_fixed").bind("click",function(){var k=$(this).attr("rel");$.scrollTo(k,1000,{easing:"easeOutQuad"});return false});$("a.b_viewpast").bind("click",function(){var l;if($("a.b_viewpast").hasClass("toggle")){$("a.b_viewpast").toggleClass("toggle");$("#past").slideToggle();$("a.b_viewpast > span.title").text("View Past Projects");$("#viewpast").animate({"margin-bottom":"0px"},150)}else{l=500;var k=$(this).attr("rel");$.scrollTo(k,l,{easing:"easeOutQuad",onAfter:function(){$("a.b_viewpast").toggleClass("toggle");$("#past").slideToggle("easeOutQuad")}});$("a.b_viewpast > span.title").text("Close Past Projects");$("#viewpast").animate({"margin-bottom":"60px"},150)}return false})});$(".b_top .bar").css({width:"0px"});$(".b_top").hoverIntent(function(){$(this).children(".bar").animate({width:"258px"},250)},function(){$(this).children(".bar").animate({height:"0px"},250,function(){$(".bar").animate({width:"0px",height:"17px"},0)})});var f=$(window).height()-$("section#contact").height();$("#footerfill").css("min-height",f+"px");$(window).bind("resize",function(){$.fn.colorbox.load()});$("article").last().addClass("last-child");$("#past-projects article").first().addClass("first-child");$("#past-projects article").last().addClass("last-child");$("ul.awards li").last().addClass("last-child");var i;var g=function(){var k=window.location.hash||"";if(k==""||k=="#home"){$.fn.colorbox.close()}};$(window).bind("hashchange",g);if(window.location.hash){var c=location.href.substr(location.href.indexOf("#")+1);var j=$("#past-projects").find('a[name="'+c+'"]');if(j.length==0){$("#past").hide(0);$(".permalink").attr("name","projectview")}else{$("a.b_viewpast").toggleClass("toggle");$(window).unbind("hashchange",g);window.location.hash="#home";$(window).bind("hashchange",g);$(".permalink").attr("name","projectview")}}else{$("#past").hide(0);$(".permalink").attr("name","projectview")}var a,e=$(".doc"),b=$(window),h=400;b.scroll(function(){window.clearTimeout(a);a=window.setTimeout(function(){if(b.scrollTop()<=h){e.addClass("hide-top")}else{e.removeClass("hide-top")}},100)})});
