function initPage() {
	initDropDown();
}

function initDropDown()
{
	var nav = document.getElementById("nav");
	if(nav) {
		var lis = nav.getElementsByTagName("li");
		for (var i=0; i<lis.length; i++) {
			if(lis[i].getElementsByTagName("ul").length > 0) {
				lis[i].className += " has-drop-down";
				lis[i].getElementsByTagName("a")[0].className += " has-drop-down-a";
				/** START ACTENCY **/
				lis[i].getElementsByTagName("span")[0].className += " has-drop-down-a";
				/** END ACTENCY **/
			}
		}
	}
}


if (window.addEventListener)
	window.addEventListener("load", initPage, false);
else if (window.attachEvent && !window.opera)
	window.attachEvent("onload", initPage);



/** START ACTENCY **/
$(function(){
  // defining some variables for later use
  $container = $("#reponsebesoin", "#content.page_48");
  
  // adding css to all wanted h3 and dl
  $("h3", $container).css({"cursor":"pointer"});
  $("dl", $container).css({"display":"none"});
  
  
  // adding some css and a class to all wanted dl
  var i = 1;
  var elemClass = '';
  var isExpanded = new Array();
  $("div", $container)
  .each(function(){
	$(this).addClass("reponse_"+i);
	isExpanded["reponse_"+i] = 0;
	i++;
  })
  .click(function(){
	elemClass = $(this).attr("class");
	if(isExpanded[elemClass] == 0){
	  $("dl", "div."+elemClass).stop(true).slideToggle("slow", function(){$(this).removeAttr("style")});
	  isExpanded[elemClass] = 1;
	} else {
	  $("dl", "div."+elemClass).stop(true).slideToggle("slow", function(){$(this).removeAttr("style").css("display","none")});
	  isExpanded[elemClass] = 0;
	}
  })
  /*.hover(
      function(){
    	elemClass = $(this).attr("class");
	    $("dl", "div."+elemClass).stop(true).slideToggle("slow", function(){$(this).removeAttr("style")});
	  },
	  function(){
	    elemClass = $(this).attr("class");
	    $("dl", "div."+elemClass).stop(true).slideToggle("slow", function(){$(this).removeAttr("style").css("display","none")});
	  }
  )*/;
});
/** END ACTENCY **/



