$(document).ready(function(){

   $("a.main2").click(function(event){
     $("#menu2").slideToggle('fast');
     $("#sep1").toggle();
    $("#menu3").hide();
    $("#sep2").hide();
     /*$("#menu1 a").css('font-weight','normal');
     if($(this).css('font-weight')!='bold'){
     	$(this).css('font-weight','bold');
 	 }else{
 	 	$(this).css('font-weight','normal');
 	 }*/
   });


$("a.main3").click(function(event){
  $("#menu3").slideToggle('fast');
  $("#sep2").toggle();
  $("#menu2").hide();
  $("#sep1").hide();
});

   $("#menu2 a").click(function(event){
   		$("#sep1").toggle();
   		$("#menu2").slideToggle('normal',function(){
   			content();
   		});
   	});

   $("#menu3 a").click(function(event){
   		$("#sep2").toggle();
   		$("#menu3").slideToggle('normal',function(){
   			content();
   		});
   	});


 });

  $(window).hashchange( function(){
    if(location.hash){
      content("#"+location.hash);
    }
  })
 	function precontent(){
 		$("#menu2").slideUp();
   	 	$('#sep1').hide();
   		$("#menu3").slideUp();
   	 	$('#sep2').hide();
   		/*$("#menu1 a").css('font-weight','normal');
	   	if($("a."+class).css('font-weight')!='bold'){
	     	$("a."+class).css('font-weight','bold');
	 	 }else{
	 	 	$("a."+class).css('font-weight','normal');
	 	 }*/
 		//window.location.hash = section;
 		//content(section)
 	}
  function confirmDelete(id){
    a = confirm("Are you sure you want to delete this news item?");
    if(a){
      document.location = '/admin/deletenewsitem/'+id;
    }
  }
