﻿$(function() {

	/*
	 * searchform
	 */
	$('#expand').click( function() {
		SearchForm.expand();
		return false;
	});

	$('#collapse').click( function() {
		SearchForm.collapse();
		return false;
	});
	
	/*
	 * link row
	 */
	$('#search_results tr.odd, #search_results tr.even').click( function() {
		document.location.href = $(this).find('a').attr("href");
		return false;
	});
	
	/*
	 * tooltip
	 */
	$("#search_results .icon").tooltip({
		track: true, 
		delay: 0, 
		bodyHandler: function() {
			return $('#' + $(this).attr("class").substr(5)).html();
		}, 
		fixPNG: true
	});
	
	/*
	 * autocomplete
	 */
	$("#plaats").autocomplete(plaatsen);
	
	/*
	 * pngfix
	 */
	$("a, label").pngfix(); // all
	$(".intro, #homebox h2").pngfix(); // home
	$("#search_form h2, #search_form_closed h2, td span, .icons_legenda, .icons_legenda span").pngfix(); // search
	$("#projectbox_top, #projectbox_bottom, .summary, .summary_bottom").pngfix(); // project
	
});
