window.addEvent('domready', function() {
  
  // Toggle Paragraphs
  var paragraphs = new Fx.Slide('paragraphs').hide(); //creates new Fx.Slide object from paragraphs div
  $('toggle-paragraphs').addEvent('click', function(e) { //Adds an onClick event to toggle-paragraphs div
    e = new Event(e);
      paragraphs.toggle(); //toggles the div
    if ($('toggle-paragraphs').hasClass('hidden')){
      $('toggle-paragraphs').removeClass('hidden').addClass('visible');
    }
    else {
      $('toggle-paragraphs').removeClass('visible').addClass('hidden');
    }
    e.stop(); //this makes sure that the user wont be sent to given url (or that the page refreshes when using dummy url like "#") if the clicked element was a link 
  });

});
