//Cufon.replace('h1, h2, .menu ul li a, ol li a, .datum_blokje .dag, .datum_blokje .maand, .slider-titel');

$(document).ready(function () {
 
 	$('.menu ul li a').append('<span class="pijltje"></span>');
	
    //Append a div with hover class to all the LI
	$('.menu ul li a .pijltje').hide();
	$('.menu ul li a.active .pijltje').show();
 
    $('.menu ul li a').hover(
         
        //Mouseover, fadeIn the hidden hover class 
        function() {
             
            $(this).children('span').fadeIn('1000');
         
        },
     
        //Mouseout, fadeOut the hover class
        function() {
         if( $(this).hasClass('active') == false){
            $(this).children('span').fadeOut('1000');   
		 }
         
    }).click (function () {
     
        //Add selected class if user clicked on it
        $(this).addClass('active');
         
    });
	
	if (hasBorderRadius()) { // 1
$("img.afgeronde_hoekjes").each(function() { // 2
$(this).wrap('<div class="afgeronde_hoekjes" />'); // 3
var imgSrc = $(this).attr("src"); // 4
var imgHeight = $(this).height(); // 4
var imgWidth = $(this).width(); // 4
$(this).parent()
.css("background-image", "url(" + imgSrc + ")")
.css("background-repeat","no-repeat")
.css("height", imgHeight + "px")
.css("width", imgWidth + "px"); // 5
$(this).remove(); // 6
});
}
 
});

function hasBorderRadius() {
var d = document.createElement("div").style;
if (typeof d.borderRadius !== "undefined") return true;
if (typeof d.WebkitBorderRadius !== "undefined") return true;
if (typeof d.MozBorderRadius !== "undefined") return true;
return false;
};
