function showBlock(id) {
    $("#" + id).slideDown("fast", function() {
        //drawCorners($(".blockContent"), "10px bl br");
    });
}

function hideBlock(id) {
    $("#" + id).slideUp();
}

function swapPolaroid() {
	var count = Math.floor(11 * Math.random()) + 1;
	//$(".polaroid img").fadeOut();
	$(".polaroid img").attr("src", "/images/kellyclarkson-foto" + count + ".png");
	//$(".polaroid img").fadeIn();
	setTimeout("swapPolaroid()", 5000);
}

$(document).ready(function() {
    drawCorners = function(obj, params) {
        // not in IE6
        if (!$.browser.msie || $.browser.version > 6) {
            obj.corner(params);
		}
    }
    
    // Set menuitems
    $("#kelly, #nieuws, #media, #songs, #fotos, #tours").each(function() {
        var menuitem = $(this);
        var href = menuitem.children("a").attr("href");
        var title = menuitem.children("a").attr("title");
        
        menuitem.css("cursor", "pointer");
        menuitem.attr("title", title);
        menuitem.click(function() {
            document.location = href;
        });
    });
    
	// Swap polaroids
	swapPolaroid();
	
    // Rounded corners
    //drawCorners($(".blockContent"), "10px bl br");
    
    // Extra margin in news block
    $("#blockNieuws h2").css("margin-bottom", "10px");
	
	// Lightbox - HdV
    $('.foto a').lightBox({
        txtImage: 'Afbeelding',
     	txtOf: 'van'
    });
});