var text1 = "My name is <b>William Thomas</b>. I'm an 18-year-old independent web developer and college student. I was born and raised in Southern California where I've wanted to be a software programmer since elementary school. Though I'm learning software in college, my primary line of work at home is web design. I've built quite a few websites over the years, both corporate and personal (including this one).<br/><br/>I try to stay up-to-date with the latest web trends, such as AJAX programming (using frameworks like jQuery and MooTools) and Web 2.0 styles. This website will kind of give you a small taste of what I do, and hopefully let you consider me designing your online project.";

var text2 = "Over the years I've designed quite a few websites. Every site I do I learn more and more, so each design is better than the last. I use the latest Adobe software for building, including Photoshop CS4 and Dreamweaver CS4. I've done websites for restaurants, blogs and directories, using a variety of techniques to make them just the way the client likes them.<br/><br/>Along with the design, I'm just as good at building intricate sites using MySQL and PHP, bringing a whole new depth in connectivity with the audience. My goal is to try to build you a website with a high feeling of personality at a reasonable rate.";

var text3 = "I'm currently a freshman at the California State Polytechnic University in Pomona, CA. Majoring in Computer Science, as well as a member of the Four-Year Pledge Program, I will be receiving my BS in 2013. As well as being a full-time student, I also spend my time building projects online, from websites to PHP widgets and even Flash media.<br/><br/>I started building Flash games in middle school, quickly accelerating in expertise before applying myself to the web development field in high school. I've created several websites (although some not currently published) and I only get better with every one I make.";

var text4 = "Oh hi.";

var cur = "abo";

$(document).ready(function(){
	
	$("#slider").easySlider({
		auto: false,
		controlsShow:false,
		continuous: true
	});
	
	
	$("#abo").click(function(){	
	if(cur!="abo"){
		$("#slider ul").stop(true);	
		
		$("#info-cont").fadeOut(500, function(){ document.getElementById("info-cont").innerHTML=text1; $("#info-cont").fadeIn(500); } );		
						
		$("#slider ul").animate({ marginLeft: "0px"},
			{ duration: 1000,
			  easing: "easeInOutSine"
			});
		
		$("#web-tab").removeClass();
		$("#web-tab").addClass("tab-off");
		
		$("#abo-tab").removeClass();
		$("#abo-tab").addClass("tab-on");
		
		$("#fre-tab").removeClass();
		$("#fre-tab").addClass("tab-off");
		
		$("#car-tab").removeClass();
		$("#car-tab").addClass("tab-off");
		
		cur = "abo";
	}
	})
	
	
	$("#web").click(function(){	
	if(cur!="web"){
		$("#slider ul").stop(true);	
		
		$("#info-cont").fadeOut(500, function(){ document.getElementById("info-cont").innerHTML=text2; $("#info-cont").fadeIn(500); });				
		
		
		$("#slider ul").animate({ marginLeft: "-533px"},
			{ duration: 1000,
			  easing: "easeInOutSine"
			});
		
		$("#web-tab").removeClass();
		$("#web-tab").addClass("tab-on");
		
		$("#abo-tab").removeClass();
		$("#abo-tab").addClass("tab-off");
		
		$("#fre-tab").removeClass();
		$("#fre-tab").addClass("tab-off");
		
		$("#car-tab").removeClass();
		$("#car-tab").addClass("tab-off");
		
		cur = "web";
	}
	})
	
	
	$("#car").click(function(){	
	if(cur!="car"){
		$("#slider ul").stop(true);	
		
		$("#info-cont").fadeOut(500, function(){ document.getElementById("info-cont").innerHTML=text3; $("#info-cont").fadeIn(500); });				
		
		
		$("#slider ul").animate({ marginLeft: "-1066px"},
			{ duration: 1000,
			  easing: "easeInOutSine"
			});
		
		$("#web-tab").removeClass();
		$("#web-tab").addClass("tab-off");
		
		$("#abo-tab").removeClass();
		$("#abo-tab").addClass("tab-off");
		
		$("#fre-tab").removeClass();
		$("#fre-tab").addClass("tab-off");
		
		$("#car-tab").removeClass();
		$("#car-tab").addClass("tab-on");
		
		cur = "car";
	}
	})
	
	
	$("#fre").click(function(){	
	if(cur!="fre"){
		$("#slider ul").stop(true);	
		
		$("#info-cont").fadeOut(500, function(){ document.getElementById("info-cont").innerHTML=text4; $("#info-cont").fadeIn(500); });				
		
		
		$("#slider ul").animate({ marginLeft: "-1599px"},
			{ duration: 1000,
			  easing: "easeInOutSine"
			});
		
		$("#web-tab").removeClass();
		$("#web-tab").addClass("tab-off");
		
		$("#abo-tab").removeClass();
		$("#abo-tab").addClass("tab-off");
		
		$("#fre-tab").removeClass();
		$("#fre-tab").addClass("tab-on");
		
		$("#car-tab").removeClass();
		$("#car-tab").addClass("tab-off");
		
		cur = "fre";
	}
	})
});

var done = 0;
var list = new Array();
list[0] = 38;
list[1] = 38;
list[2] = 40;
list[3] = 40;
list[4] = 37;
list[5] = 39;
list[6] = 37;
list[7] = 39;
list[8] = 66;
list[9] = 65;
list[10] = 13;

var pos = 0;
document.onkeydown = checkKeycode

function checkKeycode(e) {
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
if(list[pos] == keycode){
if(pos<10){
pos++;
} else {
	document.getElementById("blargg").innerHTML = '<div style="position: absolute; margin-left:'+Math.floor(Math.random()*800)+'px; z-index: 999;"><object width="600" height="150"><param name="movie" value="http://willseph.com/img/blargg.swf"><param name="wmode" value="transparent"><embed wmode="transparent" src="http://willseph.com/img/blargg.swf" width="600" height="150"></embed></object></div>';
	pos = 0;
}
} else {
	pos = 0;
}

}

function egg(){
	
}