// JavaScript Document
$(document).ready(function(){ 
      /*$("ul.sf-menu").superfish({ 
			pathClass:     'ptc',
			pathLevels:    3, 
            delay:       2000,                            // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',                          // faster animation speed 
            autoArrows:  false,                           // disable generation of arrow mark-up 
            dropShadows: false                            // disable drop shadows 
        }).superfish();  // call supersubs first, then superfish, so that subs are 
                         // not display:none when measuring. Call before initialising 
                         // containing tabs for same reason. 
	*/
	/*$(".newsclick").toggle(
	  function () {
		$(".newsitem").hide();
		$(".pointer").removeClass("over");
		$(this).siblings(".newsitem").show("slow");
		$(this).parent().children(".pointer").addClass("over");
	  },
	  function () {
		$(this).siblings(".newsitem").hide("slow");
		$(this).parent().children(".pointer").removeClass("over");
		
	  });*/
	  
	  $(".newsclick").click(
	  function () {
		if($(this).siblings(".newsitem").css("display")=="none"){
			$(".newsitem").slideUp();
			$(".pointer").removeClass("over");
			$(this).siblings(".newsitem").slideDown("slow");
			$(this).parent().children(".pointer").addClass("over");
	  	} else {
			$(this).siblings(".newsitem").slideUp("slow");
			$(this).parent().children(".pointer").removeClass("over");
	    }
	  });
	
$(".newsitem").css({'display' : 'none'});
$(".stayopen").css({'display' : 'block'});

if($("#section").val() != 2){
	$(".sf-menu li ul").css({'display' : 'none'});
}
//$(".ptc").parent().parent().css({'display' : 'block'});
//$(".ptc").children("ul").css({'display' : 'block'});

$(".sf-menu li a").click(function(){
							if($(this).parent().children("ul").css("display") == "none"){
								
								$(this).parent().children("ul").slideDown();
								$(this).parent().children("ul").children().children("ul").slideDown();
							} else {
								//$(this).children().children().slideUp();
								
								$(this).parent().children("ul").slideUp();
								
							}
						});
	
}); 

function toggleP(me,target) {
	$("#"+me).hide();	
	$("#"+target).fadeIn("slow");	
}




/*$(function() {
	$('.pics').cycle({
		timeout: 10000 ,	
		delay:  1000, 
		speed:  2000
		
	});
}); */
