var frameToDisplay;
	
	
	function foo(){
	
		var mytext = $(window).width()-205 + "px";
		var myint = $(window).width()-205;
		//alert(mytext);
		// $("#myframe").css("margin-left",mytext);


	 	var sectionButtons = ["fashion","beauty","about","portraits"];

	
		var section = getUrlVars()["section"];
		// alert(section);
		switch(section){
			case 'fashion':
			case 'beauty':
			case 'about':
			case 'portraits':

			case 'contact':
				frameToDisplay = section;
				$("#"+frameToDisplay+"btn").css("background-color","#FF0000");
	
				for(i = 0;i<sectionButtons.length;i++){
					$("#"+sectionButtons[i]+"btn").show();
				}
	
				$("#"+frameToDisplay+"btn").hide();
				$("#topbutton").html(frameToDisplay);
		 		$("#middlecol").css("width",mytext);
			break;
			default:
				frameToDisplay = 'intro';
				$("#topbutton").html();
				if(myint<870){
				$("#middlecol").css("width",mytext);
				} else {
				 $("#middlecol").css("width","870px");
				 }
			break;
	
		}
		$("#myframe").attr("src",(frameToDisplay+".html"));



	 }
	 
	 function highlight(thing){
		$("#"+thing).css("background-color","#FFFFFF");
		$("#"+thing).css("color","#000000");
		// $("#"+thing).("a").css("color","#FF0000");
	 }
	 function delight(thing){
	 	$("#"+thing).css("background-color","#000000");
		$("#"+thing).css("color","#FFFFFF");
	 }
	 function goto(thing){
	 window.location.href = "?section="+thing;
	 }



$(window).resize(function () { 
	foo();
	 });
	 
	 function getUrlVars() {
	var vars = {};
	var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
		vars[key] = value;
	});
	return vars;
}



