function hover(prevClass,nextClass){
   if(prevClass.className)
      prevClass.className=nextClass;
}

function addLoadEvent(func){
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
		window.onload = func;
		} 
		else{
			window.onload = function(){
				oldonload();
				func();
			 }
		}
}
	      
function toggleDivs(){

    $(document).ready(function(){ 
     
        $('.togglecontent').hide();
        var allToggleContent = $('.togglecontent');
        
        for(var i = 0; i<allToggleContent.length; i++){
            $(allToggleContent[i]).attr('id', 'thisToggle'+i); 
        }
        
        var allToggleSwitches = $('.toggleswitch');
         
        for(var ii = 0; ii<allToggleSwitches.length; ii++){ 
        $(allToggleSwitches[ii]).attr('id', 'thisSwitch'+ii); 
        $('#thisSwitch'+ii).attr('rel', 'thisToggle'+ii); 
            
            $('#thisSwitch'+ii).click(function(){ 
                $('#'+this.rel).slideToggle(1200);
            }); 
                     
        }       
    });
}      