$(document).ready(function(){

	$("#search-input").hide();
	$("#inlog-input").hide();
	
	$("#toggle-search").click(function () {
	  if ($("#search-input").is(":hidden")) {
		$("#search-input").slideDown("fast");
	  } else {
		$("#search-input").slideUp("fast");
	  }
	});
	
	$("#toggle-inlog").click(function () {
	  if ($("#inlog-input").is(":hidden")) {
		$("#inlog-input").slideDown("fast");
	  } else {
		$("#inlog-input").slideUp("fast");
	  }
	});
	
	    
	$(".handle h4").click(function () {
	  if ($(this).next().is(":hidden")) {
		$(".newsitem").slideUp("fast");
		$(this).next().slideDown("fast");
	  } else {
		$(this).next().slideUp("fast");
	  }
	});
	
	$(".NAV5 li.haschildren").click(function () {
		//alert('yep');
		//$('.NAV5 li.haschildrenactive ul').hide('slow');
		$('.NAV5 .haschildrenactive').addClass('haschildren');
		$('.NAV5 .haschildrenactive').removeClass('haschildrenactive');
		$(this).children('ul').show('fast');
		$(this).removeClass('haschildren');	
		$(this).addClass('haschildrenactive');			
	});
	
	$("#accordion .item h4").click(function() {
		$("#accordion div.accordion-content").hide('slow');
		$(this).next('.accordion-content').show('slow');
	});
	
});
