Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <section id="home">
  <svg id="natehead" version="1.1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="516px" height="517px" viewBox="0 0 516 517" enable-background="new 0 0 516 517" xml:space="preserve"><switch><g i:extraneous="self"><g id="Shape_1_1_" opacity="0.6" enable-background="new "><g id="Shape_1"><g><path fill="#EE5BC2" d="M397.893,140.198C383.146,85.322,350.491,24.486,264.234,23.785c-92.836-0.754-132.432,59.001-153.062,137.432c-22.15,84.212-11.462,184.044,14.013,239.832c17.705,38.772,27.445,52.489,46.888,72.758c12.192,12.709,22.344,24.817,40.421,29.642c27.535,7.349,76.111,2.118,97.011-0.539c18.731-2.382,41.184-21.591,52.277-35.57c12.016-15.142,22.914-42.148,28.564-60.901c8.546-28.363,17.701-55.152,21.558-103.478C415.633,256.255,410.19,185.959,397.893,140.198z"/></g></g></g><g id="Shape_25_1_" opacity="0.5412" enable-background="new "><g id="Shape_25"><g><path fill="#7285D2" d="M403.282,159.062c-6.506-27.383-15.091-49.045-15.091-49.045s-8.557,33.927-3.233,59.284s21.019,52.817,21.019,52.817S409.788,186.443,403.282,159.062z"/></g></g></g><g id="Shape_25_copy_1_" opacity="0.5412" enable-background="new "><g id="Shape_25_copy"><g><path fill="#7285D2" d="M122.491,118.102c0,0-9.402,18.967-14.402,46.349c-5,27.383-2.071,63.058-2.071,63.058s12.063-27.46,16.155-52.817C126.263,149.333,122.491,118.102,122.491,118.102z"/></g></g></g><g id="Shape_24_1_" opacity="0.502" enable-background="new "><g id="Shape_24"><g><path fill="#7285D2" d="M284.714,379.49c-12.884-0.044-13.488,4.062-19.941,4.851c-6.452,0.789-8.524-4.113-25.33-4.312c-14.795-0.174-26.409,20.48-26.409,20.48l95.933-0.539C308.967,399.971,297.598,379.535,284.714,379.49z"/></g></g></g><g id="Shape_21_1_" enable-background="new "><g id="Shape_21"><g><path fill="#3F2004" d="M359.285,58.187C318.626,15.496,239.434,5.368,177.229,46.48c-31.133,20.576-53.622,59.904-67.947,100.094c-14.3,40.12-12.266,126.806-10.899,138.209c1.497,12.487,5.747,7.11,8.487-14.027c2.765-21.327-0.511-85.148,8.003-116.158c6.628-24.141,13.438-36.456,28.453-59.78c23.402-36.353,36.815-42.986,78.686-61.469c41.854-18.475,85.843-0.636,124.314,25.371c47.172,31.889,60.365,115.561,58.834,143.85c-1.929,35.613-1.053,43.592,2.853,45.104c3.899,1.511,5.605-3.411,6.352-42.05C415.107,167.135,399.904,100.834,359.285,58.187z"/></g></g></g><g id="Shape_33_1_" opacity="0.2" enable-background="new "><g id="Shape_33"><g><path fill="#8F69A6" d="M356.933,434.463c-13.419,9.444-38.135,25.007-50.122,14.552c-11.987-10.454-28.346-15.183-50.122-16.707c-21.777-1.524-29.777,17.545-47.966,17.785s-28.591-19.309-43.655-26.408c-15.359-7.24-40.981-36.438-44.732-38.805c0,0,18.198,42.787,26.947,57.129c8.75,14.341,39.861,51.401,62.518,59.284c22.657,7.882,70.584,3.578,93.777,0.539c23.191-3.04,40.046-16.464,57.667-35.571s37.188-92.698,37.188-92.698S370.352,425.019,356.933,434.463z"/></g></g></g><g id="Shape_30_1_" enable-background="new "><g id="Shape_30"><g><path fill="#3F2004" d="M231.897,225.352c-1.881-7.981-10.494-13.67-22.097-15.091c-11.604-1.421-21.434,0.302-35.032,1.078s-19.437,4.573-26.947,10.24c-7.51,5.666,1.881,6.692,5.389,7.545c3.508,0.853,31.508,2.943,37.188,0.539S233.778,233.333,231.897,225.352z"/></g></g></g><g id="Shape_31_1_" enable-background="new "><g id="Shape_31"><g><path fill="#3F2004" d="M360.705,210.261c-11.251-4.372-14.997-0.922-27.486,0.539c-12.489,1.462-24.105,0.038-33.414,3.234c-9.309,3.195,1.441,12.407,8.623,12.396c7.181-0.012,27.118-1.254,36.648,1.616c9.529,2.871,30.822,3.454,35.57-0.538C385.394,223.515,371.956,214.634,360.705,210.261z"/></g></g></g><g id="Shape_19_1_" enable-background="new "><g id="Shape_19"><g><path fill="#655B8A" d="M283.053,392.926c-10.057,0.207-11.616,1.686-22.275,3.267c-10.659,1.581-10.426-6.542-23.022-3.781c-12.596,2.761-25.799,7.021-25.799,7.021s28.317,10.838,48.647,11.168c20.329,0.331,49.44-10.629,49.44-10.629S293.109,392.719,283.053,392.926z"/></g></g></g><g id="Shape_22_1_" opacity="0.502" enable-background="new "><g id="Shape_22"><g><path fill="#778EDA" d="M224.548,314.187c-1.968-6.26-13.062-7.042-28.065,11.612c-15.004,18.653-19.792,33.812-13.816,40.449c5.975,6.636,21.378-3.489,28.3-14.297c6.923-10.808,6.873-18.896,8.649-24.671S226.517,320.446,224.548,314.187z"/></g></g></g><g id="Shape_23_1_" opacity="0.502" enable-background="new "><g id="Shape_23"><g><path fill="#778EDA" d="M336.453,336.375c-11.593-14.749-21.609-22.775-31.799-24.792s-17.371-8.705-17.246,0c0.125,8.7,19.539,28.771,35.032,46.889c-8.511-9.952,16.712,15.322,22.636,13.474C350.999,370.097,348.045,351.123,336.453,336.375z"/></g></g></g><g id="Shape_7_1_" enable-background="new "><g id="stache"><g><path d="M343.459,385.958c-8.026-13.198-11.664-15.707-30.72-25.869s-24.212-14.615-33.954-15.63s-10.875,5.157-17.246,5.929c-6.372,0.771-5.754-7.548-19.941-5.929c-14.188,1.619-29.7,14.218-43.116,25.869c-13.416,11.652-25.025,23.285-22.636,37.727c1.312,7.93,5.914,10.577,16.708,7.545c10.794-3.031,9.104-3.549,14.013-12.935c4.908-9.385,13.221-20.544,25.331-25.33s19.119,1.81,26.408,0.539c7.29-1.271,21.546-3.61,31.26-1.617c9.713,1.994,19.425,10.251,23.714,20.48c3.1,7.395,0.016,13.696,8.623,17.246c8.607,3.549,15.169,3.331,23.175-1.617C353.597,407.101,351.485,399.156,343.459,385.958z"/></g></g></g><g id="Shape_9_1_" enable-background="new "><g id="Shape_9"><g><path fill="#A8FEFD" d="M335.982,237.056c-4.43-6.002-52.03,1.25-52.03,1.25s-9.712,10.596-8.776,20.627s1.038,17.565,8.46,20.853c7.422,3.288,41.325,2.732,47.332-0.851C336.974,275.351,340.412,243.057,335.982,237.056z"/></g></g></g><g id="Shape_28_1_" enable-background="new "><g id="Shape_28"><g><path fill="#7472A5" d="M373.64,238.825c-4.976-11.085-24.15-8.245-29.642-7.006c-5.491,1.238,13.192,8.115,15.629,21.019c2.438,12.904,13.999,17.245,20.48,12.935C386.589,261.463,378.616,249.91,373.64,238.825z"/></g></g></g><g id="Shape_29_1_" enable-background="new "><g id="Shape_29"><g><path fill="#7472A5" d="M149.438,242.598c-7.092,7.745-11.57,22.63-2.156,23.714s11.987-8.644,14.551-15.629c2.564-6.986,11.318-14.013,11.318-14.013S156.53,234.853,149.438,242.598z"/></g></g></g><g id="Shape_8_1_" enable-background="new "><g id="Shape_8"><g><path fill="#A8FEFD" d="M240.524,258.432c-2.691-12.624-11.423-21.694-11.423-21.694s-51.093-6.535-53.941-1.914s2.437,38.493,5.077,42.112c2.64,3.619,52.037,4.467,52.037,4.467S243.215,271.056,240.524,258.432z"/></g></g></g><g id="Shape_10_1_" enable-background="new "><g id="Shape_10"><g><path fill="#7285D2" d="M242.676,237.208c0,0-8.872-1.796-13.474-2.694c-4.602-0.897-4.717-5.118-12.935-7.006c-8.218-1.889-27.486-4.851-27.486-4.851s-2.756,5.021,5.389,5.928c8.146,0.908,26.955,6.827,36.11,12.936c9.154,6.107,7.114,12.86,5.928,21.019c-1.187,8.158-9.737,22.556-15.629,29.642c-5.893,7.087-30.72,8.085-30.72,8.085l4.851,4.851c0,0,23.015-5.413,31.259-9.162c8.245-3.75,6.118-9.395,10.24-15.63s4.508-16.491,7.006-21.558s3.233-7.007,3.233-7.007L242.676,237.208z"/></g></g></g><g id="Shape_11_1_" enable-background="new "><g id="Shape_11"><g><path fill="#7285D2" d="M327.291,294.337c0,0-23.771,4.154-31.799-4.851c-8.025-9.005-16.276-15.361-17.785-25.869c-1.508-10.509-2.795-13.644,3.234-21.02s12.852-9.112,22.636-11.856s22.553-5.806,25.869-5.39c3.317,0.416-5.39-4.851-5.39-4.851s-24.035,4.386-32.337,7.007s-20.479,10.239-20.479,10.239l-3.773,17.247c0,0,4.475,9.976,9.162,19.401c4.689,9.427,9.52,19.239,19.402,21.559c9.883,2.318,24.641,7.124,31.26,5.389C333.909,299.608,327.291,294.337,327.291,294.337z"/></g></g></g><g id="Shape_6_1_" enable-background="new "><g id="Shape_6"><g><path fill="#9B8FD7" d="M274.9,306.478c-3.162-10.921-7.281-26.692-16.855-25.947c-9.574,0.746-12.251,16.446-17.697,25.407c-7.234,11.9-17.613,20.416-12.641,32.433c4.972,12.018,15.896-3.771,20.898-3.073c5.001,0.697,4.263,4.807,9.162,5.39c4.898,0.583,6.366-5.809,12.396-3.772c6.03,2.035,15.409,4.73,17.785-2.695C290.323,326.794,278.061,317.398,274.9,306.478z"/></g></g></g><g id="Shape_18_1_" opacity="0.502" enable-background="new "><g id="Shape_18"><g><path fill="#A8FEFD" d="M268.006,297.031c-0.822-1.359-16.094-5.34-18.863,2.156c-2.768,7.496-7.621,17.295-4.312,18.324c8.258,2.569,22.957,2.334,26.948,1.616C278.034,318.004,269.608,299.681,268.006,297.031z"/></g></g></g><g id="Shape_3_1_" enable-background="new "><g id="Shape_3"><g><path fill="#3F2004" d="M455.973,255.16c-3.531-4.478-15.573-0.497-15.573-0.497l-12.864,94.889c0,0,15.702,3.53,23.021,2.484s7.75-31.755,8.803-38.75C460.41,306.29,459.504,259.638,455.973,255.16z"/></g></g></g><g id="Shape_2_1_" enable-background="new "><g id="Shape_2"><g><path fill="#ECEA43" d="M440.47,232.358c-6.364-5.785-23.733-11.778-33.954-8.624c-10.22,3.155-1.92,31.176-2.155,61.979c-0.236,30.803-14.129,65.757-12.396,73.297c1.733,7.54,7.275,8.144,16.708,9.162c9.433,1.018,13.83,0.73,17.246-3.772c3.416-4.504,8.346-33.644,11.856-62.519c2.132-17.525,5.013-37.258,5.525-51.355C443.632,241.397,442.971,234.632,440.47,232.358z"/></g></g></g><g id="Shape_5_1_" enable-background="new "><g id="Shape_5"><g><path fill="#3F2004" d="M82.708,265.922c0,0-16.342-7.97-16.481-3.708c-0.138,4.192-9.835,32.091-7.854,58.935c1.848,25.038,9.119,40.782,12.082,43.988c3.162,3.423,16.896-2.021,21.317-2.354C96.442,362.432,82.708,265.922,82.708,265.922z"/></g></g></g><g id="Shape_32_1_" enable-background="new "><g id="Shape_32"><g><path fill="#655B8A" d="M298.904,416.325c-2.81-2.947-26.936-2.652-37.63-2.897s-33.604-0.074-36.84,3.076c-3.236,3.15,1.759,2.332,4.124,3.977c2.365,1.645,23.481,5.587,34.244,5.972C273.566,426.836,301.715,419.273,298.904,416.325z"/></g></g></g><g id="Shape_4_1_" enable-background="new "><g id="Shape_4"><g><path fill="#ECEA43" d="M117.101,313.2c-3.057-47.69-3.411-67.479-8.084-74.375c-4.673-6.896-6.907,3.044-15.09,0s-18.231,1.779-19.402,6.468c-1.171,4.688,13.628,47.57,13.474,61.439c-0.155,13.87,1.333,54.814,2.156,60.901s1.652,7.852,14.013,8.084c12.36,0.232,18.666,3.183,22.636-1.078C130.771,370.38,120.158,360.891,117.101,313.2z"/></g></g></g><g id="Shape_12_1_" enable-background="new "><g id="Shape_12"><g><path fill="#232848" d="M187.703,296.492c0,0-37.37,3.886-46.888-8.084c-9.519-11.969-6.467-19.402-6.467-19.402l-5.929-15.09c0,0-1.85-6.268,7.006-15.091s50.661-6.467,50.661-6.467l-6.467-12.936c0,0-43.406,3.853-52.817,6.468c-9.411,2.614-23.714,7.545-23.714,7.545l3.773,15.091c0,0,3.92,4.123,8.084,5.929c4.164,1.805,4.279,31.037,17.247,40.96c12.967,9.922,60.362,11.856,60.362,11.856L187.703,296.492z"/></g></g></g><g id="Shape_15_1_" enable-background="new "><g id="Shape_15"><g><polygon fill="#A8FEFD" points="249.143,238.286 250.76,249.604 263.156,250.683 265.312,237.747 "/></g></g></g><g id="Shape_13_1_" enable-background="new "><g id="Shape_13"><g><path fill="#232848" d="M406.516,221.579c0,0-15.433,0.879-27.486-2.695c-12.054-3.573-43.115-2.155-43.115-2.155l1.077,9.701c0,0,20.751,1.788,31.26,2.694c10.508,0.906,12.216,7.528,17.246,21.02c5.03,13.49-2.738,28.364-12.396,36.109c-9.658,7.745-43.655,8.084-43.655,8.084l4.851,10.24c0,0,49.34-9.712,57.128-24.253c7.789-14.541,2.333-31.1,11.318-34.492s11.318-8.085,11.318-8.085L406.516,221.579z"/></g></g></g><g id="Shape_14_1_" opacity="0.502" enable-background="new "><g id="Shape_14"><g><path fill="#7285D2" d="M298.188,458.716c-15.885-12.702-26.725-23.815-35.57-22.636c-8.847,1.18-23.779,9.131-34.493,24.253c-10.713,15.122-3.154,24.036,2.156,31.259c5.311,7.222,13.909,12.926,29.642,11.856s37.373-0.321,39.883-13.474C302.313,476.822,314.072,471.418,298.188,458.716z"/></g></g></g><g id="Shape_20_1_" opacity="0.502" enable-background="new "><g id="Shape_20"><g><path fill="#778EDA" d="M311.661,196.787c-10.271-7.531-18.062-5.556-28.025-1.077c-9.964,4.478-10.821,5.274-24.792,4.85c-13.969-0.425-18.076-6.575-30.72-8.084c-12.643-1.509-27.563,3.637-21.558,8.623c6.006,4.987,19.239,12.999,30.181,14.552c10.941,1.553,14.974,2.261,25.87,1.617c10.895-0.645,20.114,1.527,32.336-3.772C307.176,208.195,321.933,204.319,311.661,196.787z"/></g></g></g><g id="Shape_26_1_" enable-background="new "><g id="Shape_26"><g><path fill="#232848" d="M238.364,328.829c-3.835,1.319-3.822,6.099-0.539,5.929s9.721,0.17,9.701-2.694C247.506,329.198,242.199,327.511,238.364,328.829z"/></g></g></g><g id="Shape_27_1_" enable-background="new "><g id="Shape_27"><g><path fill="#232848" d="M277.168,329.368c-2.378-2.308-5.848-1.76-7.006,1.078c-1.157,2.838,7.793,4.818,10.24,4.312S279.547,331.676,277.168,329.368z"/></g></g></g><g id="Shape_34_1_" enable-background="new "><g id="Shape_34"><g><path fill="#7472A5" d="M257.767,14.084c-4.271-7.574-22.636-2.155-22.636-2.155s1.177,7.487,10.24,8.623c9.063,1.135,14.012,9.701,14.012,9.701S262.037,21.658,257.767,14.084z"/></g></g></g><g id="Shape_35_1_" enable-background="new "><g id="Shape_35"><g><path fill="#7472A5" d="M265.851,17.318c-6.729,6.705-7.007,12.935-7.007,12.935s7.879-1.801,11.857-5.39s9.701-14.013,9.701-14.013S272.58,10.612,265.851,17.318z"/></g></g></g><g id="Ellipse_1_1_" opacity="0.302" enable-background="new "></g></g></switch></svg>

		<h1 class="title"><span class="nate">Nate</span> <span class="beaty">Beaty</span></h1>
		<nav class="main">
			<a class="comics" href="/comics"><span>Comics</span></a>
			<a class="journal" href="/journal"><span>Journal</span></a>
			<a class="animation" href="/animation"><span>Animation</span></a>
			<a class="featured" href="/featured"><span>Featured</span></a>
		</nav>
	</section>
              
            
