Cufon.replace('h1#header-title'); 

Cufon.replace('#tel');

Cufon.replace('#delicious'); 

var wdcount = 0;
function qof_cal() {

	if( $("input#how_manyboxes").val() != '')
	{
		if ($("#qof_boxtype").val() == 'Essentials')
		{
			price = essentials[$("input#how_manyboxes").val()] * wdcount;
		}
		else if ($("#qof_boxtype").val() == 'Seasonal')
		{
			price = seasonal[$("input#how_manyboxes").val()] * wdcount;
		}
		
		if( $("input#how_manyboxes").val() == '')
			price = 0;
		if( $("input#how_manyboxes").val() > 5 )
			price = 'TBA';
			
		$("#qof-price").val(price);
	}
}

$(document).ready(function() {

	$("#qof_whichbox input").click(function() {

		$("#qof_boxtype").val( $(this).val() );
		
		qof_cal();
		
	});
	
	
	
	$("#qof_which_days input").click(function() {
		wdcount = $("#qof_which_days input:checked").length;
		qof_cal();
	});
	
	
	$("input#how_manyboxes").keyup(function() {
		qof_cal();
		
	});



	$('input#your-name').click(function(){

		if ($('input#your-name').val() == 'Name'){

			$('input#your-name').val('');

		}

	});

	$('input#your-name').blur(function(){

		if ($('input#your-name').val() == '')

		$('input#your-name').val('Name');

	});
	
	
	
	$('input#your-telephone').click(function(){

		if ($('input#your-telephone').val() == 'Telephone'){

			$('input#your-telephone').val('');

		}

	});

	$('input#your-telephone').blur(function(){

		if ($('input#your-telephone').val() == '')

		$('input#your-telephone').val('Telephone');

	});
	

	$('input#your-email').click(function(){

		if ($('input#your-email').val() == 'Email address'){

			$('input#your-email').val('');

		}

	});
	
	

	$('input#your-email').blur(function(){

		if ($('input#your-email').val() == '')

		$('input#your-email').val('Email address');

	});

	

	$('textarea#your-question').click(function(){

		if ($('textarea#your-question').val() == 'Your question'){

			$('textarea#your-question').val('');

		}

	});

	$('textarea#your-question').blur(function(){

		if ($('textarea#your-question').val() == '')

		$('textarea#your-question').val('Your question');

	});
	
	$('input#post-code').click(function(){

		if ($('input#post-code').val() == 'Postcode'){

			$('input#post-code').val('');

		}

	});

	$('input#post-code').blur(function(){

		if ($('input#post-code').val() == '')

		$('input#post-code').val('Postcode');

	});
	
})


	function show_vdo(val,show)
	{
		if (show == 1)
		{
			var left;
			var screenWidth = document.body.clientWidth;
			
			var top = $(window).scrollTop();
			if(screenWidth <= 970)
			{
				left = 1;
			}
			else
			{
				left = $(window).scrollLeft()+((screenWidth - $('#'+val).width())/2);
			}
			top = top + 60;
			
			$('#'+val).css("top",top+"px");
			$('#'+val).css("left",left+"px");
			
			openLayerBC();
			$('#'+val).fadeIn("slow");
		}
		if (show == 0) {
			$('#'+val).fadeOut("slow");
			$('#layer').fadeOut('slow');
		}
	}

function openLayerBC()
{
	tWidth = $(document).width();
	tHeight = $(document).height();

	$('#layer').css("width",tWidth+"px");
	$('#layer').css("height",tHeight+"px");
	$('#layer').css('z-index',9999);
	$('#layer').fadeIn('fast');
}


