window.addEvent('domready', function() {
	new SmoothScroll({ duration:1400 }, window);
	var el = window.location.hash.substring(1); // the hash
	if(el) {
		window.scrollTo(0,0);
		var scroll = new Fx.Scroll(window, { wait: false, duration: 700, transition: Fx.Transitions.Quad.easeInOut });
		scroll.toElement(el);
	}
});

window.onload = function() {
  	var queryString = window.top.location.search.substring(1);
  	
  	if (queryString && queryString.length > 0) {
	  	toggleNews(queryString);
  	
   	}
}

function toggleNews(newsId) {
  var node = document.getElementById(newsId);

  if (node.className == "newsItem")
  	node.className = "fullNewsItem";
  else
  	node.className = "newsItem";
}

