$(function(){
	
	if ($.browser.msie && $.browser.version < 7)
		$('img[src$=.png]').pngfix();

	$('img[hover],input[hover]').imghover();

	$('textarea[initValue],input[initValue]').initValue();

	// Home top 3
	function activateHomeArt(ele,i) {
		$(ele).parent().find('>div').removeClass('active');
		$('#home_top3_reacties>div').hide();
		$(ele).addClass('active');
		$('#home_top3_reacties>div:eq('+i+')').show();
	}

	$('#home_top3_reacties>div').hide();
	$('#home_top3_art>div').each(function(i){
		if (i==0) activateHomeArt(this,i);
		$(this).hover(function(){
			activateHomeArt(this,i);
		},function(){});
	});
    
    $("#registersubmit").click(function() {
        $("textarea").each(function() {
            var ta = $(this);
            if (ta.attr("initValue") == ta.val()) {
                ta.val("");
            }
        });
    });
    
    $("#ecardsubmit").click(function() {
        $("textarea").each(function() {
            var ta = $(this);
            if (ta.attr("initValue") == ta.val()) {
                ta.val("");
            }
        });
    });

    if ($("#flashmovie").get(0)) {
        var flashVars = [];

        flashVars["autostart"] = "false";
        flashVars["file"] = "/media/evert-van-straaten.mp4";
        flashVars["controlbar"] = "none"; // over: 642 x 361 // bottom: 642 x 385
        flashVars["skin"] = "/flash/skins/afscheid/afscheid.xml";

        swfobject.embedSWF('flash/player.swf?v=1.0.0', 'flashmovie', '642', '361', '9.0.28', 'flash/expressInstall.swf', flashVars,
        {
            allowScriptAccess: 'sameDomain',
            allowFullScreen: 'true',
            bgcolor: '#000000',
            scale: 'noscale',
            quality: 'high',
            wmode: 'transparent',
            menu: 'false'
        });

    }

});

