$(function(){
	$("div.text_wrap").show();
	//accessibility - text sizers
	//accessibility.textresize();	
	//round the corners
	//$("#footer").positionFooter(false);  
        $("#searchbox").corner("cc:#fff bottom 5px");
        $("ul#navbar li a").corner("cc:#fff top 5px");
        //$("div.news h2, div.opinion h2, div.reads h2, div.system h2").corner("cc:#dedeef top 5px");
        $("div.boxed h2, div#promo_box_wrapper").corner("cc:#222 top 5px");
        $('.panel').corner("5px");
	$('#row1').equalHeights();
	$('#row2').equalHeights();
	$('input#keywords').example(function() {
		return $(this).attr('title'); 
	});
	$("div#promo_box ul").tabs({ event: "mouseover", fx: { opacity: 'toggle' } });
	$('#filter_date_start, #filter_date_end').datepicker();
	if ($('#charter').length > 0) {
		$("#charter").validate({
			submitHandler: function(form) {
			    $(":submit", form).attr("disabled", true);
			    form.submit();
			  },
			rules: {
			name: {
				required: true
			},
			email: {
				required: true,
				email: true
			},
			company_name: {
				required: true
			},
			action_1: {
				required: true,
				minlength: 5
			},
			action_2: {
				required: true,
				minlength: 5
			}
		},
		messages: {
			name: {
				required: "Please enter your name"
			},
			company: {
				required: "Please enter your company name"
			},
			action_1: {
				required: "Please tell us about an action you're going to champion in 2010-11"
			},
			action_2: {
				required: "Please tell us about a second action you intend to champion in 2010-11"
			}
		}
		});
		}
	});

