$(document).ready(function(){
	$('#content>h1').addClass('typeface-js');
	$("#footer>a").bind("click",function(){
		$("html, body").animate({scrollTop:"0px"}, "slow");
		return false;
	});
	$("#search_input").bind("focus blur",function(event){
		if(event.type=="focus"&&$(this).val()==$(this).attr("title")){
			$(this).val("");
		}else if(event.type=="blur"&&$(this).val()==""){
			$(this).val($(this).attr("title"));
		}
	});
	calendar.init();

	if($(".more_info img")!="undefined"){

		$(".agenda_content").css("display","none");
		$(".more_info img").bind("click",function(){
			if($(this).parent().parent().find(".agenda_content").css("display")=="block"){
				$(this).attr("src","images/btn_meer_informatie.png").parent().parent().find(".agenda_content").hide("slow");
			}else{
				window.location.hash ="jaaaa";
				$(this).attr("src","images/btn_minder_informatie.png").parent().parent().find(".agenda_content").show("slow");
			}
		});
	}
});

var calendar={
	init:function(){
		$('body').append($(document.createElement("div")).attr({"id":"calendar_cache"}).css("display","none"));
	},
	load:function(p_sUrl){
		var wrapper = $("#wrapper");
		if(!this.cashed(p_sUrl)){
			//-- load thru ajax
			wrapper.append($(document.createElement("div")).attr({"id":p_sUrl}).html("text voor"+p_sUrl));
		}else{
			//-- show cached
		}

	},
	cashed:function(p_sUrl){
		for(i=0;i<this.cache.length;i++){
			if(this.cache[i]==p_sUrl){
				return true;
				break;
			}
		}
		this.cache.push(p_sUrl);
		return false;
	},
	cache:new Array()
};



