$(document).ready(function(){

	//toggle post-comment
	animatedcollapse.addDiv('respond', 'fade=1,speed=400')
	animatedcollapse.init()
	
	//scroll to # elements
	function filterPath(string) {
   
        return string
  
          .replace(/^\//,'')
   
          .replace(/(index|default).[a-zA-Z]{3,4}$/,'')
   
          .replace(/\/$/,'');
   
        }
   
       
  
        var locationPath = filterPath(location.pathname);
  
        $('a[href*=#]').each(function() {
  
          var thisPath = filterPath(this.pathname) || locationPath;
  
          if (  locationPath == thisPath
  
          && (location.hostname == this.hostname || !this.hostname)
  
          && this.hash.replace(/#/,'') ) {
  
            var $target = $(this.hash), target = this.hash;
  
            if (target) {
  
              var targetOffset = $target.offset().top;
  
              $(this).click(function(event) {
  
                event.preventDefault();
  
                $('html, body').animate({scrollTop: targetOffset}, 800, function() {
  
                  location.hash = target;
  
                });
  
              });
  
            }
  
          }
 
        });

}); //close doc ready


    getTwitters('twitter-top', {
        id: 'nathanstaines', 
        count: 1, 
        withFriends: true, // currently disabled due to change in Twitter API
        enableLinks: true, 
        ignoreReplies: true,
        template: '<h3>My Latest Tweet</h3><ul id="twitter_update_list"><li>%text% <a class="twit-time" href="http://twitter.com/%user_screen_name%/statuses/%id%">%time%</a></li></ul><a href="http://twitter.com/nathanstaines" title="you know you want to" id="twitter-link" style="display:block;text-align:right;">follow me</a>'     
    });