$(document).ready(function(){
	var currentHeight = $('#consults').height() + 30;
	var neededHeight = 128;
	var delayTime = 500000;
	

		$('#consults').css('height',currentHeight+'px');
		$('.container .button').addClass('close').removeClass('open');
		
	//	if ($.cookie('closed'))
//		{
//		$('#consults').css('height',neededHeight+'px');
//		$('.container .button').addClass('open').removeClass('close');
//		}
//		 else 
//		{
//		$('.container .button').addClass('close').removeClass('open');
//		$('#consults').delay(delayTime).animate({height: neededHeight+'px'}, 1000, function() {
 // 		$('.container .button').addClass('open').removeClass('close')});
 //		 $.cookie('closed', neededHeight)
//		 };
		 $('#consults').css('behavior','url(/js/PIE.htc)');

    $('.container .button').click(function(){
		if ($('#consults').height()==currentHeight)
			{$('#consults').animate({height: neededHeight+'px'}, 1000, function() {
			$('.container .button').addClass('open').removeClass('close')})}
		else
			{$('#consults').animate({height: currentHeight+'px'}, 1000, function() {
			$('.container .button').addClass('close').removeClass('open')})}
    });
})

