/**
	removed as requested by client 20100222
jQuery(document).ready(function(){
	$(".start_date").datepicker({ dateFormat: 'yy-mm-dd' });
});
**/
$found = false;
$(document).ready(function() {
	$('div.bfm:eq(0) > div').hide();
 	/** 
		sets which div opens -example number 2 index 1
		$('div.bfm:eq(0) > div:eq(1)').show();
 	**/
 	$('div.bfm:eq(0) > div:eq(0)').show();
  	$('div.bfm:eq(0) > div').attr("class","");
  	$('div.bfm:eq(0) > h1').click(function() {
   		$(this).next('div').slideToggle('fast').siblings('div:visible').slideUp('fast');
   		$('div.bfm:eq(0) > h1').attr("class","");
   		$(this).attr("class",parseInt($(this).next('div').css("height"))<3?"ah1open":"");
   		//:
   	});
	$('div.bfm:eq(0) > h1:eq(0)').attr("class","ah1open");
  	
  	if($('div.bfm:eq(0) div:eq(0) p.error').length>0){
  		$('div.bfm:eq(0) > div').hide();
  		$('div.bfm:eq(0) > div:eq(0)').show();
  		$found = true;
  	}
  	if($found==false && $('div.bfm:eq(0) div:eq(1) p.error').length>0){
  		$('div.bfm:eq(0) > h1').attr("class","");
  		$('div.bfm:eq(0) > h1:eq(1)').attr("class","ah1open");
  		$('div.bfm:eq(0) > div').hide();
  		$('div.bfm:eq(0) > div:eq(1)').show();
  		$found = true;
  	}
  	if($found==false && $('div.bfm:eq(0) div:eq(2) p.error').length>0){
		$('div.bfm:eq(0) > h1').attr("class","");
  		$('div.bfm:eq(0) > h1:eq(2)').attr("class","ah1open");
  		$('div.bfm:eq(0) > div').hide();
  		$('div.bfm:eq(0) > div:eq(2)').show();
	}
});
$(document).ready(function() {
	$('div.bfm .number_children').show();
  	$('div.programme_container > div').hide();
  	$('div.programme_container:eq(0) > h2').click(function() {
    	$(this).next('div').slideToggle('fast')
    	.siblings('div:visible').slideUp('fast');
    	$('div.programme_container:eq(0) > h2').attr("class","");
   		$(this).attr("class",parseInt($(this).next('div').css("height"))<3?"ah2open":"");
   	});
});
