function fixPNGs(){
	if(jQuery.browser.msie && jQuery.browser.version < 9)
	{
 		var i;
 		for(i in document.images){
   			if(document.images[i].src)
   			{
  				var imgSrc = document.images[i].src;
  				if((imgSrc.substr(imgSrc.length-4) === '.png' || imgSrc.substr(imgSrc.length-4) === '.PNG') && document.images[i].className!='nofix')
  				{
  					document.images[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='crop',src='" + imgSrc + "')";
  				}
   			}
 		} 
	}
}

function checkHtml5()
{
	var test = document.createElement('input');
	test.setAttribute('type', 'email');
	
	return(test.type !== 'text')
}

$(function() {
	
	$('.colorbox-pic').colorbox();
	
	$('#widget_menu_top > li').hover(function() {
		$this = $(this);
		$('#widget_menu_top li ul').hide();
		$this.find('ul').stop().fadeIn(200);
	}, function() {
		$this.find('ul').delay(500).fadeOut(200);
	})
	
	fixPNGs();
	
	$('.bestemmingmenu > div > h3').click(function(){
		$(this).next().slideToggle();
	});
	
	$('#bestemmingen > label').toggle(function(){
		$('#bestemmingen').animate({padding: '0px', height: '0px'}, "medium");
		$('#bestemmingen .bestemming').fadeOut("medium");
	}, function(){
		$('#bestemmingen').animate({padding: '10px 0px', height: '230px'}, "medium");
		$('#bestemmingen .bestemming').fadeIn("medium");
	});
})
