$(window).load(function(){setTimeout(d,500);function d(){$("#indexWrapper .line1").animate({width:"229px"},1000,"easeOutQuart",c);}function c(){$("#indexWrapper .line2").animate({width:"620px"},1000,"easeOutQuart",b);}function b(){$("#indexWrapper .line3").animate({width:"880px"},1300,"easeOutQuart",a);}function a(){$("#indexWrapper .line4").animate({width:"870px"},1300,"easeOutQuart");}$.preloadImages=function(e){for(var f=0;f<arguments.length;f++){$("<img>").attr("src",arguments[f]);}};$.preloadImages("images/patternizer.jpg","images/ceaser.jpg","images/shannonswork.jpg","images/lowlustre.jpg","images/randomSearch.jpg","images/laaw.png","images/trinity.jpg","images/808.png");$.getScript("/js/videojs/video.js");});$(document).ready(function(){$.address.init(function(){var c=$.address.path();if(c=="/portfolio.html"||c=="/about.html"){$.address.value(c);}else{addresArr=$.address.baseURL().split("/");currentAddress=addresArr[addresArr.length-1];currentAddressClean=currentAddress.split(".",1);if(currentAddressClean=="portfolio"||currentAddressClean=="about"){$.address.value("/"+currentAddressClean+".html");}else{$.address.value("/");}}});$("#portfolioWrapper, #aboutWrapper , #indexWrapper").css("position","absolute");$("#navBubbles").css("opacity",0);var f="matt";var e="@";var d="matthewlein";var b=".";var a="com";$("#navBubbles").wrap('<a href="mailto:'+f+e+d+b+a+'" id="email">');$("#emailSlot").append(' <a href="mailto:'+f+e+d+b+a+'" id="email">'+f+e+d+b+a+"</a>");$("#aboutWrapper, #portfolioWrapper").css("left",$(document).width()+$(".wrapper").width()+"px");$("#indexWrapper .line1, #indexWrapper .line2, #indexWrapper .line3, #indexWrapper .line4").css("width","0px");$("#indexWrapper .line1, #indexWrapper .line2, #indexWrapper .line3, #indexWrapper .line4, #navBubbles").css("visibility","visible");var j=null;function g(c){j=c;}$("#myCarousel").jcarousel({scroll:4,wrap:"last",buttonNextHTML:'<a href="javascript:;"></a>',buttonPrevHTML:'<a href="javascript:;"></a>',initCallback:g});$("#header li a").wrapInner("<span>");$("#header li a span").hover(function(){$(this).stop().animate({opacity:"1"},200);},function(){$(this).stop().animate({opacity:"0"},200);});alreadyPopped=false;function l(){if(!alreadyPopped){$("#navBubbles").delay(500).animate({opacity:"1","margin-top":["13px","easeOutBack"]},500,function(){alreadyPopped=true;if($.browser.msie){this.style.removeAttribute("filter");}});}}function h(){$("#myCarousel li img").animate({borderBottomColor:"#999",borderTopColor:"#999",borderRightColor:"#999",borderLeftColor:"#999"},200);$("#myCarousel li a").removeClass("clickedItem");$("#portfolioWrapper .content").stop().animate({opacity:"0"},400,"easeOutQuart",function(){swfobject.removeSWF("myFlashContent");});}var i;var k="Matthew Lein - ";$.address.change(function(m){var c=$.address.path();if(c=="/portfolio.html"){$.address.title(k+"Portfolio");l();$("#slider").stop().animate({left:"282px"},700,"easeOutQuart");$("#portfolioWrapper").stop().animate({left:"0px"},700,"easeOutQuart");$("#aboutWrapper").stop().animate({left:$(document).width()+$(".wrapper").width()+"px"},700,"easeOutQuart");$("#indexWrapper").stop().animate({left:-$(document).width()-$(".wrapper").width()+"px"},700,"easeOutQuart");j.scroll(1);$("#myCarousel li img").animate({borderBottomColor:"#999",borderTopColor:"#999",borderRightColor:"#999",borderLeftColor:"#999"},200);$("#myCarousel li a").removeClass("clickedItem");$("#myCarousel li a").fadeTo(200,0.8);$("#myCarousel li a").first().stop().fadeTo(200,1);$("#myCarousel li a").first().addClass("clickedItem");$("#myCarousel li a img").first().stop().animate({borderBottomColor:"#F90",borderTopColor:"#F90",borderRightColor:"#F90",borderLeftColor:"#F90"},200);var n=$("#myCarousel li a").first().attr("href");$("#portfolioWrapper .content").stop().animate({opacity:"0"},400,"easeOutQuart",function(){$("#loading").fadeIn(200);$("#portfolioWrapper .content .wrapper").load(n+" .portfolioItem",function(){$("#loading").fadeOut(200);$("#portfolioWrapper .content").stop().animate({opacity:"1"},400,"easeOutQuart");var p=$("#myCarousel li a").first().attr("rel");if(p!==""){var v=p.split("?");var s=v[1];var r=v[2];var t=v[0];var o={};var u={menu:"false",base:"swf"};var q={id:"myFlashContent",name:"myFlashContent"};swfobject.embedSWF("swf/"+t,"myFlashContent",s,r,"9.0.0","swf/expressInstall.swf",o,u,q);}});});}else{if(c=="/about.html"){$.address.title(k+"About Me");l();h();$("#slider").stop().animate({left:"417px"},700,"easeOutQuart");$("#aboutWrapper").stop().animate({left:"0px"},700,"easeOutQuart");$("#indexWrapper").stop().animate({left:-$(document).width()-$(".wrapper").width()+"px"},700,"easeOutQuart");if(i=="/portfolio.html"){$("#portfolioWrapper").stop().animate({left:-$(document).width()-$(".wrapper").width()+"px"},700,"easeOutQuart");}else{$("#portfolioWrapper").css("left",-$(document).width()-$(".wrapper").width()+"px");}}else{$.address.title(k+"Awesomeness in Web Programming");h();$("#slider").stop().animate({left:"80px"},700,"easeOutQuart");$("#indexWrapper").stop().animate({left:"0px"},700,"easeOutQuart");$("#aboutWrapper").stop().animate({left:$(document).width()+$(".wrapper").width()+"px"},700,"easeOutQuart");if(i=="/portfolio.html"){$("#portfolioWrapper").stop().animate({left:$(document).width()+$(".wrapper").width()+"px"},700,"easeOutQuart");}else{$("#portfolioWrapper").css("left",$(document).width()+$(".wrapper").width()+"px");}}}i=c;});$("#header span").click(function(m){var c=$(m.target).closest("a").attr("href");if(c!=="/experiments/"){$.address.value(c);return false;}});$("#myCarousel li a").css("display","none").fadeTo(200,0.8);$("#myCarousel li a").hover(function(){$(this).stop().animate({opacity:"1"},200);},function(){if(!$(this).hasClass("clickedItem")){$(this).stop().animate({opacity:"0.8"},200);}});$("#myCarousel li a").click(function(c){$("#myCarousel li img").animate({borderBottomColor:"#999",borderTopColor:"#999",borderRightColor:"#999",borderLeftColor:"#999"},200);$("#myCarousel li a").removeClass("clickedItem");$(c.target).closest("a").addClass("clickedItem");$("#myCarousel li a").not(".clickedItem").fadeTo(200,0.8);$(c.target).closest("img").stop().animate({borderBottomColor:"#F90",borderTopColor:"#F90",borderRightColor:"#F90",borderLeftColor:"#F90"},200);var m=$(c.target).closest("a").attr("href");$("#portfolioWrapper .content").stop().animate({opacity:"0"},400,"easeOutQuart",function(){$("#loading").fadeIn(200);$("#portfolioWrapper .content .wrapper").load(m+" .portfolioItem",function(){$("#loading").fadeOut(200);$("#portfolioWrapper .content").stop().animate({opacity:"1"},400,"easeOutQuart");var o=$(c.target).closest("a").attr("rel");if(o!==""){var u=o.split("?");var r=u[1];var q=u[2];var s=u[0];var n={};var t={menu:"false",base:"swf"};var p={id:"myFlashContent",name:"myFlashContent"};swfobject.embedSWF("swf/"+s,"myFlashContent",r,q,"9.0.0","swf/expressInstall.swf",n,t,p);}VideoJS.setupAllWhenReady();$(".laawFull").fancybox({width:600,height:338,overlayOpacity:0.9,overlayColor:"#000",padding:20});$(".trinityFull").fancybox({width:721,height:475,overlayOpacity:0.9,overlayColor:"#000",padding:20});});});return false;});});
