$(document).ready(function(){	
						   
	//fix png in IE6
	if($.browser.msie && jQuery.browser.version.substr(0,2) < 7){
		$("img, div, span").css("behavior", "url('/css/iepngfix.htc')");
		//document.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML");
	}
	
	//close contact form
	$("#contactClose a").click(
		function () {
			$("#contactForm").hide();
            $("#overlayBg").hide();
		}
	);	
	
	//show contact form
	$(".contact").click(
		function () {
			$("#contactForm").show();
            $("#overlayBg").show();
			showtimer = window.setTimeout(showSifrAtContact, 10);
            $.get("/contact/token",function(txt){
                $("#ts").remove();
                $("#form1").append('<input type="hidden" id="ts" name="ts" value="'+txt+'" />');
            });
		}
	);	

	//close Hersenstichting form
	$("#HersenstichtingClose a").click(
		function () {
			$("#HersenstichtingOverlay").hide();
            $("#overlayBg").show();
            $("#overlayBg").hide();
		}
	);	
	
	//show Hersenstichting form
	$(".Hersenstichting").click(
		function () {
			$("#HersenstichtingOverlay").show();
            $("#overlayBg").show();
			showtimer = window.setTimeout(showSifrAtHersenstichting, 10);
		}
	);	

	//close Blueband form
	$("#BluebandClose a").click(
		function () {
			$("#BluebandOverlay").hide();
            $("#overlayBg").hide();
		}
	);	
	
	//show contact form
	$(".Blueband").click(
		function () {
			$("#BluebandOverlay").show();
            $("#overlayBg").show();
			showtimer = window.setTimeout(showSifrAtBlueband, 10);
		}
	);	    
	
	//fix image position of d block
	//var position = 17 - $(".d .img").height();
    //$(".d .img").css("margin-top", position);
});


var AdLibBT = { src: "/swf/AdLibBT.swf" };
sIFR.activate(AdLibBT);
sIFR.replace(AdLibBT, {
	selector: ".title h1",
	wmode: "transparent",
	css: [ ".sIFR-root {color: #f58220;}" ]
});
sIFR.replace(AdLibBT, {
	selector: ".container h1",
	wmode: "transparent",
	css: [ ".sIFR-root {color: #f58220;}" ]
});
sIFR.replace(AdLibBT, {
	selector: ".container h2",
	wmode: "transparent",
	css: [ ".sIFR-root {color: #ffffff;}" ]
});
sIFR.replace(AdLibBT, {
	selector: "#staticPage h3",
	wmode: "transparent",
	css: [ ".sIFR-root {color: #d91b5c;}" ]
});


function showSifrAtContact() {
sIFR.replace(AdLibBT, {
	selector: "#contactForm h3",
	wmode: "transparent",
	css: [ ".sIFR-root {color: #d91b5c;}" ]
});
}

function showSifrAtHersenstichting() {
sIFR.replace(AdLibBT, {
	selector: "#HersenstichtingOverlay h3",
	wmode: "transparent",
	css: [ ".sIFR-root {color: #d91b5c;}" ]
});
}

function showSifrAtBlueband() {
sIFR.replace(AdLibBT, {
	selector: "#BluebandOverlay h3",
	wmode: "transparent",
	css: [ ".sIFR-root {color: #d91b5c;}" ]
});
}

DD_roundies.addRule(".a", 7, true);
DD_roundies.addRule(".b", 7, true);
DD_roundies.addRule(".c", 7, true);
DD_roundies.addRule(".d", 7, true);
DD_roundies.addRule(".e", 7, true);
DD_roundies.addRule("#frame", 7, true);
DD_roundies.addRule(".title", 7, true);