function smallMe(leftValue){$("#meoncouch").animate({width:400,left:leftValue});}
function noFlash(){$("#noFlash").fadeIn();}
function contentFadeOut(){$("#about, #skills, #education, .scroll-pane, #contact, #backgroundCheck, #portfolio, #noFlash").fadeOut();}
var $nav;$.fn.animationClick=function(callback,target){var stringTarget=target,$target=target?$(target):null;return this.click(function(e){if(!$(this).hasClass("current")){$nav.removeClass("current");$(this).addClass("current");contentFadeOut();callback();if($target)$target.fadeIn();window.location.hash=stringTarget;}
return false;});}
$(function(){$("#photos a").colorbox({transition:"none"});var $me=$("#meoncouch"),$tracks=$("#sample"),$header=$("#header-target"),$upcoming=$("#upcoming"),$joke;$nav=$("nav a");var origMeWidth=633,origMeLeft=$me.position().left;$(".home-link").click(function(e){if(!$(this).hasClass("current")){$("nav a").removeClass("current");$("nav .home-link").addClass("current");contentFadeOut();$("#about").fadeIn();$me.fadeIn().animate({width:origMeWidth,left:origMeLeft,bottom:30});noFlash();}});$("#nav-skills").animationClick(function(){$("#skills").fadeIn().animate({left:50});$("#backgroundCheck").fadeIn().animate({left:30});$me.fadeIn().animate({width:400,left:350,bottom:30});},"#skills");$("#nav-experience").animationClick(function(){$("#experience").fadeIn().animate({left:50});$me.fadeIn().animate({width:origMeWidth,left:-999,bottom:30});},"#experience");$("#nav-education").animationClick(function(){$("#education").fadeIn().animate({left:50});$me.fadeIn().animate({width:400,left:350,bottom:30});},"#education");$("#nav-portfolio").animationClick(function(){$("#portfolio").fadeIn().animate({left:50});$me.fadeIn().animate({width:origMeWidth,left:origMeLeft,bottom:30});},"#portfolio");$("#nav-contact").animationClick(function(){$("#contact").fadeIn().animate({left:50});$me.fadeIn().animate({width:400,left:350,bottom:30});},"#contact");var hash=window.location.hash;hash=hash.replace(/^#/,'');switch(hash){case'skills':$("#nav-"+hash).trigger("click");break;case'experience':$("#nav-"+hash).trigger("click");break;case'education':$("#nav-"+hash).trigger("click");break;case'portfolio':$("#nav-"+hash).trigger("click");break;case'contact':$("#nav-"+hash).trigger("click");break;}});
