function submitSearch()
{
	var string = $(".blogInput").attr("value");
	var aantal = string.length;
	
	if(aantal > 2){
		return true;
	} else {
		alert("U zoekwoord moet uit 3 of meer letters bestaan");
		return false;
	}
}

function ajaxLoader(id){
	 $.ajax({
	   type: "POST",
	   url: "http://www.eastwestgeneration.com/index.php?page=blog_ajax&bid="+id,
	   dataType: "html",
	   success: function(html){
		 $(".artikelTitel").remove();
		 $("#artikelInfo").remove();
		 $("#artikelContent").remove();
		 $("#comments").remove();
		 $("#commentsHead").remove(); 
		 $("#contentNews").append(html);
	   }
	 });
}

function slideUpBlog(classes){
}

function moreBlogItems(offset){
	$.ajax({
		   type: "POST",
		   url: "http://www.eastwestgeneration.com/index.php?page=blog_ajax_more_items&offset="+offset,
		   dataType: "html",
		   success: function(html){
			 $(".blogItems").fadeOut();
			 $(".blogItems").remove();
			 $(".blogMore").remove();
			 $(".blogLess").remove();
			 $(".contentLastNews .topLastNews").after(html);
		   }
		 });
}

//-----------------------------------------------------------------------
//admin
//-----------------------------------------------------------------------
var showTextActive = false;
function showText(i){
	if(showTextActive){
		$("."+i).hide();
		showTextActive = false;
	} else {
		$(".commentText").hide();
		$("."+i).show();
		showTextActive = true;
	}
}

$(document).ready(function(){
						   
	
	$("#comments li:not(:.not_hide_comment)").hide();
	
	$('.more_comment').bind('mousedown', function(){
		$('#comments li:not(:.not_hide_comment)').fadeIn();
		$('.more_comment').hide();
		//$(".commentsHeadPijlDown").toggleClass("commentsHeadPijlUp");
	});
	
	$(".itemContentLastMenu:not(:first)").hide();
	
	$(".itemYear:not(:first)").hide();
	
	$(".itemMaandTitel").click(function(){
		$(this).next("ul").slideToggle("slow")
		.siblings("ul:visible").slideUp("slow");		
	});
	
	$(".itemYearTitel").click(function(){
		$(this).next("div").slideToggle("slow")
		.siblings("div:visible").slideUp("slow");		
	});
	
	//---------------------
	//Admin
	//--------------------
	
	
	$(".commentText").hide();
	
	
		
});
