//we define two arrays, containing our toggles and divs.
function init(){
  var myDivs = document.getElementsByClassName('newsContent');
  var myLinks = document.getElementsByClassName('newsHead');

  for( var z=0; z<myDivs.length; z++ ){	
	  myDivs[z].style.display='block';
  }

  //then we create the effect.
  var myAccordion = new fx.Accordion(myLinks, myDivs, {opacity: true});

  //hash function
		
  function checkHash(){
	  myLinks.each(
      function(h4, i){
	      if (window.location.href.indexOf(h4.id) > 0) {
          myAccordion.showThisHideOpen(myDivs[i]);
	      }
  	  }
    );
  }	
  checkHash();
}
