// paper toggle effect
      $(document).ready(function() {
        $('.paperHead').click(function (event) {
				  event.preventDefault();
          if ($(this).next().is(':hidden')) 
      		{
            $(this).next().slideDown('slow');
          } else {
            $(this).next().slideUp('fast');
          }
        });
      });
			
      // back to top function
      $('a.toTop').click(function(){
          $('html, body').animate({scrollTop: '0px'}, 300);
        return false;
      });
      // contact form
      $(function () {
        var contactContainers = $('div.contactBox > div');
        contactContainers.hide().filter(':first').show();
				
        $('div.contactBox ul.contactMenu a').click(function () {
          contactContainers.hide();
          contactContainers.filter(this.hash).show();
          $('div.contactBox ul.contactMenu a').removeClass('selected');
            $(this).addClass('selected');
          return false;
        }).filter(':first').click();
      });
      // stack and spread commands
			$(document).ready(function() {
  		  $('.spread').click(function () {
          if ($(".paperBody").is(":hidden")) 
  				{
            $(".paperBody").slideDown("slow");
          } 
        });
  		  $('.stack').click(function () {
          if ($(".paperBody").is(":visible")) 
  				{
            $(".paperBody").slideUp("fast");
          } 
        });
		});