	$(document).ready(function(){

// png voor IE
		$('body').pngFix();

// dotted linkline
		$('a').focus(function() {this.blur();});

// focus op input
		$('input[type="text"]').addClass("idleField");
		$('input[type="text"]').focus(function() {
			$(this).removeClass("idleField").addClass("focusField");
		});
		$('input[type="text"]').blur(function() {
			$(this).removeClass("focusField").addClass("idleField");
		});

// als links niet in markup mogen ivm worst-in-blik.
		$('a.verborgen').each(function(){
			var hiddenLink = $(this).text(),
				splitLink = hiddenLink.split('$'),
				emailLink = splitLink[0]+'@'+splitLink[1]+''+splitLink[2]+'.'+splitLink[3];
			$(this).attr('href', 'mailto:'+emailLink);
			$(this).text(emailLink);
			$(this).removeClass('verborgen');
		});

// form als t-shirt
		$('label.hidden').hide();

// a img hover
		$('a:not(#logo) img').hover(
			function(){
				$(this).stop().animate({"opacity": .6}, 150);
			}, function(){
				$(this).stop().animate({"opacity": 1}, 300);
		});
// special
/*		$('#special').css({'top':'-133px'});
		$('#special h3').css({'display':'none'});
		$('#special h2').css({'display':'block'});
		$('#special').hover(function(){
			$(this).stop().animate({'top':'-20px'}, 300);
		}, function(){
			$(this).stop().animate({'top':'-133px'}, 100);
		});*/


// footer @ bottom of page
		var docH = $(window).height(),
			wrapperH = $('#wrapper').height(),
			footerH = $('#footer').height();
		if((wrapperH+footerH) < docH){
			$('#footer').css({
				'margin-top': (docH - (wrapperH+footerH))+1
			});
		} else {
			$('#footer').css({
				'margin-top':0
			});
		}

	});

// na browser resize, afbeelding ook resizen
	$(window).bind("resize", function(){
		var docH = $(window).height(),
			wrapperH = $('#wrapper').height(),
			footerH = $('#footer').height();
		if((wrapperH+footerH) < docH){
			$('#footer').css({
				'margin-top': (docH - (wrapperH+footerH))+1
			});
		} else {
			$('#footer').css({
				'margin-top':0
			});
		}
		// $('#footer .textwidget p').text((headerH+mainH+footerH) +' - '+ docH +' = '+ (docH - (headerH+mainH+footerH)));
	});