!

CSS

              
                $comics: #ff1412;
$journal: #00597d;
$animation: #cd3b5c;
$featured: #e1992e;

*, *:before, *:after { box-sizing: border-box; }
body { 
  background: $comics;
  transition: background-color .25s ease-out;
}
nav.main {
  height: 100vh;
  a {
    font: italic 24px/1 "Anonymous Pro", monospace;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-decoration: none;
    display: block;
    position: absolute;
    width: 50%;
    height: 50vh;
    transition: all .3s, border-color 0.01s;
    border: 0 solid rgba(0,0,0,0);
    &:hover span {
      // text-decoration: strike-through;
      text-decoration: underline;
    }

    span {
      display: block;
      position: absolute;
      left: 30%;
      top: 50%;
      transform: translateY(-50%);
    }
    &.journal,
    &.featured {
      span {
        left: auto;
        right: 30%;
      }
    }
    &.comics {
      top: 0;
      left: 0;
      background: $comics;
    }
    &.journal {
      top: 0;
      right: 0;
      background: $journal;
    }
    &.animation {
      bottom: 0;
      left: 0;
      background: $animation;
    }
    &.featured {
      bottom: 0;
      right: 0;
      background: $featured;
    }
  }
}
#natehead {
	pointer-events: none;
	position: absolute;
	top: 50%;
	left: 50%;
  width: 500px;
  height: 500px;
  margin: -250px;
  z-index: 2;
  transition: all .25s ease-out;
}
h1.title {
	position: absolute;
	top: 35%;
	left: 50%;
	font: italic 24px/1 "Anonymous Pro";
	color: #fff;
	text-transform: uppercase;
	letter-spacing: -1px;
	z-index: 100;
	.nate {
		display: block;
		position: absolute;
		right: 0;
		text-align: right;
		top: .4em;
	}
	.beaty {
		top: 0;
		display: block;
		position: absolute;
	}
}
#Shape_7_1_ {
	background:transparent;
  border: 1px solid blue;
}


