var defaultSearch = "";
var defaultMap = "";
$(document).ready(function () {
	/*$("#search label").inFieldLabels();*/
	var bodyClass = $("body").attr("class");

	/* Superfish */


	defaultSearch = $('#zoekveld').attr('value');

	$('#zoekveld').focus(function () {
		if ($(this).attr('value') == defaultSearch) {
			$(this).attr('value', '');
		}
	});

	$('#zoekveld').blur(function () {
		if ($(this).attr('value') == '') {
			$(this).attr('value', defaultSearch);
		}
	});

	/* Toevoegen van span tags binnen de headers, op deze manier kan sIFR mooier de verschillende paginastijlen zien */
	$("h2, h3, h4").each(function () {
		var html = $(this).html();
		$(this).html('<span class="' + bodyClass + '">' + html + "</span>");
	});


	/*paginatitel als img uitschrijven bij voor printen*/
	$("body").each(function () {
		if ($(this).attr('class') == 'westlandsezoom') {
			var printimg = 'westlandsezoom';
		} else if ($(this).attr('class') == 'duinen') {
			var printimg = 'duinen';
		} else if ($(this).attr('class') == 'kreken') {
			var printimg = 'kreken';
		} else if ($(this).attr('class') == 'dorp') {
			var printimg = 'dorp';
		} else if ($(this).attr('class') == 'gouw') {
			var printimg = 'gouw';
		} else {
			var printimg = ''
		};

		if (printimg != '') {
			$("#header").append('<img src="' + defaultMap + '/bg-content-' + printimg + '.png" class="printimg"/>');
		}

	});
});
