function load_behaviors () {
  
 $('a#about-btn').click(function() {
  $('div#about').slideToggle('fast');
 });
 
 $('a#hilite-skills').click(function() {
  $('#about span.skill').attr('class', 'hi-lite');
 }); 
 
 $('#nav').children('a').each(function(index) {
    $(this).click(function() {
      if ($(this).attr('class') != "no-anchor") {
        hide_all_sections();
        $($(this).attr('href')).slideDown("fast");
        $(this).addClass("over");
        return false;
      };
    });
   });
 
	$("#tweets").getTwitter({
		userName: "vanntastic",
		numTweets: 10,
		loaderText: "Loading tweets...",
		slideIn: false,
		showHeading: false,
		headingText: "Latest Tweets",
		showProfileLink: true
	});
 
 $('a').children('img').each(function(index) {
  $(this).parent().addClass('img');
 });

 
 $('.slider').easySlider();
 
}

function hide_all_sections () {
  $('#nav').children('a').each(function(index) {
    $(this).removeClass("over");
  });
  
  $('#displays').children('div').each(function(index) {
    $(this).attr('style', 'display:none');
  });
}

function set_tab () {
  loc = document.location.href.split("#")[1];
  $("#nav").children('a').each(function(index) {
    if (loc == undefined) {
      $('a[href="#work"]').addClass("over");
    }else{
      anchor = "#" + loc;
      if ($(this).attr('href') == anchor) {
        $(this).addClass('over');
        $('#work').hide('fast');
        $(anchor).show('fast');
      };
    };
    return true;
  });
}

$(document).ready(function() {
  load_behaviors();
  set_tab();
});