// @media screen and (max-width: 540px) {
// 	#wrapper { padding: 20px 40px; }
// 	#header { margin-bottom: 40px; }
// 	h1 { font-size: 17px; }
// 	#footer { margin-top: 40px; padding-bottom: 20px; }
// }

// @media screen and (max-width:440px) {
// 	#thumbnails a:nth-child(n) {
// 		width: 100%;
// 		max-width: 300px;
// 		margin: 0 auto;
// 		margin-top: 20px;
// 		display: inline-block;
// 		float: none;
// 	}

// 	a#docs { display: none; }
// 	#thumbnails a:first-child { margin-top: 0; }
// 	#header { text-align: center; margin-bottom: 0; }
// 	#wrapper { padding: 20px 20px 40px 20px; }
// 	.post { margin-bottom: 40px; }
// 	#footer { text-align: center; padding-bottom: 15px; }
// }

// general "in a section" body state
body.in-section {
  #natehead {
    pointer-events: auto;
    transform: scale(.3);
    top: 50px;
  }
  h1.title {
    display: none;
  }
  nav.main a {
    height: 50px;
  }
}

// section specifics

// comics
body.active-comics {
  #natehead {
    top: calc(100% - 50px);
  }
  nav.main a.journal {
    height: calc(100% - 50px);
    width: 50px;
    span {
      transform: rotate(90deg);
      transform-origin: top right;
      right: 20%;
      top: 25vh;
    }
  }
}
// journal
body.active-journal {
  background: $journal;
  #natehead {
    top: calc(100% - 50px);
  }
}
// animation
body.active-animation {
  background: $animation;
}
// featured
body.active-featured {
  background: $featured;
}

