	$(function() {
		/*
$("#accordion").accordion({
			autoHeight: false
		});
*/
		$(".linktoartikel").bind("click", function(e){
		//alert("this="+$(this).attr("href"));
		$('.linktoartikel').removeClass("selected");
		$(this).addClass("selected");
		//loadcontent($(this).attr("href"));
		location($(this).attr("href"));
		return false;
		});
		
		$(".artikelthumb").bind("click", function(e){
		//alert("this="+$(this).attr("rel"));
		$('.linktoartikel').removeClass("selected");
		$(this).addClass("selected");
		//loadcontent($(this).attr("rel"));
		location($(this).attr("rel"));
		return false;
		});
		 $("#zoeken").keypress(function (e) {
			if (e.which == 13 ) {
			      zoek();          
			}
			});
		$("#vergrootglas").click(function () {
			zoek();
		} );
		// hover functies standaard rollovers
		$('#emaillink').hover(
			function () {
				$(this).attr("src","images2/topemail_f2.png");
			}, 
			function () {
				$(this).attr("src","images2/topemail.png");
			}
		);
	});

function loadcontent(href) {
	//hoofdclick van accordiom header afvangen
	// andere content van de thumbnails
    //alert("functie loadcontent "+"artikeloverzicht.php"+href)
    $("#overzicht_thumbs").load("pages/artikeloverzicht.php"+href);
};
function zoek() {
	var zoekwoorden = $('#zoeken').val();
	$.post("/zoek/zoekform_overzicht.php", {zoekwoorden: ""+zoekwoorden+"", action: "zoeken"}, 
	function(data){
		if(data.length >0) {
			//alert("Data gevonden");
			$('#overzicht_thumbs').html(data);
			$('#wrapper').html(data);
			
		};
	});
}
function lookup(inputString) {
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#suggestions').hide();
		} else {
			$.post("autoComplete/rpc.php", {queryString: ""+inputString+""}, function(data){
				if(data.length >0) {
					if (data != "geen resultaat") {
					$('#suggestions').show();
					$('#autoSuggestionsList').html(data);
					} else {
						$('#suggestions').hide();
					}
				}
			});
		}
	} // lookup
	
	function fill(thisValue) {
		$('#zoeken').val(thisValue);
		setTimeout("$('#suggestions').hide();", 200);
	}