// rotate offside links 90deg
body.active-comics nav.main a.journal,
body.active-journal nav.main a.comics,
body.active-animation nav.main a.featured,
body.active-featured nav.main a.animation {
  height: calc(100% - 50px);
  width: 50px;
  span {
    transform: rotate(90deg);
    transform-origin: top right;
    right: 20%;
    top: 25vh;
  }
}

body.active-animation nav.main a.animation,
body.active-featured nav.main a.featured,
body.active-journal nav.main a.journal,
body.active-comics nav.main a.comics {
  font: italic 30px/1 "Anonymous Pro", monospace; 
  span {
    text-decoration: underline;
  }
}

body.active-animation nav.main a.animation,
body.active-featured nav.main a.featured {
  bottom: calc(100vh - 100px);
}

// homepage hover effect giant oldskool border madness
body:not(.in-section) {
  nav.main a {
    &.comics {
      &:hover {
        border-bottom: 25vh solid darken($comics,10%);
        border-right: 25vh solid lighten($comics,10%);
      }
    }
    &.journal {
      &:hover {
        border-bottom: 25vh solid darken($journal,10%);
        border-left: 25vh solid lighten($journal,10%);
      }
    }
    &.animation {
      &:hover {
        border-top: 25vh solid lighten($animation,10%);
        border-right: 25vh solid darken($animation,10%);
      }
    }
    &.featured {
      &:hover {
        border-top: 25vh solid lighten($featured,10%);
        border-left: 25vh solid darken($featured,10%);
      }
    }
  }
}

              
            
!

JS

              
                $(document).ready(function() {
	$('#stache').velocity({ fill: '#000' });
	$('nav a').hover(function() {
		var bg = $(this).css('background-color');
		$('#stache').stop().velocity({ fill: rgb2hex(bg) });
	});
  $('#natehead').click(function(e) {
    $('body').attr('class', '');
    // clicked head
    
  });
	$('nav a').click(function(e) {
		e.preventDefault();
    var href = $(this).attr('href').replace('/','');
    $('body').attr('class','in-section active-' + href);
	});

});

function rgb2hex(rgb) {
    rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
    function hex(x) {
        return ("0" + parseInt(x).toString(16)).slice(-2);
    }
    return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
}

              
            
!
999px

Console